cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Text lements(/E) in Scripts and print program

Former Member
0 Kudos

Hi all,

I need to use Text elements from print program to Script output.

I have included the text element name in WRITE_FORM and defined in the script with (/E) also.

Still the data is not displaying.

Please let me know how to use the text elements.

thanks in advance..

Rakesh

<removed_by_moderator>

Edited by: Julius Bussche on Nov 25, 2008 10:08 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Prashanth,

The text elemetns in your example ITEM_HEADER and ITEM_LINE have any significance in the print program or do they need to declare at any other place also other than WRITE_FORM to get the text displayed?

because I followed the same way and still the values in the variables in the layout are not getting displayed.

thanks

Rakesh

Former Member
0 Kudos

You do not need to declare the text elements anywhere in driver prog

While using the WRITE_FORM directly pass them in single quotes.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'ITEM_LINE_CONFIGURATION'

EXCEPTIONS

OTHERS = 1.

If values are not printed the debug and check if the variables are not blank.

I dont think there shud be any other problem

Regards,

Prashant

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Prashanth,

How to display the content in the text element(lw_element) in the script.

Means, do we need to maintain the fields and its contents in the text element (lw_element).

I have moved some contents to some variables, then I am using the WRITE_FORM to display these contents. SO I am using the text element in the FM and in the script..

Please let me know the correct procedure to display the desired contents in the layout.

Thanks

Rakesh

Former Member
0 Kudos

For printing the text directly on the formm the text element in form wud be as

/E ITEM_HEADER

MH Quantity,,,,Description,,UOM,,Net Weight,,Gross Weight

If you have variable define in the driver prog and you want to display,text elt. wud be as

/E ITEM LINE

MH &CONF_OUT-ATBEZ&,,&CONF_OUT-ATWTB&

where CONF_OUT is a structure with fields ATBEZ and ATWTB

MH is the paragraph format

Hope this clears your doubt.

Regards,

Prashant

Former Member
0 Kudos

I

In the driver prog

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = lw_element

window = lw_window

EXCEPTIONS

element = 1

window = 2.

In the form, in window lw_window

/E lw_element

Hope this helps!

Regards,

Prashant

Former Member
0 Kudos

Hi Rasheed,

Thanks for the reply.

May I know the procedure for using the Text element in print program and sapscripts.

thanks

Rakesh

Former Member
0 Kudos

Hi

Your functional consultant will give u text-id,text-language,text-name,text-object

if not please find where the texts were mainatained in ur standard t code.

u will find text-id,text-language,text-name,text-object in stxh table

Regards

Rasheed.

Former Member
0 Kudos

Hi,

I thing you should READ_TEXT function module to get text elements in ur form.

Try with tht function module

Regards

Rasheed