11-02-2017 5:34 PM
Hello Experts,
Can anybody tell me that how can I update the VBAP-PCTRF (profit center for billing) in sales order using IDoc? I was checking IDoc SALESORDER_CREATEFROMDAT2 (message type, basic type SALESORDER_CREATEFROMDAT202) but I cannot apparently find the field. What I found out is E1BPSDITM-PROFIT_CTR which I think connects to VBAP-PRCTR. Can anyone of you please let me know.
Regards,
Aniruddha
11-03-2017 1:02 PM
Got the solution...
Step1: Use (SAPFV45P)US_VBAPKOM any placeholder field say ZZXXXX ----> get the value and put in VBAP-PCTRF
Step2: Also set this flag value (SAPFV45P)RRICB_FLAG ---> 'X'
Tested and it keeps the VBAP-PCTRF as expected which can be seen in sales order that is just created by IDoc.
11-02-2017 8:30 PM
I'm not an expert on this but I doubt this field can be sent in the IDoc. Not sure what is your scenario exactly but search in SAP Notes by VBAP-PCTRF and you'll find some FAQ / Consulting notes on how this field works.
11-03-2017 4:05 AM
Hi,
You can try to find a placeholder e.g. unused field in IDOC (SALESORDER_CREATEFROMDAT2) and then during transport of values in copy control you need to write a VOFM routine, where based on business logic you may populate VBAP-PCTRF = IDOC-un-used field segment value.
Regards,
Avik
11-03-2017 10:46 AM
So, does it mean that FV45PFAP_VBAP_FUELLEN -> line 851 PERFORM userexit_move_field_to_vbap(sapmv45a) called in MV45AFZZ has to be used to populate VBPA-PCTRF? I'm trying to explore this.
11-03-2017 1:02 PM
Got the solution...
Step1: Use (SAPFV45P)US_VBAPKOM any placeholder field say ZZXXXX ----> get the value and put in VBAP-PCTRF
Step2: Also set this flag value (SAPFV45P)RRICB_FLAG ---> 'X'
Tested and it keeps the VBAP-PCTRF as expected which can be seen in sales order that is just created by IDoc.