Skip to Content
0

Transferring billing documjent to COPA

Feb 21 at 10:16 AM

161

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Gabriel Felipe Coleti Feb 21 at 12:09 PM
0

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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) ?

0
Former Member

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 ;)

0

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

1
Former Member

Thanks Gabriel! I will give it a try ;)

0