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

SD_SALESDOCUMENT_CREATE MWST

Former Member
0 Likes
1,275

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

2 REPLIES 2
Read only

madhu_vadlamani
Active Contributor
0 Likes
785

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.

Read only

jay28
Explorer
0 Likes
785

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.