Friday 20 May 2022

Process Order Screen Enhancements (COR1/COR2/COR3)

Customer fields in process order transactions (COR1/COR2/COR3) : PPCO0020 Screen Exit

Objective

In this blog post we are going to create a custom tab for Process Order transactions (COR1/COR2/COR3) with below 3 additional fields:

◉ Reason for Schedule Variance (Drop down options)

◉ Schedule End Date (Non-editable)

◉ Schedule End Time (Non-editable)

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

Step-by-step procedure:


Part 1: Custom field addition in AUFK table

1. Add the below fields in customer Include CI_AUFK.

- Reason for Schedule Variance
- Scheduled End Date
- Scheduled End Time

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

2. Create a custom table ZPTP_REASON_CODE with table maintenance to store the list of reason codes to be displayed as drop down list for the reason field.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

Part 2: Screen Exit implementation

3. Create an enhancement project ZPTPPROD in transaction CMOD.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

4. Assign enhancement PPCO0020 to this project.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

5. Implement Screen Exit SAPLXCO1 : 5100. Double Click on this screen number to create a Sub-Screen for holding our Custom Fields.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

6. Click on Layout Arrow in the Application Toolbar of (See the picture above) to reach the Screen-Painter pop-up window, where we will be creating following fields:

– Reason for schedule Variance – I/O field with ‘List with Key’ option,

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

– Schedule End Date – I/O field with Input not possible; associate the field with the custom field added in AUFK table by giving the name of the field same as the dictionary field.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

– Schedule End Time – I/O field with Input not possible; associate the field with the custom field added in AUFK table by giving the name of the field same as dictionary field.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

7. Now go back to the Flow Logic tab of Screen Painter and create a module STATUS_5100 under the PBO section with below logic to make the fields non-editable in display mode.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

8. Similarly, create another module INIT_LISTBOX to create a drop down menu for Reason field using VRM_GET_VALUES and VRM_SET_VALUES function modules.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills
    
9. To transfer the contents to the screen fields of custom tab, double click on the Function-Exit EXIT_SAPLCOKO_005 and put the following code in the include ZXCO1U21.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

10. To transfer the contents of the screen fields of custom tab to the table AUFK, double click on the Function-Exit EXIT_SAPLCOKO_006 and put the following code in the include ZXCO1U17.

SAP ABAP Connectivity, SAP ABAP Development, SAP ABAP Extensibility, SAP NetWeaver, SAP ABAP Career, SAP Jobs, SAP Skills

Note: Declare the necessary varaible globally in Include ZXCO1TOP.

Source: sap.com

No comments:

Post a Comment