cancel
Showing results for 
Search instead for 
Did you mean: 

Partner information in CO-PA derivation

tobiasbertsche
Explorer
0 Kudos

Dear SCN members,

we want to derive partner information from SD document within the CO-PA derviations for incoming sales orders.

We realized this with include ZXKKEU11 (enhancement COPA0001, exit EXIT_SAPLKEDRCOPA_001) as last step of KEDR derivations. We derive the partner from table VBPA.

It works fine whenever a SD document is created, but if we change the partner in SD document header, our user exit has not the actual data as in VBPA, but the old (not updated) state. We think that this is because the information in VBPA is not finally updated in the database when the userexit is running.

Is there any possibility to access the temporary SD information that contains the partner information before it is written into VBPA?

Thanks for your help!

Kind regards

Tobias

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tobias,

Is there any specific reason you went with an enhancement step in the derivations instead of a table lookup step?

User-exits are limited in the temporary data they can access. You would have to save the partner data to a memory ID in an SD user exit, then read that memory ID in the CO-PA user exit.

I hope this works for you.

Best wishes.

tobiasbertsche
Explorer
0 Kudos

Dear Bulut O,

thanks for your reply.

The reason for using a user exit is that we have three different processes in place, for which we want to derive the partner information:

1. Order Intake and Sales with SD document directly derived in CO-PA (partner derivation working)

2. Order Intake of Service Orders is posted when a debit memo request (SD document) is created out of resource-related billing (this is where we have our problem)

3. Sales of Service Orders is posted during CS order settlement

What do you mean with "You would have to save the partner data to a memory ID in an SD user exit, then read that memory ID in the CO-PA user exit" - do you have an example for that?

Thanks in advance,

Tobias

Former Member
0 Kudos

Hi Tobias,

Memory IDs are basically pointers and are used to make temporary (in-memory) data accessible across programs. You can't directly read data created in one program (in this case an SD program) from another (in this case a CO program), so you assign the value you want to read to a specific memory location designated by the memory ID and then read that. Your requirement is itself a good example.

This is deep ABAP territory, so an ABAP developer would be able to provide more detailed and more accurate information.

I hope this helps.

Best wishes.