Professional Documents
Culture Documents
SAP ABAP - Operators Scripts are older version of SAP print forms. SAP Scripts are client dependent Search Semiconductor Here
and not visible to other clients. Transistor Diode Capacitor MOSFET IGBT Amplifier
SAP ABAP - Decision Control
Statements Advanced version of script is client independent and they will be visible in all ALLDATASHEET.COM Open
SAP ABAP - Loop Control statements SE71 is the transaction code for SAP scripts. The SAP system has a standard
SAPscript forms that are used as a template for form creation.
SAP ABAP - Exception Handling
SAP ABAP - Data Dictionary The SAPscript form structure contains of 2 key components −
Function Description
module
About Us ▼
Seleccionar idioma
START_FORM used to call another SAP Script into current SAP Script
(Nested Scripts).
Example:
Simple example to implement SAP scripts in writing a Report from the table.
1. Creating Script
Below are the step by step process for creating the script.
Step-1: Go to SE71 transaction. It opens the ‘Form painter: Request’ screen. Enter
the Form name with starting letter is Z or Y and select ‘page layout’ as
subobjects. In this case, the form name is ‘ZPRODUCT1 and click on Create
button.
Step-2: It will open information dialog to create ZPRODUCT1 and click on green
tick mark.
Step-6: Click on Character Formats to create custom character format like below.
Step-7: Click on Paragraph Formats to create a new paragraph like below.
Step-8: Click on Windows button to create the new window like below.
Step-9: Click on Page windows button to configure the windows under the page.
Click on Edit > Create Element to add the window.
Step-10: Add main page as first one, HEADER page as second one and their
alignments like below.
Step-11: go to edit and click on text element to enter some content like below.
Step-12: Click on back to exit from Window header. Go to settings > Form
painter.
Step-13: In SAPScript tab, check both options and click on right tick mark.
Step-14: It opens the page layout like below. Review the layout.
Step-15: To close this layout go to setting > form painter and uncheck the
graphical form painter.
Step-16: Enter the default paragraph and First page name in the below screen
on ‘basic settings’.
REPORT Z_SCRIPT_PROG.
START-OF-SELECTION.
PERFORM display_script.
FORM display_script.
IF sy-subrc <> 0.
MESSAGE 'Form is not opened successfully' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
MESSAGE 'Form is not started successfully' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
WRITE: 'Head not written', sy-subrc.
ENDIF.
IF sy-subrc <> 0.
MESSAGE 'Heading not written' TYPE 'I'.
ENDIF.
.
IF sy-subrc <> 0.
MESSAGE 'Form is not ended' TYPE 'I'.
ENDIF.
.
IF sy-subrc <> 0.
MESSAGE 'Form is not closed' TYPE 'I'.
ENDIF.
WRITE: 'Report completed..'.
ENDFORM.