cancel
Showing results for 
Search instead for 
Did you mean: 

forms

Former Member
0 Kudos

Hi,

SAP guru's plz tell me about 'text element' in scripts

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Text elements are used in scripts to basically identify locations for printing data. A driver program is required when u create scripts, right. Suppose you want to print the value of the variable 'A' at a particular position in the script. In this schenario, you call the FM Write_Form, and pass the parameters like window, text element etc. So the control goes to this particular text element and prints the value of A there. I hope this clears your query.

Nayan

Answers (6)

Answers (6)

Former Member
0 Kudos

You can define text elements (window texts) for each window. On the Form: Request screen, choose Edit -> Text elements.

The print program accesses text elements by name, formats them and prints them in the respective window. That is, the program can decide which text elements should be printed in a particular window. It calls these text elements by name to print them. You must therefore change text element names in the print program if you make any changes to text element names in a form.

In the layout of a text element, you can use only the paragraph and character formats defined in the form.

Example of a text element in an order confirmation:

/E ITEM_LINE

IL &VBDPA-POSNR&,,&VBDPA-MATNR&,,&VBDPA-ARKTX&

/ &'Customerarticlenumber 'VBDPA-IDNKD' '&&'Position

/ 'VBDPA-POSEX&

This example shows a section of a main window of a form, with an item line of an order confirmation. The /E in the tag column is used to identify the text as a text element, ITEM_LINE is the name of the text element.

Default Text Element

At the start of a window, you can define a text element without the /E command in the paragraph format column. This text is always printed at the start of the window. It is not necessary to insert this text explicitly via a print program.

Former Member
0 Kudos
Former Member
0 Kudos

Text elements in Scripts:

The length of a text element is unlimited.

Text elements may contain variable symbols.

You can use several different formatting options within one

text element.

You can use SAPscript control statements in text elements.

In each window, you may use two different kinds of text

elements:

Text Elements Without Names: By default it triggers once and but it should be defined only before

text elements with name.

Text Elements with Names

The print program can Activate Text Elements.

Regards,

Sravanthi

Former Member
0 Kudos

Hey!!

Text Elements of a Form

SAPscript calls the individual text components of a form

text elements. To achieve good structuring and readability,

you assign a fixed name to each text element in the form.

The print program then uses these names to access the

elements. This name applies also for translated versions of

a text element, while the contents of the text elements

depend on the language.

Text elements are related to a window, that is, a print

program can call for each window only those text elements

that exist in this window. The screen below (shot in the

SAPscript line editor) shows the definition of the text

elements HEADING and FLIGHTLIST in the window MAIN. The

variables used within '&...&' are replaced by the system at

output time (see also Representing Text Elements in the PC

Editor).

You can compare text elements with numbered texts in ABAP

programs (for example, TEXT-001). However, text elements

are much more flexible:

The length of a text element is unlimited.

Text elements may contain variable symbols.

You can use several different formatting options within one

text element.

You can use SAPscript control statements in text elements.

In each window, you may use two different kinds of text

elements:

Text Elements with Names

Text Elements Without Names

The print program can Activate Text Elements.

Regards

Abhijeet Kulshreshtha

bpawanchand
Active Contributor
0 Kudos

Hi

You can define text elements (window texts) for each window. On the Form: Request screen, choose Edit ® Text elements.

The print program accesses text elements by name, formats them and prints them in the respective window. That is, the program can decide which text elements should be printed in a particular window. It calls these text elements by name to print them. You must therefore change text element names in the print program if you make any changes to text element names in a form.

In the layout of a text element, you can use only the paragraph and character formats defined in the form.

Example of a text element in an order confirmation:

/E ITEM_LINE

here in the text element always identified by using /E

and The /E in the tag column is used to identify the text as a text element, ITEM_LINE is the name of the text element.

and apart from this we have DEFAULT TEXT ELEMENTS or Unnamed text elements which are executed only once for the whole form again unnamed text element

At the start of a window, you can define a text element without the /E command in the paragraph format column. This text is always printed at the start of the window. It is not necessary to insert this text explicitly via a print program.

Regards

Pavan

former_member181995
Active Contributor
0 Kudos

Raju,

1. Text elements - within the SAPScript (SE71 transaction)

They are labels, which can be accessed from the printer program.

/E ELEMENT

2. Standard text - can be accessed in transaction SO10, pre-defined texts

Amit.