06-17-2008 5:55 AM
Hi all,
I needed to create a popup window that is displayed on button click.
The popup window consist of Paramaters that is used for selecting data.
Any suggestions welcome.
Regards,
06-17-2008 5:57 AM
Hi,
In SE51 screen painter , you have an option called modal dialog box radiobutton while selecting the screen type, you can use that.
In this screen you can create parameters for selecting data.
On button click you can call this screen.
Thanks and regards.
06-17-2008 6:07 AM
Hi all,
Thanks for reply,
I create a selection screen .
Eg : 500 screen and then it consist of one paramater.
*SELECTION-SCREEN:
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE TEXT-100 AS WINDOW.
PARAMETERS P_DAYS LIKE SY-DATUM.
END OF SCREEN 500.
SELECTION-SCREEN END OF SCREEN 500.
PAI
AT SELECTION-SCREEN.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
It calls the screen sucessfully. But it consist of 4 button also at botton but i needed two button i.e. Ok and Cancel .
Regards,
06-17-2008 5:58 AM
use the below function module....
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Confirm Action'
text_question = wf_ques
text_button_1 = 'Yes'
icon_button_1 = 'ICON_OKAY'
text_button_2 = 'No'
icon_button_2 = 'ICON_CANCEL'
display_cancel_button = 'X'
IMPORTING
answer = wf_ans
EXCEPTIONS
text_not_found = 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.
u can change parameters as per ur requirements...
Reward points if useful...
Regards
Rudra
06-17-2008 6:00 AM
Use this:
case sy-ucomm.
WHEN 'save'.
CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'
EXPORTING
defaultoption = 'Y'
diagnosetext1 = diagnosetext3
textline1 = text-w46
titel = text-w25
cancel_display = 'X'
IMPORTING
answer = answer.
CASE answer.
...............
06-17-2008 6:00 AM
hi,
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'Button1'.
WINDOW STARTING AT 1 15
ENDING AT 25 23.
SET PF-STATUS 'GUI1'.
WRITE : w_check AS CHECKBOX , 'CARRID',
/ w_checK AS CHECKBOX , 'CONNID',
/ w_check AS CHECKBOX , 'CITYFROM',
/ w_check AS CHECKBOX , 'CITYTO',
/ w_check AS CHECKBOX , 'AIRPFROM',
/ w_check AS CHECKBOX , 'AIRPTO'.
ENDCASE.
This will bring a window with check boxes and text in write statment.
Reward if helpful
Regards,
priya
06-17-2008 6:02 AM
Try this program,
This is when the user clicks on any line in the report screen and a popup will occur.
Modify it according to your need.
&----
*& TYPE-POOLS
&----
TYPE-POOLS slis.
&----
*& DATABASE TABLE
&----
TABLES : zcust_master3.
&----
*& INTERNAL TABLE
&----
*DATA: wi_custb TYPE STANDARD TABLE OF zcust_master3,
wa_custb LIKE LINE OF wi_custb.
DATA : wi_custb LIKE zcust_master3 OCCURS 0 WITH HEADER LINE.
DATA : wi_custb1 LIKE zcust_master3 OCCURS 0 WITH HEADER LINE.
DATA : itab1 LIKE zcust_master3 OCCURS 0 WITH HEADER LINE.
&----
*& DATA
&----
DATA: flag1 TYPE c LENGTH 1,
flag2 TYPE c LENGTH 1,
flag3 TYPE c LENGTH 1,
flag4 TYPE c LENGTH 1,
col TYPE i,
lin TYPE i,
fldname(20),
value(20),
ln TYPE i,
var1(30) TYPE c VALUE 'customer name',
var2(40) TYPE c VALUE 'address',
var3(15) TYPE c VALUE 'city',
var4(15) TYPE c VALUE 'state'.
&----
*& TOP-OF-PAGE
&----
TOP-OF-PAGE.
ULINE.
SKIP 1.
WRITE : 'CUSTOMER REPORTS'.
SKIP 1.
ULINE.
&----
*& START-OF-SELECTION
&----
START-OF-SELECTION.
WRITE : 'PRIMARY LIST'.
SELECT * FROM zcust_master3 INTO CORRESPONDING FIELDS OF TABLE wi_custb1.
LOOP AT wi_custb1.
WRITE:/ wi_custb1-cust_id HOTSPOT ON.
ENDLOOP.
END-OF-SELECTION.
AT LINE-SELECTION.
SET PF-STATUS 'ZBANKCUSTRTRIAL'.
*SELECT * FROM zcust_master3 INTO CORRESPONDING FIELDS OF TABLE wi_custb WHERE cust_id = wi_custb1-cust_id.
col = sy-cucol + 100.
lin = sy-curow + 4.
WINDOW STARTING AT sy-cucol sy-curow
ENDING AT col lin.
WRITE : / flag1 AS CHECKBOX ,var1.
WRITE : / flag2 AS CHECKBOX ,var2.
WRITE : / flag3 AS CHECKBOX ,var3.
WRITE : / flag4 AS CHECKBOX ,var4.
AT LINE-SELECTION.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SUBMIT'.
SELECT SINGLE * FROM zcust_master3 INTO itab1 WHERE cust_id = wi_custb1-cust_id.
WRITE: / 'SECONDARY LIST'.
LOOP AT itab1.
DO.
READ LINE sy-index FIELD VALUE flag1 var1.
IF sy-subrc <> 0.
EXIT.
ELSEIF flag1 = 'X'.
WRITE : / itab1-cust_name.
ENDIF.
READ LINE sy-index FIELD VALUE flag2 var2.
IF sy-subrc <> 0.
EXIT.
ELSEIF flag2 = 'X'.
WRITE : / itab1-address.
ENDIF.
READ LINE sy-index FIELD VALUE flag3 var3.
IF sy-subrc <> 0.
EXIT.
ELSEIF flag3 = 'X'.
WRITE : / itab1-city.
ENDIF.
READ LINE sy-index FIELD VALUE flag4 var4.
IF sy-subrc <> 0.
EXIT.
ELSEIF flag4 = 'X'.
WRITE : / itab1-state.
ENDIF.
ENDDO.
ENDLOOP.
ENDCASE.
&----
*& END-OF-PAGE
&----
END-OF-PAGE.
ULINE.
SKIP 1.
WRITE : 'CUSTOMER REPORTS'.
SKIP 1.
ULINE.
06-17-2008 6:04 AM
Hiiii
if you want a pop up window in a alv report ... then just use
REUSE_ALV_POPUP_TO_SELECT to present the data in the pop up window ...
else if u want to have a pop up window for any thing in the report just use se51 and creae a screeen and
select dialog box radio button int he attributes of the screen.
and that would act as a pop up window for u ...
the other way of getting a pop up window is ...
create a screen and in ur abap program...
call screen<screen number>
starting and <column pos><row pos>
ending at <col pos> <row pos>....
reagrds
chandu reddy
06-17-2008 6:09 AM
dear friend
IF_WD_WINDOW
The interface IF_WD_WINDOW enables a popup to be opened, closed, and edited.
Methods
CLOSE
This method asynchronously closes the popup once the Phase Model Cycle of the window is completed.
OPEN
This method asynchronously opens the popup once the phase model cycle of the underlying window is completed.
SET_WINDOW_SIZE
This method sets the window size.
SET_WINDOW_TITLE
This method sets the window title.
SET_ON_CLOSE_ACTION
This method registers the user action when Cancel is chosen.
SUBSCRIBE_TO_BUTTON_EVENT
This method registers the user action when a button is clicked.
UNSUBSCRIBE_FROM_BUTTON_EVENT
This method deregisters a user action.
SET_REMOVE_ON_CLOSE
This method removes the window after it has been closed.
SET_BUTTON_KIND
This method specifies the button combination
http://help.sap.com/saphelp_nw04s/helpdata/en/43/035be8dc7e22f4e10000000a1553f7/frameset.htm
will definatly solve the problem.
thanks
rewards are expecting.
vivek
06-17-2008 7:20 AM
Hi.
To create a popup window, create a screen type of model dialog box for this go to initial screen of screen painter (SE51) => go to attributes select screen type as model dialog box and then design the reqired screen by going to layout.
pushbotton lies on actual screen on clicking this button take the function code and write CALL SCREEN <screen number of screen whose type is model dialog box> or use SET SCREEN <screen number> depends on ur requirement in PAI of actual screen.
I think this information will give an idea about ur requirement plz reward points if helpful.
Regards.
06-17-2008 7:25 AM
Hi,
On button click we just need to call a window by CALL SCREEN command
MODULE user_command_9001 INPUT.
CASE g_ok_code .
WHEN 'SUBM'.
PERFORM f0601_save.
WHEN 'SHOW'.
CLEAR : g_wa_outtab_1,
g_wa_outtab_1.
REFRESH : g_t_outtab_1,
g_t_outtab_1[].
PERFORM f0600_show_selections.
CALL SCREEN 9002 STARTING AT 1 1 ENDING AT 130 20.
ENDCASE.
ENDMODULE.
The above code will surely help you.
Plz reward if useful.
Thanks,
Dhanashri.
06-18-2008 6:06 AM