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

SCREEN

Former Member
0 Likes
602

HAI,

THIS IS THE <u><b>HP</b></u> QUESTION.

PLEASE ANS IT

In start of selection if we perform validation ,what happens?

can u create more than one selection screen? IF YES , HOW ?

can u add a new view to the existing view?

with out doing any action how to go another screen ,means when ever control comes to that particular field this action has to be done?

THANK YOU

ASHOK KUMAR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
578

Hi

Yes, You can do validations in Start of selections

You can define a single Selection screen (1000) for a program.

Add the Tables of two views together in a single view and create all fields provided they have some relationship.

You can call another screen. CALL SCREEN 200

based on a condition.

<b>Reward points for useful Answers</b>

Regards

Anji

4 REPLIES 4
Read only

Former Member
0 Likes
579

Hi

Yes, You can do validations in Start of selections

You can define a single Selection screen (1000) for a program.

Add the Tables of two views together in a single view and create all fields provided they have some relationship.

You can call another screen. CALL SCREEN 200

based on a condition.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
578

Hi,

see this below example.in this we will create sub more than than 1 selection-screen(as sub screens).

REPORT ZBHTSTR.

TABLES:SSCRFIELDS.

SELECTION-SCREEN BEGIN OF SCREEN 2001 AS SUBSCREEN.

PARAMETERS:NAME(6) TYPE C DEFAULT 'BHARAT'.

SELECTION-SCREEN END OF SCREEN 2001.

SELECTION-SCREEN BEGIN OF SCREEN 2002 AS SUBSCREEN.

PARAMETERS:NUM(2) TYPE N DEFAULT 10.

SELECTION-SCREEN END OF SCREEN 2002.

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

SELECTION-SCREEN TAB (6) tabs1 USER-COMMAND ucomm1

DEFAULT SCREEN 2001.

SELECTION-SCREEN TAB (6) tabs2 USER-COMMAND ucomm2

DEFAULT SCREEN 2002.

SELECTION-SCREEN END OF BLOCK tabb1.

WRITE:/ NAME,NUM.

INITIALIZATION.

tabs1 = TEXT-001.

tabs2 = TEXT-002.

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'UCOMM1'.

tabb1-prog = SY-CPROG.

tabb1-dynnr = 2001.

tabb1-activetab = 'TABLE1'.

WHEN 'UCOMM2'.

tabb1-prog = SY-CPROG.

tabb1-dynnr = 2002.

tabb1-activetab = 'TABLE2'.

ENDCASE.

rgds,

bharat.

Read only

Former Member
0 Likes
578

<b>In start of selection if we perform validation ,what happens?</b>

If the validetion failed you will not find the respective field editable.

<b>can u create more than one selection screen? IF YES , HOW ?</b>

Yes you can create and call more than one selection screen.

Ex:

REPORT demo_call_selection_screen.

<b>with out doing any action how to go another screen ,means when ever control comes to that particular field this action has to be done?</b> 

SELECTION-SCREEN BEGIN OF BLOCK sel1 WITH FRAME TITLE tit1.
PARAMETERS: cityfr TYPE spfli-cityfrom,
            cityto TYPE spfli-cityto.
SELECTION-SCREEN END OF BLOCK sel1.

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS sel1.
SELECTION-SCREEN BEGIN OF BLOCK sel2
                          WITH FRAME TITLE tit2.
PARAMETERS: airpfr TYPE spfli-airpfrom,
            airpto TYPE spfli-airpto.
SELECTION-SCREEN END OF BLOCK sel2.
SELECTION-SCREEN END OF SCREEN 500.

INITIALIZATION.
  tit1 = 'Cities'.

AT SELECTION-SCREEN.
  CASE sy-dynnr.
    WHEN '0500'.
      MESSAGE w888(SABAPDOCU) WITH 'Screen 500'.
    WHEN '1000'.
      MESSAGE w888(SABAPDOCU) WITH 'Screen 1000'.
  ENDCASE.

START-OF-SELECTION.
  tit1 = 'Cities for Airports'.
  tit2 = 'Airports'.
  CALL SELECTION-SCREEN 500 STARTING AT 10 10.
  tit1 = 'Cities again'.
  CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

Read only

Former Member
0 Likes
578

hi ashok,

IN START-OF-SELECTION we can do validation as using select single *

for ex: to check wheteher a given matnr value exists in mara table or not as

select single * from mara where matnr = p_matnr [parameter having matnr value]

if sy-subrc eq 0.

call screen 999.

....................

....................

ex:

if screen-name = 'p_matnr'.

call screen 9999.

endif.

if useful reward some points.

with regards,

suresh.