‎2011 Jan 26 7:44 AM
Hello community,
about above topic there are several discussions on internet but I did not find any solution.
I am using above function module to create debit and credit memos with reference to a billing document. I hand over header data, item date and pricing condition PR00. After processing the function module the sales order had been created but inside the pricing shema the condition type MWST is missing. After entering analysis of pricing results for MWST I found all accesses. Two of them failed because of conditions. The middle one had been processed succesfully but the condition type had not been set.
Message 108 'Condiiton record exists, but has not been set.' comes up. After manual reprocessing of pricing with 'C' MWST has been set and every thing looks ok.
What is wrong that the condition type wont be set after processing FM SD_SALESDOCUMENT_CREATE? Is there any idea?
Thank you for your time in advance
Regards
Norbert
‎2011 Jan 28 5:08 AM
Dear Norbert Bürger,
Hi .While creating sales order in va01 are you giving that condition manually are it is picking automatically. If you need that automatic ask your functional consultants to do that . Just you pass that to the table
SALES_CONDITIONS_IN
wa_order_cond-itm_number = '000010'.
wa_order_cond-cond_type = 'ZJCD'.
"wa_order_cond-COND_VALUE = 5.
"WA_ORDER_COND-cond_st_no = '20'.
wa_order_cond-cond_value = '5'.
Better to use BAPI_SALESORDER_CREATEFROMDAT2.This is perfect.Internally that above fm used in this also.
Regards,
Madhu.
‎2022 Mar 10 3:09 PM
Hi,
even though this topic is quite old we faced a similar issue. When creating a new sales doc with reference the address data from the partners is not taken into account properly. So we solved it by reading all the data (especially the country) of the ship-to / bill-to.
e.g. like that (address numbers are coming from the reference doc via function module SD_VBPA_READ_WITH_VBELN):
CALL FUNCTION 'ADDR_GET_COMPLETE_ALL_TYPES'
EXPORTING
addrnumber = ls_sales_partner-address
address_object_type = '1'
IMPORTING
addr1_complete_bapi = ls_partneraddresses
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
person_not_exist = 3
internal_error = 4
address_blocked = 5
person_blocked = 6
contact_person_blocked = 7
OTHERS = 8.
IF sy-subrc = 0.
MOVE-CORRESPONDING ls_partneraddresses TO ls_sales_partner.
ELSE.