‎2007 Apr 05 8:04 PM
hai
with detail explaination, give me the real time scenerio for BAPI.
and also for userexit.
urgent .
thx in advance.
‎2007 Apr 05 8:08 PM
A BAPI is used to do some business function. For example, changing a sales order. Just last week, I had a requirement to create a program which can be used to mass change sales orders, changing the requested delivery date and the plant. So in this case I used the BAP BAPI_SALESORDER_CHANGE.
Regards,
Rich Heilman
‎2007 Apr 05 8:08 PM
A BAPI is used to do some business function. For example, changing a sales order. Just last week, I had a requirement to create a program which can be used to mass change sales orders, changing the requested delivery date and the plant. So in this case I used the BAP BAPI_SALESORDER_CHANGE.
Regards,
Rich Heilman
‎2007 Apr 05 8:15 PM
Bapi are really powerful and are really simple to use. It can be used as a substuite for BDC. Its basically a Remote enabled FM.
Recently I have used BAIPI for creating planned orders which is done using MD11 transaction and below is the code for it.
Shreekant.
FORM change_plannedorder .
Change the Quantity and make it Firmed
LOOP AT t_output.
t_output-auffx = 'X'.
CLEAR l_headerdatachange.
l_headerdatachange-total_plord_qty = t_output-zcastqty.
l_headerdatachange-FIRMING_IND = t_output-auffx.
l_headerdatachangex-total_plord_qty = 'X'.
l_headerdatachangex-firming_ind = 'X'.
CALL FUNCTION 'BAPI_PLANNEDORDER_CHANGE'
EXPORTING
plannedorder = t_output-plnum
headerdata = l_headerdatachange
headerdatax = l_headerdatachangex
IMPORTING
return = l_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
APPEND l_return.
CLEAR l_return.
ENDLOOP.
ENDFORM. " change_plannedorder
‎2007 Apr 05 8:18 PM
Bapi to create Planned order.
LOOP AT t_plafcreate_pe.
CLEAR l_headerdatacreate.
l_headerdatacreate-pldord_profile = t_plafcreate_pe-paart.
l_headerdatacreate-material = t_plafcreate_pe-matnr.
l_headerdatacreate-plan_plant = t_plafcreate_pe-plwrk.
l_headerdatacreate-total_plord_qty = t_plafcreate_pe-gsmng.
l_headerdatacreate-order_start_date = t_plafcreate_pe-psttr.
l_headerdatacreate-firming_ind = t_plafcreate_pe-auffx.
l_headerdatacreate-version = t_plafcreate_pe-verid.
PERFORM data_conversions.
CALL FUNCTION 'BAPI_PLANNEDORDER_CREATE'
EXPORTING
headerdata = l_headerdatacreate
IMPORTING
return = l_return
plannedorder = l_plannedorder
createdheaderdata = l_createdheaderdata
capacityheaderdata1 = l_capacityheaderdata1
TABLES
componentsdata = i_componentsdata
createdcomponentsdata = i_createdcomponentsdata
capacitydata1 = i_capacitydata1.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
.
APPEND l_return.
CLEAR l_return.
Shreekant
‎2007 Apr 05 9:23 PM
hai Shreekant,
the thing u send is very nice, if u have done some scenerio in user exit means
send me that to.
thx in advance