SAP Scripts - Form Painter



The Form Painter tool provides the graphical layout of a SAPscript form and various functionalities to manipulate the form. In the following example, we will create an invoice form after copying its layout structure from a standard SAPscript form RVINVOICE01, and display its layout by accessing the Form Painter tool.

Open the Form Painter. You may request the screen either by navigating the SAP menu or by using the SE71 Transaction code.

Step 1 − In the Form Painter, request screen, enter a name and language for a SAPscript form in the Form and Language fields, respectively. Let’s enter 'RVINVOICE01' and 'EN' respectively in these fields.

RVINVOICE01

Step 2 − Select the Page Layout radio button in the Subobjects group box as shown in the above screenshot.

Step 3 − Select Utilities → Copy from Client to create a copy of the RVINVOICE01 form.

Copy of RVINVOICE01

The 'Copy Forms between Clients' screen appears.

Step 4 − In the 'Copy Forms Between Clients' (following) screen, enter the original name of the form, 'RVINVOICE01', in the Form Name field, the number of the source client '000' in the Source Client field, and the name of the target form as 'ZINV_01' in the Target Form field. Make sure that other settings remain unchanged.

Copy Forms Between Clients

Step 5 − Click the Execute icon in the 'Copy Forms Between Clients' screen. The 'Create Object Directory Entry' dialog box appears. Enter the Package name to save the object. Click the Save icon.

Execute Icon

The ZINV_01 form is copied from the RVINVOICE01 form and displayed in the 'Copy Forms between Clients screen'.

Click the back icon twice and navigate back to the Form Painter: Request screen, which contains the name of the copied form ZINV_01.

After clicking the Display button, the 'Form ZINV_01: Layout of Page FIRST' window and the 'Form: Change Page Layout: ZINV_01' screen appears as shown in the following screenshot.

Page Layout

The 'Form ZINV_01: Layout of Page FIRST' window shows the initial layout of the form. The layout of the form contains five windows: HEADER, ADDRESS, INFO, INFO1, and MAIN. The description of these windows can be accessed in PC Editor.

For instance, by just selecting the MAIN window and clicking the Text icon in the 'Form: Change Page Layout: ZINV_01' screen, you can view all the margin values.

Advertisements