cancel
Showing results for 
Search instead for 
Did you mean: 

Transferring billing documjent to COPA

former_member217324
Participant
0 Kudos

Hi all,

We have 2 new fields in the VBRP table (Billing document line item level) and we would like to transfer this to COPA characteristics.

However, so far, we only manage to transfer these from the sales order table VBAP.

I have checked so far, I believe these 2 new fields are not avabile in TKEZU. (these are Z fields, means we have some user exit behind them)

Any ideas? Can this be done in any COPA user exit? KEDR?

Thanks in advance.

Ronny

Accepted Solutions (1)

Accepted Solutions (1)

coleti
Active Contributor
0 Kudos

Dear Ronny,

You can use the Characteristic Derivation Process (Transaction code KEDR) adding an Step Type of Enhancement. This step will call an ABAP code in of exit EXIT_SAPLKEDRCOPA_001 (SMOD: COPA0001).

On this step you can set your own logic to get the new fields in Sales Tables based on your billing or sales order.

Best regards,

Gabriel Coleti

former_member217324
Participant
0 Kudos

Dear Gabriel,

Thanks a lot. We are currently using this for other characteristics, however I think for the derivation from the billing document table, this is very tricky. Have you actually successfully implement this? The problem is when we create the COPA document during the billing document creation (to be precious, during the saving of billing document, COPA documents are generated), the billing document number somehow is not available and therefore cannot be used to read the table VBRP entry during this time.

best regards

Ronny

coleti
Active Contributor
0 Kudos

I see, but what kind of information you need to get from VBRP table that you don´t have in your sales order item(VBAP) ?

former_member217324
Participant
0 Kudos

Basically, these are fields that gets redetermine during the billing document creation. And they are Z fields, so not the most easiest in the world to get them 😉

coleti
Active Contributor

Right, so, as per my undersand, the PA document is generated by the Accounting Interface Function. During the Billing Processing, the FM AC_DOCUMENT_CREATE is called. and inside there you have the COPA derivation, based on the accounting tables item and header.

I am not sure if it is the best solution, the ideia that I have in your case is to do something using the memory and two ABAP codes.

In the first moment, you ask your ABAP to export to memory the fields information using the SD user exit EXIT_SAPLV60B_008 (SMOD Enhancement SDVFX008). At this point you have all VBRP/VBRK information. Because it is the point that SAP is transfering to accounting all line items information.

After that, in the COPA document you import from memory using the derivation user exit EXIT_SAPLKEDRCOPA_001

(SMOD Enhancement COPA0001).

Good luck with that.

Best regards,

Gabriel Coleti

former_member217324
Participant
0 Kudos

Thanks Gabriel! I will give it a try 😉

Answers (0)