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' 

Thursday, 29 December 2011

SAPSCRIPT all about ...

What is SAPSCRIPT?


SAP script is the SAP System’s own text-processing system. It is like other leading text-processing systems. It is used to print preformatted text in pre-formatted forms.

Transaction code for SAPSCRIPT
SE71 - Form Painter
SE71 - Styles Maintenance
SE78 - Sapscript Graphic Management
SO10 - Create Standard Text Module

SAPSCRIPT vs Report
Sapscript is a form that has a layout set as per company standards and can be used for external use too.
Reports generally designed for internal use for internal users.

SAPSCRIPT vs SMARTFORMS
Things that can and can't do:
Title
SAPSCRIPT
SMARTFORMS
Table
simulated by the use of tabulations, so they can't contain dynamic long texts, no borders
True tables, with borders
Main window
can have several ones, useful for printing several identical labels per page
can have only one
XML/HTML
No
Smart Forms generates XML output which can be viewed through the web
Page format
One only
Several page formats are possible
Color
No
Yes
Make copies look different

Use of "Copies" windows
Barcode
Printer-dependent, only works with printers that are able to generate barcodes by themselves (natively or addition of SIMM); few printers supported by SAP
New barcode technology: SAP converts barcode data into an image, so it works for all device types which are able to print graphics
 Development of these forms:

SAPSCRIPT
SMARTFORMS
client dependent
client independent

It is possible to create a Smart Form without a main window
Data extraction/calculation and form output are mixed together
Separation of concerns: Data extraction must be done once at the beginning, they are passed to the smart form once at the end

Enhanced Form Builder

On activation a function module is generated for Smart Forms
conditions like if..endif, case..endcase inside a window
exists as conditions on windows