Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 03, 2017 at 01: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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2017 at 04: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Nov 02, 2017 at 08: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.

    Add comment
    10|10000 characters needed characters exceeded