Calling a Screen as a Modal Dialog
Hi
I have created a 'Z' Transaction which has only one Screen which is of type 'Modal Dialog'. Whenever i run the Z Transaction, i get the screen in a full window size. Is there any way by which i can restrict this screen to a Modal Dialog. I know that we can use call Screen XX Starting at .. Ending at.. Option. But this will help me only when i have two screens.
Can anyone answer this as it is urgent !!!
Rgrds,
Murli.
Here is an example of what I'm talking about. Here we have a small program with a selection screen. When you hit enter, it will call the function module which has the CALL SCREEN...Starting...Ending statement. This will thru the dialog box in front of the selection-screen. I believe that this is the functionality that you required.
The program code......
report zrich_0003.
data: br_itab type table of zbrbin with header line.
parameters: p_check.
at selection-screen.
call function 'Z_BIN_LOC'
tables
br_itab = br_itab.
The function module....
FUNCTION Z_BIN_LOC.
*"*"Local interface:
*" TABLES
*" BR_ITAB STRUCTURE ZBRBIN
CLEAR: ITAB. REFRESH: ITAB.
CLEAR: OK_CODE, SAVE_OK.
*Loop thru parameter table and fill up screen.
LOOP AT BR_ITAB.
* Entry already exists........get bin location.
SELECT SINGLE * FROM ZBRBIN
WHERE VBELN = BR_ITAB-VBELN.
IF SY-SUBRC <> 0.
CLEAR ZBRBIN-BIN.
ENDIF.
ITAB-KDAUF = BR_ITAB-VBELN.
ITAB-BIN = ZBRBIN-BIN.
APPEND ITAB.
ENDLOOP.
REFRESH CONTROL 'ITABCON' FROM SCREEN '0100'.
* call entry screen.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 85 16.
ENDFUNCTION.
Regards,
Rich Heilman
Similar Messages
-
Calling a screen in a user exit!
friends,
Is it possible to call a screen (Normal or modal dialog box) to display an error message or some 2 or 3 lines in a user exit? thanks allYou can also try the following logic.. it worked for me inside a HR User Exit ( ZXPADU02)..
report zpinc .
data t_errors type table of rpbenerr with header line.
t_errors-pernr = '0001'.
t_errors-class = 'RP'.
t_errors-msgno = '016'.
t_errors-msgv1 = 'TEST1'.
t_errors-msgv2 = 'TEST2'.
t_errors-msgv3 = 'TEST3'.
t_errors-msgv4 = 'TEST4'.
append t_errors.
clear t_errors.
t_errors-pernr = '0002'.
t_errors-class = 'RP'.
t_errors-msgno = '016'.
t_errors-msgv1 = 'TEST1'.
t_errors-msgv2 = 'TEST2'.
t_errors-msgv3 = 'TEST3'.
t_errors-msgv4 = 'TEST4'.
append t_errors.
clear t_errors.
call function 'HR_BEN_SHOW_ERROR_POPUP'
exporting
title = 'Error List'
tables
error_table = t_errors.
~Suresh -
Help with modal dialog returning a value to the calling page
Greetings,
Apex Version: 4.1.0.0.32
What I am trying to do is to create a modal dialog that is called from a form page. The dialog will present the user with an IR report that will allow the him to select a row and return a value from that row to a field on the calling page. I have it working in Firefox, but I get an error using IE 8. I hope someone can show me why it is not working in IE.
Here is how I am doing it:
From the calling page:
Created a button
Action: Redirect to URL
URL Target: javascript:var rc = window.showModalDialog('f?p=&APP_ID.:70:&SESSION.::&DEBUG.:::','','resizable:yes;center:yes;dialogWidth:1000px;dialogHeight:500px;');
On the called page:
The called page is an IR report where the query returns this as one of the columns:
*(Note: I had to put a dot '.' in front of the onclick to get it to show in this thread. It is not there in my real code.)*
select
<a href="#" name="z" style="color:blue; text-decoration:underline;" .onclick="javascript:passBack(''' || LOT_NO ||''');">Select</a>' SelectThis
, column1
, column2
from sometablename;This resolves the anchor to:
<a .onclick="javascript:passBack('232158');" href="#">Select</a>Here is the Javascript function that is called from the anchor onclick:
function passBack(passVal1)
opener.document.getElementById("P75_ITEM1").value = passVal1;
close();
}When I run this in Firefox, it works as expected. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and it returns the correct value back to the calling page and closes the modal dialog.
When I run it in IE8, it fails. I click on the button on the parent page. The modal dialog is opened and the IR report is displayed. I click on one of the links in the report and I get this error: “opener.document is null or not an object”.
I hope that is clear and that someone can help.
Thanks
LarryA quick google search determines that window.opener doesn't exists when using window.showModalDialog
Suggestions range from using window.open instead of window.showModalDialog to using dialogArguments instead of window.opener
Try the following:
In the parent page define a getPopupValue() function:
function getPopupValue(){
var dr = window.showModalDialog('f?p=&APP_ID.:70:&SESSION.::&DEBUG.:::','','resizable:yes;center:yes;dialogWidth:1000px;dialogHeight:500px;');
if ( (dr != undefined) && (dr != '') && (dr != false) ){
$x("P75_ITEM1").value = dr;
}Change the button url to call the function:
javascript:getPopupValue(); On the popup page change the passback function to:
function passBack(passVal1)
returnValue = passVal1;
close();
} -
Hi,
I have an ALV on suppose screen 3000, I have created a button in the tool bar to call another ALV, but my question is, can we display ALV in modal dialog box screen(because the requirement is to display ALV as a popup)
So when i changed the screen type to normal screen, my alv is coming,,but when i change the screen type to modal dialog box, then no ALV is being displayed in the output. Only blank screen is displayed.
Can you please help me.
Thanks.Hello
The problem is that you have to take into account that the ALV in the popup (or modal dialogbox) is displayed on a different screen level:
level 0 = main screen
level 1 = 1st popup
level 2 = 2nd popup
We have up to 9 screen level available.
The following sample report ZUS_SDN_ALV_IN_POPUP is a variant of my sample report ZUS_SDN_TWO_ALV_GRIDS.
Depending on whether you mark P_POPUP or not the second ALV grid is additionally displayed on a popup.
*& Report ZUS_SDN_ALV_IN_POPUP
*& Thread: ALV in modal dialog box
*& https:||<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="762642"></a>
*& Screen '0100' contains no elements.
*& ok_code -> assigned to GD_OKCODE
*& Flow logic:
* PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
* PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
REPORT zus_sdn_alv_in_popup.
TYPE-POOLS: abap.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
" containers and ALV grids for main screen
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
" container and ALV grid for popup
go_docking3 TYPE REF TO cl_gui_docking_container,
go_grid3 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
PARAMETERS:
p_popup AS CHECKBOX DEFAULT ' '.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
IF ( p_popup = abap_true ).
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'POPUP'
* IMPORTING
* rc =
ELSE.
* Triggers PAI of the dynpro with the specified ok-code
* * CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ). " not on 4.6c
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DETAIL'
* IMPORTING
* rc =
ENDIF.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
" Select data
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = '1000'.
PERFORM init_controls.
* Display data
gs_layout-grid_title = 'Customers'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
is_layout = gs_layout
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
gs_layout-grid_title = 'Customers Details (Sales Areas)'.
CALL METHOD go_grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the popup
gd_repid = syst-repid.
CALL METHOD go_docking3->link
EXPORTING
repid = gd_repid
dynnr = '0200'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0 " main screen -> level 0 !!!
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
" Create container and grid for popup.
* Create docking container
CREATE OBJECT go_docking3
EXPORTING
parent = cl_gui_container=>screen1 " !!! popup !!!
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
" NOTE: Starting from a main dynpro (screen level 0) the first popup
" (or modal dialogbox) is on level 1 !!!
" Using cl_gui_container=>screen0 fails to display ALV grid.
CREATE OBJECT go_grid3
EXPORTING
i_parent = go_docking3
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " INIT_CONTROLS
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE syst-dynnr.
WHEN '0100'.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
PERFORM entry_show_details.
WHEN 'POPUP'.
PERFORM entry_show_details.
go_grid3->refresh_table_display( ). " required
CALL SCREEN '0200' STARTING AT 5 5
ENDING AT 150 30.
WHEN OTHERS.
ENDCASE.
WHEN '0200'.
set screen 100. leave screen.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM knvv INTO TABLE gt_knvv
WHERE kunnr = ls_knb1-kunnr.
ENDFORM. " ENTRY_SHOW_DETAILS
Regards
Uwe -
Hi,all
I've found a problem arising from this sentence "call SELECTION-SCREEN 1001 STARTING AT 10 10",in the main screen. (here the type of screen 1001 is 'Modal Dialog Box')
The 'close' button on the right-top correr of the screen has no effect to close the
screen 1001,so how can I catch the event of click on that button?
Thanksyou need to write the code as below
case sy-ucomm.
when 'EXIT'.
leave to screen 0. " always use screen 0 for modal dialog box.
when "BACK'
leave to screen 0
WHEN 'CANC'.
leave to screen 0
endcase.
Please activate buttons in Menu Painter.
Thanks
Seshu -
I'm using the Blackberry API Level 4.5, Currently we have a app that on startup prompts the user if there is a new version available for download. In this method we check if the new version is greater or not. We then get a handle on the UI, call the invokeAndWait() method while pushing a modal dialog on the screen. This is where the new version dialog prompt is. This dialog is a predefined dialog and waits for a users response. We get a handle on the EventLock, pass in the downloadUrl. At this point the download screen should be pushed to screen. But instead we get a runtime exception our app doesn't start properly and the modal dialog screen freezes on the screen while our code executes in the background. First question, is the application method 'invokeAndWait' actually doing what it should? Secondly, could it be possible that the dialog is doing a lock?
hI
<b>Screen type for modal dialog box</b>
If you activate this attribute, the screen is used as a modal dialog box. In the program, you call the screen with
CALL SCREEN STARTING AT <top left>
ENDING AT <bottom right>.
Unlike normal pop-ups, a modal dialog box has its own pushbuttons and title. There is no menu bar and command field entries are not possible.
To call a Modal dialog Screen use the statement:
CALL SCREEN <NO> STARTING AT 2 5 ENDING AT 40 20.
<b>REWARD IF USEFULL</b> -
Suppresing Modal dialog - Distiller
Hi All,
We have server version of Acrobat Distiller server in the workflow where it processes morethan 2000 PS files/Day.The issues we are facing is modal dailog of file missing info (File not found, etc) blocks processing of next file until modal dialog is closed. Is there any possibility to supress this message or set this log as mail delivery?
I have attached screen shot for reference.Any have suggestions for this problem?
Regards,
SelvakumarhI
<b>Screen type for modal dialog box</b>
If you activate this attribute, the screen is used as a modal dialog box. In the program, you call the screen with
CALL SCREEN STARTING AT <top left>
ENDING AT <bottom right>.
Unlike normal pop-ups, a modal dialog box has its own pushbuttons and title. There is no menu bar and command field entries are not possible.
To call a Modal dialog Screen use the statement:
CALL SCREEN <NO> STARTING AT 2 5 ENDING AT 40 20.
<b>REWARD IF USEFULL</b> -
Can we call normal screen from subscreen
hi,
can any body tell how to call normal screen from subscreen in Dialog Programming
thanks in Advance,
Subodh.Hi,
use stmt like":
call screen '1001'.
But this will be diplayed as new screen and not as subscreen.
Jogdand M B
Message was edited by:
Jogdand M B -
Hiding Application To System Tray will cause Modal dialog unblock
I have a JFrame, when I minimize it, it will hide. The user can recall it back by simply double click on its icon, which is created in system tray during application initialization.
However, I am facing problem when I pop up a modal dialog box. (In Linux)
When I pop up a modal dialog box, I am expecting setVisible(true) will always being block, until the modal dialog box is closed.
However, in Linux, user is able to minimize the parent windows, even there is a modal dialog box. During minimization, I have to call JFrame.setVisible(false), in order to hide the application.
A side effect of calling setVisible(false) for a modal dialog box owner (JFrame), will cause the modal dialog box JDialog.setVisible(true) being unblocked and continue for the next statement.
How I can prevent this, to ensure the JDialog.setVisible is always blocked, until the JDialog is really closed? Thanks!tnx Sarcommand ..i give up on that, i understand the risk if that feature is included..
all i wanted is to make an internet cafe client/server that blocks the client's pc interaction if log time is reached.blocking only the keyboard and mouse.
i have seen so many softwares sets the cursor position within the dialog bounding box only with user and password there. though my other application runs the mouse is still captured on the dialog even the dialog lost focus.
if that would not be possible I'll just send notification to the client, a dialog that does not block any application.
now, im going to try if the client can do som action whenever the server sends alert if the client java app is not the focus. i will post next time what hapens.but if you tried already, if u dont mind posting it so others could know it also..
tnx so much Sarcommand.. -
Extracting Modal Dialog - P-track application
Hi,
I want to use the modal dialog as found in the P-Tack application (page 200 when you click on contribute status button)
http://apex.oracle.com/pls/apex/f?p=73267:200: (test/test)
The current Modal Dialog in theme 26 does not work in IE 7. Tried doing Jquery Modal by creating a region but running into all sorts of trouble.
I know one can export a theme, how would I extract the region template from here? Couldn't see that option anywhere.
Any direction appreciated. Cheers.My Workaround to make good of current theme 26 Modal in IE 7:
1) Add the following code in HTML header:
<script type="text/javascript">
function openModal3(p_div_id)
// added - ensures user can open one modal at a time, so one opens, existing one closes
closeModal();
//gBackground.fadeIn(100); --> commented out
gLightbox = jQuery('#' + p_div_id);
gLightbox.addClass('modalOn');
</script>and call this instead of openModal().
its the fadeIn() function that causes issues in IE 7. However this is what makes the modal dialog dissapear when you click on any area of the background. So by commenting out, you will need to add a button to call "closeModal()" to close the Modal dialog.
Still figuring out how to close it by clicking on the background.
Edited by: William Wallace on 30/05/2013 21:38 -
Calling Selection Screen in Modal dialog box
Hi Experts.
I have created screen 9000 having user interface and in tool bar there is create button in the screen 9000
The create button 9001 will call another screen with different I/O fields (9001 is Modal dialog screen).
In the 9001 there is push button for which the selection screen is called 9002.
I have declared 9002 as subscreen and called the screen 9002 in user command.
In the Screen 9001 when user clicks the push button i need to get pop up screen where the user select some data.
How i need to do ?
I am getting error can't call subscreen in modal dialog box.
Thanks,
ERPSAPHI,
HOpe this will help you
How to call table control in subscreen in module pool program
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/reg-tab-strip-control-module-pool-abap-444944
http://12go.com/sap/search?query=title%3A(calling%20subscreens%20in%20module%20pool)
Regards,
Pravin -
How to remove the default icons from the toolbar of modal dialog box screen
Hello Friends,
Iam calling a screen from function module using CALL SCREEN statement.
The screen is of type Modal Dialog Box. I created some input fields and buttons in the screen. When the screen is displayed, I can see the tool bar at the bottom along with the input fields and buttons in the screen.
These icons are Continue(Enter), Check, Cancel. How can I supress this??
I mean in my screeen I want only my input fields and buttons but not the default toolbar. How to do that?
Regards,
RajuHi Raju,
Try this...
First try to capture the F-codes of ur button apppearing on the dialog box and then exclude it from the PF-status by passing it to itab.
types: begin of tab_type,
fcode like rsmpe-func,
end of tab_type.
data: tab type standard table of tab_type with
non-unique default key initial size 10,
wa_tab type tab_type.
clear tab.
move 'DELE' to wa_tab-fcode.
append wa_tab to tab.
move 'PRIN' to wa_tab-fcode.
append wa_tab to tab.
set pf-status 'STA3' excluding tab.
Cheers,
Simha.
Reward all the helpful answers.. -
Module Pool - Error message on a Modal Dialog screen with input
Hello All,
I have a modal dialog screen which is called on F4 help of a input field. This dialog screen has radio buttons on it to select. On selection, we check if the user is authorized to that option. If not, raise and error message with command MESSAGE msgid.....
When the error message pops-up and when clicked ok on it, the radio buttons on the modal dialog screen gets disabled. I want to have the modal dialog box to be able to accept the new radio button as input.
Can anyone please suggest.
Thanks,
SmitaPut all of your Radio buttons in the CHAIN ... ENDCHAIN with one module.
CHAIN.
FIELD rb1.
FIELD rb2.
FIELD rb3.
MODULE check_chain ON CHAIN-REQUEST. "<< implement logic in check_Chain
ENDCHAIN.
If you want, you can even disable the options before displaying the screen. Do all necessary checks in the PBO and based on that disable the options.
Regards,
Naimesh Patel -
ALV Toolbar on modal dialog screen and toolbar on text edit control
Hello,
I have created one container and producing ALV Grid output on a modal dialog screen. i do not want the ALV Toolbar to appear on this screen. How can I hide it ?
ALso I need to hide some buttons on a Text edit control. How can I hide them ?
Thanks and rgds,
AnandHi,
To exclude some Toolbar functions, please do the below
DATA:
lt_toolbar_excl TYPE ui_functions.
Exclude Some toolbar functions
APPEND cl_gui_alv_grid=>mc_fc_detail TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_info TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_graph TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_view_crystal TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_loc_delete_row TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_loc_append_row TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_loc_insert_row TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_loc_copy_row TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_loc_undo TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_check TO lt_toolbar_excl.
APPEND cl_gui_alv_grid=>mc_fc_refresh TO lt_toolbar_excl.
And Pass the lt_toolbar_excl to the ALV object
Display
CALL METHOD go_alv_grid->set_table_for_first_display
EXPORTING
is_variant = ls_variant
is_layout = ls_alv_lay
is_print = ls_print
i_save = 'A'
it_toolbar_excluding = lt_toolbar_excl
CHANGING
it_sort = lt_sort
it_outtab = gt_user[]
it_fieldcatalog = lt_alv_cat.
Hope this helps you.
Thanks,
Ruthra -
Screen sequence processing when using modal dialog box
I have been struggling with a dialog program which I have written. I have a screen which has 2 radiobuttons and a check box (screen 100). If the checkbox is marked, a modal dialog screen pops up (screen 150). If I complete both input fields on screen 150, I can go through to screen 200, then back out of screen 200 to screen 100, and then I can back out 100 to screen 0.
The problem I have is the validation I have put in screen 150 if one or both input fields have no values or if I want to exit screen 150. If I exit screen 150, in order to get back to screen 100 in the main screen I need to do CALL SCREEN 100 as if I use SET SCREEN 100, 100 then appears in my modal dialog box screen.
If I try to back out of screen 100 to screen 0, the program then brings up screen 150 in the PAI part of the module and then go to screen 0 when I close screen 150 even though I have coded SET SCREEN 0. LEAVE SCREEN. in the user command module of screen 100. Here is my code:
<u><b>screen 100</b></u>
PROCESS BEFORE OUTPUT.
MODULE status_0100.
PROCESS AFTER INPUT.
MODULE user_command_0100.
<b>
<u>Modules for 100</u></b>
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ZL_PWB_GR1'.
SET TITLEBAR 'ZL_PWB_GR1'.
CLEAR: w_hse_stock, w_new_product, wa_sto, w_reverse,
mara-matnr, mkpf-mblnr.
PERFORM release_lock.
REFRESH CONTROL 'TC_GR' FROM SCREEN 0200.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT .
CASE ok_code.
WHEN 'ENTER'.
IF w_reverse = space.
CALL SCREEN 0200.
ELSE.
CALL SCREEN 0150 STARTING AT 30 2
ENDING AT 75 5.
ENDIF.
WHEN 'BACK' OR 'EXIT' OR 'CANC'.
w_pai = c_yes.
SET SCREEN 0.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
<u><b>screen 150</b></u>
PROCESS BEFORE OUTPUT.
MODULE status_0150.
PROCESS AFTER INPUT.
MODULE exit_command_0150 AT EXIT-COMMAND.
FIELD mara-matnr MODULE check_matnr.
FIELD mkpf-mblnr MODULE check_art_doc.
<u><b>Modules for 150</b></u>
MODULE user_command_0150.
*& Module STATUS_0150 OUTPUT
* text
MODULE status_0150 OUTPUT.
SET PF-STATUS 'GR_REV'.
SET TITLEBAR 'GR_REV'.
ENDMODULE. " STATUS_0150 OUTPUT
*& Module exit_COMMAND_0150 INPUT
* text
MODULE exit_command_0150 INPUT.
IF sy-ucomm = 'EXIT'.
CALL SCREEN 100.
ENDIF.
ENDMODULE. " exit_COMMAND_0150 INPUT
*& Module check_matnr INPUT
* Check if issues has been filled and if issue is a valid article no.
MODULE check_matnr INPUT.
DATA: l_matnr TYPE matnr.
IF mara-matnr IS INITIAL.
MESSAGE i010(ad) WITH 'Issue no. required'.
EXIT.
ELSE.
SELECT SINGLE matnr FROM mara INTO l_matnr
WHERE matnr = mara-matnr.
IF sy-subrc NE 0.
CLEAR l_matnr.
MESSAGE i010(ad) WITH 'Issue does not exist'.
ENDIF.
ENDIF.
ENDMODULE. " check_matnr INPUT
*& Module check_art_doc INPUT
* text
MODULE check_art_doc INPUT.
IF mkpf-mblnr IS INITIAL.
MESSAGE i010(ad) WITH 'Article document no. required'.
EXIT.
ELSE.
PERFORM get_art_doc USING mara-matnr
mkpf-mblnr.
IF sy-subrc NE 0.
MESSAGE i010(ad) WITH 'No article document exists for this issue'.
ENDIF.
ENDIF.
ENDMODULE. " check_art_doc INPUT
*& Module USER_COMMAND_0150 INPUT
* text
MODULE user_command_0150 INPUT.
CASE sy-ucomm.
WHEN 'ENTE'.
IF mara-matnr NE space AND mkpf-mblnr NE space.
CALL SCREEN 200.
ELSE.
* MESSAGE i010(ad) WITH 'Please fill in both fields'.
SET SCREEN 150.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0150 INPUT
Any suggestions or pointers would be greatly appreciated as I am going round in circles.
Thanks
LarissaHave got around this by removing the references to SET SCREEN 150. This way, I can get around the screen sequencing. It just means that I cannot keep my screen 150 in view if a validation message occurs but for now it will do for what I need.
Thank you for your help anyway.
Larissa
Maybe you are looking for
-
P205-6267 - WiFi mysterious​ly shuts off - Win 8.1 32-bit
I resurrected an old Satellite laptop my daughter was using for a long time as a 'desktop.' Monitor wasn't working. Once I got her a desktop PC, I managed to repair the display, install a new hard drive and install Win 8.1 32-bit on it. It has been w
-
Release Strategies in Purchase Order - possible values of caracteristics
Hello, I have the following situation at hand. We use in a company code a release strategy for POs. One of the caracteristics is the "plant" (CEKKO-WERKS, multiple values). Strategy is working fine. Now I have to implement in another company code- in
-
All of a sudden - can't open files
Running Adobe Reader 10.1.2 (current rev) on Win 7 (latest release) Had been working fine. Now on some files (but not all) I get this error: "there was an error opening this document. The file is damaged and could not be repaired." Two comments: (1)
-
Case insensitive ordering ??
Is it possible to set the query odering on a string field and have it be case insensitive? Right now my lower case & upper case strings are getting sorted seperately, but I want them sorted together i.e. Alex andover Busy ball Rathern than andover ba
-
What is the mbps speed of AirPort Extreme?
What is the MBPS speed of the AirPort Extreme 5th Generation?