Dear All,
i am trying to read sales text form material master into query SQ02. i have the following ABAP code. i don't know write it and i am trying adjust it to to my requirement.
*----------------------------------------
Data:
xname like TEXTNAME,
gt_lines TYPE TABLE OF tline,
gs_lines TYPE tline.
Clear SALTEXT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = '0001'
LANGUAGE = 'E'
NAME = XNAME
OBJECT = 'MVKE'
TABLES
LINES = gt_lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6.
IF sy-subrc = 0.
CLEAR gs_lines.
LOOP AT gt_lines INTO gs_lines.
MOVE gs_lines-tdline TO SALTEXT.
EXIT.
ENDLOOP.
ENDIF.
*-----------------------
Note: TEXTNAME is a other field which having data to get sales text. it data is combination Material+SaleOrg.+Distr.Chan.
SALTEXT is a field that i create to get Sales Text from table STXL
there's no error when generating the infoset but there is error when running the query.
Can someone make this work?
Regards,
Rtn