This post will help to PS Functional as well as Technical Consultant.
As per my practical experience; I found that there are number of blogs for the creation of customer field in WBS, Mapping of same as well as Validation and Substitutions, but couldn’t find all the relevant steps for integrating this whole scenario.
So, I decided to wrap-up all of this things in a single blog with an example.
BUSINESS SCENARIO :
- Let say, One Customer field (ZZXXXX) is to be assign in WBS
- Field is to be set as mandatory.
- Field data should be copy from Main WBS to all below WBS
1. To create Customer Field we will be using Exit : CNEX0007 : PS customer specific fields WBS element
Step 1 : Go to T-Code : SE11 > Open Structure CI_PRPS > Add Customer Field ZZXXXX*
* : Please, make sure while creating customer field . It should be start with ZZ as per SAP Guidelines, else system will not able to find that field in substitution ( I came across with this while an implementation project )
Step 2 : Go to T-code : CMOD > Create Project and assign this exit to created project.
Step 3 : After Assignment of exit , click on components and double click on highlighted program
Step 4 : Now it will take you to the Screen : SAPLXCN1 , then click on layout, screen painter will open. Now put ZZXXXX on screen & activate it.
Step 5 : Now, Go back to Project and double click on function exit : EXIT_SAPLCJWB_004, Now double click on Include : ZXCN1U21 and press enter & Assign value to ZZXXXX from cnci_prps_imp
This exit is used to retrieve data from table ( PRPS ) to customer filed ( ZZXXXX )
Step 6 : Now, Go back to Project and double click on function exit : EXIT_SAPLCJWB_005, Now double click on Include : ZXCN1U22 and press enter & Assign value to cnci_prps_exp from ZZXXXX
This exit is used to transfer value data from customer filed ( ZZXXXX ) to table ( PRPS )
Step 7 : Activate the Project and All the includes.
RESULT : Customer Field ZZXXXX created
2. After creating field, we want this field as mandatory and will do this by using Validation Function.I hope all are confirmtable with fundamental of Validation function
Step 1 : Create Validation Name under WBS Element in T-code : OPSI
Step 2 : Maintain Step for field with Check and Error Message
- Message ID can be new created and message can be created as per your requirement or you can use existing message ID and just create new message under it.
- T-code : SE91, will help to achieve all of this
RESULT : Validation Created ; which will create customer field mandatory.
3. Now, To achieve copy of field from Main WBS to all sub-WBS, we will use Substitution Function.I hope all are confirmtable with fundamental of Substitution function.
Step 1 : Create Substitution Name under WBS Element in T-code : OPSN
Step 2 : Lets create Step and choose Field “ ZZXXXX “
- Note : There are TWO Pre-requisite to getting this Field in substitution
- Go To SM30 > Maintain Table : VWTYGB01 > Create a New Entry for field as per below
- Go To SE38 > Execute Program : RGUGBR00 as per below
Now, you are able get this field in Step Creation as shown in below,
Step 3 : Select Substitution Method “ Field – Field Assignment “
Step 4 : Maintain Pre-requisite ( Level > 1 ) & Substitution as below,
Kindly, select Superior WBS field ( RCJ_PRPSUP-ZZXXXX ) as this value to be copy to all below level WBS.
RESULT : Substitution Created ; which copy data from Top WBS to all Sub-WBS for customer field
Step 1 : Create Sample Project Definition
Step 2: Attach L-0 WBS and Press Intermediate Save Button – System gives Error which derives from Validation as no data in field
Step 3: Go To Cust. Enhancement Tab & Put required Value on Field and then Press Intermediate Save Button – After that Error will eliminate
Step 4: Attach L-1 WBS under L-0 WBS: Press Enter > Press Intermediate Save > Check data on Cust. Enhancement Tab : Data derive from Substitution
I would like to thank my colleague Mr. Sonu Kumar for his contribution on ABAP Part.
Please, let me know if anyone have doubt or I missed something.
Your suggestions are most welcome.