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.
cancel
Showing results for 
Search instead for 
Did you mean: 

sap script

Former Member
0 Kudos

how to include icons in sap script

5 REPLIES 5

Former Member
0 Kudos

Hi,

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

else

&your line without icon&.

endif

Regards,

Priyanka.

Former Member
0 Kudos

Hi,

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

Regards,

Bhaskar

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

Use

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.

Restrictions

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.

Prerequisites

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.

Procedure

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.

Result

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

Hi

Please check these links.

http://www.sap-img.com/abap/abap-interview-question.htm

http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm

http://sap.ittoolbox.com/documents/document.asp?i=3240

http://www.techinterviews.com/?p=198

for Smartforms material

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

How to trace smartform

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

check most imp link

http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html

step by step good ex link is....

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

SAPScripts

http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf

http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf

http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf

http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf

http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf

http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-sub...

SAP SCRIPT FIELDS

http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm

scripts easy material

http://www.allsaplinks.com/sap_script_made_easy.html

Debugging Document.

http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm

http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm

SAP SCRIPT

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

UOM CM

Line width for text 132

Text name ZHEX-MACRO-COMPLOGO

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

/: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.

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.

SMARTFORM

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.

or

1) goto SE71

2) menu..UTILITIES -> COPY FROM CLIENT.

procedure to add fields.

1)goto SE71.

2)provide FORM( which you migrated).

3)slect PAGE WINDOWS.

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)

8)goto------>EDITOR.

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:

/: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON

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.

NEU Purchase order 1 SAPFM06P ENTRY_NEU MEDRUCK.

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...

NACE

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

http://help.sap.com/saphelp_erp2005/helpdata/en/c8/1989fe43b111d1896f0000e8322d00/frameset.htm

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 transactrion...so 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.

http://www.sap-img.com/sapscripts.htm

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

http://help.sap.com/saphelp_erp2005vp/helpdata/en/9b/e3b0dcc2a711d3b558006094192fe3/frameset.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

for Smartforms material

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

How to trace smartform

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

Former Member
0 Kudos

/: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E

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

INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line

regards,

srinivas

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