‎2010 Feb 23 3:03 AM
Hi experts,
Now My requirement is get all contract condition data. If I don't want to create a new contract to get these condition data, I can use Function module 'PRICING' to get all condition data. But the question is the parameter COMM_ITEM_I is a structure, it only can store a record(single material). If the contract has many item, eg Service + Goods............ How to process this scenario? If you have experience in this, please give me any idea. Thanks in advance!
function pricing.
*"----
""Globale Schnittstelle:
*" IMPORTING
*" VALUE(CALCULATION_TYPE) LIKE KOMV-KSTEU DEFAULT 'A'
*" VALUE(COMM_HEAD_I) LIKE KOMK STRUCTURE KOMK
*" VALUE(COMM_ITEM_I) LIKE KOMP STRUCTURE KOMP
*" VALUE(PRELIMINARY) TYPE C DEFAULT ' '
*" VALUE(NO_CALCULATION) TYPE C DEFAULT ' '
*" EXPORTING
*" VALUE(COMM_HEAD_E) LIKE KOMK STRUCTURE KOMK
*" VALUE(COMM_ITEM_E) LIKE KOMP STRUCTURE KOMP
*" TABLES
*" TKOMV STRUCTURE KOMV
*" SVBAP STRUCTURE VBAPU OPTIONAL
*" CHANGING
*" VALUE(REBATE_DETERMINED) TYPE C DEFAULT ' '
*"----
‎2010 Feb 23 3:56 AM
And if I use FM BAPI_SALESORDER_SIMULATE get all condition data, It's very strange that it can't get any condition data. According to track FM BAPI_SALESORDER_SIMULATE, the reason of no condition data is XKOMV = space in FM SD_SALES_ITEM_TABLES_READ.
‎2010 Feb 23 4:04 AM
Hi,
I guess contracts will be found in EKKO, not in VBAK. Correct me if I am wrong.
If I am correct, you can use the BAPI "BAPI_PO_GETDETAIL1". POCONDHEADER and POCOND inporting tables will retrieve pricing information.
Regards,
Ganga
‎2010 Feb 23 5:22 AM
Hi Ganga,
BAPI 'BAPI_PO_GETDETAIL1' only can use for a exist sales document. My requirement is not create a entitative sales document, but still get all condition data.Thanks for your reply.