SAP Scripts Interview Questions


SAP Scripts Interview Questions: Exploring the Versatility of SAP Scripts for Document Customization

1) What are the Components of SAP Script (Form Painter/Layout set)?

Ans: SAP Script form contains 2 parts.

1. Form painter (Layout Set) 
2. Print Program

 1. Header: It maintains the Administrative & basic settings data.

a. Administrative data:

➢ It contains the technical details such are Package name, Changed by, Created by, etc.

b. Basic data:

➢ It is used to maintain the default settings which can be applied across the forms.
➢ TheBasic settings are page format, orientation, font size, etc.
➢ The first page & the default paragraph names must be specified once they are created.

 2. Pages:

➢ They are the rectangular format of the documents.
➢ This element is used to maintain the next page, print mode, page counter mode, etc.
 
3. Windows:

➢ They are the small components on the pages.
➢ We can place the same window on any no of pages.
➢ The windows are not positioned on the pages unless they are assigned to the pages.
 
4. Page window:

➢ They are used to position the window on the pages.
➢ Different position attributes Left margin, upper margin, Window width, and Height are
maintained. It is used to place the window on the page with coordinates.

 5. Paragraph format:

➢ They print/format the entire paragraph with the required format & style.

a. Standard Attributes: It is used to maintain the standard attributes such are alignment,
line spacing, left margin, right margin, etc.

b. Font Attributes: They are used to maintain the font setting such are font family, font
size, bold, italic, etc.
 
6. Character format:

➢ They are used to print/format the particular text/string with the required font & style.
➢ They can also be used to select the Bar codes.

a. Standard Attributes: It is used to select barcodes, superscripts, subscripts, etc.

b. Font Attributes: They are used to maintain the font type, font size, bold, italic, etc.

2. Print Program or Driver Program:

➢ The Driver program is used to extract the data from the database tables or views,
process the extracted data & pass the processed data to SAP Script form to
display/print on the document.

2) What are the different types of Windows?

Ans: 

Windows: - They are used to define the different types of windows.

➢ Following are the different types of windows.

Main Window: It is the default widow. It is used to display the continuous text on
the pages. Without the main window, we can’t design SAP scripts. The system
generates the pages dynamically for the main window. Up to 99 main windows can be
created in a form. The window type is ‘MAIN’.

Constant Window: This window contains the static content which can be
formatted only once to print/display the same contents on all the pages.

Variable Window: It prints the data based on the window size. It can be
formatted for each page to print/display the different contents. Without a variable
window also we can design the SAP script.

Graphic Window: It is used to print/display the graphics/logos on the page.


3) What are the different types of Symbols in Scripts?

Ans: - The Symbols are the constants that can be inserted n the page windows to display/print the
corresponding contents/data. Symbols are of 3 Types.
 
1. System Symbols: They display the system data such as date, time, etc.
Ex: &DATE&, &DAY&, &MONTH&



➢ The system provided standard structure SAPSCRIPT contains some of the SAP Script
system fields.

Note: The number of pages like 1 or 10 can be displayed using the system symbols PAGE &
FORM PAGE as below.

Ex:&PAGE&of&SAPSCRIPT-FORMPAGES&
 #
2. Standard Symbols: They are predefined symbols. The pooled table TTDTG is used to
 maintain the standard symbols.

3. Application Symbols: These display/print the processed data from the print
program or database. Ex: &WA_T001-BUKRS&


4) What are the different TAG columns in SAP Script form?

Ans:



5)What are the Function Modules associated with Scripts?

Ans:-

#
1. OPEN_FORM: 
➢ #
➢ The global data variables of the print program can be accessed in SAP Script form
after this function, a module is called to open a form/used.

2. START_FORM:
➢ This function module is used to specify the starting page from where the
document to be printed or displayed.

 3. WRITE_FORM:
➢ This function module is used to pass the multiple entries of an internal
table into the SAP Script form to print/display the multiple entries or
line items through the Text Elements.

4. END_FORM:
➢ It is an optional function module that is used to End the started Form.

5.CLOSE_FORM: 
➢ This function module is used to close the Opened Form & send the
Spool Request/Print to the device.
➢ It can also be used to get the SAP Script form data into OTF(Other Text) format.
Note: The standard function module CONVERT_OTF or CONVERT_OTF_2_PDF can
 convert the SAP Script OTF Data into PDF format.
➢ The standard function module SO_NEW_DOCUMENT_ATT_SEND_API1 is used to
send an email with the required attachments in different formats.

6. CONTROL_FORM:
➢ This function module is used to control the form by creating the pages or windows
dynamically.
Note: An icon Transport (Lorry icon) or in the menu path, Graphic -> Transport is used to
generate transport requests to release LOGOs from one system to another system.
6) What are the different ways to debug the Script?

Ans: - 

There are two ways to debug the Script Form.

➢ The path SE71 --->Utilities --->Activate debugger.
➢ By executing Standard Program/ Report -  RSTXDBUG.
7) Differentiate between Page1 & Page2 format in sap script?

Ans: 

