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

Problems while using BAPI SD_SALESDOCUMENT_CREATE

0 Likes
1,034

Hi every body,

I have used the BAPI SD_SALESDOCUMENT_CREATE in a program which create sales order with the data from file. But here I am facing one problem with pricing.

Here I have populated the item number (Posnr), condition type (Kschl) and condition value (Kbetr) in the table parameter order_conditions_in. In the cofig of the pricing procedure the manual entry is set as blank (No Limitations). Now when I am going to create an order with this BAPI then It is picking two condition type. One is from master data and another is from my file. But here the file entries should get preference. That means instead of two only the codition type from file should be updated.

Please help me to solve this.

Thanks & Regards,

Arnab.

4 REPLIES 4
Read only

Former Member
0 Likes
714

Hi,

Use SALES_CONDITIONS_INX-UPDATEFLAG = 'U' and try.May be this should work.

Hope this info helps.

Regards,

Amit Teja

Read only

mukundkansara
Participant
0 Likes
714

Hi,

I think it is not possible to remove master condition through BAPI but in other way you can do 1 thing that after committing ur BAPI write BDC code to remove master condition.

Read only

Former Member
0 Likes
714

Hi ,

Try with this peace of code.

data: cond_inx type standard table of BAPICONDX.

wa_cond_inx-UPDATEFLAG = 'X'.

wa_cond_inx-COND_TYPE = 'X'.

wa_cond_inx-COND_VALUE = 'X'.

Regards,

Suresh M.

Read only

Former Member
0 Likes
714

Hi,

You can use the pricing user exit(USEREXIT_PRICING_PREPARE_TKOMK ) to delete the unwanted pricing condition coming from the system.

Regards,

Deepa Ashok