Application Development and Automation 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: 
Read only

problem with a bapi fm...

Former Member
0 Likes
280

hi all,

i have a problem with Bapi_goodmvt_create.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = gt_header

goodsmvt_code = gt_bapigm_code

testrun = 'X'

IMPORTING

goodsmvt_headret = gs_headret

TABLES

goodsmvt_item = gt_item

return = gt_return.

IF gt_return-type <> 'E'.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

ENDIF.

in the error table gt_return iam getting,

while running in the test run mode no errors are comming. but while running test run mode immediately iam getting the below error, but i havent opened the plant or material anywhere,

"The plant data of the material 801187 is locked by the user PREM."

help me in this issue,

Thanks,

Prem.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
255

Use WAIT for 5 seconds before COMMIT. It may work.

Regards,

Amit

Reward all helpful replies.

1 REPLY 1
Read only

amit_khare
Active Contributor
0 Likes
256

Use WAIT for 5 seconds before COMMIT. It may work.

Regards,

Amit

Reward all helpful replies.