List box in dialog programming
Hi Frnds,
i am working on a complex scenario,
i want to print 3 list box.
first one i can show but the problem is with second one and third one.
first list box have three fields suppose
program
events
movies
when user will select either one , suppose he will select program
then in second listbox program releted entries should be displayed like fiction , non fiction.
and when he will select any entry then in third list box corresponding sub entries should be come.
all data i have in ztables.
i can make search help also.
any suggestion should be appreciated.
Thanks and Regards
vijay
Use this program!
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
TABLES: sscrfields.
Selection screen
List box
PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10
USER-COMMAND abc.
Radio buttons
PARAMETERS: rb1 RADIOBUTTON GROUP ab MODIF ID bl2,
rb2 RADIOBUTTON GROUP ab MODIF ID bl2,
rb3 RADIOBUTTON GROUP ab MODIF ID bl3.
INITIALIZATION.
Populate list box values
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
AT SELECTION-SCREEN OUTPUT.
Set list box with value
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
Control the display of screen components
LOOP AT SCREEN.
IF ps_parm = 1.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 0.
ELSEIF screen-name = 'RB3'.
screen-invisible = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = 2.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 1.
ELSEIF screen-name = 'RB3'.
screen-invisible = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = space.
rb1 = 'X'.
clear: rb2,rb3.
IF screen-name = 'RB1' OR screen-name = 'RB2' OR
screen-name = 'RB3'.
screen-invisible = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABC'.
ENDIF.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
And use:
AT-SELECTION-SCREEN on value request for p_yyyy.
if p_xxxx-key is not initial..
get the values required for second parameter...or listbox..
endif..
similarily for 3rd listbox also!
Similar Messages
-
Handle text using list box in dialog program
hi,
I am working on dialog program , Created two fileds , one is list box type I/O field and another is i/O field which displays text based on value selected in list box.
Please provide any inf how to Handle text using list box value in dialog program.
thanksHi,
<li>Check the screen to know how to set I/O field to set as listbox.[ dropdown box picture|http://2.bp.blogspot.com/_O5f8iAlgdNQ/Sm7RBrqfjcI/AAAAAAAAFaU/RateViiVqrU/s1600-h/drop_down-754481.JPG]
<li>in the above screen we need to set FctCode for the dropdown box field so that when you select value from the dropdown box PAI event is triggered.
<li>screen flow logic like below
PROCESS BEFORE OUTPUT.
MODULE values_into_dropdown.
FIELD g_bukrs.
FIELD g_text.
PROCESS AFTER INPUT.
FIELD g_bukrs.
FIELD g_text MODULE get_bukrs_txt.
<li>Logic to fill Dropdown field with values.
PROGRAM sapmztest_dropdown.
DATA: g_bukrs TYPE t001-bukrs.
*& Module VALUES_INTO_DROPDOWN OUTPUT
MODULE values_into_dropdown OUTPUT.
TYPE-POOLS:vrm.
DATA:
field TYPE vrm_id,
it_values TYPE vrm_values,
wa_values LIKE LINE OF it_values.
DATA: t001 TYPE t001 OCCURS 0 WITH HEADER LINE.
IF it_values[] Is INITIAL.
SELECT * FROM t001 INTO TABLE t001 UP TO 10 ROWS.
LOOP AT t001.
wa_values-key = t001-bukrs.
wa_values-text = t001-butxt.
APPEND wa_values TO it_values.
CLEAR wa_values.
ENDLOOP.
ENDIF.
field = 'G_BUKRS'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = FIELD
values = it_values.
ENDMODULE. " VALUES_INTO_DROPDOWN OUTPUT
*& Module get_bukrs_txt INPUT
MODULE get_bukrs_txt INPUT.
read table it_t100 into wa_t100 with key bukrs = g_bukrs.
g_text = t001-butxt.
ENDMODULE. " VALUES_INTO_DROPDOWN INPUT
I hope that it helps you.
Thanks
Venkat.O -
Values not populating in list box in dialog programing.
hi,
i am facing a problem i.e. i am having a listbox on screen , in pbo i am filling that listbox with some values in an internal table.
But i am not able to populate the values i.e. while i am debugging the pai ......the list box is containing nothing.
So needed some help in this issue.
regards,
someshHi,
Try to read these links. It will give you some pointers regarding on your problem.
<link-farm removed>
Revert if you have still any concern.
Thanks,
iostreamax
Edited by: Suhas Saha on Feb 21, 2012 8:50 AM -
Pop-up box in dialog programming
Hi,
Is it possible to add a pop-up box inside dialog programs?..if so can someone show me how?
thanks!hi,
it is possible to display popup box inside the dialog programs.
follow this sample program, it clearly explains the logic.......
<u><b>FLOW-LOGIC CODE.</b></u>
PROCESS ON VALUE-REQUEST.
FIELD SFLIGHT-CONNID MODULE HELP-FOR-CONNID.
<u><b>CODE FOR MODULE POOL PROGRAM.</b></u>
MODULE HELP-FOR-CONNID INPUT.
DATA: begin of it_itab occurs 0,
connid1(45),
end of it_itab.
refresh it_itab.
it_itab-connid1 = 'possible vales for connectionid'.
append it_itab.
select * from sflight.
it_itab-connid1 = sflight-connid.
append it_itab.
endselect.
****here call FM to display pop-up box
call function 'popup_with_table_display'
exporting
endpos_col = 45
endpos_row = 25
startpos_col = 10
startpos_row = 1
titiletext = 'text'
tables
valuetab = it_itab.
the above program display the list of possible values for the field connid in popup-box.
regards,
Ashok Reddy -
How to add List Box in Dialog Screen
Hi All,
I need to add list box in Dialog screen.
In Dialog screen I have 2 radio buttons "Yes" and 'NO'.
If user selects radio button YES, then under Yes I need to display values in list box and these values should be retrieved from one table.
If user selects Radio button NO then under NO I need to display values in list box.
Please give the solution for above requirement.
Thanks
VijayVijay Reddy ,
To get Drop Drown Box on screen .
Follow these steps.
1.Go to T.Code SE51 and Select Laypout for the Screen.
2.Double click on the field for which u want Dropdown box.
3.Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.Save and Activate ur screen .
5.Enter the following piece of code in the PBO of the screen.(Change for ur
requirement).
The following logic needs to be written under PBO of the screen logic.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
EXCEPTIONS
id_illegal_name = 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.
6.Observe the above code and change as for ur requirement.
I hope that it helps you .
Regards,
Venkat.O -
List bos in dialog programming through process on value-request
Dear all,
i am using FM to get list box but not getting list of values , i am getting blank screen , on which getting header stmt
Restrict value range (1) 3 entries found.
TYPES : BEGIN OF F4_VALUES,
TYPE(5) TYPE C,
END OF F4_VALUES.
DATA: F4_VALUE TYPE TABLE OF F4_VALUES WITH HEADER LINE.
DATA: PROGNAME LIKE SY-REPID,
DYNNUM LIKE SY-DYNNR.
PROCESS ON VALUE-REQUEST.
FIELD WA_DATA-TYPE MODULE EXP_TYPE.
MODULE exp_type INPUT.
CLEAR F4_VALUE.
REFRESH F4_VALUE.
F4_VALUE-TYPE = 'Shift'.
APPEND F4_VALUE.
F4_VALUE-TYPE = 'Flat'.
APPEND F4_VALUE.
F4_VALUE-TYPE = 'Day'.
APPEND F4_VALUE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'TYPE'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'WA_DATA-TYPE'
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
TABLES
VALUE_TAB = F4_VALUE
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
Thanks in advance.
Vijay dwivedihii vijay,
1. There are two important things :
a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
b) Fm VRM_SET_VALUES
2. just copy paste
3.
REPORT abc.
TYPE-POOLS : vrm.
DATA : v TYPE vrm_values.
DATA : vw LIKE LINE OF v.
PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
vw-key = '1'.
vw-text = 'Jan'.
APPEND vw TO v.
vw-key = '2'.
vw-text = 'Feb'.
APPEND vw TO v.
vw-key = '3'.
vw-text = 'Mar'.
APPEND vw TO v.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'A'
values = v
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
Check the link -
How to fill the values in List Box?
List Box
rgrds,
Shweta
Edited by: Shweta Joon on Aug 24, 2009 1:19 PM -
Modal Dialog box in Dialog Programe
I have create one Modal Dialog Box in Module Pool.
when i click on the 'X' on the top right side of that screen the Dialog box is not closed.
Can any one help on this?For the Modal Dialog box you need to create the Status, while creating the status Choose the Status for Dialog box. that time you it will show different Status Options.
you need to set the status to the CANCEL(X) button , Then handle the Function in the PAI user_command module.
CASE sy-ucomm.
when 'CANCEL'.
leave to screen 0.
endcase. -
Control of Text box in Dialog programming
Hai Friends
i am having problem in controlling the Text box in PAI of Screen. For eg. if it is command button with the use of Function name i can able to check or do validation in PAI.
As in the case of Textbox how to give the name for the text box and how to handle it in PAI for Validation.
Please
Badhri.Are you talking about a text editor? IF so, what is the validation that you want to perform. Do you want to check to make sure that the user has entered something in the text editor?
If so, then just get the text from the text editor into an internal table, and check that internal table to make sure that something is in it.
call method editor->get_text_as_r3table
exporting
only_when_modified = c_textedit_control=>false
importing
table = textlines
exceptions
others = 1.
<b> if textlines[] is initial.
message e014.
endif.</b>
Regards,
Rich Heilman -
Question Related to Check-box in Dialog Program
Hi All-
I desgined check box in Table Control... In my Internal table I have 41 records, When user click on Select all button it selects only first 14 records from the table control...When the user uses page-down, then click on Select all, selects remaining 14 records and so on...
But how to select all the records at a time instead of using page-down...
Please advice me how to solve my problem!!!!
Thanks,
SonyI would not suggest doing it like that. Instead move the MODULE USER_COMMAND outside of that loop.
* Screen Flow Logic
PROCESS AFTER INPUT.
LOOP AT i_x002 .
ENDLOOP.
MODULE user_command_0600 .
* Module coding
MODULE user_command_0600 input..
CASE sy-ucomm.
WHEN 'SELA'.
loop at i_x002.
i_x002-flag = 'X'.
MODIFY i_x002.
endloop.
WHEN 'DELA'.
loop at i_x002.
i_x002-flag = space.
MODIFY i_x002.
endloop.
ENDCASE.
endmodule.
Regards,
Rich Heilman -
Declaring constant data in a list box - Dialog programming
i need to declarare some constant data 1...4 in list box in dialog programming i have done some coding its not working here is the code, can you plz tell me whats wrong in the code non of the values are displaying in drop downbox.
type-pools vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
clear list.
REFRESH LIST.
value-key = '1'.
value-text = 'Sales & Distribution'.
append value to list.
value-key = '2'.
value-text = 'Material Management'.
append value to list.
value-key = '3'.
value-text = 'Finance & Controlling'.
append value to list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list
EXCEPTIONS
ID_ILLEGAL_NAME = 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.I think your code is correct onlybut the problem may be where
you are passing the internal table to the FM 'VRM_SET_VALUES' ...
Try to use the following code..
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LISTBOX1'
values = list[] -
How to populate list box in module pool program
How to populate list box in module pool program.
Please give me reply as soon as posible
regards,
Venu.hi,
go thrugh the folling code .
TABLES sdyn_conn.
DATA ok_code TYPE sy-ucomm.
Global data
TYPES: BEGIN OF type_carrid,
carrid type spfli-carrid,
carrname type scarr-carrname,
END OF type_carrid.
DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
*& Processing Blocks called by the Runtime Environment *
Event Block START-OF-SELECTION
START-OF-SELECTION.
CALL SCREEN 100.
Dialog Module PBO
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
Dialog Modules PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
Dialog Module POV
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
the following code should be included in flow logic of screen
process on value-request.
field scarr-carrname module create_dropdown_box.
in module pool select list box.
hope it is useful.
regards,
sreelakshmi. -
I would simply like to write a simple list in a dialog box using WINDOW. Seems pretty stright forward, but mine doesn't work. I don't want to define a gui status, as I want the code portable. So here is what I did:
SET PF-STATUS 'STDPOPUP' OF PROGRAM 'SAPLSALV'.
WINDOW STARTING AT 1 1 ENDING AT 10 10.
WRITE: /1 p_tab-low,
20 g_lines.
Can someone tell me why this doesn't work?
I also tried POPUP_WITH_TABLE_DISPLAY, but I don't want a decision button.
Your help is greatly appreciated.
Kind Regards,
JasonHi,
See the following code.
Copy it in a new report & execute to see the results.
REPORT demo_list_window NO STANDARD PAGE HEADING.
SET PF-STATUS 'BASIC'.
WRITE 'Select line for a demonstration of windows'.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SELE'.
IF sy-lsind = 1.
SET PF-STATUS 'DIALOG'.
SET TITLEBAR 'WI1'.
WINDOW STARTING AT 5 3 ENDING AT 40 10.
WRITE 'Select line for a second window'.
ELSEIF sy-lsind = 2.
SET PF-STATUS 'DIALOG' EXCLUDING 'SELE'.
SET TITLEBAR 'WI2'.
WINDOW STARTING AT 45 10 ENDING AT 60 12.
WRITE 'Last window'.
ENDIF.
ENDCASE.
Hope it helps.
Reward if helpful.
Regards,
Sipra -
List Box Problem In MODULE POOL PROGRAM(EDIT MODE)
I Have Developed A MODULE POOL PROGRAM ,
It Basically Consists Of CREATE EDIT and DISPLAY Modes.
CREATE MODE:
When I am Creating For Example FORM NO 1,it is having Fields With drop down list box with values
A,B and C. if I Choose A then That form will Get Created With A value and Form 1 will be created.
EDIT MODE:
The same form If u want to edit In EDIT Mode ,it is displaying value A and it Showing the list box in the fillowing Manner.A,B,C,and A.(This is what the problem I am Facing Know).It Is Displaying the value two times.How to Avoid this ,PLs Help me in this regard.
Thaks & Regards,
Anuradha.Where ever you are populating the List Box, write a REFRESH statement just before that.
Means Refresh the old content and add new content -
Dropdown list in dialog programming
Moved to correct forum by moderator. Subject amended. Please use meaningful subjects in future
Hi Experts,
How to get a drop down list in Dialog Programming. I need a drop down list for a field called country. Should it be done in Layout Editor or in the coding part. If at coding part can you please help me out with some pointers?
TIA
Edited by: Matt on Nov 16, 2008 4:11 PMSELECTION-SCREEN BEGIN OF SCREEN 111 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(11) text-012 FOR FIELD p_step1 MODIF ID st1.
PARAMETER: p_step1 TYPE c AS LISTBOX VISIBLE LENGTH 20
USER-COMMAND step1 OBLIGATORY MODIF ID st1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 111.
DATA: name1 TYPE vrm_id,
list1 TYPE vrm_values,
value1 LIKE LINE OF list1.
IF list1[] IS INITIAL.
name1 = P_STEP1.
value1-key = 1.
value1-text = your text which you want to display in the list.
APPEND value1 TO list1.
value1-key = 2.
value1-text = your text which you want to display in the list.
APPEND value1 TO list1.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name1
values = list1
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
ENDIF. -
List Box Dialog Object VB CS4 or CS2
It appears that the InDesign Dialog object doesn't allow you to place list boxes. Does anyone know a work around for this. I need to match up the items for two lists that can contain 40 - 50 items each. Any thoughts?
They have something called a drop down list:
var aStringArray = new Array;
aStringArray.push("Hello");
aStringArray.push("World!");
var myDialog = app.dialogs.add ({name:"My First Dialog",canCancel:true});
with (myDialog)
with (dialogColumns.add())
with (dialogRows.add())
staticTexts.add ({staticLabel:"My List"});
dropdowns.add ({stringList:aStringArray, selectedIndex:0});
I guess 'real' Windows Listboxes are not supported -- can't find them in the newer (CS3) ScriptUI as well.
>..match up the items for two lists..
How were you planning to 'match up' two listboxes? Perhaps you can place two dropdown lists side by side?
Maybe you are looking for
-
HOW TO INCLUDE a LITTLE LOGO of your site in the browser bar
All the website are having their logo appearing in the browser bar at the left hand side. I would like to incorporate a little logo to my website ( www.buscapartamentosbogota.com).Does anyone know how?
-
[SOLVED] Journalctl is not formatting correctly and is not in color.
My user is a member of adm, but when I run journalctl it just prints out the "ESC[1;39m" instead of formating it in bold or red for errors. example line: Nov 04 12:16:24 red5 kernel: ESC[1;39mLinux version 3.6.5-1-ARCH (tobias@T-POWA-LX) (gcc version
-
How to use GPS on my Nokia 5233? Moderator's note: Edited post. Please post messages that are relevant to the subject to seek solution to the problem. Solved! Go to Solution.
-
Enable responses from 2 separate internet connections on the same system
Hello List I am hoping one of the network gurus here can help me out. I've spent quite a few hours trawling these forums and others online to try to find the answer to my question, but success has not been forthcoming. My situation is this. I have a
-
TypeError: Error #1007: Instantiation attempted on a non-constructor.
So I am trying out Flex 4 and started so by creating a basic class that extends the spark.components.Application class. package import spark.components.Application; public class SimpleApp extends Application public function SimpleApp