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 and Commit work in INBOUND IDOC

Former Member
0 Likes
1,105

Hi Experts,

Problem is about lock and commit work

i need to receive idoc for Good receipt for purchase order.

For one Purchase Order i can receive many good receipt Idoc at the same time and when first came in Lock the Purchase Order and further idoc came after give Errors becouse purchase Order is lock.

Problem is not the serialization (the sequence is correct), but is the lock.

Any idea on how to fix this issue? (maybe there is some std settings??)

Cheers

Boris

3 REPLIES 3
Read only

Former Member
0 Likes
707

The requirement is your want to execute your IDOC separately, one IDOC each time, right?

I think you should disable your server group for IDOC handling, because it will launch several session to handle IDOC parallel, lock issue will happen. So make sure you make it disable.

And Set your IDOC inbound process code for Individual one, and Packetize one.

E.G. BAPI not BAPP.

Because the Packetize will execute serial of IDOC in one commit work. I think individual one will be better for you.

Read only

Former Member
0 Likes
707

Hi,

try like this Distribution lock.

You can control the distribution of change master records with the indicator Distribution lock.

You can set the indicator in Customizing choose Engineering Change Management ® Define statuses for master record. This setting is read when distribution automatically starts after a change pointer is set or for an Integrated Distributed PDM Solution (ID PDM).

An object with this indicator in its status will not be distributed into other ALE systems.

You can ignore this setting by starting the distribution manually. When you set the indicator Ignore Distribution lock in the initial screen, then all change master records will be distributed overriding the previously set status.

Regards

Read only

Former Member
0 Likes
707

Hello Guys

the packetsize is already set to 1 but the problem still again..... and where i can find this setting "in Customizing choose Engineering Change Management ® Define statuses for master record". ?

Any way i try in function module in inbound to check the lock object with this sample code:

DO 30 TIMES.

CALL FUNCTION 'ENQUEUE_EMEKKOS'

EXPORTING

mode_ekko = 'S'

mandt = sy-mandt

ebeln = goodsmvt_item-po_number

_scope = '2'

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

IF sy-subrc <> 0.

WAIT UP TO 1 SECONDS.

ELSE.

EXIT.

ENDIF.

ENDDO.

but also with this....problem syill again...

thanks

Boris