Tuesday, 3 January 2012

Orientation in SAPSCRIPT

This is very important for developer to know the orientation in Sapscript. As a developer, we must know the basic function modules needed during creating program and calling Sapscript form. Below are the most important Function Modules to call the Sapscript form from driver program:


1. Call function 'OPEN_FORM'
2. Call function 'START_FORM'
3. Call function 'WRITE_FORM'
4. Call function 'END_FORM'
5. Call function 'CLOSE_FORM'

Reading Text in SAPSCRIPT

If you only need to output the text, you don't need to used READ_TEXT like in an ABAP program,
just use the INCLUDE command in SAPScript.
It will read the text and output it to your form.


The Syntax is like this: 
/:  INCLUDE <text name> OBJECT <object> ID <id> LANGUAGE <language>
eg:
1. From standard text (SO10)






/: INCLUDE 'Z_TEST_TEXT' OBJECT 'TEXT' ID 'ST' LANGUAGE 'EN'
2. with paragraph declaration
/:  INCLUDE <text name> OBJECT <object> ID <id> LANGUAGE <language> NEW-PARAGRAPH <paragraph>
/: INCLUDE 'Z_TEST_TEXT' OBJECT 'TEXT' ID 'ST' LANGUAGE 'EN' NEW-PARAGRAPH 'DG'
3. From header text (eg. VA02 --> GoTo --> Header --> Texts --> Header )











/: INCLUDE '0100001299' OBJECT 'VBBK' ID '0001' LANGUAGE 'EN'