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

Sub-Screen Number

naveenvishal
Contributor
0 Likes
688

how to get current sub-screen number at runtime..???

a abit complex , let me explain.

calling,

call subsceen 001 including sy-repid '1001' ,

002 including sy-repid '1000' ,

003 including sy-repid '1001'.

How to get the current subscreen executed at runtime becz both are calling same subscreen 1001. how to distinguish betw two at runtime.

Thanx,

2 REPLIES 2
Read only

Former Member
0 Likes
556

Hi,

CONSTANTS : BEGIN OF c_t_tabstrip,
              tab1 LIKE sy-ucomm VALUE 'INT_DET',
              tab2 LIKE sy-ucomm VALUE 'DMG_DET'.
                          END OF c_t_tabstrip.

Create one structure like this in TOP include.

DATA      : BEGIN OF g_t_tabstrip,
             subscreen   LIKE sy-dynnr,
             pressed_tab LIKE sy-ucomm VALUE c_t_tabstrip-tab1,
            END OF g_t_tabstrip.

and in the TAB Press write the below code in one form.

CASE save_ok.
    WHEN   'INT_DET' OR 'DMG_DET' .

      PERFORM handle_code.

inside this perform.

write the below code.

CASE save_ok.

    WHEN c_t_tabstrip-tab1.
      g_t_tabstrip-pressed_tab = c_t_tabstrip-tab1.
    WHEN c_t_tabstrip-tab2.
      g_t_tabstrip-pressed_tab = c_t_tabstrip-tab2.
        WHEN OTHERS.

  ENDCASE.

In PBO of the main screen

MODULE detail_tab_set.

inside the module

detail_tab-activetab =  g_t_tabstrip-pressed_tab.

  CASE g_t_tabstrip-pressed_tab.

    WHEN c_t_tabstrip-tab1.
      g_t_tabstrip-subscreen = '9402'.

    WHEN c_t_tabstrip-tab2.
      g_t_tabstrip-subscreen = '9403'.

  

  ENDCASE.

now you can call different screen based on the tab you selected,

CALL SUBSCREEN intim_ref
  INCLUDING sy-repid g_t_tabstrip-subscreen.

hope this will help

shibu

Read only

naveenvishal
Contributor
0 Likes
556

well, it was not possible for me to track at runtime, on which sub-screen the code is currently executing on. At last, the conditions modified and requirement for it vanishes.

Thanks for the help...

Naveen Vishal