2007 Nov 27 12:34 PM
Dear All,
I am using BAP_OBJCL_CREATE for extending classification view/data for material master.I have entered the relevant data,system generates message 'assignment created',but on data is not getting updated in tables i.e data has not got extended.
HI Stuti.
Did you call the BAPI_TRANSACTION_COMMIT after calling the BAPI (otherwise changes will not be committed to the database).
Regards,
John.
2007 Nov 27 12:40 PM
HI Stuti.
Did you call the BAPI_TRANSACTION_COMMIT after calling the BAPI (otherwise changes will not be committed to the database).
Regards,
John.
2007 Nov 28 3:15 AM
Hi John,
Based on your advise I called the other BAPI also,but it returns no message.
Normally,using a BAPi, entries are directly updated in the table.Plz help me.
2007 Nov 28 7:14 AM
Hi Stuti,
Your statement is not correct: using BAPIs entries will NEVER be updated in tables. Instead you should check the return-table for any errors and then call either BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK. I use the BAPI for object classification as well:
*-Change the object classification:
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = iv_objectkey
objecttable = iv_objecttable
classnum = iv_class
classtype = iv_classtype
TABLES
allocvaluesnumnew = ct_nume_values
allocvaluescharnew = ct_char_values
allocvaluescurrnew = ct_curr_values
return = zlt_return.
*-Commit transaction in case no errors:
READ TABLE zlt_return INTO zls_return
WITH KEY type = 'E'.
IF syst-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ev_error = zls_return-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Regards,
John.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |