Stefanos Moschidis - SAP Certified Technical Consultant

Embed Size (px)

Citation preview

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    1/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html

    Stefanos Moschidis - SAP Certified Technical Consultant - How to build a Form with SMARTFORMS

    Call the transaction SMARTFORMS . Enter a name of a new Form to be built with SMARTFORMS and press the Create command button.

    The Form Builder appears on the screen. Any node can be selected or expanded from the left hand side tree menu.

    https://www.googleadservices.com/pagead/aclk?sa=L&ai=Cvc7XiDh3V56TK4ipvATGnoyIB7zB8oZFzIPC8-AC_Oy4uJEFEAEgnP2PLGDl0uaDvA6gAeL55ewDyAEC4AIAqAMByAOZBKoE_wFP0ITd2fibGRTXlPp4flTkxsbZaMfylIlNWziYb7cRXkXaUxERqhT52OFdOrPS9JgYGAWAwZ-PFB0w-CwEFni8b-JJBqp7tMgn1RHb9pR05G-16bnU6qq1W0Kzs4DPqTl75hGkUuHtMOLIg-bsTh8tcMhgwSlj3vc3W4DBccF5gG1j1Xnnhr2o9h6UX85gmah_O_y61k1VcITuFufymsHHEfi7HG1tGKXsvb4ta42C61mqAhzJxURB652YeHnsNdiwa1nVb0SFWnp8W2Xa7xEN6zjT-7hVQenutaMfNiWZOiOzdV90q-2WiTbkNyzNm-zpORO6vUQ5nzmSorM9247gBAGIBgGgBgKAB4aGmhOoB6a-G9gHAQ&num=1&cid=CAASEuRoRl55zuWpaknAvVmez-pU6g&sig=AOD64_2hkmiyImeQhDz08OEYOjmyBZGfuQ&client=ca-pub-4304283602670086&adurl=https://www.expressvpn.com/in/%3FrefID%3DIN_RD_Bhttp://adtrack.ministerial5.com/clicknew/?a=637394
  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    2/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    Select the Form Interface node and provide the names of the internal tables containing the data. (In this example we have a Customer table and aCustomer's Transaction Table connected with an one to many relationship).

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    3/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 3

    Select the Global Definitions and provide the names of two variables for controlling the page break after finishing a section of a Customer.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    4/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 4

    In the initialization tab of the Global Definitions node, give the code calculating the number of Customers. Input and output parameters should beprovided so that the code works correctly.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    5/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 5

    After expanding the %PAGE1 node, we can notice that a Main Window exists. From the context menu (appearing by clicking the right mouse button)of the Main window select Create -> Complex Section.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    6/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 6

    This Section has data which are processed repeatedly and the Output Type (the format) is Unstructured.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    7/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 7

    The data of this Section are retrieved from the internal table I_ZCUST and are stored in the data structure I_ZCUST in each iteration.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    8/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 8

    At this point select the context menu of the Section and create a Text Element.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    9/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 9

    Type the names of the fields of the internal table in the General Attributes tab. The field names are enclosed in ampersands.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    10/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    From the context menu of the Text Element create a series of Program lines.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    11/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    This series of Program lines, (actually a single Program line), increases the index of Customers printed by one (Variable INDEX_CUST_PRN). Inputand Output parameters should be declared on the appropriate fields of the tab (In this case the Input and the Output parameter is the variableINDEX_CUST_PRN).

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    12/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    From the context menu of the Program Lines create a second Complex Section.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    13/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    This Section has data which are processed repeatedly. The Output Type (format) is a table.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    14/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 14

    Specify a Table Width and a Line Type.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    15/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    Select the Data tab and specify the Loop in the I_ZTRANSACTIONS table and the Where condition.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    16/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    On the Events tab select the Header and Footer events and specify a Height of the Footer.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    17/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    Select the Header node and check the New Line checkbox.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    18/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    At this point from the %Section2 context menu select Create -> Text.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    19/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 1

    On the Global Attributes tab of the Text Element type the fields of the internal table we wish to show on the form enclosed in ampersands. The Textnode is Appended directly (check the relevant radio button).

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    20/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    From the context menu of the Footer Event select Create -> Command .

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    21/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    Drag the %Command1 created and drop it on the %Section2 node. A popup window appears and select After the node %Section2.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    22/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    So the %Command1 is aligned to the Footer of %Section2. Check the Go to New Page checkbox.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    23/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    Select the Conditions tab of the Command element an set the condition that a new page is created if the last customer is not reached by the printingprocess (I e the Index of the Customers printed is less than the Number of Customers).

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    24/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 24

    Start another session and call the transaction SE78.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    25/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    Expand the Graphics node on the left hand side tree menu, select BMAP Grid screens node and double click on it. On the right hand side provide the

    SAP name of a new graphic and check the Color radio button. Press the Import command button.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    26/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    On the appearing popup window provide the path where the bitmap image is stored and check the checkbox stating that Resides in the Printer Memory.

    Press the Continue command button.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    27/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    The appearing screen shows that the graphic has been successfully imported into the SAP graphics management.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    28/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    Go back to the session of SMARTFORMS and select the %PAGE1 node. From the context menu select Create -> Graphic .

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    29/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 2

    On the General Attributes tab of the %Graphic1 created type the SAP Name of the graphic and provide the Object, ID, Color attribute and Resolution.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    30/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html 3

    Activate the Form from the menu path Form -> Activate.

  • 7/25/2019 Stefanos Moschidis - SAP Certified Technical Consultant

    31/31

    7/2/2016 Stefanos Moschidis - SAP Certified Technical Consultant

    The function module SSF_FUNCTION_MODULE_NAME has as its import parameter a name of a Form created with SMARTFORMS and gives asoutput a function module name. The latter when executed with table parameters the internal tables of the SMARTFORMS Form, gives the final

    printout. The following code is an example of calling the Form created on the previous steps.

    Further reading in the SAP Library on link http://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm . Orthrough the path Basis Components -> Basis Services / Communication Interfaces (BC-SRV) -> SAP Smart Forms (BC-SRV-SCR) .

    http://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htmhttp://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/Z_EXAMPLE_OF_SMARTFORMS.TXT