‎2006 Jul 28 7:08 AM
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
‎2006 Jul 28 7:32 AM
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.
‎2006 Jul 28 7:11 AM
‎2006 Jul 28 7:16 AM
Try passing the header condition with item number as "000000" in the structure SALES_CONDITIONS_IN .
Cheers,
TM.
‎2006 Jul 28 7:18 AM
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.
‎2006 Jul 28 7:32 AM
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.
‎2006 Jul 28 7:43 AM
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
‎2006 Jul 28 8:00 AM
‎2006 Jul 28 8:03 AM