Page1 format: In this, all pages have the same design.
Page2 format: In this, there is variation in page format i.e. first page has a different format than
the second page.

8) Some of the useful Control commands/Statements in SAP scripts?

Ans:

 1./: Address…Endaddress: It is used to display the address details of the given address
 number in the standard format.

Syntax: /: ADDRESS
/: ADDRESS number &GS_KNA1-ADRNR&.
/: ENDADDRESS
 
2. /: Set Date mask: This command is used to print/format the system Date in the required format.
Syntax: SET DATE MASK = ‘<DD.MMMM.YYYY>’.
 * Date: &DATE&

3. /: Set Time Mask: This command is used to print/format the system Time in the required format.
Syntax: /: SET TIME MASK = ‘ SS:MM:HH ’.

Note: Pass blank spaces to the formatted date & time to format them into default format.
➢ There are no loop statements in SAP Script forms but the text elements can be used to
communicate with the function module WRITE_FORM used within the loop of the print
program to display the multiple entries.

Text Element:
➢ Text Element is the name given to the block of statements in the page window. If we pass the
text element name to the WRITE_FORM function module then the WRITE_FORM function
module transfers the data from the driver program to all the available statements
under Text Element.
➢ Whenever we are working with the main window, then we must provide the Text Element name,
otherwise, the 1st information is printed twice.

 4. Protect…End protect: It is used to print the continuous text without any page breaks in SAP
Script forms.1st the system checks each & every page to determine which page has enough place
to print the constant text. If no page has enough space it simply breaks the text &
printing on different pages.
Syntax: /: PROTECT
 /E ELE
 /: ENDPROTECT
 
5. Define: This command is used to define/declare the symbols in SAP Script.
 Syntax: /: Define &GV_SYMBOL&

6. Box: This command is used to draw the Boxes/Frames on the page windows.
Syntax: /: BOX XPOS <**> cm/mm YPOS <yy> cm/mm
 /: WIDTH <ww> cm/mm HEIGHT <yy> cm/mm
 /: FRAME <FF> TW INTENSITY <yy> TW

Note: An additional INTENSITY is used to gray out the boxes.
➢ The command position & size can also be used to define the box position & sizes.

