- Use path visible in transaction AL11
- Create SQ02 Query to read f.e. MSEG table
- Put the script in the following sections of extras->code tab:
DATA: L_LINE TYPE STRING.
DATA: T_FILE(999) TYPE C.
DATA: L_TEMP TYPE STRING.
ENCODING DEFAULT
WITH SMART LINEFEED.
CONCATENATE
'Material'
'Quantity'
'Movement'
INTO L_LINE
SEPARATED BY C_SEMI.
TRANSFER L_LINE TO T_FILE.
CLEAR L_TEMP.
L_TEMP = MSEG-MENGE.
* Row creation with output to csv
CONCATENATE
MSEG-MATNR
L_TEMP
MSEG-BWART
INTO L_LINE
SEPARATED BY C_SEMI.
TRANSFER L_LINE TO T_FILE.
ENDLOOP.