Add to the Excel output as below
Step 1: Modify output structure
Step 2: put data into the new field
Step 3: Add 1 more row to internal table define data type for excel column
COL_NO = 2 is for Material Description
Step 4: Set column title
Step 5: enhance form FORM XXL_EXPORT
create implicit enhancement at beginning of the subroutine, copy all logic of the subroutine and then adjust as below:
declare internal table DTAB2 same structure as DTAB and move MAKTX to second position
Move data from DTAB to DTAB2 and change the import tables parameter from DTAB to DTAB2
The reason of using DTAB2 is to move MAKTX to second index of data source internal table for excel
DTAB -> MAKTX is at the last position
DTAB2 -> MAKTX is at the second position
Exit here to do not process SAP standard logic of the subroutine
The SAP standard logic (METHOD i_oi_spreadsheet~insert_full) set data to EXCEL by index that the reason why we use DTAB2 to set MAKTX at second position