Process Order Screen Enhancements (COR1/COR2/COR3)
Customer fields in process order transactions (COR1/COR2/COR3) : PPCO0020 Screen Exit
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)
Part 1: Custom field addition in AUFK table
- Add the below fields in customer Include CI_AUFK.
- Reason for Schedule Variance
- Scheduled End Date
- Scheduled End Time
- 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.
Part 2: Screen Exit implementation
- Create an enhancement project ZPTPPROD in transaction CMOD.
- Assign enhancement PPCO0020 to this project.
- Implement Screen Exit SAPLXCO1 : 5100. Double Click on this screen number to create a Sub-Screen for holding our Custom Fields.
- 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,
– 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.
– 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.
- 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.
- 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.
Part 3: Function Exits Implementation
- 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.
- 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.
Note: Declare the necessary varaible globally in Include ZXCO1TOP.
Conclusion: In this way you can enhance your standard screen with any custom field business demands. If you understand the concept behind these steps, you shall be able to enhance any standard transaction, not just COR1/2/3. All you need to do is find the suitable screen exit in SMOD. Try enhancing other transactions and leave comments below with your findings or concerns.
Thank you for reading! Like, Share and Comment!