‎2009 Sep 09 9:18 PM
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
‎2009 Sep 09 9:26 PM
Hi,
Lets say field1 is your list box and field2 is the text field do like below:
PAI
chain.
field field1.
field field2 module get_value.
endchain.
module get_value input.
select field2 from....<<<<Get field2 value based on field1 value entered on the screen and assign it to field2 here
endmodule.
Regards,
Himanshu
‎2009 Sep 09 10:36 PM
Hi Himansu,
I tried as per logic which you given, its not triggering
is anywhere i want to wirtie in POV event.
Here My requirement is under list box i am getting values, and beside creted one field type i/o where it displays text of vlaue selected in listbox.
Thanks
‎2009 Sep 09 10:41 PM
Hi Himanshu,
I kept this code in POV, then i am not getting list box values.
Thanks,
‎2009 Sep 10 3:13 PM
Hi,
I am already getting list of values under this field, but i am whne I am selecting value from list box, i am unable to print text in beside field.
Thanks
‎2009 Sep 10 3:41 PM
PROCESS AFTER INPUT.
field EDEVICED-Textfield module get_value.
MODULE GET_VALUE INPUT.
select single ezwg_info into EDEVICED-Textfield table it_ezwg
from h_ezwg where ZWGRUPPE = EDEVICED-ZWGRUPPE.
endmodule.
‎2009 Sep 10 3:43 PM
sorry
PROCESS AFTER INPUT.
field EDEVICED-Textfield module get_value.
MODULE GET_VALUE INPUT.
select single ezwg_info into EDEVICED-Textfield
from h_ezwg where ZWGRUPPE = EDEVICED-ZWGRUPPE.
endmodule.
‎2009 Sep 09 11:33 PM
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
<li>Logic to fill Dropdown field with values.
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.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
I hope that it helps you.
Thanks
Venkat.O
*&---------------------------------------------------------------------*
*& 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
‎2009 Sep 10 2:26 PM
Hi Venkat,
fctcode field is disable for I/O field ( Listbox).
thanks
‎2009 Sep 10 2:59 PM
hi Venkat,
I tried with Fct code , no use.
any other method.
Thanks
‎2009 Sep 11 3:02 AM
Hi ,
once I create a field on the screen, it showing list of values under listbox , Here my requirement is added one more field beside listbox field where it shows text corresponding value of listbox.
Thanks.
‎2009 Sep 11 7:43 AM
Hi,
Anyways you are getting the values in the list box. Once the user selects the listbox value, get the corresponding text and move that text to the screen filed which is next to your list box field. You can incorporate this code in the POV of the screen.(where the list box is)
Hope this will help you.
Regards,
Smart Varghese