Smart Forms Data

download Smart Forms Data

of 49

Transcript of Smart Forms Data

  • 8/3/2019 Smart Forms Data

    1/49

    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 builtwith SMARTFORMS and press the Create command button.

    http://www.tripod.lycos.com/
  • 8/3/2019 Smart Forms Data

    2/49

  • 8/3/2019 Smart Forms Data

    3/49

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

  • 8/3/2019 Smart Forms Data

    4/49

    Select the Form Interface node and provide the names of the internal tablescontaining the data. (In this example we have a Customer table and a

    Customer's Transaction Table connected with an one to many relationship).

  • 8/3/2019 Smart Forms Data

    5/49

  • 8/3/2019 Smart Forms Data

    6/49

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

  • 8/3/2019 Smart Forms Data

    7/49

    In the initialization tab of the Global Definitions node, give the codecalculating the number of Customers. Input and output parameters should be

    provided so that the code works correctly.

  • 8/3/2019 Smart Forms Data

    8/49

  • 8/3/2019 Smart Forms Data

    9/49

    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.

  • 8/3/2019 Smart Forms Data

    10/49

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

  • 8/3/2019 Smart Forms Data

    11/49

  • 8/3/2019 Smart Forms Data

    12/49

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

  • 8/3/2019 Smart Forms Data

    13/49

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

  • 8/3/2019 Smart Forms Data

    14/49

  • 8/3/2019 Smart Forms Data

    15/49

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

  • 8/3/2019 Smart Forms Data

    16/49

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

  • 8/3/2019 Smart Forms Data

    17/49

  • 8/3/2019 Smart Forms Data

    18/49

    This series of Program lines, (actually a single Program line), increases theindex of Customers printed by one (Variable INDEX_CUST_PRN). Input and

    Output parameters should be declared on the appropriate fields of the tab (In

    this case the Input and the Output parameter is the variable

    INDEX_CUST_PRN).

  • 8/3/2019 Smart Forms Data

    19/49

  • 8/3/2019 Smart Forms Data

    20/49

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

  • 8/3/2019 Smart Forms Data

    21/49

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

  • 8/3/2019 Smart Forms Data

    22/49

  • 8/3/2019 Smart Forms Data

    23/49

    Specify a Table Width and a Line Type.

  • 8/3/2019 Smart Forms Data

    24/49

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

  • 8/3/2019 Smart Forms Data

    25/49

  • 8/3/2019 Smart Forms Data

    26/49

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

  • 8/3/2019 Smart Forms Data

    27/49

    Select the Header node and check the New Line checkbox.

  • 8/3/2019 Smart Forms Data

    28/49

  • 8/3/2019 Smart Forms Data

    29/49

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

  • 8/3/2019 Smart Forms Data

    30/49

    On the Global Attributes tab of the Text Element type the fields of the internaltable we wish to show on the form enclosed in ampersands. The Text node is

    Appended directly (check the relevant radio button).

  • 8/3/2019 Smart Forms Data

    31/49

  • 8/3/2019 Smart Forms Data

    32/49

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

  • 8/3/2019 Smart Forms Data

    33/49

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

  • 8/3/2019 Smart Forms Data

    34/49

  • 8/3/2019 Smart Forms Data

    35/49

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

  • 8/3/2019 Smart Forms Data

    36/49

    Select the Conditions tab of the Command element an set the condition that anew page is created if the last customer is not reached by the printing process (I

    e the Index of the Customers printed is less than the Number of Customers).

  • 8/3/2019 Smart Forms Data

    37/49

  • 8/3/2019 Smart Forms Data

    38/49

    Start another session and call the transaction SE78.

  • 8/3/2019 Smart Forms Data

    39/49

    Expand the Graphics node on the left hand side tree menu, select BMAP Gridscreens 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.

  • 8/3/2019 Smart Forms Data

    40/49

  • 8/3/2019 Smart Forms Data

    41/49

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

    Press the Continue command button.

  • 8/3/2019 Smart Forms Data

    42/49

  • 8/3/2019 Smart Forms Data

    43/49

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

  • 8/3/2019 Smart Forms Data

    44/49

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

  • 8/3/2019 Smart Forms Data

    45/49

  • 8/3/2019 Smart Forms Data

    46/49

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

  • 8/3/2019 Smart Forms Data

    47/49

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

  • 8/3/2019 Smart Forms Data

    48/49

  • 8/3/2019 Smart Forms Data

    49/49

    The function module SSF_FUNCTION_MODULE_NAME has as its importparameter a name of a Form created with SMARTFORMS and gives as output

    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 onlinkhttp://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae1000000

    9b38f842/frameset.htm . Or through the path Basis Components -> Basis

    Services / Communication Interfaces (BC-SRV) -> SAP Smart Forms (BC-

    SRV-SCR) .

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/Z_EXAMPLE_OF_SMARTFORMS.TXThttp://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/Z_EXAMPLE_OF_SMARTFORMS.TXThttp://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htmhttp://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htmhttp://help.sap.com/saphelp_46c/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htmhttp://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.TXThttp://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/Z_EXAMPLE_OF_SMARTFORMS.TXT