Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

'BAPI_CUSTOMERRETURN_CREATE' input

Former Member
0 Likes
2,334

I need to create return order (va01->create order with reference to ->billing document) from given invoice number.

Can someone please help me on what input table/parameter need to be filled out in BAPI 'BAPI_CUSTOMERRETURN_CREATE'?

And brief idea about how to create the parameter for the BAPI from the given billing document?

Eg: Do we need to read all order creation inputs from the billing document sales order? Or BAPI will do this logic if we give invoice number as input?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
979

hiiii

please refer to following code given in link

regards

twinkal

4 REPLIES 4
Read only

Former Member
0 Likes
979

Hi,

I hope the below link can help you.

Thanks,

Khushbu.

Read only

Former Member
0 Likes
980

hiiii

please refer to following code given in link

regards

twinkal

Read only

0 Likes
979

Hi,

Check this one

Hi,

For Return Orders you may to use the BAPI:

You may have to populate below items.

CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'

EXPORTING

SALESDOCUMENTIN =

RETURN_HEADER_IN = lst_header_in

RETURN_HEADER_INX = lst_header_inx

SENDER =

BINARY_RELATIONSHIPTYPE =

INT_NUMBER_ASSIGNMENT =

BEHAVE_WHEN_ERROR =

LOGIC_SWITCH =

TESTRUN =

CONVERT = ' '

IMPORTING

SALESDOCUMENT = l_babi_vbeln

TABLES

RETURN = ltbl_return

RETURN_ITEMS_IN = tbl_items

RETURN_ITEMS_INX = ltbl_items_inx

RETURN_PARTNERS = tbl_partners

RETURN_SCHEDULES_IN = tbl_schedule_in

RETURN_SCHEDULES_INX = ltbl_schedule_inx

RETURN_CONDITIONS_IN =

RETURN_CFGS_REF =

RETURN_CFGS_INST =

RETURN_CFGS_PART_OF =

RETURN_CFGS_VALUE =

RETURN_CFGS_BLOB =

RETURN_CFGS_VK =

RETURN_CFGS_REFINST =

RETURN_TEXT =

RETURN_KEYS =

EXTENSIONIN =

PARTNERADDRESSES =

Read only

0 Likes
979

Just wanted to update all:

I need the reference billing (and its sales order details) to be copied in new sales order.

Following BAPI worked for me. Thanks for your input.

CALL FUNCTION 'BAPI_SALESDOCUMENT_COPY'

EXPORTING

salesdocument = lv_billing_document

documenttype = lv_new_sales_ord_type

IMPORTING

salesdocument_ex = lv_vbeln.

Note:

Input: billing document number

new sales order type

Output: new sales order created.