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

Former Member
0 Likes
1,130

I am trying to create a debit memo using function SD_SALESDOCUMENT_CREATE. I need to enter a manual price for the item (our condition type = ZMAN). Does anyone know which table I need to save the condition type and condition value to? I've tried SALES_CONDITIONS_IN but I get "Condition ZMAN is not allowed as header condition" in RETURN table, so clearly SALES_CONDITIONS_IN is for order header items. Which is the right table for item conditions?

Thanks in advance,

Brigitte

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
964

Brigitte

As you are trying to manually enter prices for items.

Try using the following steps:

1. While populating table ORDER_ITEMS_IN specify an Item Number(say starting with 000010 and incrementing 10 for each item).

2. Use this item number as reference and populate ORDER_CONDITIONS_IN, specify the same item number here.

Sample Code:

data: l_posnr(6) type i value '000010'.

Loop at itab.

clear: ibapiitm, ibapitmx, ibapicond, ibapicondx.

ibapiitm-itm_number = ibapiitmx-itm_number = ibapicond-itm_number = ibapicondx-itm_number = l_posnr.

populating other fields for the respecitve structures.

.....

.....

append: ibapiitm, ibapiitmx, ibapicond, ibapicondx.

l_posnr = l_posnr + 10.

endloop.

Above method works for me perfectly.

Regards

Eswar

Note: Reward for useful info.

7 REPLIES 7
Read only

Former Member
0 Likes
964

Hi,

Check in KONV, KOMP tables,

Rgds,

Read only

Former Member
0 Likes
964

Try passing the header condition with item number as "000000" in the structure SALES_CONDITIONS_IN .

Cheers,

TM.

Read only

Former Member
0 Likes
964

Hi,

If u r entering confitions for an item, u need to give item number also in Conditons table. U will have item no in that table, pass that field also.

Sreedhar.

Read only

Former Member
0 Likes
965

Brigitte

As you are trying to manually enter prices for items.

Try using the following steps:

1. While populating table ORDER_ITEMS_IN specify an Item Number(say starting with 000010 and incrementing 10 for each item).

2. Use this item number as reference and populate ORDER_CONDITIONS_IN, specify the same item number here.

Sample Code:

data: l_posnr(6) type i value '000010'.

Loop at itab.

clear: ibapiitm, ibapitmx, ibapicond, ibapicondx.

ibapiitm-itm_number = ibapiitmx-itm_number = ibapicond-itm_number = ibapicondx-itm_number = l_posnr.

populating other fields for the respecitve structures.

.....

.....

append: ibapiitm, ibapiitmx, ibapicond, ibapicondx.

l_posnr = l_posnr + 10.

endloop.

Above method works for me perfectly.

Regards

Eswar

Note: Reward for useful info.

Read only

Former Member
0 Likes
964

Hi

Populate the same item number in table SALES_CONDITIONS_IN as that of SALES_ITEMS_IN

Ie SALES_CONDITIONS_IN-ITM_NUMBER = SALES_ITEMS_IN-ITM_NUMBER

Regards

Beena

Read only

Former Member
0 Likes
964

Thank you all very much.

Read only

0 Likes
964

Brigite

Glad we could help you.

Eswar