‎2010 Jul 21 4:23 AM
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
‎2010 Jul 21 4:46 AM
Hi Mohit,
The name will be concatenation of SY-MANDT with order number (AUFK, AFKO tables. Field AUFNR).
Regards,
Birendra
‎2010 Jul 21 4:47 AM
‎2010 Jul 21 5:04 AM
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
‎2010 Jul 21 9:42 AM
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