‎2006 Jul 04 8:41 AM
Hi All,
I am doing some batch characteristics update using the BAPI BAPI_OBCL_CHANGE BAPI Return table is showing success message but the changes are not effecting to the data base Even I have used BAPI_TRansaction_Commit also after calling the BAPI.
PLease throw some idea on this it's very urgent
Thanks&Regards
Mahesh
‎2006 Jul 04 8:47 AM
Hi
I haven't that BAPI in my system, have you tried to set WAIT parameter of BAPI_TRansaction_Commit?
Max
‎2006 Jul 04 9:27 AM
‎2006 Jul 04 9:30 AM
Hey,
I am using this BAPI in my current project as below and its giving thr desired result.
REFRESH return.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = i_objtable-object
objecttable = 'EQUI'
classnum = i_objtable-classnum
classtype = i_objtable-classtype
TABLES
allocvaluesnumnew = i_allocvaluesnum
allocvaluescharnew = i_allocvalueschar
allocvaluescurrnew = i_allocvaluescurr
return = return.
READ TABLE return WITH KEY type = 'E' BINARY SEARCH.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
-Kiran
*Please reward useful answers
‎2006 Jul 04 9:58 AM
‎2006 Jul 04 10:09 AM
Hi
Perhaps there're some problems on the data you're moving to BAPI, let's know your code for calling BAPI.
Max
‎2006 Jul 04 10:28 AM
The code is as follows
REFRESH return.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = W_OBJECT
objecttable = 'MARA'
classnum = P_CLASS
classtype = P_KLART
TABLES
allocvaluesnumnew = NUMTAB
allocvaluescharnew = CHATAB
allocvaluescurrnew = CURTAB
return = return.
READ TABLE return WITH KEY type = 'E' BINARY SEARCH.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
Bapi is returning success message but not updating to the data base.
‎2009 Jul 16 10:08 AM
Dear Friend,
You want to Upload the Characteristics Values to the T16FS table.
Just show the Below Code.
call function 'BAPI_OBJCL_CHANGE'
exporting
objectkey = <wa_datatab>-col5
objecttable = 'T16FS'
classnum = so_num-low
classtype = '032'
status = '1'
keydate = sy-datum
no_default_values = ' '
IMPORTING
CLASSIF_STATUS =
tables
allocvaluesnumnew = jtab
allocvaluescharnew = ist_datatab
allocvaluescurrnew = ztab
return = return.
loop at return assigning <bapiret1>.
case <bapiret1>-type.
when 'S'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = space.
when 'E'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = space.
move <bapiret1> to bapiret.
move count to bapiret-number.
append bapiret to return1.
when 'I'.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = space.
move <bapiret1> to bapiret.
append bapiret to return1.
when others.
break <bapiret1>-type.
endcase.
endloop.
delete it_datatab where col5 = <wa_datatab>-col5.
clear: wa1_datatab, ist_datatab[].
endloop.
If its help u plz give marks.