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: 

selection screen issue

Former Member
0 Kudos

Hi,

in alv report while giving t-code the default values are shown,

dmrdate    02.10.2014    to   06.10.2014

noof days  0                  to    5

based on no of days dmrr date is calculated  0 means current date and 5 means current date - 5 days.

so while giving t-code it automatically takes the value,but now the user erase the dmrr date and give number of days as sometnkng

let us assume 0 to 1 means. 05.10.2014 to 06.10.2014.

so while giving no of days as 0 to 1 and press enter means it takes 05.10.2014 to 06.10.2014. in dmrr date.

but i don want to show this date,the field should be empty,but the value run in background processing(select query must contains dmrr date)

and my code is....any one help how to clear dmrr date value in selection screen.

at selection screen.

if so_dmdat[] is initial and so_noday-high is not initial.

   so_dmdat-low           sy-datum - so_noday-high. .

   so_dmdat-high          sy-datum .

   so_dmdat-option        'BT'.

   so_dmdat-sign          'I'.

   APPEND so_dmdat.


if i give at selection screen output  means so_dmdat value is cleared...

4 REPLIES 4

SimoneMilesi
Active Contributor
0 Kudos

sorry, but i'm missing your requirement: you want to overwrite ALWAYS SO_DMDAT values or just when it's initial and without the user recognize it?

SO_DMDAT should not be obligatory

To clear ALWAYS values in SO_DMDAT

AT SELECTION-SCREEN OUTPUT   

     clear: so_dmdat, so_dmdat[]

To force value without user recognize it.

START-OF-SELECTION

if so_dmdat[] is initial and so_noday-high is not initial.

   so_dmdat-low           sy-datum - so_noday-high. .

   so_dmdat-high          sy-datum .

   so_dmdat-option        'BT'.

   so_dmdat-sign          'I'.

   APPEND so_dmdat.

Former Member
0 Kudos

Hi Christina,

Do you want to hide the SO_DMDAT from selection screen, but not really discard it from selection screen? If so, then you can add "NO-DISPLAY" at your select-options.

Ex : SO_DMDAT FOR SY-DATUM NO-DISPLAY.

0 Kudos

no if i give no display means default values also not displayed...user sometimes only erase the default value and give new value.That time only i want to hide.

0 Kudos

I see.. then you could use MODIFY SCREEN as your solution.

Ex : SELECT-OPTIONS : SO_DMDAT FOR SY-DATUM MODIF ID 'ABC'.

then AT SELECTION-SCREEN OUTPUT add your logic to hide or not :

LOOP AT SCREEN.

     IF SCREEN-GROUP1 EQ 'ABC'.

          IF {add your logic here whenever you want to hide or show}.

               SCREEN-INVISIBLE = 1. "HIDE

          ELSE.

          SCREEN-INVISIBLE = 0. "DISPLAY

          ENDIF.

          MODIFY SCREEN.

     ENDIF.

ENDLOOP.