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)


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

  1. 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

 

  1. Create an enhancement project ZPTPPROD in transaction CMOD.

  1. Assign enhancement PPCO0020 to this project.

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

  1. 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.

  1. 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.

  1. 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

 

  1. 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.

  1. 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!

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x