2006 Mar 23 6:43 PM
Hi,
Ive a problem with leaving screens/set screens.
What I pretend to do:
1 I ve a screen 100
2 I click a line on screen 100 and call screen 200
3 - I do something on screen 200
4 I want to return to screen 100
5 But I want a new line in screen 100 (created on screen 200) How can I achieve this?
I can return to screen 100 with no problem set screen 0. leave screen.
The problem is that I need the screen 100 refreshed.
Can you help?
Best Regards,
Maria João Rocha
2006 Mar 23 6:48 PM
Can you explain in detail what exactly mean by 'Screen 100 refreshed'?
2006 Mar 23 6:48 PM
Can you explain in detail what exactly mean by 'Screen 100 refreshed'?
2006 Mar 23 6:52 PM
Thanks Ashish,
Yes.
Screen 100 is an ALV GRID witch reflects an internal table
On screen 200 I insert a new line on that internal table
When I return to screen 100 I want to see the new line automatically.
Best Regards,
Maria João Rocha
2006 Mar 23 6:54 PM
Can you try this -
From screen 100
set screen 200. Leave screen.
In screen 200.
Set screen 100. Leave screen.
This should refresh data in screen 100.
And make sure that screen 100 PBO has updated internal table. (With new inserted record).
2006 Mar 23 7:04 PM
When you go back to the screen 100, you also need to do a refresh by setting UCOMM = '&REFRESH'. So I am assuming that you call the screen 200 in your user command routine of the ALV. Here is the sequence.
In the routine user command.
case ucomm.
when 'abc'.
call screen 200.
ucomm = '&REFRESH'.
endcase.In your screen 200, before coming back to 100, you will add the new record to your internal table.
2006 Mar 23 6:57 PM
when you go back to your screen 100, this new line added in screen 200 should be added whatever internal table you are displaying in 100.
2006 Mar 23 6:59 PM
Hi Maria,
You can use ABAP command.
<b>REFRESH CONTROL contrl FROM SCREEN dynnr.</b>
Hope this will help.
Regards,
Ferry Lianto
2006 Mar 23 7:00 PM
Hi,
I've already do i, but doesn't work.
Remains a empty screen 100.!!
Best Regards,
Maria João Rocha
2006 Mar 23 7:04 PM
Hi Ferry,
I'm on 4.6c.
This instruction doesnt exist on 4.6c.
LEAVE SCREEN 200
Best Regards,
Maria João Rocha
2006 Mar 24 8:52 AM
Hi,
in the PBO of screen 100, you can call method REFRESH_TABLE_DISPLAY of CL_GUI_ALV_GRID.
so that when you return to screen 100, the changes in the internal table will be reflected.
sample code.
DATA : G_GRID TYPE REF TO CL_GUI_ALV_GRID,
WA_LVC_S_STBL TYPE LVC_S_STBL.
module PBO_100.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = WA_LVC_S_STBL
I_SOFT_REFRESH = ' '
EXCEPTIONS
FINISHED = 1
OTHERS = 2.
endmodule.
Hope it helps.
Regards,
Shashank
2006 Mar 24 10:22 AM
Hi,
Thank you all.
What I did solved the problem!
Call screen 100.
leave sreen. -> New
---on screen 200.
set screen 0. Leave screen.
Maria João Rocha