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
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.
Part 2: Screen Exit implementation
3. Create an enhancement project ZPTPPROD in transaction CMOD.
4. Assign enhancement PPCO0020 to this project.
5. Implement Screen Exit SAPLXCO1 : 5100. Double Click on this screen number to create a Sub-Screen for holding our Custom Fields.
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,
– 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.
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.
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.
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.
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.
Note: Declare the necessary varaible globally in Include ZXCO1TOP.
Source: sap.com
No comments:
Post a Comment