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: 

how to handle sy-ucomm in generated screen/dynpro

Former Member
0 Kudos

Hi,

like the topic says, I have a problem to handle

the user-input in or better, after the first screeen!

I think, the best Info is the code itself:

SELECTION-SCREEN BEGIN OF screen 100 as window.
SELECT-OPTIONS:  s_kunnr  for wa_besuche-kunnr,
                 s_bzirk  FOR wa_besuche-bzirk,
                 s_vtweg  FOR wa_besuche-vtweg,
                 s_vkgrp  FOR wa_besuche-vkgrp,
                 s_dat    FOR sy-datum DEFAULT '20070101' TO '20071231'.
SELECTION-SCREEN END   OF screen 100.


call screen 100.


datumuntergrenze = s_dat-low.
datumobergrenze  = s_dat-high.

perform daten_selektieren_generieren.


* Here I want to handle sy-ucomm (if the user doesn't 
* pushed the EXIT/CANCEL/BACK-Buttton in screen 100,
* the following screen 200 should be called)
* --------> BUT SY-UCOM IS EMPTY

call screen 200.


I would be very nice, if somebody can

help me with this sh...!

3 REPLIES 3

Former Member
0 Kudos

Hi

In your PF-Status, you should define a Funtion code(say NXTSC) and assign it to any Functiona key, say F5.

Now, you should code in PAI, that

CASE SY_UCOMM.

WHEN 'NXTSC'.

call screen '0200'.

ENDCASE.

0 Kudos

hi, thanks for your response!

I can't use your hint, because with the code:

SELECTION-SCREEN BEGIN OF screen 100 as window.

there will be a "GENERATED" screen. This means, there

is a screen with all the input fields und the label 100 which I can't

edit! Because if I edit this screen and activate my source again,

my changes will be undone!

So is my question, if there is another system-field than sy-ucom?

0 Kudos

You are using a selection-screen. So, the correct event is AT SELECTION-SCREEN, because the flow logic of the (generated) screen will not end until "ONLI" (F8 keypress) command.

Try this:

TABLES: sscrfields.

AT SELECTION-SCREEN.
 IF sscrfields-ucomm EQ 'MYUCOMM'.
     CALL SCREEN 200.
 ENDIF.