1. After Entering the master data purchase order text, use the editor to open the text editing box;
2. There is a "Header" under the "go to" menu, and the basic information is displayed as follows:
3. Call reports:
ReportZtest001.
DataTmp_nameTypeTHEAD-TDNAME.
DataTmp_matnrTypeMatnr.
Data LinesLikeTlineOccurs 0 With Header Line.
DataTmp18TypeChar18.
Tmp_matnr ='123'.
Call Function 'Conversion _ exit_alpha_input '"material encoding completion leading 0
Exporting
Input= Tmp_matnr
Importing
Output= Tmp18
.
Tmp_name = tmp18.
Call Function 'Read _ text' "reads text data
Exporting
Client = SY-MANDT
ID = 'Best'
Language = '1'
Name = tmp_name
Object = 'Aterial'
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
.
Loop AtLines.
Write:/Lines-Tdline.
Endloop.