2009 Mar 16 11:58 AM
Hi Gurus,
I need to read text from vf01 header note 1, there user type max 10 lines i want to read that 10 lines and print in sap script main window after line item printed. i used read text but one line only fetched. i declare variable like data : NEXRSP LIKE TLINE-TDLINE and read_text function module. pls provide solution for this.
Regards
G.Vendhan
2009 Mar 16 12:07 PM
Use the include statement after the line item :
INCLUDE &TDNAME& OBJECT<>ID <> LANGUAGE <>& PARAGRAPH <>
Mathews
2009 Mar 16 12:07 PM
Use the include statement after the line item :
INCLUDE &TDNAME& OBJECT<>ID <> LANGUAGE <>& PARAGRAPH <>
Mathews
2009 Mar 16 12:11 PM
instaed of line variable declare a internal table like NEXRSP type standard table of TLINE.
i guess you are getting only one line because you are passing work area. you need to pass the internal table to capture all the lines of long text.
also check for the exapmple you are testing with, it has multiple lines of header text.
2009 Mar 16 1:16 PM
HI GURUS,
Thank u for reply i declare like
ID = '0002'.
PERFORM READTEXT USING EN NAME OBJECT ID TEXT_OUTPUT.
NEXRSP = TEXT_OUTPUT . CLEAR TEXT_OUTPUT.
FORM READTEXT USING P_EN
P_NAME
P_OBJECT
P_ID
P_TEXT_OUTPUT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = P_ID
LANGUAGE = P_EN
NAME = P_NAME
OBJECT = P_OBJECT
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
LOOP AT LINES.
P_TEXT_OUTPUT = LINES-TDLINE.
EXIT.
ENDLOOP.
FREE LINES. CLEAR LINES.
ENDFORM. " READTEXT
2009 Mar 16 1:26 PM
hi,
In below code, because of exit , you are getting only one row in P_TEXT_OUTPUT.
{code
LOOP AT LINES.
P_TEXT_OUTPUT = LINES-TDLINE.
EXIT.
ENDLOOP.
you can do like this.
loop at lines.
concatenate P_TEXT_OUPUT line-tdline into p_text_output.
endloop.
at the end p_text_output will have all the lines of header text.
{code}
2009 Mar 16 1:44 PM
Thank u santosh,
I want to print line by line like ,
ED Suffered:
Basic Duty XXXXXX
2% Cess on ED XXXXXX
1% Addl Cess on ED XXXXXX
Total XXXXXXX
Excise Duty Remitted
thanks and regards
G.Vendhan
2009 Mar 26 3:41 AM