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

Calling a Selection Screen as Sub Screen

0 Likes
8,787

Hi all,


In executable program,I created normal screen 100 and placed a tabstrip control with 3 tabs.

in first tab subscreen area I want select-options.

So I defined selection screen with select-options .

Now I want to call that selection screen on 'tab1' subscreen area.


So I use CALL selection-screen: 0101 starting at 10 10 ending at 20 20 in Main screen's PBO.

But when I check syntax, still have a syntax error: "Include block not specified, not defined or spelt incorrectly."

Could everybody can tell me, What is wrong???

Thanks very much!!


Hi all,


In executable program,I created normal screen 100 and placed a tabstrip control with 3 tabs.

in first tab subscreen area I want select-options.

So I defined selection screen with select-options .

Now I want to call that selection screen on 'tab1' subscreen area.


So I use CALL selection-screen: 0101 starting at 10 10 ending at 20 20 in Main screen's PBO.

But when I check syntax, still have a syntax error: "Include block not specified, not defined or spelt incorrectly."

Could everybody can tell me, What is wrong???

Thanks very much!!


7 REPLIES 7
Read only

Former Member
0 Likes
4,071

Hi,

Check this thread which might help you.

Thanks

KH

Read only

Former Member
0 Likes
4,071

Hi,

     Define your Subscreen in Selection Screen Declaration like

   SELECTION-SCREEN BEGIN OF SCREEN 0101 AS SUBSCREEN.
   SELECT-OPTIONS : field1 FOR xyz  .
   SELECTION-SCREEN END OF SCREEN 0101.

    

   and Normally call in PBO like

     CALL SUBSCREEN <Subscreen area> INCLUDING sy-REPID  0101.


Regards:

Somendra

Read only

VenkatRamesh_V
Active Contributor
0 Likes
4,071

Hi,

For Executable type, Without  creating separate screen    below sample code will display the tabbed screen.

TABLES: mara, mkpf.

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES.

SELECTION-SCREEN TAB (20) t1 USER-COMMAND ucomm1 DEFAULT SCREEN 101.

SELECTION-SCREEN TAB (20) t2 USER-COMMAND ucomm2 DEFAULT SCREEN 102.

SELECTION-SCREEN END OF BLOCK tabb1.

SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.

SELECT-OPTIONS: s_matnr FOR mara-matnr,

s_mtart FOR mara-mtart.

*s_days FOR bapifvdexp_vzzbepp-num4 NO-EXTENSION  NO INTERVALS DEFAULT 180.

SELECTION-SCREEN END OF SCREEN 101.

SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.

SELECT-OPTIONS:

s_date  FOR mkpf-budat.

SELECTION-SCREEN END OF SCREEN 102.


Hope it helpful.


Regards,

Venkat.


Read only

0 Likes
4,071

Thanks all for your replies..

In my selection screen I am having two more radio buttons and  2 check boxes as well.

SELECTION-SCREEN BEGIN OF BLOCK b1 .

PARAMETERS :g_r1 RADIOBUTTON GROUP g USER-COMMAND ucm ,"MODIF ID a.

                         g_r2 RADIOBUTTON GROUP DEFAULT 'X'.

  SELECT-OPTIONS : so_role FOR agr_1251-agr_name .

  SELECT-OPTIONS : so_user FOR usr02-bname .

PARAMETERS :  p1 AS CHECKBOX DEFAULT 'X' ,

                            p2 AS CHECKBOX ,

                            p3 AS CHECKBOX .

SELECTION-SCREEN END OF BLOCK b1.

I have to hide two check boxes ,p1 and p2 when g_r1 is selected .

I Wrote code as

AT SELECTION-SCREEN OUTPUT.

   LOOP AT SCREEN.

     .......<logic>

MODIFY SCREEN .

   ENDLOOP.


Now when I am Calling in my main screen PBO

CALL SUBSCREEN:   ssa1 INCLUDING sy-repid '101',


In PAI :

CALL SUBSCREEN: SSA1.


In USER COMMAND I wrote Case .. endcase also for navigating .


Now all the Hiding Screen elements is working and when I am trying to go to other tabs it is not navigating to other tab.

What is Wrong here??



Read only

0 Likes
4,071

Hi

You can`t call sub screen statically.

CALL SUBSCREEN:   ssa1 INCLUDING sy-repid '101',   "Always '101' subscreen in PBO.

refer this thread, Old School Programming Techiques 1 - Multiple Tabs in a selection screen in Module Pool Programming ...

regards,

Archer

Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,071

Did you read the sample provided in Abap online help Selection Screens as Subscreens

Regards,

Raymond

Read only

0 Likes
4,071

I got the solution.

Thank you all for valuable information.

I used only one subscreen and passed screen numbers as below.

In PBO

CALL SUBSCREEN: SSA INCLUDING sy-repid g_number.

In PAI

Call SUBSCREEN SSA.

The thread is closed.....