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

Lock entry problem..

Former Member
0 Likes
742

Hi ALL.

*****************************

Sales Order # : 11

items : 10 , 20

*****************************

I want to make each Delivery Notes(below DN) of a sales order(which has a lot of items) by using BAPI[BAPI_DELIVERYPROCESSING_EXEC] in a work process.

First of all, item #10 is created normally. I check the lock entry in SM12.

Sales Order #11 and new DN # is enrolled in the lock entry.

Next, When item #20 is created, the old lock entries is still exist.

So, I can't make new DN of Item # 20, because of existing old lock entries.

Please, Let me know how to make the second item and disappear the old lock entries in BAPI.

Thank you in advance.

Best regards.

Kil-Nam.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
640

Hi kil,

1. use BAPI_TRANSACTION_COMMIT

after callling

BAPI_DELIVERYPROCESSING_EXEC (for 1st item)

2. like this.

BAPI_DELIVERYPROCESSING_EXEC (for 1st item)

BAPI_TRANSACTION_COMMIT

BAPI_DELIVERYPROCESSING_EXEC (for 2nd item)

BAPI_TRANSACTION_COMMIT

regards,

amit m.

5 REPLIES 5
Read only

Former Member
0 Likes
641

Hi kil,

1. use BAPI_TRANSACTION_COMMIT

after callling

BAPI_DELIVERYPROCESSING_EXEC (for 1st item)

2. like this.

BAPI_DELIVERYPROCESSING_EXEC (for 1st item)

BAPI_TRANSACTION_COMMIT

BAPI_DELIVERYPROCESSING_EXEC (for 2nd item)

BAPI_TRANSACTION_COMMIT

regards,

amit m.

Read only

0 Likes
640

Hi Amit.

It is not useful "BAPI_TRANSACTION_COMMIT".

I call the BAPI as aRFC for Multi-processing.

Is it problem..?

Thank you!!..

regards.

kil..

Read only

0 Likes
640

Hi again,

1. I call the BAPI as aRFC for Multi-processing.

Is it problem..?

I did not get this point.

2. Even if u do like this,

we should COMMIT (BAPI_TRANSACTION_COMMIT)

so that the LOCKED ENTRIES are deleted.

regards,

amit m.

Read only

0 Likes
640

Hi..

It is not useful both "Commit work" and "BAPI~COMMIT".

So, I think two ways.

1. Use Submit.

-. After the 1st Item created, It invokes the 2nd Item using Submit.

-. The pgm of the 1st item is terminated and releases lock entries..

2. Use Dequeue Fucntion..

-. I check the lock entry of the sales order.

-. if it exist, dequeue entries.

-. And then creates the 2nd item of the sales order.

How about?

regards,

kil..

Read only

Former Member
0 Likes
640

Hi,

I have had the same problem. Are you closing the connection at each iteration? Use following sequence of commit & Close at every loop -

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

<b> DESTINATION 'destination name'</b>

EXPORTING

WAIT = 'X'.

CALL FUNCTION 'RFC_CONNECTION_CLOSE'

EXPORTING

<b> DESTINATION = 'Destination name'</b>

EXCEPTIONS

DESTINATION_NOT_OPEN = 1

OTHERS = 2.

Thanks,

Amit