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

ENQUEUE multiple records at the same time?

andrew_jacobs2
Participant
0 Likes
2,078

Hi,

I need to update a text field in multiple records of AFRU at the same time.

SAP provides an enqueue function for AFRU which will work, however I need to lock more than one record.

Is it possible to lock more than one record with an enqueue function or do I need to lock each entry and update through a loop?

Thx.

Andy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,100

Hi

In Enqueue FM if u give only table name then it will local total table

and if u provide any key, then it will lock the records which matches with that key

Ex:

KUNNR BUKRS NAME1 NAME2

1000 0100 HHh JJJJ

1000 0200 JJJJ JJJJ

In this case if u give Key as 1000 then it will lock 2 records

If u give 1000 0100 then it will lock first record

Kiran

2 REPLIES 2
Read only

Former Member
0 Likes
1,100

Hi Andrew,

How about you create a Z wrapper FM, which accepts a table of confirmation and counter and then within this FM you loop and lock the combinations in recieved table.

Then in your main program, you just call the Z wrapper once.

Another option is to lock the whole table ENQUEUE_E_TABLE in your application which will basically prevent any updates on the table on any record ! Risky, but probably can be considered based on requirement.

Cheers,

Aditya

Read only

Former Member
0 Likes
1,101

Hi

In Enqueue FM if u give only table name then it will local total table

and if u provide any key, then it will lock the records which matches with that key

Ex:

KUNNR BUKRS NAME1 NAME2

1000 0100 HHh JJJJ

1000 0200 JJJJ JJJJ

In this case if u give Key as 1000 then it will lock 2 records

If u give 1000 0100 then it will lock first record

Kiran