8. Top…End Top: This command is used to display/print the contents at the Top portion/Header
of the specified window.
Syntax: /: TOP
 /* Display/Print at Top of the page window.
 /: ENDTOP

9. Bottom…End bottom: This command is used to display/print the contents at the
 Bottom/Footer portion of the specified window.
Syntax: /: BOTTOM
 /* Display/Print at the bottom of the page window.
 /: ENDBOTTOM

10. New Page: This command generates the next pages.
Syntax: /: NEW-PAGE.

11. New-Window: This command is used to generate the new windows.
Syntax: /: NEW-WINDOW.

10) How to add functionality to the script without modifying the print (driver) program?

Ans: - The Form Routines (PERFORM ......END PERFORM) are used to add the additional
functionality to the SAP Script form without changing the print program.


11) What are client-dependent objects in ABAP/sap?

Ans: SAP Script layout, text element, and some DDIC objects.


12) Can we call another Form from the same print program in the sap script?

Ans: We can call other forms in the same print/driver program.


13) How to copy the Standard Script and make the changes?

Ans:- The path SE71--->Utilities---> Copy From Client can be used and make the necessary
changes.

14) How to convert the language from DE to our required language?

Ans: 

In SE71, Utilities ->Convert Original Language, Provide the To Language & press Enter


15) How to transport text elements in SAP ABAP?

Ans: 

If it is the first time, they will automatically transport along with the program, if you change them
next time, it will ask for TR, you can move that TR

16) What are the Standard Texts?

Ans:- 

The Standard texts maintain the Long text using the T-Code SO10.
➢ The command INCLUDE….OBJECT is used to insert the standard text on the page window.
Syntax: /: INCLUDE <ZSTP_TEXT_NAME> OBJECT <obj-name>
ID <id_name> LANGAUGE <EN/..>
➢ The standard function module READ_TEXT can also be used in the programs to read
standard text & application text.
➢ By Default the System doesn't generate any transport request for standard texts.
➢ The standard Report RSTXTRAN is used to generate the Transport Request number for
Standard texts.

17) Tell some of the Standard Scripts and Print programs?

Ans:-

Some of the useful Standard Script Forms and Print programs:-



18) How to execute the program in the background?

Ans: 

Execute SE38, provide the program name & Execute, provide the Input
In the Menu bar, click on program -> Execute in Background
Provide the output device LP01 & click on enter
Click on Immediate & save.

19) How to copy the SAP script from 800 clients to 810 clients?

Ans: 

In the Target client 810, Execute SE38 & Provide the program name: RSTXFCPY & Execute
 Provide the Form name, In source client 800, Provide the Target Form name & Execute.
➢ All the standard script forms are available in client 000.

20) Explain some of the Symbol Formatting Options in Scripts?

Ans: 




21) How to format the date, time, and country in Scripts?

Ans:- The commands SET DATE MASK, SET TIME MASK, and SET COUNTRY can be used to
 format the date, time, and country.

22) How do we display the Application Texts?

Ans:-

Using the Function Module READ_TEXT.

23) How to split the line into the next line in Scripts?

Ans:-

The Function Module RKD_WORD_WRAP is used to split the text into multiple lines.

24) What are the fields in ITCSY Structure?

Ans:-


The standard structure is used as a reference to the Import & Export of the symbol with the form routines in SAP Script form.

25) How do we create/maintain different styles in Scripts?

Ans:- 

The T-Code SE72 is used to maintain the SAP Script Form Styles such is Paragraph
Formats, Character formats. Barcodes are maintained in the Character Format.


26) What are the ways to upload the Logos and display them?

Ans: - 

The T-Code SE78 (or) the standard report RSTXLDMC is used to upload the LOGOS/IMAGES

➢ Whenever we are working with .BMP image, we must convert .BMP to graphics 
using SE78 T-code.
➢ Whenever we are working with.TIFF image then we must convert TIFF to text image by
using RSTXLDMC standard program.

27) How can you pass the data to the Script from the Print program without using WRITE_FORM?

Ans: - 

After Accessing the Fun. Module OPEN_FORM we can declare the Global data.


28) How to develop the SAP Scripts in Diff. languages?

Ans: -

In SE63, Click Translation --->Long Texts --->Sap scripts---> Forms.

29) How to convert sap script spools request to PDF?

Ans: - RSTXPDFT4.

30) How to convert/migrate sap scripts to Smart Forms?

Ans: - 

Execute SMARTFORMS & Enter the New Smart Form name
The path SMARTFORMS --->Utilities --->Migration ---> Import SAP script Form
Enter the Existing SAP script Form name & click on the Yes button.

31) How to set the output device LP01 by default in our own pc?

Ans:

Execute SU01 & provide the user name as SAPUSER, click on Change mode
Click on the Default tab & provide the output device LP01
Select the required decimal notation (1,234,576.89) & date format & click on save.

32) How to identify the driver program based on the form name?

Ans:

Execute SE11, open the Table TTXFP & Click on Display & Click on Contents
Provide the Form name & Execute, Identify the Driver program.

33) What are the Transaction Codes associated with Scripts?

Ans:


➢ Bar codes can be selected under The Standard Attributes tab.
➢ The T-code SLXT is used to generate Transport Request for Translations

34) Standard reports associated with SAP scripts?

Ans:

 RSTXDBUG -> Activate/Deactivate from a debugger
 RSTXLDMC -> To upload Graphics/Logo
 RSTXSCRP -> Download/Upload the Forms, Styles & Standard Text
 RSTXPDFT4 -> To convert the spool job of the SAP script into PDF format
 RSTXFCPY -> Copy the SAP script from one client to another
 RSTXTRAN -> To create Transport Request for standard text


35) What are the tables associated with Scripts?

Ans:- TNAPR

36) How to generate Transport Request for Translations?

Ans:

➢ Execute the T-code SLXT
➢ Select the required target language (DE)
➢ Enter the required text element/text symbol name (%TEXT1) in the description
➢ Select a radio button workbench request
➢ Click on execute


37) What is SAP Script, and how does it differ from Smart Forms and Adobe Forms in SAP?

Ans:

SAP Script is a form printing and design tool used to create and modify layout sets for forms in the SAP system. It is based on procedural language and uses a programming language called "Print Control Language" (PCL). On the other hand, Smart Forms and Adobe Forms are newer form printing and design tools in SAP that use graphical interfaces and are based on object-oriented programming.

38)How do you create a layout set in SAP Script, and what are the components of a layout set?

Ans:

To create a layout set in SAP Script, you need to define a Form, Page, and Window. A Form represents the entire form, a Page represents a single page of the form, and a Window represents a portion of a page where the actual data is printed. The components of a layout set include Elements (such as Text, Graphics, and Barcodes), Windows, and Page Windows.

39)How do you pass data to an SAP Script form from an ABAP program?

Answer:

To pass data to an SAP Script form from an ABAP program, you can use Function Modules such as OPEN_FORM, WRITE_FORM, and CLOSE_FORM. OPEN_FORM is used to start the form processing, WRITE_FORM is used to write data to the form, and CLOSE_FORM is used to end the form processing. You can also use the EXPORT and IMPORT statements to pass data between the ABAP program and the SAP Script form.

40) Difference between sap script and smart forms?

Ans:

  • Design Interface: SAP Script uses a text-based interface with a procedural language, while Smart Forms have a graphical interface with drag-and-drop functionality.
  • Maintenance: SAP Script requires a separate maintenance transaction and has limited options for reusing form components, while Smart Forms have a built-in form builder and automatically reflects changes in the ABAP program calling it.
  • Functionality: SAP Script has basic form printing features, while Smart Forms have advanced features like dynamic tables and support for Adobe Forms.
  • Integration: SAP Script is compatible with older SAP systems, while Smart Forms are recommended for newer implementations.
  • Migration: SAP Script forms can be migrated to Smart Forms, but may require manual adjustments and thorough testing.

Post a Comment

0 Comments