‎2008 Jan 04 1:12 AM
Hi,
Any updates on this..
I am using BAPI 'BAPI_CONTRACT_CREATEFROMDATA' to create sales contract.
I am passing 'TARGET QTY' and 'AMOUNT' to table parameters CONTRACT_ITEMS_IN and CONTRACT_CONDITIONS_IN.
sales contract is getting created but QUANTITY and AMOUNT fields are empty.
Please suggest how to handle these fields through BAPI.
Thanks in advance,
Deepak.
Edited by: KDeepak on Jan 4, 2008 8:51 PM
Edited by: KDeepak on Jan 4, 2008 9:25 PM
Edited by: KDeepak on Jan 4, 2008 9:39 PM
Edited by: KDeepak on Jan 4, 2008 10:29 PM
‎2008 Jan 04 1:17 AM
Hi Deepak,
Are you passing parameter X to CONTRACT_CONDITIONS_INX and CONTRACT_ITEMS_INX also?
Regards,
Atish
‎2008 Jan 04 1:30 AM
Hi Deepak,
Make sure all required fields have data in the item table and corresponding fields have data with 'X' in flag table. Please let me know if you need more info on this.
Regards,
Satya
‎2008 Jan 04 2:23 AM
Hi,
Thanks for your response.
Quantity and AMOUNT field are not getting updated in sales contract.
I am passing all the required parameters for CONTRACT_ITEMS_IN, CONTRACT_ITEMS_INX, CONTRACT_PARTNERS,
CONTRACT_CONDITIONS_IN, CONTRACT_CONDITIONS_INX.
Here is my code.....
LINE ITEM DATA
clear: it_slin1, it_slin_in.
line_item = line_item + 10.
it_slin1-ITM_NUMBER = it_slin-posnr.
it_slin1-MATERIAL = it_slin-matnr.
it_slin1-HG_LV_ITEM = it_slin-uepos.
it_slin1-ALT_TO_ITM = it_slin-grpos.
it_slin1-DLV_GROUP = it_slin-grkor.
it_slin1-REASON_REJ = it_slin-abgru.
it_slin1-TARGET_QTY = it_slin-ZMENGC.
it_slin1-TARGET_QU = it_slin-ZIEME.
it_slin1-CUST_MAT35 = it_slin-kdmat.
it_slin1-REF_DOC = it_slin-oldnr.
it_slin1-BILL_DATE = it_slin-fkdat.
it_slin1-PURCH_DATE = it_slin-bstdk.
append it_slin1.
it_slin_in-UPDATEFLAG = 'I'.
it_slin_in-ITM_NUMBER = 'X'.
it_slin_in-MATERIAL = 'X'.
it_slin_in-HG_LV_ITEM = 'X'.
it_slin_in-ALT_TO_ITM = 'X'.
it_slin_in-DLV_GROUP = 'X'.
it_slin_in-REASON_REJ = 'X'.
it_slin_in-TARGET_QTY = 'X'.
it_slin_in-TARGET_QU = 'X'.
it_slin_in-CUST_MAT35 = 'X'.
it_slin_in-REF_DOC = 'X'.
it_slin_in-BILL_DATE = 'X'.
it_slin_in-PURCH_DATE = 'X'.
APPEND it_slin_in.
CONDITION DATA
clear: it_cond1, it_cond_in.
it_cond1-ITM_NUMBER = '10'.
it_cond1-COND_TYPE = 'PR00'.
it_cond1-COND_VALUE = '1000000.00'.
it_cond1-CURRENCY = 'USD'.
it_cond1-CONDVALUE = '89000.00'.
it_cond1-CONBASEVAL = '89000.00'.
APPEND it_cond1.
it_cond_in-UPDATEFLAG = 'I'.
it_cond_in-ITM_NUMBER = '10'.
it_cond_in-COND_TYPE = 'X'.
it_cond_in-COND_VALUE = 'X'.
it_cond1-CURRENCY = 'USD'.
APPEND it_cond_in.
Please let me know if any thing I am missing.
Thanks,
Deepak.
Edited by: KDeepak on Jan 4, 2008 9:30 AM