on 09-29-2008 9:46 AM
hi all,
I am entering some header text in PO.
How can i capture using read_text. Please tell me the procedure.
Regards
Reddy
pass these parameters to 'read_text' function module.
Text Name = Po number
Language = EN
Text ID = F01
Text Object = EKKO
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this sample code. Though this code is for sales order text. You can apply same logic for fetching purchase order text.
Pass purchase document instead of sales doc. and use object 'EKKO' instead of VBBK and search for text ids in Tcode me23n.
REPORT z_test1.
TABLES:
thead.
PARAMETERS:
p_vbeln TYPE vbak-vbeln.
PARAMETERS:
p_textid TYPE thead-tdid.
DATA:
BEGIN OF t_thead OCCURS 0.
INCLUDE STRUCTURE thead.
DATA:
END OF t_thead.
DATA:
w_line TYPE i,
w_idx TYPE i,
w_flag TYPE i.
DATA:
BEGIN OF t_tline OCCURS 0.
INCLUDE STRUCTURE tline.
DATA:
END OF t_tline.
DATA:
w_test TYPE thead-tdname.
START-OF-SELECTION.
w_test = p_vbeln.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = p_textid
language = sy-langu
name = w_test
object = 'VBBK'
TABLES
lines = t_tline
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 NE 0.
MESSAGE 'HEADER TEXT NOT FOUND' TYPE 'I'.
ENDIF.
END-OF-SELECTION.
LOOP AT t_tline.
WRITE: / t_tline-tdline.
ENDLOOP.
Regards
Abhijeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.