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,
ERPSAP
HI,
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
Similar Messages
-
Is it possible to call a subscreen/modal dialog box from the global class
Hi,
Is it possible to call a subscreen or modal dialog box from the global class ..
or is there any option to display a pop screen or subscreen in order to get the values from user which as to be implemented
in the global class..
thanks and regards,
Poornima.Hi Poornima,
you should follow Uwe's suggestion. The only alternative I can imagine is dynamic document in a dialog container. But I don't know any standardized classes to make use with minimum effort. Have a look at report DD_ADD_FORM_INPUT. Here they put the input field in a container control in a screen; you can put the container control on a dialog container (CL_GUI_DIALOGBOX_CONTAINER).
We will not get rid of any screen for the time being, but if your application is started from any screen, the DIALOGBOX_CONTAINER can start from there.
Regards,
Clemens -
Unable to disable input field in modal dialog box
Hi All, I have a screen typed modal dialog box with a table control.
I want to disable field input in the table control when some conditions meet.
I write the following code in the PBO, but it's not working. The group1 has been set.
LOOP AT SCREEN.
IF screen-group1 = 'DSP'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Would anyone help me? Thanks in advance!Hi,
Loop over table control and then modify the table control. Check the below threads for reference:
enble / disable table control column at runtime.
Table Control Enable / Disable Row | SCN
Table Control  Fields Disable. | SCN
hope this helps u,
Regards,
Kiran -
Saerch help for Date field on Modal Dialog box
Hi ,
I have made a screen of Modal Dialog box type . I have one date field on that screen . I have given datatype datum to that field but the serch help for that field is not coming . There is no search help for that field .. Please help..
Thanks in advance....hi,
in the pop up box for that field just checjk whether the data type is date. -
How to create application toolbar in modal dialog box in selection-screen
Hi Experts,
how to create application toolbar in modal dialog box in selection-screen?
Regards,
SwapnikaHi,
Check the following link regarding Model dialog box and appication toolbar
http://help.sap.com/saphelp_nw70/helpdata/en/d1/801b84454211d189710000e8322d00/frameset.htm
It helps in solving your problem.
Thanks.
Ramya. -
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 -
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.. -
How to call jquery function when i close modal dialog box ?
Hello,
I need to call one jquery function when I click on close button of modal dialog box.Can anyone please let me know how can I implement it ?
Thanks,
Dipti ChhatrapatiHi Dipti,
If my understanding is correct, you are using SP Modal Dialog and want to track the close event of this dialog. Then you may use
dialogReturnValueCallback parameter of Options variable. Follow is the code sample:
function ShowModal() {
ExecuteOrDelayUntilScriptLoaded(function () {
var options = {
url: 'page1.aspx',
tite: 'Add Title',
width: 800,
height: 450,
allowMaximize: true,
showClose: true,
dialogReturnValueCallback: scallback
SP.UI.ModalDialog.showModalDialog(options);
}, 'sp.js');
function scallback(dialogResult, returnValue) {
if (dialogResult == SP.UI.DialogResult.OK) {
// call your Jquery method here...
Thanks, Ram -
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 -
How to display a screen as Popup Dialog box in Module Pool
Hi All,
I have a requirement to display a popup dialoge box into module pool.
i need to display a screen as a popup on the current screen on a button click.I have developed a screen and in atribute tab i have defined the screen type as modal dialog box but it is displaying previous screen screen is hide i want to display on the same screen as a popup.
Thanks
NarendraHi Narendra,
Try to trigger the popup once it is done with the previous action might be anything.
i have shown one sample code where after i click on save button when the data is saved successfully
after that it has to trigger me a popup asking for conformation for the next action.
A small piece of code
INSERT INTO ZORMD1 VALUES WA_ZORMD1.
IF SY-SUBRC = 0.
G_LOCAL1 = 0.
MESSAGE S000. " Data saved successfully and immediately call the popup
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'Y'
TEXTLINE1 = 'SUCCESSFULLY SAVED'
TITEL = 'POPUP FOR conformation'
START_COLUMN = 25
START_ROW = 10
CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = G_PRINT
IF G_PRINT = 'J'.
PERFORM PRINT_OUT.
ENDIF.
Do the modification according to your requirement.
Cheers!!
VEnk@ -
Standard 'X' in a modal dialog box not working
Hi,
I have created a module pool and calling screen from main screen using Call screen.... Starting... ending... statement.
It is a modal dialog box screen. As a standard a [X] appears on top right corner. But when I click it doesn't work. it does not even fire PBO. How can I make it work?Hi,
Set next screen as 0, not the screen itself. Then you are able to close it this way.
Regards
Marcin
I was wrong, this will only close the modal box each time after the dialog step is completed. To activate this magic 'X' (allow closing the window with ALT+F4) in PBO set status (type dialog box ) and activate CANCEL and CONTINUE buttons. Now when you try closing the window either by CANCEL button or using X, sy-ucomm (ok_code of the screen) will store CANCEL function code. This way you can simply say LEAVE SCREEN . That works fine, I checked.
Regards
Marcin
Edited by: Marcin Pciak on Mar 17, 2009 11:16 PM -
Dynamically calling selection screen in loop
Hi all
Please help me to solve this problem.I need to call a selection screen(like a dialog screen) containing 2 fields depending on the loop counter in a program.
Thank You.
Regards
Giri.Hi
I will explain indetail.I am displaying a SAPSCIPT throup program.Before displaying it I have to choose groupvalues or individual value.If it is individual then i don't have any problem because I have to display the dialog box which accepts details and current status values of that particular individual only once.But I don't know how to display dailog box which accepts these 2 values dynamically without knowing the number before for groupvalues.Because the group which we select may have 3,4 or any other number of individual values.Please help me.
Thank You.
Regards
Giri. -
Unable to close Modal dialog box
Hello Friends,
I am displaying a list in a Modal Dialog box. When I try to close the Modal dialog box. It is not getting closed.I have defined a gui status for this modal dialog box. PBO and PAI Coding is given below .
module STATUS_0300 output.
SET PF-STATUS 'STATUS_300'.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0 .
IF p_week IS NOT INITIAL.
WRITE : text-009 COLOR 1.
ENDIF.
IF p_month IS NOT INITIAL.
WRITE : text-010 COLOR 1.
ENDIF.
LOOP AT g_t_wkmon_error INTO g_s_wkmon_error.
WRITE :/ g_s_wkmon_error-matnr,
g_s_wkmon_error-period,
g_s_wkmon_error-quantity.
ENDLOOP.
LEAVE SCREEN.
endmodule.
module USER_COMMAND_0300 input.
CASE ok_code.
WHEN 'OK'.
LEAVE PROGRAM.
ENDCASE.
endmodule.
Thanks in Advance.
HariHi,
Check the below thread
Re: Unable to close modal dialog box
" Make sure you select the Radio Button DIalog BOX Typ while creating the Status in PBO
You can use SET SCREEN 0 In the above Thread
MODULE user_command_0100 INPUT.
CASE ok.
when 'CANCEL'. " You Standard GUI options shown in The GUI Screen
SET SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
module STATUS_0100 output.
SET PF-STATUS 'ABC'. " This is of type Dailog Box type
* SET TITLEBAR 'xxx'.
endmodule. " STATUS_0100 OUTPUT
Hope this would resolve your Issue.
Cheerz
Ram
Edited by: Ramchander Krishnamraju on Apr 16, 2010 1:16 PM -
How to 'Exit' OO ALV screen type 'Model Dialog Box' using 'X' on the top?
HI Experts,
I have the below issue in my OO ALV screen type 'Model Dialog Box'...
The main screen is OO ALV and displays rows of data,
When select a line(row) and push any buttons
( u201CAdd Materialu201D, u201CAdd Binu201D, u201CModify Binu201D, u201CMove Materialu201D, u201CDisplay Batchesu201D)
the program will take you to next screen and it is a u201CModal dialog boxu201D type.
That screen has two buttons to exit ( u201CSAVEu201D and u201CCancelu201D ) on the bottom of the screen.
User would like to exit the screen using u201CXu201D on the top line right corner.
That u201CXu201D is not on for the u201CModal dialog boxu201D type screen.
How do I add event to close that screen using u201CXu201D?
Thanks in advance,
John.data :GR_EVENT_HANDLER TYPE REF TO LCL_EVENT_HANDLER,
GR_DIALOG_CONTAINER TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER,
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS :
HANDLE_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
IMPORTING E_UCOMM,
HANDLE_ON_DIALOGBOX_CLOSE FOR EVENT CLOSE OF CL_GUI_DIALOGBOX_CONTAINER
IMPORTING SENDER,
ENDCLASS. "lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
METHOD HANDLE_USER_COMMAND.
CASE E_UCOMM.
WHEN 'DBCON'.
PERFORM DIALOG_DISPLAY.
ENDCASE.
ENDMETHOD. "HANDLE_USER_COMMAND
METHOD HANDLE_ON_DIALOGBOX_CLOSE.
IF NOT SENDER IS INITIAL.
CALL METHOD SENDER->FREE
EXCEPTIONS
OTHERS = 1.
FREE GR_DIALOG_CONTAINER.
CLEAR GR_DIALOG_CONTAINER.
ENDIF.
ENDMETHOD. "handle_on_dialogbox_close
ENDCLASS. "lcl_event_handler IMPLEMENTATION
FORM DIALOG_DISPLAY .
DATA : L_TEXT(255),
L_LIN TYPE I.
IF GR_DIALOG_CONTAINER IS INITIAL.
CREATE OBJECT GR_DIALOG_CONTAINER
EXPORTING
PARENT =
WIDTH = 400
HEIGHT = 150
STYLE = CL_GUI_CONTROL=>WS_SYSMENU
REPID =
dynnr = '100'
LIFETIME = lifetime_default
TOP = 100
LEFT = 350
CAPTION = 'Error Dialog Box'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
EVENT_ALREADY_REGISTERED = 6
ERROR_REGIST_EVENT = 7
OTHERS = 8.
ENDIF.
SET HANDLER GR_EVENT_HANDLER->HANDLE_ON_DIALOGBOX_CLOSE FOR GR_DIALOG_CONTAINER.
REFRESH IG_INDEX_ROWS.
CLEAR WG_SELECTED_ROW.
CALL METHOD GR_ALVGRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = IG_INDEX_ROWS.
DESCRIBE TABLE IG_INDEX_ROWS LINES L_LIN.
IF L_LIN GT 0.
READ TABLE IG_INDEX_ROWS INTO WG_SELECTED_ROW INDEX 1.
READ TABLE IG_SAL INTO WG_SAL INDEX WG_SELECTED_ROW-INDEX.
CONCATENATE 'Item' WG_SAL-POSNR 'of Sales Order' WG_SAL-VBELN 'has been selected' INTO L_TEXT
SEPARATED BY SPACE.
ELSE.
L_TEXT = 'Enter Netvalue greater than 500'.
ENDIF.
CALL METHOD GR_HTMLD->ADD_GAP
EXPORTING
WIDTH = 1.
CALL METHOD GR_HTMLD->ADD_TEXT
EXPORTING
TEXT = L_TEXT.
CALL METHOD GR_HTMLD->NEW_LINE.
Display the data
CALL METHOD GR_HTMLD->DISPLAY_DOCUMENT
EXPORTING
PARENT = GR_DIALOG_CONTAINER.
ENDFORM. " DIALOG_DISPLAY
Maybe you are looking for
-
Ok, so this problem is incredibly annoying and has got me perplexed. I recently re-installed Mac OSX 10.5 for various reasons.I am running a Macbook Pro that is 2 years old apprx. I did the following steps: 1. Booted from Install DVD (authentic) 2. E
-
OS will not boot after Snow Leopard Upgrade
I have a MacPro (Intel). I just upgraded to Snow Leopard and everything appeared fine. However, after restarting my computer the OS will not load. A circle with a hash through it replaces the Apple logo and the apple's spinning wheel continues but al
-
Hi, For my application I need to use a textarea as a code editor but my problem is that tabulation key is used to give the focus to the next control but I want the tab key to simply insert a tabulation. Here is my current state: I have this in my tex
-
Coying Database to another server
Dear All, I want trying to copy database to another server but i got error Login failed for user 'domainName\ComputerName$' I already use domain administrator to both of server and already create user login in both server. Both of the login is domain
-
Hi, We are migrating our Lookout from Windows 2000 Professional to Windows XP Embedded to minimize the footprint. Do you have an SLD file containing all the files/reg entries to incorporate into our runtime image so lookout does not have to be manual