Add Field in COOIS 2 SAP

12
Step by step Add Custom Field (COOIS) with BADI AUTHOR: DEKA FANDESTIA | POSTED AT: 1:15 AM | F ILED UNDER : ABAP In this tutorial I will share how to add fields in transaction code COOIS (Production Order Information System). Field to be added is WEMPF (goods receipt) and ABLAD (Unloading Point). - My first step would be to add custom fields. for these additions, can be added at the table IOHEADER_DELAY.  open transaction code SE11, write IOHEADER_DELAY  so add field WEMPF and ABLAD. 

description

Add Field in COOIS 2 SAP

Transcript of Add Field in COOIS 2 SAP

Step by step Add Custom Field (COOIS) with BADIAUTHOR:DEKA FANDESTIA| POSTED AT: 1:15 AM |FILED UNDER:ABAPIn this tutorial I will share how to add fields in transaction code COOIS (Production Order Information System).Field to be added is WEMPF (goods receipt) and ABLAD (Unloading Point).

- My first step would be to add custom fields. for these additions, can be added at the table IOHEADER_DELAY. open transaction code SE11, write IOHEADER_DELAY

so add field WEMPF and ABLAD.

-The second step is to edit the Badi.for this tcode SAPLCOISEXT I use the program with (include) LCOISEXTU02

My next step will modify the program

Data Declaration

finally we have successfully added a custom field and now we will try tcode COOIS

COCR_CMX_BI_INFOCOIS_WO_INFO_DELAY1COIS_WO_INFO_PREDEC1Help textBAdI: PP and PI Order Information SystemUseThis Business Add-In (BAdI) is called in the application components Information System (PP-SFC-IS), Order Processing (PP-SFC-EXE) and Process Order (PP-PI-POR).Function group: COBADIThis Business Add-In can be used to fill additional (customer-specific) fields in the order info system for production orders and process orders. You can also react to entries on the selection screen or the output list.RajThe BAdI comprises the following methods for the selection screen:Call in selection screen of the Order Information System( AT_SELECTION_SCREEN)This method is only called in the transactions that use the report PPIO_ENTRY: COOIS, COHV, COOISPI, COHVPI, CO04N, CO05N und COMAC.The BAdI comprises the following methods for representing the new transactions of the Order Info System (COOIS, COHV, COOISPI, COHVPI, CO04N, CO05N, COMAC, CO01, CO02, CO03, COR1, COR2, COR3, CO78, SARA, SARI):Processing of order and planned order tables( TABLES_MODIFY_LAY)Process detail lists( DETAIL_LIST_LAY)Process layout-based object overviewOVERVIEW_TREE_LAYCall in the event of action on output listAT_OUTPUT_SCREEN_LAY)The BAdI comprises the following methods for representating the old transactions in the Order Information System (CO26, CO28, COID, COIO):Processing of order tables( ORDER_TABLES_MODIFY)Processing of planned order tables( PLANNED_ORDER_TABLES_MODIFY)Call in case of action on output list( AT_OUTPUT_SCREEN)Processing of object overview( OVERVIEW_MODIFY)RequirementsTo use your own fields, you must first define the fields in the customer include for the relevant structure.Standard settingsThe Business Add-In is not active in the standard system. The Business Add-In can be used several times.ActivitiesTo activate the Business Add-In, you must create an active implementation. Note that the Business Add-In can be used several times and all the active implementations are therefore called and run through.After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:1. In the dialog box, enter a name for the implementation of the Add-In and choose Create.The system displays the initial screen for creating Business Add-In implementations.2. On this screen, enter a short description for your implementation in the Implementation Short Text field.3. If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.4. Save your entries and assign the Add-In to a package.5. To edit a method, double-click its name.6. Enter your implementation code between the method ~. and endmethod. statements.7. Save and activate your code. Navigate back to the Change Implementation screen.Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step:8. Choose Activate.When the application program is executed, the code you created is run through.RESET N1Along with the enhancement used to add customer-specific fields, this BAdI can also be used to:Prevent changes to the layout or selection of specific profiles.This prevents the display of critical fields, for example (data protection).Prevent the user jumping to mass processing (variant SAP&HVOM) by choosing a different variant from the info system (transaction COOIS, variant SAP&COOIS).

