Tuesday, February 9, 2010

SAP script

Q1)+ How can I get the Landscape format in SAP script?
Ans:- In the form,
à Go to ‘Basic settings’,
à here you can find the ‘Landscape format’ option, Click on it,
à and at the bottom, you can find the ‘page’ option,
à Enter the page name for which you want to assign landscape format.

Q2)+ How can I change the page size of the layout?
Ans:- In the form,
à Go to ‘Basic settings’,
à Here you can configure the page settings and their orientation.

Q3)+ How can I set the header and footer in the MAIN window?
Ans:- * By using the TOP…ENDTOP and BOTTOM…ENDBOTTOM commands,
We can set the header and footer texts in the MAIN window.
* These texts will be displayed on the starting and ending of every new page
in the output.
* To disable these texts, enclose empty commands between these commands.
* Ex: /: TOP
/: ENDTOP

Q4)+ What are the conditional statements used in SAP scripts?
Ans:- * IF…ELSE/ELSEIF…ENDIF
* CASE…ENDCASE
These are the conditional statements used in SAP scripts.

Q5)+ Can you create a SAP script without a MAIN window?
Ans:- We can not create a SAP script without a MAIN window.

Q6) How can I prevent page break in the message that is to be displayed?
Ans:- * By using PROTECT…ENDPROTECT control commands, we can
prevent Page break in the message that is to be displayed.
* Enclose the text that you want to prevent page break in between
PROTECT…ENDPROTECT.
* SAP script will ensure that each line of this text is printed together
on the same page.
* If SAP script finds that the text can not be printed on that page completely,
Then an Implicit page break occurs and the text is printed on the next page.
* Syn: /: PROTECT
*Text within
*The same page
/: ENDPROTECT

Q7) How to convert a SAP script to Smartform?
Ans:- Execute SMARTFORMS, Go to Utilities => Migrate SAPscript Form.
This is the way to convert a SAP script to Smartform.
Q8) How can I format the date being displayed in the SAP script?
Ans:- * By using the ‘SET DATE MASK’ control command, we can
format the date fields in an SAP script.
* Syn ex: /: SET DATE MASK = ‘MMMM DD YY’.
* Executing this command causes all subsequent date fields to be
printed with the specified formatting.
* To return to the default formatting, use the ‘SET DATE MASK’
command with an empty string.
Syn: /: SET DATE MASK = ‘ ’.

Q9) How can I format the time fields in the SAP script?
Ans:- * By using the ‘SET TIME MASK’ control command, we can
format the time fields in an SAP script.
* Syn ex: /: SET TIME MASK = ‘HH hrs MM min SS sec’.
* Here HH refers Hours, MM refers Minutes and SS refers Seconds.
* Executing this command causes all subsequent time fields to be
printed with the specified formatting.
* To return to the default formatting, use the ‘SET TIME MASK’
command with an empty string.
Syn: /: SET TIME MASK = ‘ ’.

Q10) How can I debug my SAP script?
Ans:- We can debug SAP scripts in 2 ways.
* 1st way: à Execute Transaction code ‘SE71’.
à Enter the ‘Form name’.
à Click on Utilities => Activate Debugger to enable debugging.
* 2nd way: By using the standard program RSTXDBUG.
These are the 2 ways to debug an SAP script.

Q11) How to upload logos in SAP scripts?
Ans:- We can upload the logos in SAP scripts, by using the transaction code ‘SE78’
Or by using the program ‘RSTXLDMC’.

Q12) I have created an SAP script in language DE. Now I need to translate it to EN.
How can I do this?
Ans:- * Open your SAP script through Transaction code ‘SE71’.
* In the ‘Header screen’, in the ‘Language Attributes’ option,
choose ‘Translate to…’ option to translate to other languages.
* If you want to translate any text modules or texts within the SAP
script, then it can be done by using the transaction code ‘SE63’.

Q13) How can I word wrap the text being displayed in SAP script?
Ans:- Use the function module RKD_WORD_WRAP to wrap the text
which is being displayed in SAP script.


Q14) How do I set tabs between the fields in display?
Ans:- In the form,
à Click on ‘Paragraph Format’ tab,
à create a new paragraph format, and
àIn the ‘Tabs’ tab,
àenter the ‘Tab position’ and the ‘Alignment’ for the fields.

Q15) Where can you find all the SAP script form names and print program names?
Ans:- We can get all the SAP script form names and print program names
in the table TNAPR.

Q16) How can I copy SAP scripts from one client to another?
Ans:- à In the transaction ‘SE71’, enter the form name,
à Click on Utilities => Copy from client to copy SAP
scripts from one client to another.
Or use the program ‘RSTXSCRP’ to Import/export SAP scripts.

Q17) How can I create Standard texts for SAP scripts?
Ans:- * By using the transaction ‘SO10’, we can create standard texts. Then
to insert these standard texts in the Sap scripts, choose the menu
Insert => Text => Standard, and choose the desired standard text.
* Alternatively, you can display standard texts in your SAP scripts
using the command:
INCLUDE ZSTEXT OBJECT TEXT ID ST LANGUAGE EN
* Here ZSTEXT refers to the standard text name.

Q18) How can I display bar codes in SAP scripts?
Ans:- à Create a ‘Character format’ in the SAP script.
à In the bottom, you can get the ‘Bar code’ option,
Here choose the Bar code for the Character format.
à And finally, to display Bar codes, in the command enter:
&VBELN&
* Where C1 is the character format created and ‘VBELN’
is the variable for which the bar code is to be created.

Q19) How to add extra functionality to a standard print program
without touching the print program?
Ans:- By using Subroutines.

Q20) How many MAIN windows are allowed for SAP script?
Ans:- * SAP script allows only one MAIN window.
* Each page can consist up to 99 windows.
* Each MAIN window is assigned a consecutive identifying number(0…98).
* This is mainly used for Label printing and Address printing.

1 comment:

Anonymous said...

How to create a sapscript in abap, you could check this link http://saptechnicals.blogspot.com/2012/04/how-to-create-sapscript-in-abap.html

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

goodsites