Académique Documents
Professionnel Documents
Culture Documents
Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner
About
About
share
0 share
0 tweet share
0 like
0
Follow
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 1/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
METHOD – TABLES_MODIFY_LAY
Symptom:
For preparing this document, references have been taken from the
below notes.
Note # Description
615206 COOIS: BADI order delay in IOHEADER
806375 COOIS: Order delay Business Add-In in IOHEADER
434123 Filling and displaying own elds in information system
363327 COOIS/CO26/CO28: Change list of elds that can be
displayed
How:
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 2/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
Following is the step by step procedure for adding new fields for the COOIS
transaction output:
2. Add the required fields in the structure (this structure will later be added
as an append structure in IOHEADER_DELAY ). These fields are the new
fields or new columns that will be displayed on the COOIS ALV output.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 3/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
SAVE the structure. Input the name of a package, Transport Request number
and ACTIVATE the structure.
Below is the screen print of the structure IOHEADER_DELAY before adding the
fields (or before performing an append structure):
In the pop up, input the name of the structure that we created in step 1 & step
2 so that this structure can be appended to IOHEADER_DELAY.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 4/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 5/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
Input “IOHEADER” in the field string name and “RCNHEAD” in the include
name as shown below and click on Execute –
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 6/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
Input the name of the structure “IOHEADER” in the field string name Choose
F8 to execute the report.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 7/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
Below is the screen print of the report RCOTX000 output. You will be able to
iden fy your fields in the below screen (fields per this requirement are not
shown below though)
Click “SAVE” and you will be taken to back to the selec on screen. You can now
close the transac on SE38.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 8/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
Click Con nue. On the following screen, input the implementa on short text and click
SAVE.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 9/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
9. Click on the interface tab. In the list of methods, the logic for the current
requirement is to be implemented in the method TABLES_MODIFY_LAY.
11. For the current requirement, the logic is written to add data into the method
interface parameter CT_IOHEADER. This internal table contains data that
would be displayed as the output. Hence we implement our logic in this method.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 10/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 11/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
METHOD if_ex_workorder_infosystem~tables_modify_lay.
BEGIN OF ty_qave,
prueflos TYPE qals–prueflos,
aufnr TYPE qals–aufnr,
vcode TYPE qave–vcode,
END OF ty_qave.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 12/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
CLEAR: ls_qals.
READ TABLE lt_qals INTO ls_qals WITH KEY aufnr =
<fs_ct_ioheader>–aufnr.
IF sy–subrc = 0.
<fs_ct_ioheader>–prueflos = ls_qals–prueflos.
<fs_ct_ioheader>–zzstat34 = ls_qals–zzstat34.
<fs_ct_ioheader>–zzstat35 = ls_qals–zzstat35.
<fs_ct_ioheader>–zzlmengezub = ls_qals–zzlmengezub.
CLEAR: ls_qave.
READ TABLE lt_qave INTO ls_qave WITH KEY prueflos = ls_qals–
prueflos
aufnr = <fs_ct_ioheader>–aufnr.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 13/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
IF sy–subrc = 0.
<fs_ct_ioheader>–zzvcode = ls_qave–vcode.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDMETHOD.
A er wri ng the logic, SAVE and ACTIVATE the method and the BADI
implementa on. Also, for your requirements, please debug and check if you
are able to populate data as needed into the relevant fields.
Following are the new fields or columns that we have added to the COOIS ALV
OUTPUT. Please note that, displaying the below fields or columns may also
need a change in the layout se ngs to display the below columns. Hence,
please make sure that these columns exist in the ALV output by changing the
layout se ngs.
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 14/20
12/04/2018 Add New or Custom Fields to COOIS Output | SAP Blogs
You have now completed the procedure to enhance / add new or custom
elds to the transaction COOIS using the BADI
WORKORDER_INFOSYSTEM.
Thank you so much for reading and I am happy to have helped, Great
Day Ahead !!
My Best Regards,
Alert Moderator
https://blogs.sap.com/2015/10/07/add-new-or-custom-fields-to-coois-output/ 15/20