How to handle sy-ucomm in generated screen/dynpro
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...!
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?
Similar Messages
-
How To handle User Command in Sub Screen .
How can we handle Sy-ucomm in sub screen .
You do that in the PAI of the screen (Process After Input)
MODUE PAI.
CASE SY-UCOMM.
WHEN 'XXXX.
WHEN 'YYY'.
ENDCASE.
Regards,
Ravi -
How to handle this scenario in selection screen?
hi friends...i have 2 radio-buttons (2 parameter fields below each) in one group..the need when one radio button is checked, i need two parameter fields below it to be input enabled and the other to be disabled, if another radio button is checked, then the former two will be disabled and the other two parameter fields to be input enabled..no problems with this..i have written this functionality in at selection-screen output..i want to make each 1 parameter in the two groups to be mandatory..as using obligatory gives problems during at selection-screen output event, i want to achieve this functionality in some other event...i have tried the same in At selection screen on para_1 and at selection screen on para_2 fields, but am not able to achieve the desired functionality..by default the first radio button is checked, if the user wants to click the second radio button, At selection screen on para_1 event gets triggered and it throws the error msg. for the first one & vice versa...can't handle this in start-of-selection event also, as it gives the error msg. in a blank new screen..how to achieve it??
i have checked quite a few SDN threads, but doesn't answer my question
regards,
Sathish RHi,
I think you cannot proceed with obligatory statement as it will be triggered before theselection screen events.
You may check the code below.
PARAMETERS: r1 RADIOBUTTON GROUP rad1 USER-COMMAND abc.
PARAMETERS p1(5). ( maintained as obligatory)
PARAMETERS p2(5).
PARAMETERS r2 RADIOBUTTON GROUP rad1.
PARAMETERS p3(5). ( maintained as obligatory)
PARAMETERS p4(5).
INITIALIZATION.
r1 = 'X'.
AT SELECTION-SCREEN OUTPUT.
IF r1 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P4'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF r2 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN .
IF p1 IS INITIAL AND sy-ucomm NE 'ABC'.
MESSAGE 'Enter the obligatory value' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
IF p3 IS INITIAL AND sy-ucomm NE 'ABC'.
MESSAGE 'Enter the obligatory value' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
Hope this will help you.
Regards,
Smart Varghese -
How to handle help function type in a dynpro
Hello
I've made a button with the functiontype H ( Help Function) and now I'd like to react on this button.
But in the POV AND POH I can't call a module, because for this I need an input-/outputfield.
(FIELD "FIELDNAME" MODULE "MODULENAME").
My question is, how can I react on this functiontype / "HelpButton" ?
Thx in advance
ChristianThere are two ways:
First************
Process after input.
module user_command.
Code inside module user_command:
IF SY-UCOMM = 'H' "Function code for help button
*fetch all the list and store into an internal table.
* Call another screen to display the internal table.
endif.
Second*****************
Create an input field on the screen and make it invisible.
Process after input.
module user_command.
Code inside module user_command:
IF SY-UCOMM = 'H' "Function code for help button
*fetch all the list and store into an internal table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
retfield = 'name of field of internal table which is to be returned to invisible dynpro field'
* PVALKEY = ' '
dynpprog = 'program name'
dynpnr = 'dynpro number'
dynprofield = 'name of invisible dynpro field'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
TABLES
value_tab = Internal table containing list to be displayed
* FIELD_TAB =
* RETURN_TAB =
* dynpfld_mapping =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
endif. -
How can get my labels in a screen(dynpro) dynamically .
Hi All,
I have a route screen which has got 6 fields which are the activities in PLPO.So the text of these activites which are 6 are gonna changes.Like let us say for material 5867 I will have to go read PLPO and read VGWTS for it and then on basis of VGWTS there will read TC21 and get all the parametrs like PAR01,PAR02...PAR06.IF they are having some value for it then go read tc20t and get the text for it from TC20t and that is gonna be the text(They are label before input box) in my screen.So it changes dynamically like this.How can i Do this?
Regards,
VijayHow are your six screen fields named and how are the corresponding variables named in your logic? Let us say your fields on the screen are named FIELD1, FIELD2, FIELD3, FIELD4, FIELD5 and FIELD6. Your program should also have 6 variables named the same. Then you move the texts into these six variables, you should see your values in the screen.
-
How to handle screen resolution in bdc session method.
hi all,
how to handle screen resolution in bdc session method.Hello,
Why do need that for? Is it to add rows on a table control??
If it does, add new rows by using the add button instead of adding into the table control directly to each row.
Bye
Gabriel. -
How to handle screen resolution in session method
how to handle screen resolution in session method without bdc_insert .
Hello,
Why do need that for? Is it to add rows on a table control??
If it does, add new rows by using the add button instead of adding into the table control directly to each row.
Bye
Gabriel. -
How to handle screen resolution in ME21 fro a bdc programme
I need to use BDC program for ME21 for that how to handle the screen resolution,
i know CTU_PARAMS structure is there ,but how to use them, please send the model code.
Thanks & Regards
krishnagot the solution
-
How to handle dynamic screens in bdc
HI SIR,
i am working on BDC for CA02 in this i have probelm that if operation 10 it doesnot contains any items it showing one screen and if operation 10 contain some items
and its item counter increasing automatically in this case it coming to this screen through some other screen.so.plz help me how to handle this dynamic screens in bdc ,plz help.hi sir,
now i am working BDC UPLOAD with tcode CA02 in this in second screen their are some rows like in table control
opt
10 x
20
30 x
like above in this if row one of column contains 'x' then if i want to fill sub item then it display i one screen EX 100 else if it dsplay screen 200(ie item 10 already contains subitems it display x in one row column(i.e selected check box) else it show unselected check box.plz tell how to know wheather check box is selected or not from screen to .plz tell.
thanking u -
How to handle two main screens in one program.?
Hi Experts,
I have implemented ALV TREE report using Object oriented paradigm. So i have used screen 100 to contain custom container. Now i need to add this code another program . I need to create one push button as soon i press this button it should display this report. Now problem is another program also has one main screen. Now please let me know how to handle this problem. Please help me.
Thanks and regards,
shivanand.ok shivanand,
check out this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9db635c111d1829f0000e829fbfe/frameset.htm
hope it will help you.
Thanks -
How to handle different screen sizes?
Hi,
I have a couple of 2D 180X180 png images. I used them for splash screen, backgrounds etc etc. How do i ensure that my splash screen and background (using these fixed-sized images) can cover the device's displayable area? For example, if a device is 200X200, how do i stretch my 180X180 images?
I'm currently using lcdui's Image class to display the images, and there isn't any method that i could use to scale the images for different device sizes. :-(
Thanks for any help!! :-)The way this is usually handled is with different versions containing graphics fro different screen sizes.
You can resize images using MIDP 2.0, but this method is a memory hog, and with an image as big as 180x180 there is a big risk of running out of memory during the process.
Or you can work out a way so that the screen resolotion doesn't affect you. Like centering the image over a background of the same color as the image's background, using tiles to create the background, etc.
shmoove -
How to handle the multiple message on the screen
I am new to j2me. I am trying to write a simple program for instant messaging. I want to write a program that to handle incoming messages. Now I am able to display one message at a time but I dont know how to handle multiple messages. Do anyone can give an example?
Is that anyway that pop up an indication for new messages in j2me?
Need yours expertise to help me. Thanks.Use a custom canvas to display messages. Then you can do whatever you want with it!
-
How to generate screen dynamically ?
My requirement is to get the customers informations but the case is according to the number of the customers to generate the tab screen automatically (ex: 5 customers should be 5 tabs )and each tab screen to layout the information of the customer.
the title of the tab should be the customer name.
any suggestion?
many thanks~hi
good
try this code
FUNCTION z_change_screen_field_position.
Code Devlioped in version 4.5B
""Local interface:
*" IMPORTING
*" VALUE(PROG) LIKE D020S-PROG DEFAULT SY-REPID
*" VALUE(DNUM) LIKE D020S-DNUM DEFAULT SY-DYNNR
*" VALUE(FNAM) LIKE D021S-FNAM
*" VALUE(LINE_NUM)
*" VALUE(COLN_NUM)
DATA: h LIKE d020s,
f LIKE d021s OCCURS 0 WITH HEADER LINE,
e LIKE d022s OCCURS 0 WITH HEADER LINE,
m LIKE d023s OCCURS 0 WITH HEADER LINE,
f1(100), f2(100), f3(100), dynpro_id(44).
Format Screen ID
dynpro_id = prog.
dynpro_id+40(4) = dnum.
Import Screen data in tables
IMPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Modify Screen Data
LOOP AT f WHERE fnam EQ fnam.
f-line = line_num.
f-coln = coln_num.
MODIFY f.
ENDLOOP.
CHECK sy-subrc EQ 0.
Export Screen Data
EXPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Generate Screen for changes to take effect
GENERATE DYNPRO h f e m ID dynpro_id MESSAGE f1 LINE f2 WORD f3.
ENDFUNCTION.
thanks
mrutyun^ -
How to handle the hyperlink in alv
Hello friends,
I made one alv report by using function.. now i want that on one coloum, if user click than it can fetch the information regarding it. please tell me how i can do.. i made a hyperlink on that coloum but i dont know how i handle it..
Regards,
Reema Jain.REPORT zdemoab.
TYPE-POOLS: slis.
TABLES: mara.
TYPES: BEGIN OF t_itab,
matnr TYPE mara-matnr,
mtart TYPE mara-mtart,
END OF t_itab.
DATA: itab TYPE TABLE OF t_itab,
wa_itab like line of itab.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat,
i_layout TYPE slis_layout_alv,
g_repid TYPE sy-repid.
SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 0.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'MARA'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-tabname = 'MARA'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR: wa_fieldcat.
i_layout-colwidth_optimize = 'X'.
i_layout-hotspot_fieldname = 'MATNR'.
g_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
is_layout = i_layout
it_fieldcat = i_fieldcat[]
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'MATNR'.
* To pass the material no in ME22 transaction
READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'MM03'.
ENDIF.
ENDFORM. -
How to Add Push Button On Selection Screen
Hi Experts,
How to add Push button on Selection Screen.
Points will b rewarded for useful help.
Bohra.Hi,
To create a pushbutton on the selection screen, you use:
SELECTION SCREEN PUSHBUTTON [/]<pos(len)> <push>
USER-COMMAND <ucom> [MODIF ID <key>].
The [/]<pos(len)> parameters and the MODIF IF addition have the same function as for the formatting options for underlines and comments.
<push> determines the pushbutton text. For <push>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called.
For <ucom>, you must specify a code of up to four characters. When the user clicks the pushbutton on the selection screen, <ucom> is entered in the UCOMM of the SSCRFIELDS interface work area. You must use the TABLES statement to declare the SSCRFIELDS structure. The contents of the SSCRFIELDS-UCOMM field can be processed during the AT SELECTION-SCREENevent.
Ex.
REPORT DEMO.
TABLES SSCRFIELDS.
DATA FLAG.
SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,
PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,
PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,
END OF LINE,
END OF SCREEN 500.
AT SELECTION-SCREEN.
CASE SSCRFIELDS.
WHEN 'CLI1'.
FLAG = '1'.
WHEN 'CLI2'.
FLAG = '2'.
WHEN 'CLI3'.
FLAG = '3'.
WHEN 'CLI4'.
FLAG = '4'.
ENDCASE.
START-OF-SELECTION.
TIT = 'Four Buttons'.
BUT1 = 'Button 1'.
BUT3 = 'Button 3'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
CASE FLAG.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.
This example defines four pushbuttons on a selection screen that is displayed as a
dialog box. The selection screen is defined in a statement chain for keyword
SELECTION-SCREEN.
If the text symbols TEXT-020 and TEXT-040 are defined as 'Button 2' and 'Button 4',
the four pushbuttons appear as follows on the selection screen displayed as a dialog box.
Regards,
Bhaskar
Maybe you are looking for
-
Using the right apple ID and password I can't sign into iMassage? Why
Using the right apple ID and password with wi-fi I can't sign into iMassage. Why?
-
I have an older iMac 5,1 and the disc drive no longer works. I was hoping that I could the Apple USB super drive as a replacement, but the info on the super drive page says compatible with iMac 2012 or later. Does anyone know why it would not work fo
-
Okay heres the problem Due to my throwing a fit @ the latest Drivers putting a white screen up on my TV out i formatted my Pc now when i go to play a DVD or anything like that and turn on my TV out it no longer picks up my video clips whats wrong wha
-
ALV output as an attachment to mail
Hi all, I have an requirement where in an interface i populate a ALV data and i need to pass the ALV output as an attachment to a mail send to some shared folder in SAP mail office. Indeed i should not display the output but rather capture the output
-
How do I prevent my apple from auto ejecting a cd when prompted by a program. This happens when I am playing a game and after beating a certain level it asks me to insert a cinematics cd then the apple ejects the disc. In the game I am able to chose