‎2008 Feb 08 11:32 AM
hi all,
do we have any BAPI's available in SAP to create orders using IW31 transaction.
Rgds,
stock.
‎2008 Feb 08 11:51 AM
Do you absolutely need BAPI function module? If not then there is a funciton modlue :
CALL FUNCTION 'ALM_ME_ORDER_CREATE'
EXPORTING
order_header = g_order_header
IMPORTING
e_order_header = g_order_header
TABLES
order_partner = i_ordpartner
return = lt_return.
all errors will be stored in lt_return.
Check for fatal errors
CALL FUNCTION 'ALM_ME_CHECK_RETURN_TABLE'
TABLES
return = lt_return
EXCEPTIONS
error_in_return = 1
OTHERS = 2.
if sy-subrc is zero then, post the order using the funciton module:
If no errors then post
CALL FUNCTION 'CO_ZV_ORDER_POST'
EXPORTING
commit_flag = 'X'
ext_flg = 'X'
flg_wait = ' '
trans_typ = 'H'
no_gui_message = 'X'
no_dialog = 'X'
TABLES
caufvd_num_exp = l_caufvdn
EXCEPTIONS
OTHERS = 1.
Please reward points if useful...
‎2008 Feb 08 11:36 AM
Hi,
I believe the BAPI is BAPI_ALM_ORDER_MAINTAIN
Cheers,
Vasanth
‎2008 Feb 08 11:51 AM
Do you absolutely need BAPI function module? If not then there is a funciton modlue :
CALL FUNCTION 'ALM_ME_ORDER_CREATE'
EXPORTING
order_header = g_order_header
IMPORTING
e_order_header = g_order_header
TABLES
order_partner = i_ordpartner
return = lt_return.
all errors will be stored in lt_return.
Check for fatal errors
CALL FUNCTION 'ALM_ME_CHECK_RETURN_TABLE'
TABLES
return = lt_return
EXCEPTIONS
error_in_return = 1
OTHERS = 2.
if sy-subrc is zero then, post the order using the funciton module:
If no errors then post
CALL FUNCTION 'CO_ZV_ORDER_POST'
EXPORTING
commit_flag = 'X'
ext_flg = 'X'
flg_wait = ' '
trans_typ = 'H'
no_gui_message = 'X'
no_dialog = 'X'
TABLES
caufvd_num_exp = l_caufvdn
EXCEPTIONS
OTHERS = 1.
Please reward points if useful...
‎2008 Feb 08 11:58 AM