*&---------------------------------------------------------------------*
*& Form FETCH_TEXT_INFO
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fetch_text_info .
refresh : istxh.
select * from stxh into corresponding fields of table istxh
where tdname = ivbak-vbeln.
loop at istxh.
perform fetch_text_information.
endloop.
endform. " FETCH_TEXT_INFO
*&---------------------------------------------------------------------*
*& Form FETCH_TEXT_INFORMATION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form fetch_text_information .
call function 'READ_TEXT'
exporting
id = istxh-tdid
language = istxh-tdspras
name = istxh-tdname
object = istxh-tdobject
importing
header = header
tables
lines = itf_text
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
others = 8.
if istxh-tdid = 'ZINF' and istxh-tdobject = 'VBBK'.
loop at itf_text.
info_order = itf_text-tdline.
endloop.
endif.
if istxh-tdid = 'ZCBG' and istxh-tdobject = 'VBBK'.
loop at itf_text.
c_bags = itf_text-tdline.
endloop.
endif.
if istxh-tdid = 'ZPPB' and istxh-tdobject = 'VBBK'.
loop at itf_text.
p_bags = itf_text-tdline.
endloop.
endif.
if istxh-tdid = 'ZADG' and istxh-tdobject = 'VBBK'.
loop at itf_text.
ad_mat = itf_text-tdline.
*write : /1 ad_mat.
endloop.
endif.
* if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* endif.
* write : /1 AD_MAT.
endform. " FETCH_TEXT_INFORMATION
 
 
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com