cancel
Showing results for 
Search instead for 
Did you mean: 

print

Former Member
0 Kudos

what is nthe exact procedure to modify a script with out modifying the print program and what are the various types of symbols used in scripts.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

There are some Standard Sap Scripts in SAP. We cant directly execute them in scripts we have to use some T-codes and by giving some input to the required fields we can see the output printform.

I will show one example. There are some Standard Sap Scripts such as MEDRUCK which is a standard Sap Script for Purchase Order and RVINVOICE01 for billing and so on...

To see oupt of MEDRUCK go to T-code ME9F give purchase order number and execute select one number and click on dislplay messages button on application tool bar you can find the print form of MEDRUCK.

You cannot change the Standard Sap Scripts but you can use Standard Sap Scripts and Copy them to userdefined Script and can make changes to them and replace standard Sap Script with usedefind script.

Ex: Go to SE71,

on menu bar u find Utilities->copy from Client. click on it u ll find new screen showing

Form name:

Source Clinet:

Target Form:

give Form name as usedefined form name EX: ZFORM1

Source client as 000 and

Target form as MEDRUCK.

execute.

Now, the standard from MEDRUCK is copyied to your form ZFORM1.

NOW, go to SE71 and give form name as ZFORM1 and do some changes to the form such as adding logo any thing. save and Activate.

Now, you have done changes to the Form ZFORM1 and u have to replace your form with standard SAP Script.

Go to NACE Transaction.

on Applications select EF for purchase order and click Output types button on application tool bar.

now select NEU as output types dobule click on Processing Routines.

now click on Change option on application tool bar and on right side u find MEDRUCK in form place replace MEDRUCK with ZFORM1 and SAVE.

go back twice and now go to T-code ME9F give the purchase order number and execute and select one option and click on display messges button .

you will find the changes that you have done in ZFORM1. so we cant chage the standard Sap Scripts by copying the Standard Sap Scripts we can chage and replace with our forms.

A variable in SAPscript is called a symbol. There are the following types.

• System symbol (e.g. the number of the current page)

• Standard symbol (usable in any document)

• Program symbol (value from the print program)

• Text symbol (“local variable”)

The value of a symbol is text for using within SAPscript code and is represented by the symbol-name enclosed by ampersands. On seeing the tell-tale ampersands in SAPscript code, you sometimes need to figure out the symbol type.

goto any PAGEWINDOW's Text elements in Script (SE71)

from the Menu-> INSERT-> Symbols

you find all symbols here

System symbols

System symbols in a SAPscript form are comparable to system fields like SY-UZEIT in an ABAP program, and include these. The graphical editor offers three types of system symbol.

1. General system symbols

See the table TTSXY. PAGE is the most widely used. The list given in our BC460 training manuals is out of date.

2. SAPscript system symbols

See the dictionary structure SAPSCRIPT. SAPSCRIPT-FORMPAGES is the most widely used.

3. ABAP system symbols

For the ABAP system field SY-UNAME, say, the symbol is SYST-UNAME. [SYST is the dictionary structure for ABAP system fields.]

Sample code:

  • User: &SYST-UNAME&

  • Page &PAGE& of &SAPSCRIPT-FORMPAGES(C3)&

Standard symbols

Standard symbols are maintained centrally (in the table TTDTG via transaction SE75) for use in any document. Menu path:

Tools

Form Printout

Administration

Settings

Some standard symbols are SAP-standard and others are custom. Curiously, table TTDTG is cross-client although SAPscript forms are not.

The value of a standard symbol has to be defined for each language used. This gives a way to make a single SAPscript form multi-lingual.

We can take advantage to an extent of the central maintenance, though there is no guarantee that the available standard symbols will used in every appropriate context.

Standard symbols complicate searching a SAPscript form, since text like ‘Charity registration 211581’ may be hiding in a standard symbol.

Text symbols

A text symbol is declared and assigned to within the SAPscript code, and so obviously applies only to the current document. The command DEFINE is used, requiring /: in the tag column, as in the following examples.

/: DEFINE &COMP_NAME& = ‘University of Warwick’

/: DEFINE &WS_RATE& = &TAX_SUMM_C&

SCRIPT COMMANDS

ADDRESS : Formatting of Address

BOTTOM, ENDBOTTOM : Define Footer text in a window

BOX, POSITION, SIZE : Boxes, Lines and Shading

CASE, ENDCASE : Case Distinction

DEFINE : Value assignment to text symbols

HEX, ENDHEX : Hexadecimal values

IF, ENDIF : Conditional text output

INCLUDE : Include other texts

NEW-PAGE : Explicit forms feed

NEW-WINDOW : Next window main

PRINT-CONTROL : Insert print control character

PROTECT...ENDPROTECT : Protect from page break

RESET : Initialize outline paragraphs

SET COUNTRY : Country-specific formating

SET DATE MASK : Formating of date fields

SET SIGN : Position of +/- sign

SET TIME MASK : Formating of time fields

STYLE : Change style

SUMMING : Summing variables

TOP : Set header text in window MAIN

Regards

Anji

Answers (0)