Skip to Content

Discount condition record exit not in Return SO using BAPI_CUSTOMERRETURN_CREATE ref to Billing

Dear Friend,

could you guide.....

Basic price updated wrongly and discount conditon record as missed in Return SO.

CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
EXPORTING
* SALESDOCUMENTIN =
return_header_in = gw_header
return_header_inx = gw_headerx
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
salesdocument = gv_salesdoc
TABLES
return = gt_ret
return_items_in = gt_ord_item
return_items_inx = gt_ord_itemx
return_partners = gt_part
return_schedules_in = gt_schld
return_schedules_inx = gt_schldx
return_conditions_in = gt_condition
* 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 =.

Details :

following requiment to creat Return Sales order reference to Billing Documents.

I facing one issue regarding Condition record. if i pass condition record having base price and discount record. Then it throw an error like "Condition ZB2C is missing in pricing procedure A V YHTSO2".

But i remove gt_condition record then Return SO was created success fully. But only base price condition are copied with different base price. it want not fetching discount condition record.

Reference No:

Return SO:

Regards,

Bhagaban Pradhan

invoice-ref.jpg (78.6 kB)
return-so.jpg (81.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 28, 2017 at 05:32 PM

    I am not a developer, just a functional consultant, so please forgive me if I ask stupid questions.

    What is the outcome if you try creating the return document not via the bapi, but from VA01 and use the same billing as reference - is the discount determined?

    For the document, which you managed to create, but the condition is missing - what do you see in the determination log for pricing for ZB2C?

    Normally, when you create a return order and reference billing, the prices are fixed (this a setting in VTAF per item category for a combination of source billing type and target order type), but it is worth double-checking, especially when I see that your base price YKP0 also does not correspond to what was in the billing. Did you reprice the document by any chance? I can see that you do not use logic_switch, but if repricing comes from customizing...

    I do not really know how exactly one needs to call the bapi to create return order referencing a billing document and whether this is supported at all, but did you check if you have referenced the right billing document (VBAP, VBFA)?

    Also, check if the pricing procedure in your document (created from the bapi) is the same as the pricing procedure when you try creating a document referencing the same billing. This could be a result of not correctly referencing the billing document via the FM. Normally, the referencing document inherits the pricing procedure from the referenced document (in your case - the billing). If you create without reference, the determined pricing procedure could be different.

    Add comment
    10|10000 characters needed characters exceeded

    • After you create the document as an exact copy, it is possible to modify storage location, usage and order reason via document change bapi (e.g. bapi_customerreturn_change). It is not the most elegant solution, but you do not have a way to guarantee the right pricing procedure with the other bapi and you are stuck.