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.
thanks
Hi,
<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
Similar Messages
-
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
vijayUse 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! -
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 -
How can we use list box on selection screen
hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
thanks in advance
rajuUse the VRM_SET_VALUES function module.
DATA: list TYPE vrm_values,
value LIKE LINE OF list.
AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
name = 'P_OBJECT'.
CLEAR list.
REFRESH list.
CLEAR value.
value-key = '1'.
value-text = 'Development Class'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'Program'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'Function Module'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'Database Table'.
APPEND value TO list.
CLEAR value.
value-key = '5'.
value-text = 'Structure'.
APPEND value TO list.
CLEAR value.
value-key = '6'.
value-text = 'View'.
APPEND value TO list.
CLEAR value.
value-key = '7'.
value-text = 'Data Element'.
APPEND value TO list.
CLEAR value.
value-key = '8'.
value-text = 'Table Type'.
APPEND value TO list.
CLEAR value.
value-key = '9'.
value-text = 'Class / Interface'.
APPEND value TO list.
CLEAR value.
value-key = '10'.
value-text = 'Type Group'.
APPEND value TO list.
CLEAR value.
value-key = '11'.
value-text = 'Domain'.
APPEND value TO list.
CLEAR value.
value-key = '12'.
value-text = 'Search Help'.
APPEND value TO list.
CLEAR value.
value-key = '13'.
value-text = 'Lock Object'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
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. -
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 -
How to use custom control in Dialog Programming?
How can I call a subscreen using custom control in Dialog Programming?
The required subscreen contains a calender. Any class or something available for this purpose. Please suggest.As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
Regards,
Raymond -
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 -
How i use list box in runtime or fill runtime asper user given data
hi master
my user want he writ any word such as a writ in text box then show the list box that have the name who's start with a character and select any one name and transfer name and code in other text box.
please give me sample or setp or code
i am new in oracle
Thanking you
AamirAamir, appears that you are asking Forms questions in the wrong area, please note you are in the Collaboration Suite area, which does not use Forms.
Try posting your question to Forms -
How to use list box parameter in crystal Reports
Hi Experts,
How to acheive list box parameter in sap B1 crystal reports.
Regards
VinothHi,
check this thread
Crystal Report Drop Down Selection List
Drop down list parameter
https://scn.sap.com/thread/1782598 -
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 -
Using message boxes or dialogs to get user information in javascript.
Hi,
I want to create a dialog box that displays some check boxes with some options for the user. Is this possible with the designer javascript? I suppose another option would be to have a dialog with a text field, more of a prompt allowing the user to manually enter a value. I would prefer the check boxes, but I'm not sure if that's possible. Any ideas?
Thanks,
ChadThe Adobe Dialog manager should be able to handle that.
http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/plugins/ADMReferenceGuide.pd f
For a clean and easy product to facilitate this, check WindJack Solutions AcroDialogs, a graphical designer for creating custom dialog boxes for use with Adobe Acrobat.
http://www.windjack.com/products/acrodialogs.html
Noah Katz -
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. -
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[]
Maybe you are looking for
-
SO_OBJECT_SEND does not work after ECC upgrade
Hi Gurus, I find a problem after ECC upgrade with SO_OBJECT_SEND. This was used in a zprog and was wroking fine in 4.6 C. When this prog is executed it sends mails to the users thru SOST/SCOT. But in ECC , upon execution I did not see the mails in SO
-
Cheque Print. issue (urgent)
Dear all, Iam facing an issue related to cheque print. We are using T-code FBZ5 to print cheque when ever we are issuing check system updates cheque number in reference field of payment Document. But from the 01.04.2008 system not updating check numb
-
GPS question about Michelin x-930 with Navteq maps...
I unfortunately have a Michelin GPS x-930 with a grossly outdated 2006 map by Navteq. Michelin no longer produces GPS equipment. Going to their old site is fruitless; their GPS site no longer exists for the US, only info on their tires, a GPS site in
-
Subcontrcating Po with paid duty
Hello, Subcontrcating Po with paid duty When created the PO with Account assignment category"Q" and Item category"L" subcontrcating PO. While Supllying the components to suncontrcating vendor.After GI system generates the Mat Doc number. With ref to
-
I am very disappointed that podcast can no longer be placed in a playlist. I use the iPhone this way ALL the time. can this be fixed, and soon, please?