Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

sap script

Former Member
0 Kudos

how to include icons in sap script


Former Member
0 Kudos


Go to se71. In the Window (f. ex. MAIN)

make insert->characters->SAP-icon.

make a condition in the script.

if cond1

&your line with icon& here put the icon


&your line without icon&.




Former Member
0 Kudos


These are the steps to be followed for uploading graphics in R/3 system

1. First save the file as BMP

2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and

make it Zoom as 100% and save as *.TIFF

3. Open SE38 and execute program RSTXLDMC

4. Give your TIFF file path name

5. Select Bcol (for Color)

6. TEXT ID will be ZHEX-MACRO-*.

7. Inplace of * write your own logo name (ZCOMPANYLOGO)

8. Execute the program

9. Now Goto SE71 create your ZFORM

10. Create logo window

11. Goto text element of logo window



0 Kudos

I am trying to include two text elements in one window...which is a variable window.But in the output it is showing only the second text element o/p....pls explain why this happening?But when i am creating a new window ,it is showing the o/p fine..

Former Member
0 Kudos

Entering Include Text Properties


You want to display a SAPscript text in the form. This text type has the same function as the SAPscript command INCLUDE.

If you do not have to use SAPscript texts, we recommend that you use text modules. They are cross-client texts and are linked to Change and Transport System and the translation tools.


The following components are not supported in SAPscript texts and are ignored when the form is processed:

● SAPscript styles

● Outline paragraphs

● Control statements

● Paragraph properties: Page protection, next paragraph on same page

● Character formats: Superscript and subscript, bar codes

● Special characters

● System icons, such as ULINE

● Standard icons

● Hyperlinks

The following are supported with restrictions:

● Tabulators, but not for aligning fields within texts

● SAP characters, but not SAP icons, for example

More information about these restrictions is available in the SAP Notes 894389 and 863893.


You have created a text node in the context and selected the text type Include Text. The include text, which has been created with SAPscript Editor, exists in the system.


1. Specify the general properties of the include text, such as the name, description, and status.

2. Under Text Name, enter the name under which the include text is stored in the system.

Choose F4 to see a selection of the texts in the system.

3. Specify the text object. TEXT indicates a standard SAPscript text.

You use transaction SE75 to define separate text objects with their own text IDs for applications. In this way, you can manage application-specific form texts. The TEXT text object with the text ID ST is used for general standard texts that you create with the standard text editor (transaction SO10).

Enter constant values in quotation marks.

4. Specify the text ID. The usual ID of a standard SAPscript text is ST.

5. Enter the text language in which you want the include text to be inserted.

If specified, the system copies the values for Text Object, Text ID, and Text Language already stored for this text in the SAP system.

6. Set the flag No error if text not available if you still want the form to be printed, even if the inserted include text does not exist in the system. If you do not set this flag, the form is not printed, and an error message appears.

7. The style assigned to the text node contains formatting for standard paragraphs (‘*’). If you specify a paragraph format in the Standard Paragraph field, you override the format of all standard paragraphs in the include text with this format.

8. Under First Paragraph, you can set a paragraph format for the first paragraph of the include text. This overrides the setting in the style. If you leave the Standard Paragraph field empty, all standard paragraphs in the include text are also formatted with this paragraph format.

9. Specify the style that you want to use for the include text.


You have created a text node with the text type Include Text. The corresponding text is not inserted until the form is processed.

For more information about creating and editing SAPscript texts, see the SAPscript Editor documentation.

Re: urgent-scripts,smartforms

Posted: Jul 19, 2007 9:40 AM in response to: sandeep G Reply


Please check these links.

for Smartforms material

How to trace smartform

check most imp link

step by step good ex link is....



scripts easy material

Debugging Document.


To create a logo in SAP printouts just do the following

1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.

2. Run program RSTXLDMC and enter the following parameters

Enter file name C:COMPLOGO.TIF


Line width for text 132


Text ID ST

Text language = E

Number of Tiff gray levels (2,4,9) 2

3. Then Create a new window 'COMP' with attributes;

Window COMP description Company Logo

Left margin 7.00 CH window width 10.00 CH

Upper margin LN window height 8.00 LN

Finally in the text element, mention


Please note that if object name is not indicated as 'ZHEX...’ the logo may not be printed!

You will not be able to see the logo in a test print. The same will be printed in actual printout.


1) In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)

2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description

3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures

4) Select any picture and set its Resolution in DPI

5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and position of the Logo

6) Set any other parameters if required, save and activate.

7) If there is only 1 Window in the forms, set it as Main Window in general attributes.

😎 Use TCode SE78 to upload new pictures and logos.

before changing standard script you must migrate into user defined script. for that one follow these steps...

1)goto SE71. 2)provide name for SCRIPT( begin with Z)

3)select CREATE option.

4)press ENTER.

5)select FORM option(u find this option on top of the screen).

