Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update VBAP-PCTRF (profit center for billing) in sales order using IDoc?

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Jelena
Active Contributor
0 Kudos

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.

former_member365886
Contributor
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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.