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

ALV prb

Former Member
0 Likes
1,271

hi friends,

i have completely developed one interactive ALV report in which PO line items are calling ME22n and corresponding changes are getting reflected back to alv list.but what i have observed is it does not reflect the changes immediately..When i save the me22n transaction and alv list comes back,at that time that values does not change in the list..but when i put a break-point and go slowly then the reflection does come..or when i write "wait up to 1 seconds." then also it works..But can't it reflect immediately..

Thanks,

Gaurav

hi friends,

i have completely developed one interactive ALV report in which PO line items are calling ME22n and corresponding changes are getting reflected back to alv list.but what i have observed is it does not reflect the changes immediately..When i save the me22n transaction and alv list comes back,at that time that values does not change in the list..but when i put a break-point and go slowly then the reflection does come..or when i write "wait up to 1 seconds." then also it works..But can't it reflect immediately..

Thanks,

Gaurav

8 REPLIES 8
Read only

Former Member
0 Likes
1,224

use refresh to get the alv refreshed with the values

Read only

0 Likes
1,224

hi,

see my code.

case r_ucomm.

when '&IC1'. "for double click

*if rs_selfield-fieldname = 'VBELN'.

read table it_main index rs_selfield-tabindex.

set parameter id 'BES' field it_main-ebeln.

call transaction 'ME22N' and skip first screen.

*endif.

*when 'REFRESH'.

rs_selfield-refresh = 'X'.

rs_selfield-exit = 'X'.

*wait up to 1 seconds.

perform fetch_data.

refresh it_fieldcat.

PERFORM fieldcat1.

PERFORM display_ALV.

Read only

0 Likes
1,224

>

> hi,

> see my code.

>

> case r_ucomm.

> when '&IC1'. "for double click

> *if rs_selfield-fieldname = 'VBELN'.

> read table it_main index rs_selfield-tabindex.

>

> set parameter id 'BES' field it_main-ebeln.

> call transaction 'ME22N' and skip first screen.

> *endif.

> *when 'REFRESH'.

> rs_selfield-refresh = 'X'.

> rs_selfield-exit = 'X'.

> *wait up to 1 seconds.

> perform fetch_data.

> refresh it_fieldcat.

> PERFORM fieldcat1.

>

> PERFORM display_ALV.

Please add the following statement before calling the transaction and check if it works


SET UPDATE TASK LOCAL.

Read only

0 Likes
1,224

hi rajesh,

thanks for reply...but its not working

Read only

Former Member
0 Likes
1,224

Since you are updating the data and coming back every thing is in one session so you can say commit work or else

use wait up to 1 seconds.

Read only

0 Likes
1,224

hi vijay,

commit work is not working and i dont want to use wait up to 1 sec..pls suggest different..

Thanks,

Gaurav

Read only

0 Likes
1,224

As you can not know when the update process will come at end, ME22N may already have called a COMMIT WORK without WAIT (So maybe already be finished or may yet need a long time on a huge order on a slow server or at rush hour)

As it is a CALL TRANSACTION you are not in the same LUW (Forget to use COMMIT WORK in your LUW, no hope)

Try to lock the purchase order (with WAIT) until the purchase order is locked by you, then release it and read the data before refreshing the ALV. (The update process keeps the order locked until the final database commit)

Use Function modules ENQUEUE_EMEKKOE (DO until locked) and then DEQUEUE_EMEKKOE. (or MM_ENQUEUE_DOCUMENT and a COMMIT WORK or DEQUEUE_ALL)

You may collect messages from transaction call, so in case of error message, don't try to lock the purchase order (Imagine that if someone else is locking the purchase order, then the call transaction fails and then if you try to lock the order yourself, not very useful)

Regards

Read only

Former Member
0 Likes
1,224

Hi,

Use method refresh_table_display just after where u want updation..... dont pass any parameter to this method.

Thanks & Regards

Ashu Singh