‎2006 Jan 18 3:09 PM
Hi All,
can anybody help me out...??? my problem is i am creating sales order by using BAPI_SALESORDER_CREATEFROMDAT2 function module.
in that i am using function module BAPISDORDER_GETDETAILEDLIST to get ORDER_CFGS_CUVALS_OUT.
and i am getting this error: " <b>A BS 001 No status object is available for SDI 0</b>"
Thanks.
Salil.
‎2006 Jan 18 3:16 PM
This sample program works very well for me. Maybe it will give you some hints.
report zrich_0003 .
data: view type order_view.
data: sd_docs type table of sales_key with header line.
data: cuvals type table of bapicuvalm with header line.
parameters: p_vbeln type vbak-vbeln.
view-header = 'X'.
view-configure = 'X'.
sd_docs-vbeln = p_vbeln.
append sd_docs.
call function 'BAPISDORDER_GETDETAILEDLIST'
exporting
i_bapi_view = view
* I_MEMORY_READ =
tables
sales_documents = sd_docs
* ORDER_HEADERS_OUT =
* ORDER_ITEMS_OUT =
* ORDER_SCHEDULES_OUT =
* ORDER_BUSINESS_OUT =
* ORDER_PARTNERS_OUT =
* ORDER_ADDRESS_OUT =
* ORDER_STATUSHEADERS_OUT =
* ORDER_STATUSITEMS_OUT =
* ORDER_CONDITIONS_OUT =
* ORDER_COND_HEAD =
* ORDER_COND_ITEM =
* ORDER_COND_QTY_SCALE =
* ORDER_COND_VAL_SCALE =
* ORDER_CONTRACTS_OUT =
* ORDER_TEXTHEADERS_OUT =
* ORDER_TEXTLINES_OUT =
* ORDER_FLOWS_OUT =
* ORDER_CFGS_CUREFS_OUT =
* ORDER_CFGS_CUCFGS_OUT =
* ORDER_CFGS_CUINS_OUT =
* ORDER_CFGS_CUPRTS_OUT =
order_cfgs_cuvals_out = cuvals
* ORDER_CFGS_CUBLBS_OUT =
* ORDER_CFGS_CUVKS_OUT =
* ORDER_BILLINGPLANS_OUT =
* ORDER_BILLINGDATES_OUT =
* ORDER_CREDITCARDS_OUT =
* EXTENSIONOUT =
.
check sy-subrc = 0.
Regards,
Rich Heilman
‎2006 Jan 30 11:59 AM
Hey rich,
its working... but my problem is i need to create sales order using BAPI_SALESORDER_CREATEFROMDAT2 and in this if i am assigning this table then its not populating in sales order.
Suggest something...
Thanks.
Salil.
‎2006 Jan 18 3:33 PM
Hi salil,
I Think the problem is that the Sales order is not created in the function module BAPI_SALESORDER_CREATEFROMDAT2.
You have to call the bapi BAPI_TRANSACTION_COMMIT after the first bapi is succesful or BAPI_TRANSACTION_ROLLBACK for not success.
Once you commit the transaction, then the sales doc is created and the subsequest call to the bapi BAPISDORDER_GETDETAILEDLIST, works without error.
REgards,
Ravi
‎2006 Jan 30 11:50 AM
Hi Ravi,
I am using BAPI_TRANSACTION_COMMIT. In this case my sales order has been created but i am not able to populate item configuration data.
Thanks.