Use BADI WORKORDER_INFOSYSTEM to add Custom column offices in COOIS

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.