Note 806247 - COOIS: BADI for predecessor status SummarySymptomThis note provides a sample implementation for the Business Add-In WORKORDER_INFOSYSTEM. The implementation presents only a proposal for how to use the BAdI and not SAP functions.As a result of this implementation, information on the three preceding operations is added to the list of operations.Other termsPPIO_ENTRY, COOIS, COHVReason and Prerequisites-Solution1. Use Transaction SE11 to create the CI_IOOPER customer include in the IOOPER structure.2. Add the IOOPER_PREDEC include to the CI_IOOPER customer include.3. Use Transaction SE18 to copy the COIS_WO_INFO_PREDEC1 implementation and activate all your changes.

NotesNote 615176 - COOIS: BADI for predecessor status SummarySymptomThis note delivers an example implementation for the Business Add-In (BAdI) WORKORDER_INFOSYSTEM. The implementation represents only a proposal for the usage of the BAdI and not an SAP function.You can activate or copy and change this implementation yourself.As a result, information about the three previous operations is added to the list of operations.Other termsPPIO_ENTRY, COOIS, COHVReason and PrerequisitesThe implementation is delivered as inactive. To activate it, execute steps 2 and 3.After you implement this note and activate the implementation:If the operation list is called with a profile or layout that begins with PRE or /PRE, the implementation is executed and the fields PREx_STATUS, PREx_STTXT, PREx_QUANT, PREx_MGVRG, PREx_LMNGA, PREx_MEINH, PREx_SSEDD, PREx_SSEDZ, PREx_IEDD and PREx_IEDZ are filled with the relevant values (whereby in each case three structures exist with x =1, 2 and 3).Solution1. Use transaction SE11 to create the structure IOOPER_PREDEC in the package COIS.Set the enhancement category to "Can Be Enhanced, Character-Type or Numeric-Type".Add the following fields:ComponentComponent TypeReference table, Reference field

PRE1_STTXTCHAR40

PRE2_STTXTCHAR40

PRE3_STTXTCHAR40

PRE1_STATUSCHAR4

PRE2_STATUSCHAR4

PRE3_STATUSCHAR4

PRE1_QUANTCHAR4

PRE2_QUANTCHAR4

PRE3_QUANTCHAR4

PRE1_MGVRGMGVRGIOOPER_PREDECPRE1_MEINH

PRE1_LMNGALMNGAIOOPER_PREDECPRE1_MEINH

PRE1_MEINHMEINH

PRE2_MGVRGMGVRGIOOPER_PREDECPRE2_MEINH

PRE2_LMNGALMNGAIOOPER_PREDECPRE2_MEINH

PRE2_MEINHMEINH

PRE3_MGVRGMGVRGIOOPER_PREDECPRE3_MEINH

PRE3_LMNGALMNGAIOOPER_PREDECPRE3_MEINH

PRE3_MEINHMEINH

PRE1_SSEDDSSEDD

PRE1_SSEDZSSEDZ

PRE1_IEDDIEDD

PRE1_IEDZIEDZ

PRE2_SSEDDSSEDD

PRE2_SSEDZSSEDZ

PRE2_IEDDIEDD

PRE2_IEDZIEDZ

PRE3_SSEDDSSEDD

PRE3_SSEDZSSEDZ

PRE3_IEDDIEDD

PRE3_IEDZIEDZ

PRE1_ARBPLARBPL

PRE2_ARBPLARBPL

PRE3_ARBPLARBPL

Activate the structure (Ignore warnings).2. Use transaction SE11 to display the structure IOOPER and create the customer include CI_IOOPER by double-clicking CI_IOOPER.Set the enhancement category of CI_IOOPER to "Can Be Enhanced, Character-Type or Numeric-Type".Add the following fields:ComponentComponent type

.INCLUDEIOOPER_PREDEC

