‎2006 Jun 21 8:30 AM
Hi ,
Am calling a user defined BAPI in my report , its returning an error message before comitting the data.
need suggestion how to rectify the error , i mean wht r the things i need to check , do i need to check the parameters tht r passed to the user defined bapi ?
The user defined bapi code is :
CALL FUNCTION '/zkg/WB_ALLOCATION'
EXPORTING
i_material = itab_display_matnr
i_batch = itab_display_charg1
i_plant = itab_display_werks
i_alloc_flag = p_all
I_LOCK_CHECK = 1
i_vbeln = itab_display_vbeln
i_posnr = itab_display_posnr
i_sloc = itab_display_lgort
i_clabs = itab_display_clabs
TABLES
et_return = w_bapiret2
ET_DOC_INFO =
CHANGING
I_COMPLETE =
.
READ TABLE w_bapiret2 INTO wa_bapiret2 WITH KEY type = 'E'.
IF sy-subrc = 0.
output the error message
CLEAR okcode.
MESSAGE e100(pp) WITH wa_bapiret2-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = g_bwait
IMPORTING
return = gt_bapiret2.
ENDIF.
thxs,
vind.
‎2006 Jun 21 8:34 AM
Hi,
Check in the Debug mode where the error gets set.
Then accordingly you can change what is passed to the BAPI. Or change the BAPI code.
Sameena
Message was edited by: sameena attarwala
‎2006 Jun 21 8:34 AM
Hi,
Check in the Debug mode where the error gets set.
Then accordingly you can change what is passed to the BAPI. Or change the BAPI code.
Sameena
Message was edited by: sameena attarwala
‎2006 Jun 21 8:34 AM
‎2006 Jun 21 8:59 AM
Hi,
I suppose you need to check your BAPI. Put a break-point in your BAPI to check whether data input to BAPI is in appropriate format or not. This will also give you a clear picture of where the problem is occuring, I mean the code in your BAPI that is generating error. We will then be able to find the solution.
Regards,
Reema.