cancel
Showing results for 
Search instead for 
Did you mean: 

VA01 with COPA at item level in Account assign tab via BAPI_SALESORDER_CREATEFROMDAT2

Pankaj13
Explorer
0 Kudos

Dear Experts,

I have sincerely explored a lot about this, and unfortunately could not find any solution. Apologies if there exists any solution and could not find on my own, need your help.

Scenario :-

I am running in Implementation project where I need to create sales order via custom program using BAPI_SALESORDER_CREATEFROMDAT2. Problem lies here, in my scenario, we have Account based COPA activated, hence there are COPA fields in line item of sales Order(VA01) at Account Assignment Tab on clicking PROFITABILITY SEGMENT button.

Here I am unable to pass COPA fields in BAPI. Kindly help to achieve this cumbersome requirement.

For example in MM MIGO BAPI - BAPI_GOODSMVT_CREATE to pass COPA fields, we can use

COPA_PROFITABILITY_SEGMENT, but this doesn't helps in BAPI_SALESORDER_CREATEFROMDAT2.

If any information missing, kindly let me know, I shall respond promptly. Many thanks in advance for helping and guiding.

View Entire Topic
Pankaj13
Explorer
0 Kudos

One of my team mate has figured out the solution, narrating here if anyone needs it for their scenario.

Suppose there are 3 CO-PA fields out of which 2 are to be manually entered and 1 will be automatically derived based on other 2 fields.

Created these 3 fields (i.e. ZWW002, ZWW003, etc as defined for COPA) extension/custom fields at Line order level i.e. VBAP level.

In KEDR transaction maintain the Table lookup as shown in screen shot KEDR.

Pass these COPA fields in EXTENSIONIN in BAPI for creating sales Order....just like other custom fields are pushed via EXTENSION after appending required structures. Once done, these copa fields will get populated in VBAP and also will get populated in COPA sales order table

CE41000_ACCT. Derivation will also happen correctly.