Activate the structure (Ignore warnings).3. Use transaction SE38 to execute the report RCNCT000 and enter IOPER as the field string name and RCNOPER as the include name.Choose "Execute" and then choose "Generate".4. Use transaction SE38 to execute the report RCOTX000 and enter IOOPER as the field string name (afterwards, choose F8).Enter the following texts and save your entries:TableField4 Texts

IOOPERINDEX_NODE

IOOPERPRE1_STTXTStatus Text 1Status Text 1Status 1Status 1

IOOPERPRE2_STTXTStatus Text1Status Text 1Status 2Status 2

IOOPERPRE3_STTXTStatus Text 3Status Text 3Status3Status3

IOOPERPRE1_STATUStatus 1Status 1Status 1Status 1

IOOPERPRE2_STATUStatus 2Status 2Status 2Status 2

IOOPERPRE3_STATUStatus 3Status 3Status3Status3

IOOPERPRE1_QUANTQuantity Variance 1Quantity Variance 1Quantity Variance 1Qty Var. 1

IOOPERPRE2_QUANTQuantity Variance 2Quantity Variance 3Quantity Variance 1Qty Var. 2

IOOPERPRE3_QUANTQuantity Variance 3Quantity Variance 3Quantity Variance 1Qty Var. 3

IOOPERPRE1_MGVRGOperation Quantity 1Operation Quantity 1Operation Quantity 1Op. Qty 1

IOOPERPRE1_LMNGAConfirmed Yield 1Confirmed Yield 1Confirmed Yield 1Cnf. Yield1

IOOPERPRE2_MGVRGOperation Quantity 2Operation Quantity 2Operation Quantity 2Op. Qty 2

IOOPERPRE2_LMNGAConfirmed Yield 2Confirmed Yield 2Confirmed Yield 2Cnf. Yield2

IOOPERPRE3_MGVRGOperation Quantity 3Operation Quantity 3Operation Quantity 3Op. Qty3

IOOPERPRE3_LMNGAConfirmed Yield 3Confirmed Yield 3Confirmed Yield 3Cnf. Yield3

IOOPERPRE1_SSEDDLatest End Date 1Latest End Date 1Latest End Date 1LatestEnd1

IOOPERPRE1_SSEDZLatest End Date 1Latest End Date 1Latest End Date 1Latest End Date 1

IOOPERPRE1_IEDDActual End Date 1Actual End Date 1Actual End Date 1ActEndDat1

IOOPERPRE1_IEDZActual End Time 1Actual End Time 1Actual End Time1ActEndDat1

IOOPERPRE2_SSEDDLatest End Date 2Latest End Date 2Latest End Date 2Latest End Date 2

IOOPERPRE2_SSEDZLatest End Time 2Latest End Time 2Latest End Time 2Latest End Time 2

IOOPERPRE2_IEDDActual End Date 2Actual End Date 2Actual End Date2Act. End2

IOOPERPRE2_IEDZActual End Time 2Actual End Time 2Actual End Time 2Act. End 2

IOOPERPRE3_SSEDDLatest End Date 3Latest End Date 3Latest End Date 3LatestEnd3

IOOPER

PRE3_SSEDZ Latest End Time3 Latest End Time 3 Latest End Time 3 LatestEnd3

IOOPERPRE3_IEDDActual End Date 3Actual End Date 3Actual End Date 3ActEndDat3

IOOPERPRE3_IEDZActual End Time 3Actual End Time 3Actual End Time 3ActEndDat3

IOOPERPRE1_ARBPLWork Center 1Work Center 1Work Center 1Work Ctr 1

IOOPERPRE2_ARBPLWork Center 2Work Center 2Work Center 2Work Ctr

IOOPERPRE3_ARBPLWork Center 3Work Center 3Work Center 3Work Ctr 3

5. Use transaction SE19 to create the implementation COIS_WO_INFO_PREDEC1 for the BAdI WORKORDER_INFOSYSTEM in the package COIS.Implement the source code for the method ORDER_TABLES_MODIFY using transaction SNOTE (see below).As of Release 600, use the method TABLES_MODIFY_LAY instead of the method ORDER_TABLES_MODIFY.6. Activate the implementation.