Step-by-step approach in creating a PO Layout using Smart Forms

...Previous 

22.               Right click the “ADD_WIN Address Window” in the Left Sub-tree and from the Menu option “Create” à select the “Address”.

23.               Double click the “%ADDRESS1 New address1” and change the Address name and description (e.x. Address = COMP_ADD and Description = “COMPANY ADDRESS”).

24.               Select the Type of the address in the “General attributes” Tab. (Since we are retrieving the Organization address, we selected the first radio button) and in the Address number text box pass the V_ADRNR Variable as &V_ADRNR&. 

25.               Set the Main window attributes like this: (Setting of window co-ordinates)

26.               Right click the “MAIN Main Window” in the Left Sub-tree and from the Menu option “Create” à select the “Program Lines”.

27.               Enter the name and description (e.x. Program Lines = “SELECT_RECORD” and Description = “SELECTING RECORDS”).

 

28.               Enter the Input Parameter as  COMPANY_CODE and Output Parameter as I_EKKO and I_EKPO in the “General attributes” Tab and write the select query as following:

SELECT EBELN BUKRS

       INTO TABLE I_EKKO

       FROM EKKO

       UP TO 10 ROWS

       WHERE BUKRS EQ COMPANY_CODE.

IF SY-SUBRC EQ 0.

  SORT I_EKKO BY EBELN.

  SELECT EBELN EBELP MENGE NETPR

         INTO TABLE I_EKPO

         FROM EKPO

         FOR ALL ENTRIES IN I_EKKO

         WHERE EBELN EQ I_EKKO-EBELN.

  IF SY-SUBRC EQ 0.

    SORT I_EKPO BY EBELN EBELP.

  ENDIF.

ENDIF.

29.               Right click “MAIN Main Window” in the Left Sub-tree and from the Menu option “Create” à select the “Complex Section”.

30.               Enter the Section name and description (e.x. Section = “PO_LOOP” and Description = “PURCHASE ORDER NUMBER LOOP”) and check the “Repeat processing” check box and select the “Output type” as Unstructured (i.e. select the Unstructured radio button) in the “General attributes” Tab.

31.               Select the “Data” Tab.

32.               Enter the Internal Table Name as I_EKKO and Work area name as WA_EKKO and sort by the BUKRS and EBELN fields.

33.               Right click “PO_LOOP PURCHASE ORDER NUMBER LOOP” in Left Sub-tree and from the Menu option “Create” à select the “Text”.

 

34.               Enter the Text name and description (e.x. Text = “PO_NO_DISPLAY” and Description = “PURCHASE ORDER NUMBER DISPLAY”) and enter the values as in the screen shot

Click the Text Editor

Display the values of Company Code and Purchase Order Number as shown below:

 

Press Back Button, then Press Save and Check Buttons

 

35.               Right click the “PO_LOOP PURCHASE ORDER NUMBER LOOP” in the Left Sub-tree and from the Menu option “Create” à select the “Template”.

36.               Double click on “%TEMPLATE1 New template” and enter the Template name and description (e.x. Template Name = “OI_HEAD” and Description = “ORDER ITEM HEADER”).

 

Before press save or enter click the “Table Painter Button” which will take you to following screen.

To avoid the “cross line” in the Editor click the “Settings Button”

which will result in the following popup, in which you un-check the “Cross” Check Box and press enter.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image