Start of Content Area

Procedure documentation Creating Form Levels  Locate the document in its SAP Library structure

Use

You create form levels to add structures to the dataset of a form class; these structures are in a 1:n relationship to existing form levels.

Prerequisites

Form levels are in a 1:n relationship to another. This relationship should always agree with the actual relationship in the data model – otherwise the hierarchy has a design error that has a negative effect on the use in application forms and the enhancement of the form class. This means that for n=1, you should use 1:1 levels.

Procedure

...

       1.      In the Print Workbench menu choose Form Class ® Process.

       2.      If form levels exist, place the cursor on an existing form level.

       3.      Choose Edit ® Create ® Lower Level or Edit ® Create ® Same Level depending on the hierarchical relationship of the new form level.

       4.      In the following dialog box, enter a maximum ten character name for the form level and if necessary, choose the node type Form Level. The name of the form level is binding and unique within a form class and should be fitting. Enter a short text and the output structure. If the indicator Smart Forms is set in the attributes of the form class, also enter the name of the generated structure and the generated table type.

       5.      Choose Continue.

The new form level is inserted into the hierarchy. Create the related READ and GET subprograms by selecting the symbols R and G in the hierarchy. If the form class library has not been created yet, the program is created automatically by the Print Workbench. In the READ or GET form routines, implement the coding for procuring the relevant data for the form level. In the READ subprogram you can first read all the relevant data and can only fill the relevant subareas in the required internal table in the GET subprogram. Alternatively, you can procure all the relevant data in the GET subprogram. Note that you can call the GET subprograms several times. You should therefore buffer to reduce the effect on performance.

This graphic is explained in the accompanying textYou are responsible for initializing the global data area <WA_*>. Since the generated programs are function groups, the values in the global data areas are retained if you call a form or form routine again.

Result

You have created a form level and implemented the relevant data procurement in the relevant subprograms of the form class library. You can now include the form level in an application form and test that the subprograms work correctly. You can create additional form levels or 1:1 levels for the form level.

 

End of Content Area