Requirement Description: according to the requirements raised by the LC business department, you need to add an office column in COOIS.
1. Add field offices to CI_IOHEADER of IOHEADER_TAB, as shown in the following figure:
2. Run se19 in badi name: WORKORDER_INFOSYSTEM and click Create Impl, as shown in the figure below.
3. Double-click TABLES_MODIFY_LAY, enter the code, and save it for activation.
DATA: begin of ST_VKBUR,
Vkbur type vkbur,
End of ST_VKBUR.
DATA: begin of ST_KDAUF,
Kdauf type kdauf,
End of ST_KDAUF.
DATA: ST_HEADER type ioheader.
Loop at CT_IOHEADER INTO ST_HEADER.
If not ST_HEADER is initial.
SELECT SINGLE KDAUF
FROM AFPO
INTO ST_KDAUF
Where aufnr = ST_HEADER-AUFNR.
SELECT SINGLE VKBUR
FROM VBAK
INTO ST_VKBUR
Where vbeln = ST_KDAUF-KDAUF.
ENDIF.
ST_HEADER-VKBUR = ST_VKBUR-VKBUR.
MODIFY CT_IOHEADER FROM ST_HEADER.
ENDLOOP.
4. The added fields can be found in the layout and displayed.