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

problem with BAPI_CUSTOMERRETURN_CREATE, qty is 0

Former Member
0 Likes
1,192

hi all,

i am using BAPI_CUSTOMERRETURN_CREATE to create SO return, the SO no is sucessfully created but the quantity is 0.

did i miss anything?

here is my coding:

iheader-doc_type = 'RE'.

iheader-sales_org = '1001'.

iheader-distr_chan = '01'.

iheader-division = '01'.

iheader-ref_doc = '0090009921'.

iheader-refdoc_cat = 'M'.

iheader-refdoctype = 'F2'.

iheader-purch_date = sy-datum.

iheader-purch_no_c = 'oa'.

APPEND iheader.

ipartner-partn_role = 'AG'.

ipartner-partn_numb = '0005000005'.

  • ipartner-LANGU = 'E'.

APPEND ipartner.

item-itm_number = '000001'.

item-material = '000000000020019790'.

item-target_qty = '10.000'.

APPEND item.

CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'

EXPORTING

salesdocumentin = w_vbeln

return_header_in = iheader

  • RETURN_HEADER_INX =

  • SENDER =

  • BINARY_RELATIONSHIPTYPE =

  • INT_NUMBER_ASSIGNMENT =

  • BEHAVE_WHEN_ERROR =

  • LOGIC_SWITCH =

  • TESTRUN = 'X'

  • CONVERT = ' '

  • IMPORTING

  • SALESDOCUMENT =

TABLES

return = ireturn

RETURN_ITEMS_IN = item

  • RETURN_ITEMS_INX =

return_partners = ipartner

  • RETURN_SCHEDULES_IN =

  • RETURN_SCHEDULES_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 =

.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
524

Hi Ester,

Pass the quantity ti the schedule lines as well. REQ_QTY = '10.000'.

item_sl-ITM_NUMBER= '000001'.

item_sl-SCHED_LINE = '0001'.

item_sl-target_qty = '10.000'.

item_sl-REQ_DATE = sy-datum

APPEND item_sl.

Regards,

Ravi

1 REPLY 1
Read only

Former Member
0 Likes
525

Hi Ester,

Pass the quantity ti the schedule lines as well. REQ_QTY = '10.000'.

item_sl-ITM_NUMBER= '000001'.

item_sl-SCHED_LINE = '0001'.

item_sl-target_qty = '10.000'.

item_sl-REQ_DATE = sy-datum

APPEND item_sl.

Regards,

Ravi