Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_REQUIREMENTS_CHANGE

Former Member
0 Kudos
498

Hi

I am using below bapi to Change The Planning Order Requirements.

Does this Bapi has Internal Commit or need to explicitly mention it using BAPI_TRANSACTION_COMMIT/ROLLBACK.

Because i can also see one parameter DO_COMMIT. Setting this parameter BLANK will automatically get committed.?

Does all BAPI needs to be handled commit work explicitly? or depends on the parameter?

CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'

EXPORTING

MATERIAL = U_WL_PBIM-MATNR

PLANT = U_WL_PBIM-WERKS

REQUIREMENTSTYPE = U_WL_PBIM-BEDAE

VERSION = U_WL_PBIM-VERSB

REQMTSPLANNUMBER = U_WL_PBIM-PBDNR

VERS_ACTIV = CG_X

DELETE_OLD = CG_MSGV_BLANK

TABLES

REQUIREMENTS_SCHEDULE_IN = TL_NREDL

RETURN = TL_REPA. "Return parameter

Pls confirm.

Regard

Chandra

1 ACCEPTED SOLUTION

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
128

Usually, BAPIs rely on a COMMIT WORK statement (or calling BAPI_TRANSACTION_COMMIT) afterwards.

This particular one however will perform the COMMIT WORK if the DO_COMMIT parameter is not blank.

3 REPLIES 3

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos
129

Usually, BAPIs rely on a COMMIT WORK statement (or calling BAPI_TRANSACTION_COMMIT) afterwards.

This particular one however will perform the COMMIT WORK if the DO_COMMIT parameter is not blank.

Former Member
0 Kudos
128

The call to a BAPI generates a Chain of BAPI calls in the system. Now it is explicitily required to do a COMMIT work for the BAPI. The Function Module BAPI_TRANSACTION_COMMIT as mentioned can serve the purpose. In your case the parameter DO_COMMIT has to be set to 'X' for the COMMIT Work to happen.

Regards,

Tanmoy

madhu_vadlamani
Active Contributor
0 Kudos
128

Hi Chandra,

When i use this Bapi i did not use bapi_transaction_commit . For me it is updated automatically.Check this and post if any issue.

Regards,

Madhu.