6)from that choose MIGRATE option.

7)then it will displays dialog screen with required field like FORM( provide standard form name) and LANGUAGE( here provide in which language form exisisting).

8)press ENTER. 9)select SAVE and ACTIVATE.


1) goto SE71


procedure to add fields.

1)goto SE71.

2)provide FORM( which you migrated).


4)select EDIT option.

5)select WINDOW required for adding a field.

6)select EDIT option.

7)from that choose ELEMENT( also called TEXT ELEMENTS)


Here you enter field as per your needs.

      • i give sample code

AS modifying layout <>

/: if &ekko-lifnr& > 50000

/ plant id is 300

/: endif.

9)after completion of entering element goto BACK.

10)choose SAVE.

11)ACTIVATE. regards

procedure to uploading LOGO

follow these steps for uploading logo which is exisisting in bitmap format.

In the form painter, you can either include directly to the form using menu

Edit->Graphic->Create or using the INCLUDEstatement in a window.

To use an INCLUDE statement, goto into the window scripteditor and use menu Include->Graphic. The include can looklike this for a bitmap:


in this statement MYLOGO is name of the logo.

BMON mean's logo exisiting in black&white format, we can also pass

BCOL means logo exisiting in color format.

Go to transaction OMFE. Tell me what you see there for the output type you are interested in. Let me take the standard output type NEU. The entry looks something like this.


The first one is your output type, next is its description, next is the medium, then the program, routine, and the form name.

You already copied the layout MEDRUCK to ZMEDRUCK. Now copy SAPFM06P to ZZSAPFM06P. Now ENTRY_NEU routine is in the include FM06PE02. You need to make your changes here to accommodate for the new field. So copy this include to ZZFM06PE02 and make your changes. Also, in ZZSAPFM06P, change the line where it says INCLUDE FM06PE02 to INCLUDE ZZFM06PE02.

Now in this routine ENTRY_NEU, there is a function module call ME_READ_PO_FOR_PRINTING which reads in the PO data from the tables. We need to copy this function module as well as this is where you will do your extra selections for the new fields. You will do the same with the other function call ME_PRINT_PO, if you need to change anything on the print.

after this to define output type...


You can track the form and the print program used for that form

NACE is used to create output type while creating the output type you will mention forms, and driver program.

that will be maintained in the table TNAPR.if you create the output type using NACE then it will be automatically visible in table NAST and TNAPR.

so check in NAST, TNAPR table

EX--in simple terms..take a transaction say ME21N ( Purchase Order ), u can see a Print icon there. now when u click on this icon, it has to print the PO document. Now how does it do that? when u click Print, the control gets transffered to a print program, now which program gets triggered is decided by what program name u specify in NACE.

So in NACE>EF>Output Type>NEU>processing routine--> u can see some standard program already configured( maybe SAPFM06P n form MEDRUCK )..these are the programs n sapscript that gets executed wen u say "PRINT" in the u can customise the print program for customer changes over here by copying the standard program n form into a Z/Y one and replacing the program names in NACE.

check this link

Check link for more on SAP Scripts.

differences between scripts an smartforms

script is client dependent

smartform is client independent

less programing in smart form

multiple page format is possible in smart form

we can maintain background graphics in smartform

scripts doesnot generate any funtional module where as smart form generates.

multiple page format not allowed in scripts allowed in sf.

labelling is possible in scripts not possible in sf.

If u want step by step creation of script and SF then i can provide plz give me ur mail id

refer these links

for Smartforms material

How to trace smartform

Former Member
0 Kudos


These are the steps to be followed for uploading graphics in R/3 system

1. First save the file as BMP

2. Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and make it Zoom as 100% and save as *.TIFF

3. Open SE38 and execute program RSTXLDMC

4. Give your TIFF file path name

5. Select Bcol (for Color)

6. TEXT ID will be ZHEX-MACRO-*.

7. Inplace of * write your own logo name (ZCOMPANYLOGO)

8. Execute the program

9. Now Goto SE71 create your ZFORM

10. Create logo window 11. Goto text element of logo window. The steps for including graphical elements in the layout set are as follows

• The graphical element (like company logo) should be in valid graphic file format like .bmp or .jpg

• Use appropriate software to convert the above file into a .TIFF file

• Use report RSTXLDMC to upload this file as a text module in SAP

• Execute the above program from the ABAP /4 editor

• Enter the location of the .TIFF file on the PC

• Specify BMON or BCOL as the raster image type

• The SAP system suggests a name for the file ( like ZHEX-MARCO-* ). The * indicates the type of file. For e.g. if the file contains a logo then the name can be ZHEX-MACRO-LOGO

• The ID should be ‘ST’ and give the logon language

• Running the program will convert this .TIFF file into a text element

• Incorporate this converted logo in the appropriate window under the appropriate text element by giving




<b>*reward for useful answers*</b>