on 04-06-2008 11:36 AM
Friends,
i am having problem in fetching the item text from tcode [me23n]. I am able to fetch the 1st line from the item text and able to print it in the PO through SAP Script, but can anyone tell me how to fetch and print the 2nd,3rd ....line from the same.
Siddhartha Prakash ,
Use the FM "read_text" to get all the lines of the item text
Passing the following to the FM :
Text Name : concatenate the POnumber (EBELN) and item number EBELP
Language : EN
Text ID : F01
Text Object : EKPO
U will get the item text (IT_TEXT) as the output
Now all the lines will be available in the internal table, so u can print each line (similar to printinmg a table)
Reward points if u find it useful
-Sapsurfer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sid,
DATA: i_lines TYPE STANDARD TABLE OF tline WITH HEADER LINE ,
r_lines TYPE tline,
v_cnt LIKE sy-tabix,
name TYPE tdobname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = stxh-tdid
language = stxh-tdspras
name = name
object = stxh-tdobject
TABLES
lines = i_lines[]
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
* Only 4 lines of Header text supported. Can add if needed
LOOP AT i_lines INTO r_lines.
CONDENSE r_lines-tdline NO-GAPS.
v_cnt = v_cnt + 1.
CASE v_cnt.
WHEN 1.
zzboldsx = r_lines-tdline.
WHEN 2.
zzboldsx2 = r_lines-tdline.
WHEN 3.
zzboldsx3 = r_lines-tdline.
WHEN 4.
zzboldsx4 = r_lines-tdline.
WHEN OTHERS.
EXIT.
ENDCASE.
* zzbolDSX = i_lines-tdline .
ENDLOOP.
Amit.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.