Application Development and Automation 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: 
Read only

Read_Text function module

Former Member
0 Likes
657

Hi All,

We are printing on SAP script form from a transaction IW32. Here we want to print the order header text in script form.I am using read text function module as below. Could you please tell me what i need to pass in 'NAME' in exporting parameter and from which table i need to fetch this value.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = 'KOPF'

LANGUAGE = 'E'

NAME =

OBJECT = 'AUFK'

Thanks

Mohit

4 REPLIES 4
Read only

birendra_chatterjee
Active Participant
0 Likes
588

Hi Mohit,

The name will be concatenation of SY-MANDT with order number (AUFK, AFKO tables. Field AUFNR).

Regards,

Birendra

Read only

anup_deshmukh4
Active Contributor
0 Likes
588

aufnr

Read only

Former Member
0 Likes
588

Dear Mohit,

To know what parameters need to be passed to the FM Read_text for any transaction got to the screen where your text is entered in the transaction (the Text Editor) and from the Menu select Goto -> Header . All the details that you need to pass are given here, those will give you an idea.

Regards,

Mrunal

Read only

Former Member
0 Likes
588

Hi Mohit

you need to declare a variable of type 'thead-tdname' and cocatenate the value of order number from table AUFK in this variable and pass this variable in the NAME Parameter of the FM READ_TEXT.

before that you need to fetch the order number from table AUFK.

like :

DATA: W_ITEM type THEAD_TDLINE,

W_AUFNR like AUFNR,

W_MANDT like MANDT.

select MANDT AUFNR from AUFK into W_MANDT W_AUFNR.

concatenate w_mandt w_aufnr into W_ITEM.

call function READ_TEXT.

name = w_item.

language = 'EN'.

Language should be 'EN' for english not 'E'.

Thanks

Lalit Gupta