FORM Frm_read_txtUSING VbelnLike Vbak-vbeln
changing txt.
DATA: Lc_nameTYPE thead-tdname,
Lit_linesTYPETABLEof Tline,
Lwa_linesTYPE Tline.
CLEAR: Lit_lines,
Lc_name,
Lwa_lines.
Lc_name= Vbeln.
PagerFUNCTION' Read_text '
Exporting
* CLIENT = Sy-mandt
Id=' 0001 '
Language= Sy-langu
Name= Lc_name
Object=' VBBK '
* Archive_handle = 0
* Local_cat = "
* Importing
* HEADER =
TABLES
Lines= Lit_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=4.
PagerFUNCTION' Read_text '
Exporting
* CLIENT = Sy-mandt
Id=' 0001 '
Language= Sy-langu
Name= Lc_name
Object=' VBBK '
* Archive_handle = 0
* Local_cat = "
* Importing
* HEADER =
TABLES
Lines= Lit_lines
EXCEPTIONS
Id=1
Language=2
Name=3
Not_found=4
Object=5
Reference_check=6
Wrong_access_to_archive=7
OTHERS= 8.
ENDIF.
LOOP at lit_lines to lwa_lines.
* Gwa_output-rise_text = Lwa_lines-tdline.
concatenate txt lwa_lines-tdline into txt.
Endloop.
endform.
ABAP Read sales order header text self-built function