cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of sales order(Credit memo request) w.r.t invoice

Former Member
0 Kudos

Hi want to create a Credit memo request (sales order) with respect to a invoice.

Can any body suggest me a bapi or Fm which will directly create a sales order with input as invoice number?

Also all mandatory import export parameters to be filled?

Thanks in Advance,

Rohan.

Accepted Solutions (0)

Answers (1)

Answers (1)

Jelena
Active Contributor
0 Kudos

You should be able to use one of these BAPIs (depending on your release - the ...2 one is the lates and greatest, it seems):

BAPI_SALESORDER_CREATEFROMDAT1

BAPI_SALESORDER_CREATEFROMDAT2

BAPI_SALESORDER_CREATEFROMDATA

You'll find a lot of information on them anywhere, please use search. There is also a decent documentation available for each one of them.

The invoice reference will have to be entered as follows (note that it's always at line level):

order_items_in-ref_doc = <invoice number = VBRK-VBELN>.

order_items_in-ref_doc_it = <<invoice line number = VBRP-POSNR.>.

order_items_in-ref_doc_ca = 'M'. " or whatever category is applicable

Keep in mind though that BAPIs do NOT always work the same way as VA01. If, for example, you have the requirements and copy routines (VOFM), they might get bypassed when creating an order with BAPI.

Any follow-up questions I'd suggest to post in ABAP forum. Good luck!