‎2006 Apr 25 10:04 AM
Hi,
Can anyone suggest a FM/BAPI to read the contract data? As in, if I enter the contract number, it should return the details of the contract. I am especially looking for the order quantity in the contract(KWMENG).
This quantity is not maintained in VBAP, for a quantity contract.
Thanks and Regards,
Shivali
‎2006 Apr 25 10:32 AM
Hi Shivali,
YOu can query vbak and vbap tables with order type as 'KTN' for Contract number.
Regards,
Ravi
‎2006 Apr 25 10:16 AM
Hi Shivali,
Try this Bapi <b>BAPI_CONTRACT_CREATEFROMDATA</b>.
Reward points if helpful.
Regards,
Srikanth.
‎2006 Apr 25 10:32 AM
Hi Shivali,
YOu can query vbak and vbap tables with order type as 'KTN' for Contract number.
Regards,
Ravi
‎2006 Apr 25 10:37 AM
Hi,
I have others details for the contract from these tables, but this cumulative order quantity is not maintained in vbak/vbap.
Thanks,
Shivali
‎2006 May 17 10:52 AM
Hi Shivali ,
Did you find a solution for this ?
Even I have a similar req: to fetch the open qty and cummulative order quantity from the contract . Couldn't find the value in VBAP and the screen field shows struture RV45A.
Anyone out there to help on this regard
Regards
Beena
‎2006 May 17 11:07 AM
Hi,
BAPISDORDER_GETDETAILEDLIST
user above mentioned BAPI as following.
**Filling ORDER_VIEW
is_bapi_view-header = 'X'.
is_bapi_view-item = 'X'.
is_bapi_view-sdschedule = 'X'.
is_bapi_view-business = 'X'.
is_bapi_view-partner = 'X'.
is_bapi_view-address = 'X'.
is_bapi_view-status_h = 'X'.
is_bapi_view-status_i = 'X'.
is_bapi_view-sdcond = 'X'.
is_bapi_view-sdcond_add = 'X'.
is_bapi_view-contract = 'X'.
is_bapi_view-text = 'X'.
is_bapi_view-flow = 'X'.
is_bapi_view-billplan = 'X'.
is_bapi_view-configure = 'X'.
is_bapi_view-credcard = 'X'.
is_bapi_view-incomp_log = 'X'.
is_vbeln-vbeln = g_vbeln.
append is_vbeln.
Function Module BAPISDORDER_GETDETAILEDLIST is used to fetch
data of the complete sales order
call function 'BAPISDORDER_GETDETAILEDLIST'
exporting
i_bapi_view = is_bapi_view
tables
sales_documents = is_vbeln
order_headers_out = is_order_headers_out
order_items_out = is_order_items_out
order_conditions_out = is_order_conditions_out.
Regards,
Suresh
‎2006 May 17 11:25 AM
Hi Suresh ,
thanks for the reply
This BAPI didn't return the open qty and cumulative order quantity in the contract . It returned all other details
Regards
Beena
‎2006 May 17 12:13 PM
Hi Beena,
As I could not find any BAPI/FM I did it manually. Go to table VBFA and enter preceding document as contract number and select all sales orders for that contract. Then sum up their quantities and subtract it from the target quantity in the contract. This will give you the open quantity.
Regards,
Shivali
‎2006 May 17 12:17 PM
Thanks Shivali,
Keeping in mind the option suggested by u , I am looking for some other way that do not hinder the performance .
Regards
Beena