Application Development 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: 

set screen/leave screen

MariaJoãoRocha
Contributor
0 Kudos

Hi,

I’ve 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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Can you explain in detail what exactly mean by 'Screen 100 refreshed'?

10 REPLIES 10

Former Member
0 Kudos

Can you explain in detail what exactly mean by 'Screen 100 refreshed'?

MariaJoãoRocha
Contributor
0 Kudos

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

0 Kudos

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).

0 Kudos

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.

Former Member
0 Kudos

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.

ferry_lianto
Active Contributor
0 Kudos

Hi Maria,

You can use ABAP command.

<b>REFRESH CONTROL contrl FROM SCREEN dynnr.</b>

Hope this will help.

Regards,

Ferry Lianto

MariaJoãoRocha
Contributor
0 Kudos

Hi,

I've already do i, but doesn't work.

Remains a empty screen 100.!!

Best Regards,

Maria João Rocha

MariaJoãoRocha
Contributor
0 Kudos

Hi Ferry,

I'm on 4.6c.

This instruction doesn’t exist on 4.6c.

LEAVE SCREEN 200

Best Regards,

Maria João Rocha

Former Member
0 Kudos

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

MariaJoãoRocha
Contributor
0 Kudos

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