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

Selection screen + hiding selection parameter adn adjusting elements

former_member196517
Contributor
0 Likes
2,403

Hi ,

I am able to hide a selection parameter in At Selection screen output event by checking screen-name and then making screen-active as 0. but problem is that i am seeing a blank space there and i expect screen to adjust all elements accordingly and remove all blanks,

Can you please provide some hints,..

Regards

Anuj

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,363

Hi Anuj,

try it with MIDIF ID instead on screen name use screen group as show below:

Parameters:
  Char1(5) type c MODIF ID abc,
  Char2(5) type c MODIF ID abc,
  Char3(5) type c MODIF ID def,
  Char4(5) type c MODIF ID def.

At Selection-screen output.

  Loop at screen.
    If Screen-group1 = 'ABC'.
      Screen-active = 0.
      Modify Screen.
    Endif.
  Endloop.

With luck,

Pritam.

6 REPLIES 6
Read only

Former Member
0 Likes
1,363

Hi

In SCREEN table we have got another field invisible, use these field your problem will solve.

Regards

Kumar M

Read only

faisalatsap
Active Contributor
0 Likes
1,363

Hi, Anuj Goyal

First of all to find the Screen Field name follow the steps bellow. ( i think lables are appearing there find the lable name too)

1. --> Display the Screen With all the fields

2. --> Place you Muse Courser on the Field you want to hide using the Loop at Screen

3. --> Press 'F1' Key and on the display Window

4. --> From the Tool bar select the Technical Information Button

and after finding the name of the fied follow the following code for example here i am hiding some fields and aldo the lable using name.

AT SELECTION-SCREEN OUTPUT.
  BREAK-POINT.
  LOOP AT SCREEN.
    IF (
*       screen-name = '%BYB1005_BLOCK_1000'
       screen-name = '%FYTI007_1000'
     or  screen-name = '%FBIS010_1000'
     or  screen-name = 'PYVW0_0'
 
     or  screen-name = '%_PYPERNR_%_APP_%-TEXT'
     or  screen-name = 'PYPERNR-LOW'
     or  screen-name = '%_PYPERNR_%_APP_%-VALU_PUSH'
 
        ).
      screen-active = '0'.
      screen-invisible = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Please Reply if any Issue,

Kind Regards,

Faisal

Edited by: Faisal Altaf on Jan 19, 2009 12:10 PM

Read only

Former Member
0 Likes
1,363

Hi,

Make both ACTIVE as 0 and INVISIBLE as 1 for screen table.

Hope it solves!!

Regards,

Pavan

Read only

Former Member
0 Likes
1,363

hii

try using following code.there elements will be adjusted automatically if there is any space.

PARAMETERS:
  p_pfile TYPE rlgrap-filename OBLIGATORY.
" File Name


SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_rad1 TYPE c RADIOBUTTON GROUP gr  DEFAULT 'X' USER-COMMAND usr .
SELECTION-SCREEN COMMENT 3(16) text-005.
SELECTION-SCREEN END OF LINE.


SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_rad2 TYPE c RADIOBUTTON GROUP gr.
SELECTION-SCREEN COMMENT 3(16) text-006.
SELECTION-SCREEN END OF LINE.

PARAMETERS p_docno(11) TYPE c .
" Document Number


AT SELECTION-SCREEN OUTPUT .

  IF p_rad2 IS INITIAL .
    LOOP AT SCREEN.
      IF screen-name CS 'p_docno'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN.

  ELSE.
    LOOP AT SCREEN .
      IF screen-name CS 'p_docno'.
        screen-active = 1.
        screen-input = 1.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-name CS 'p_docno'.
    ENDLOOP.                           " LOOP AT SCREEN .
  ENDIF.                               " IF p_rad2 IS INITIAL .

regards

twinkal

Read only

Former Member
0 Likes
1,364

Hi Anuj,

try it with MIDIF ID instead on screen name use screen group as show below:

Parameters:
  Char1(5) type c MODIF ID abc,
  Char2(5) type c MODIF ID abc,
  Char3(5) type c MODIF ID def,
  Char4(5) type c MODIF ID def.

At Selection-screen output.

  Loop at screen.
    If Screen-group1 = 'ABC'.
      Screen-active = 0.
      Modify Screen.
    Endif.
  Endloop.

With luck,

Pritam.

Read only

Former Member
0 Likes
1,363

Hi.....

To adjust all the screen accordingly use the following code

PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1 TYPE c LENGTH 10 MODIF ID bl2,
            p2 TYPE c LENGTH 10 MODIF ID bl2,
            p3 TYPE c LENGTH 10 MODIF ID bl2.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p4 TYPE c LENGTH 10,
            p5 TYPE c LENGTH 10,
            p6 TYPE c LENGTH 10.
SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF show_all <> 'X' AND
       screen-group1 = 'BL2'.

       screen-invisible = '0'.
       screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

Here I have used the check box. If it is checked only then all the elements would be displayed.

Else only the second half will be displayed

Hope this is useful.

Thanks and Regards

Bhuvaneswari