Regarding topdown list box
how to place topdown list box in selection screen
Hi,
Please check this sample code.
type-pools: vrm.
data:
IT_LIST TYPE VRM_VALUES," table to store values of listbox
*--Structure declaration
WA_LIST LIKE LINE OF IT_LIST,
*--Variable declaration
V_NAME1 TYPE VRM_ID. " to store Id of Value Set
selection-screen begin of line.
SELECTION-SCREEN COMMENT 1(20) text-001 FOR FIELD v_vbeln1.
parameters: v_vbeln1 type vbap-vbeln AS LISTBOX VISIBLE LENGTH 13.
SELECTION-SCREEN COMMENT 40(20) text-002 FOR FIELD v_vbeln2.
parameters:v_vbeln2 type vbap-vbeln AS LISTBOX VISIBLE LENGTH 13.
selection-screen end of line.
*--populating the values for the list box
WA_LIST-TEXT = '0000000011'.
WA_LIST-KEY = '0000000011'.
APPEND WA_LIST TO IT_LIST.
CLEAR WA_LIST.
WA_LIST-TEXT = '0000000012'.
WA_LIST-KEY = '0000000012'.
APPEND WA_LIST TO IT_LIST.
CLEAR WA_LIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = V_NAME1
VALUES = IT_LIST.
Regards,
Ferry Lianto
Similar Messages
-
Reg: Drop-Down list Box not displaying values
Hi Experts,
i am publishing a module pool program in the internet using SICF Transaction . In the internet my drop down list box is not displaying the default value but in my sap it works fine .
What may be the problem?
Regards,
VikramHello Thorsten Domsalla ,
My Problem is in my sap module pool program there is a drop down list box which disaplays default values its working fine in sap gui but when i access through internet (SICF) Transaction the Drop down list box not listing out default values .
i am using Integrated ITS Version 7.0 and Support package 08.
Regards,
Vikram -
How to get the selected value/key of a drop down list box in webdynpro Java
Dear SDN Members,
I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
Can any one put here the code part relating to this.
Your help will be awarded.
Thanks in advance,
Regards,
Sireesha.BHi Sireesha,
You want to display value based on the key selected in dropdown list. If you want to do like that
1) Create a context attribute for ex: key_value
2)In the properties of the attribute select the calculated as true.
3)It will create getter and setter methods for your attribute.
4)Go to implementation add the following code in getter method of your attribute
String attributeName = IPrivateCreate.IContextElement.KEY;
//KEY is your dropdown key attribute not the value attribute.
IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
Object key = element.getAttributeAsText(attributeName);
return valueset.getText(key);
Regards
Suresh -
Add List box for one field in ALV GRID
Hi All,
I need to add drop down list box for one field in ALV Grid.
If any body knows, please help.
Thanks in advance.
Regards
MangleshHi,
Here is the ex where i have used for date parameter in the sel screen
type-pools: vrm.
data: name type vrm_id,
list type vrm_values,
value like line of list.
parameters : p_date like p_date2
as listbox visible length 15.
at selection-screen output.
name = 'P_DATE'.
value-key = '1'.
value-text = 'Today'.
append value to list.
value-key = '2'.
value-text = 'Last 7 days'.
append value to list.
value-key = '3'.
value-text = 'Last 30 days'.
append value to list.
value-key = '4'.
value-text = 'Last 90 days'.
append value to list.
value-key = '5'.
value-text = 'Last year'.
append value to list.
Call the ''VRM_SET_VALUES' to display the values in Listbox
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
at selection-screen.
if sy-ucomm = 'CLI1'.
sscrfields-ucomm = 'ONLI'(001).
endif.
if p_date = '1'.
p_date11 = sy-datum .
elseif p_date = '2'.
p_date11 = ( sy-datum - 7 ).
elseif p_date = '3'.
p_date11 = ( sy-datum - 30 ).
elseif p_date = '4'.
p_date11 = ( sy-datum - 90 ).
elseif p_date = '5'.
p_date11 = ( sy-datum - 365 ).
endif.
Hope this helps u..
Please reward points if useful.
Regards,
Sreenivas -
How to fill the values in List Box?
Hi Experts,
Can anyone explain me how to fill the values in the List Box such that the value should be from the table?
For Example : Fill the EmpID from table T1 into the ListBox?
Thanks in Advance,
Regards,
Raghuhi,
and u doing it through report means from se38 than here is code...
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr,
END OF itab.
DATA : ok_code LIKE sy-ucomm.
CALL SCREEN 0200.
*& Module STATUS_0200 OUTPUT
text
MODULE status_0200 OUTPUT.
SET PF-STATUS 'Z200'.
ENDMODULE. " STATUS_0200 OUTPUT
*& Module USER_COMMAND_0200 INPUT
text
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Module mat_val INPUT
text
MODULE mat_val INPUT.
SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab
WHERE matnr BETWEEN '000000000000000101' AND '000000000000000109'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
VALUE_ORG = 'S'
tables
value_tab = itab
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. " mat_val INPUT
<b>And this is flow logic..</b>
PROCESS BEFORE OUTPUT.
MODULE status_0200.
PROCESS AFTER INPUT.
MODULE user_command_0200.
PROCESS ON VALUE-REQUEST.
FIELD itab-matnr MODULE mat_val. -
Hope someone can help. I have tried to find the best way to do this and can't seem to make sense of anything. I'm using an Access 2013 Database and I have a report that is based on a query. I've created a Report Criteria Form. I
need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date. I then need my report to return only the records that meet all selected criteria. It works fine with a ComboBox and 1 selection but can't
get it to work with a List Box so they can select multiple items. Any help is greatly appreciated while I still have hair left.The query should return all records.
Let's say you have the following controls on your report criteria form:
txtStart: text box, formatted as a date.
txtEnd: text box, formatted as a date.
lbxMulti: multi-select list box.
cmdOpenReport: command button used to open the report.
The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
The report to be opened is rptReport.
The On Click event procedure for the command button could look like this:
Private Sub cmdOpenReport_Click()
Dim strWhere As String
Dim strIn As String
Dim varItm As Variant
On Error GoTo ErrHandler
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
End If
For Each varItm In Me.lbxMulti.ItemsSelected
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
Next varItm
If strIn <> "" Then
' Remove initial comma
strIn = Mid(strIn, 2)
strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
End If
If strWhere <> "" Then
' Remove initial " AND "
strWhere = Mid(strWhere, 6)
End If
DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
Exit Sub
ErrHandler:
If Err = 2501 Then
' Report cancelled - ignore
Else
MsgBox Err.Description, vbExclamation
End If
End Sub
If SomeField is a text field instead of a number field, change the line
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
to
strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
How to place multiple list box in Module Pool Program having same option.
I have a screen. I want to place multiple i/o box with listbox option having 10 option of each . Is it possible ?
Hi Manoj,
Sorry, did not got you. You mean list box with 10 options, just this?
Or Cascading list box?
regards,
Archer -
Is it possible to allow use to type entry into a drop down list box ?
Hi ,
Is it possible to provide type in the value option ( provide option to user like he can select a value from the extracted data in a drop down list object and also he can enter a value manually ) to a drop down list box on an interactive form ?
NandaHello Nanda,
In the Adobe LiveCycle Designer you can specify several list items for objects of type 'Drop-down List' and it is also possible to allow custom entries (checkbox: "Allow Custom Text Entry").
Regards,
Philipp -
I am currently creating a list box on a selection screen. I have created the box, but I am unable to populate it with data. After looking through many resources and several threads through this forum I am still unable to populate it. I have followed syntax posted on this forum and others, yet my list box still remains empty. I am using the call function 'VRM_SET_VALUES' and doing the proper exports, I have used TYPE-POOL: TRM, and have created the data declaration. Yet the box remains empty. Anything I should look for to correct this problem?
Hi,
Here is the simple Program
REPORT ZLIST.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
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.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
Regards
Sudheer -
CREATION OF INFOTYPE _ LIST BOX ISSUE
Hi all,
I am creating a custom infotype through pm01. I want to use say 10 list boxes in this infotype where the values should come from different fields of a data table. I am using vrm_set_values for this.
I am passing values through an internal table. The issue is - how to go about passing different field values to different list boxes. should i create separate subroutines for each list box or should I catch the ok code values for each of the listbox click? or is there any other way to do it?
Please suggest.
Thanks
RibhuHi ribhu,
1. OK Code does not come into picture.
2. For all those 10 list boxes,
we have to populate them,
inside the PBO.
3.
call function 'VRM_SET_VALUES'
exporting
id = combo_id
values = items.
exceptions
id_illegal_name = 1
others = 2.
Where COMBO_ID will be the name of your list box.
regards,
amit m. -
What is the data type of the value returned by the List box prompt in crystal
Post Author: Mudit Kothiyal
CA Forum: Formula
Hi all,
I am creating a report which has a list box prompt. When I am selecting a single value from the list box the report is working fine, but when I am selecting multiple values its not returning any data( although data is there). Does anyone know how the prompt values are passed to the report query by the crystal. I kno it passes the value to the report as an array. But how does it pass the value to the report query.
I am using command query to fetch data from the DB.
Crystal Report Version: Crystal Report XI R2.
DB: Oracle 10g
Also does anyone know how to pass the values of the list box prompt to the report query in comma seperated format.
Thanks & regards,
MuditPost Author: rcoleman
CA Forum: Formula
In regards to the latter part of your question
The following examples are applicable to Basic and Crystal syntax.
The examples assume that list is a String array consisting of the 3 elements: "Chocolate", "Vanilla" and "Strawberry".
Join (list)
Returns the String "Chocolate Vanilla Strawberry".
Join (list, "***")
Returns the String "Chocolate**Vanilla**Strawberry".
Not sure about the first part of your question,sorry. -
How to populate values in List Box in Adobe form
Hi,
How to populate values in List box in adobe forms?
Thanks
RBif you want to display a fixed values in the dropdown you can use list box ui and can specify values there
or if u want to display values from the context node of the webdynpro
1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
with regards
shanto aloor -
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. -
How to show value in list box on screen.
Hey,
I'm trying to write a little program to select a value from a listbox on a screen...
Filling the listbox, no problem. But showing the value on screen, and using the selected value isn't working...
So when i select a value, directly after the listbox 'closes', the selected value disappears...
I read already different threads regarding this topic, but i don't see a solution :(.
Below you find the code. Anyone sees where the problem is?
Screen number = 300.
PROCESS BEFORE OUTPUT.
MODULE status_0300.
Module init_dropdown_box.
PROCESS AFTER INPUT.
MODULE user_command_0300.
REPORT ztesttom2 .
TABLES: zbadgelinks.
TYPE-POOLS vrm.
DATA values TYPE vrm_values WITH HEADER LINE.
data: name type vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_badgelinks LIKE zbadgelinks OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM zbadgelinks INTO TABLE it_badgelinks.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
* text
module status_0300 output.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
endmodule. " status_0300 OUTPUT
MODULE init_dropdown_box output.
IF init is initial.
name = 'LB_SEL_PC'.
loop at it_badgelinks.
values-text = it_badgelinks-description.
values-key = it_badgelinks-id.
append values.
endloop.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = values[]
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.
endif.
init = 'X'.
ENDMODULE.
*& Module user_command_0300 INPUT
* text
module user_command_0300 input.
CASE OK_CODE.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. leave to screen 0.
WHEN 'CB_OK'.
READ TABLE it_badgelinks WITh KEY ID = it_badgelinks-id.
IF SY-SUBRC = 0.
MESSAGE I398(00) WITH 'ID: ' it_badgelinks-id
'Description: ' it_badgelinks-description.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
ID_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.
ENDCASE.
endmodule. " user_command_0300 INPUT
Thanks in advance,
Kind Regards,
TomHi,
Please check the below modified code of yours.
Now the value is retained in the list box.
REPORT ztest_cert.
TABLES: t511t.
TYPE-POOLS vrm.
DATA: lb_sel_pc(80).
DATA values TYPE vrm_values WITH HEADER LINE.
DATA: name TYPE vrm_id.
DATA ok_code LIKE sy-ucomm.
DATA save_ok LIKE sy-ucomm.
DATA init.
DATA it_t511t LIKE t511t OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM t511t INTO TABLE it_t511t WHERE sprsl = 'EN'.
CALL SCREEN 300.
*& Module status_0300 OUTPUT
text
MODULE status_0300 OUTPUT.
SET PF-STATUS 'ST_0300'.
SET TITLEBAR 'TB_0300'.
ENDMODULE. " status_0300 OUTPUT
MODULE init_dropdown_box OUTPUT
MODULE init_dropdown_box OUTPUT.
IF init IS INITIAL.
name = 'LB_SEL_PC'.
LOOP AT it_t511t.
values-text = it_t511t-kotxt.
values-key = it_t511t-konst.
APPEND values.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = values[]
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.
ELSEIF init = 'X'.
<b> lb_sel_pc = values-text.</b>
ENDIF.
init = 'X'.
ENDMODULE. "init_dropdown_box OUTPUT
*& Module user_command_0300 INPUT
text
MODULE user_command_0300 INPUT.
data: l_code like values-key.
CASE ok_code.
WHEN 'BACK'. LEAVE TO SCREEN 0.
WHEN 'EXIT'. LEAVE TO SCREEN 0.
WHEN 'CANC'. LEAVE TO SCREEN 0.
WHEN 'CB_CANCEL'. LEAVE TO SCREEN 0.
WHEN 'CB_OK'.
clear: it_t511t.
lb_sel_pc = l_code.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
IF sy-subrc = 0.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt.
MESSAGE i398(00) WITH 'ID: ' it_t511t-konst
'Description: ' it_t511t-kotxt.
ENDIF.
WHEN 'SEL_PC'.
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = name
IMPORTING
VALUES = values[]
EXCEPTIONS
id_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.
ELSE.
<b> l_code = lb_sel_pc.
READ TABLE it_t511t WITH KEY konst = lb_sel_pc.
CLEAR values.
values-key = it_t511t-konst.
values-text = it_t511t-kotxt</b>.
ENDIF.
ENDCASE.
ENDMODULE. " user_command_0300 INPUT
Thanks & Regards
Praba -
How to read the selected value of a dropdown list box
Hello,
I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
I dont know how to trap the selection made on dropdown list.
PLease guide me on how to trap the dropdown list field selection value.
Thanks in advance.
Thirumala.Hello,
Check what is done in standard for the fielf REGION which is inked to the country.
Otherwise, you can do the following :
- in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
- Put the new value in a global variable (GV).
- in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
Hope this will help you,
Regards,
Frederic
Maybe you are looking for
-
Can I use the iPad 1 or iPhone 4 with a Samsung 8000 Series HDTV?
I am trying to connect my iPad to a HDMI input on my Samsung Series 8000 HD LED TV without success. Can this only be done with an iPad 2? I am using an Apple dongle to link to the HDMI cable which seems to work fine at Radio Shack. Any help would be
-
Much to my surprise, there is no audio input jack on the W520. I must have been dazzled by all of the good things about this laptop, not to notice there is no audio input. The big question is what is the best way to feed audio to the hard disk so t
-
Trying to fit output of XY Graph
Hello, I'm trying to fit the output of an XY graph which is (1-D Array of Cluster of 2 Elements(2x 1-D Array of Double[64-bit Real])). It seems like instead of having one array with two columns X,Y indexed persample number, I want to have a 1-D Array
-
The full message reads as, " Force Quit Applications Your Mac OS X startup disk has no more space available for application memory. To avoid problems with your computer, quit any applications you are not using. Closing windows and removing files fr
-
OK, I have never really had a problem with itunes before, nothing more than needing to update some tags when importing my library for the first time. But recently, a fresh reformat has left me wondering *** is going on. I imported my library, error f