Hello,
I am trying to read some text from sales order item level into a query.
I have the following ABAP code. I didn't write it, I just found it and I am trying to adjust it according to my requirement.
"TABLES:
stxl.
DATA:
tdname LIKE stxl-tdname,
myline LIKE tline-tdline,
ze13_line(200) TYPE c.
DATA: BEGIN OF lines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA:END OF lines.
DATA:BEGIN OF myheader.
INCLUDE STRUCTURE thead.
DATA:END OF myheader.
CLEAR textclient.
CLEAR tdname.
CONCATENATE vbap-vbeln vbap-posnr INTO tdname.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '0008'
language = sy-langu
name = '0060220469000010' "tdname
object = 'VBBP'
IMPORTING
gjvc->header = myheader
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.
IF sy-subrc = 0.
LOOP AT lines.
MOVE lines-tdline(132) TO textclient.
EXIT.
ENDLOOP.
ENDIF.
There isn't any error when generating the infoset but there is one when running the query.
"Short text
Function parameter "GJVC->HEADER" is unknown.
What happened?
Error in the ABAP Application Program
The current ABAP program "AQCSCNS-DV======Z_VA_700======" had to be terminated
because it has come across a statement that unfortunately cannot be executed.
Function module "READ_TEXT" was called with the parameter "GJVC->HEADER".
This parameter is not defined.
"
Can someone make this work?
Thank you.
Daniela
p.s. I'm not a programmer.