Dropdown list in table control
Hi,
how do i create dropdown list in table control with reference to the database table field names? (dropdown list will be populated with the particular table field names upon selecting the input help value from an input box).
please provide sample codes.
thanks.
will reward marks if useful.
ok i have checked that for the past few days but its not what i want.
i am using wizard to do this and i need to populate the database table records (individual field names) and display in the table control dropdown list.
what the demo shows is only how to display a dropdown list with reference to the table names.
Similar Messages
-
Dropdown List in table - multicolumn foreign key
Hello,
Steve Muench has a nice screencast how to create a dropdown list in an editable adf table.
Is there a way how to update this example to work with multicolumn foreign key between edited table and lookup table?
Let's say lookup table has Code, Line attributes as primary key and edited table has foreign key attributes MasterCode and MasterLine. How populate the FK attributes by dropdown list?
For editable table it's probably not possible directly from dropdown list. I tried to find a solution but I had problem to identify which lookup row was selected.
Radook i have checked that for the past few days but its not what i want.
i am using wizard to do this and i need to populate the database table records (individual field names) and display in the table control dropdown list.
what the demo shows is only how to display a dropdown list with reference to the table names. -
Drop down list in Table Control - Value disappeared after pressing ENTER
Dear Gurus,
I have a problem in one of my development where I used a table control in which one field is a drop down list.
I used VRM_SET_VALUES and VRM_GET_VALUES for populating the values from the programand not use any domain level value table for that field.
My problem is when I select one value from this list , and pressing enter , the value get disappeared. But if I use a domain for this field with value table then everything working properly.
My doubt is am I doing some miss coding or using the VRM_ function modules improperly ?
I am sharing some code with you
in PAI :
CALL FUNCTION 'VRM_GET_VALUES'
EXPORTING
id = 'ITAB-FIELD3' "This is drop down list element on screen
IMPORTING
values = values[] " even it is not the expor parameter...it will work..
EXCEPTIONS
id_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
No sy-subrc check required.
ENDIF.
IN PBO
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'IVBAP-ERNAM'
values = values[].
Can you please help me.
Thanks .HI,
The link contains the list box creation, just check if this might help.
Re: Getting values back from a listbox.
Regards and Best wishes. -
Exact cell in list and Table Control
Hi,
Is there someone who knows,
how to to get exact cell from lists (START-OF-SELECTION)
or from Table Control.
For example:
In list I wrtie:
number name date
1234 | es | 10/07/07
and now if I click for example on "es" now there should window apear about name "es"
the same with Table Control.
I know that get selected line is not the problem
but how to get column ???
Please it's very important
Best regards,
Greg.hi,
You can retrieve information either about the current field or the current line.
For field information, use this syntax:
GET CURSOR FIELD <f> [OFFSET <off>]
[LINE <lin>]
[VALUE <val>]
[LENGTH <len>].
This statement transfers the name of the field on which the cursor is positioned during a user action into the variable <f>. If the cursor is on a field, the system sets SY-SUBRC to 0, otherwise to 4.
The system transports the names of global variables, constants, field symbols, or reference parameters of subroutines. For literals, local fields, and VALUE parameters of subroutines, the system sets SY-SUBRC to 0, but transfers SPACE as the name.
The options have the following effects:
OFFSET <off>
The field <off> contains the position of the cursor within the field. If the cursor is on the first column, <off> = 0.
LINE <lin>
The field <lin> contains the number of the list line on which the cursor is positioned (SY-LILLI).
<b>VALUE <val></b>
The field <val> contains the character string output representation of the field on which the cursor is positioned. The representation includes formatting characters.
LENGTH <len>
The field <len> contains the output length of the field on which the cursor is positioned.
<b>you try with this logic.</b>
**define variables for holding field name and field values
DATA: fieldname type n,
fieldval type n.
<b>GET CURSOR FIELD fieldname VALUE fieldval </b>
now the fieldname and fieldval variables hold the values which was selected by user based on cursor position.
the variable declarations based on your selected fields.
regards,
Ashok Reddy -
Getting problem in binding DropDown List with table data in visual JSF
Hi All,
I am new to visual JSF.
I am getting few problems while working over components.
I have succeeded in binding data of Person table in a drop down list .
By just drag drop ..it worked.
But while connecting to external DB this drag drop mechanism didn't work for me .
1st problem that i faced was by dragging method columns are not visible when i did right click-> bind to Data -> DataProvider window .
But i am successfully printed table Data in backend ie: by putting
for(int i=0; i<xn_white_listDataProvider.getAllRows().length;i++){
System.out.println(" value :"+xn_white_listDataProvider.getValue("SUB_ID",xn_white_listDataProvider.getRowKey(Integer.toString(i))));
}I am not getting how to set Items in dropdown1
I tried putting
HelloSh.xn_white_listDataProvider.options['XNODE.XN_WHITE_LIST.SUB_ID, XNODE.XN_WHITE_LIST.SUB_ID'but it didn't work while for person data table
items="#{HelloSh.personDataProvider.options['PERSON.PERSONID,PERSON.NAME']}"it is working
when i am writting items="24,28" in dropdown1 box
& printing its value in static text Like
<webuijsf:staticText id="staticText3" style="position: absolute; left: 72px; top: 120px" text="#{HelloSh.dropDown1.items}"/> it is printing fine .
Plz help me in this regard.
Any clarification if needed plz let me know.
Thanks in advance.<h:selectOneMenu id="menu1" styleClass="selectOneMenu">
<f:selectItems value="*#{selectitems.pc_DynamicPortletEdit.regList}*" />
</h:selectOneMenu>When we bind the list to the h:selectOneMenu the code in the JSP will be as given above.
My doubts here are
1) But when i tried to bind the list to a selectonemenu the code in the JSP is looking like this one
<h:selectOneMenu id="menu1" styleClass="selectOneMenu">
<f:selectItems value="*#{selectitems.pc_DynamicPortletEdit.regList.regList.toArray}*" />
</h:selectOneMenu>2) Also in the runtime instead of displaying the values in the dropdown, i am getting the object names (javax.faces.model.SelectItem@680d0ccc) in the drop down.
What am I doing wrong? Any help here would be usefull for me.
BTW,
the code in the backing bean for setting the values is like this
List dropListValue = new ArrayList();
for (int x=0; x<result.length; x++){ //where result is array of string values
SelectItem tempSelect = new SelectItem();
tempSelect.setLabel(result[x]);
tempSelect.setValue(result[x]);
dropListValue.add(result[x]);
this.setRegList(dropListValue );The bean is in request scope only. -
How to create dropdown list in table
dear friends,
i created one table in dynpro. In table i have one column dropdown by index. when i changed the value in dropdown box , same value reflect in all row in addition of row where i selected the value. please somebody tell me what i should do????
regards,
sunil sharmaHi,
If you have got 10 rows, In the first row if you have selected some value from dropdown then you want to have this same value
to be shown across the other rows of the same column right. Also for the new row you want the same value right.
if this is the case, then first implement the action for leadselect for that dropdown.
if your node has 3fields, empno, begda, endda. for ex: endda is the dorpdown by index.
In the OnleadSelect event -
Write this code -
You will get the element right. for that element get the record using
get_static_attributes into ls_table1.
Now,
loop at lt_table into ls_table.
ls_table-endda = ls_table1-endda.
modify lt_table from ls_table index sy-tabix.
endloop.
lo_nd_node->bind_table( lt_table).
Or
Also try this out.
Using the GET_ELEMENTS of IF_WD_CONTEXT_NODE
loop at lt_elments into ls_elmenets.
ls_elements->set_attribute
exporting
name = `ENDDA`
value = ls_table1-endda.
endloop.
Regards,
Lekha.
Edited by: Lekha on Sep 30, 2009 12:00 PM -
How to put drop down in table control ?
Hi All,
I m writing one module pool program to edit table.
I want dropdown to one field so that user can select the appropriate value. And also I want to save that record.
So how to get the dropdown list and after editing that record how to save that in the database?
Thanx in advance.
-UmeshHi Umesh,
Please check this demo program RSDEMO_TABLE_CONTROL on how to add drop down list in table control. Also check this program DEMO_DYNPRO_TABCONT_LOOP_AT as well.
To save to database you can code something like this in PAI.
MODULE USER_COMMAND_0100 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'SAVE'.
MODIFY <database table> FROM TABLE <table control>.
IF SY-SUBRC = 0.
ELSE.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Hope this will help.
Regards,
Ferry Lianto -
Table Control Dropdown List Problem
Hi,
I have this problem with my table control.
I now have an input field (with input help) called: Reference Table, as well as a table control.
What i need is to select the table names (select from the Reference table input help) and the field names will be populated inside the table control (according to the field names inside the respective tables) as a dropdown list.
Refer to this diagram if unclear: http://img166.imageshack.us/img166/1066/tablecontrolwt4.png
Please give me sample codes as i really need help.
Will reward marks if useful.
thanks a lot.
Below is my codes:
*& Report ZHERA_TABLE3
REPORT ZHERA_TABLE3_EVONNE.
DATA: P_HERA TYPE DNTAB-TABNAME VALUE 'Z07P4_REF',
ITAB_HERA TYPE TABLE OF Z07P4_REF,
FIELD_COUNT TYPE I,
WA_HERA LIKE LINE OF ITAB_HERA.
SELECT * INTO TABLE ITAB_HERA FROM Z07P4_REF.
START-OF-SELECTION.
CALL SCREEN 3000.
MODULE STATUS_3000 OUTPUT.
SET PF-STATUS 'UI'.
SET TITLEBAR 'TITLE'.
ENDMODULE. "STATUS_8000 OUTPUT
MODULE USER_COMMAND_8000 INPUT
MODULE USER_COMMAND_3000 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'EXIT'.
LEAVE PROGRAM.
WHEN 'SAVE'.
PERFORM UPDATE_TABLE.
ENDCASE.
ENDMODULE. "USER_COMMAND_8000 INPUT
*&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE' ITSELF
CONTROLS: ZTABLE TYPE TABLEVIEW USING SCREEN 3000.
*&SPWIZARD: LINES OF TABLECONTROL 'ZTABLE'
DATA: G_ZTABLE_LINES LIKE SY-LOOPC.
DATA: OK_CODE LIKE SY-UCOMM.
*&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
MODULE ZTABLE_CHANGE_TC_ATTR OUTPUT.
DESCRIBE TABLE ITAB_HERA LINES ZTABLE-lines.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GET LINES OF TABLECONTROL
MODULE ZTABLE_GET_LINES OUTPUT.
G_ZTABLE_LINES = SY-LOOPC.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MODIFY TABLE
MODULE ZTABLE_MODIFY INPUT.
MODIFY ITAB_HERA
FROM WA_HERA
INDEX ZTABLE-CURRENT_LINE.
ENDMODULE.
*&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: PROCESS USER COMMAND
MODULE ZTABLE_USER_COMMAND INPUT.
OK_CODE = SY-UCOMM.
PERFORM USER_OK_TC USING 'ZTABLE'
'ITAB_HERA'
CHANGING OK_CODE.
SY-UCOMM = OK_CODE.
ENDMODULE.
INCLUDE TABLECONTROL_FORMS *
*& Form USER_OK_TC *
FORM USER_OK_TC USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME
CHANGING P_OK LIKE SY-UCOMM.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA: L_OK TYPE SY-UCOMM,
L_OFFSET TYPE I.
&SPWIZARD: END OF LOCAL DATA----
*&SPWIZARD: Table control specific operations *
*&SPWIZARD: evaluate TC name and operations *
SEARCH P_OK FOR P_TC_NAME.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
L_OFFSET = STRLEN( P_TC_NAME ) + 1.
L_OK = P_OK+L_OFFSET.
*&SPWIZARD: execute general and TC specific operations *
CASE L_OK.
WHEN 'INSR'. "insert row
PERFORM FCODE_INSERT_ROW USING P_TC_NAME
P_TABLE_NAME.
CLEAR P_OK.
WHEN 'DELE'. "delete row
PERFORM FCODE_DELETE_ROW USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
CLEAR P_OK.
WHEN 'P--' OR "top of list
'P-' OR "previous page
'P+' OR "next page
'P++'. "bottom of list
PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
L_OK.
CLEAR P_OK.
WHEN 'L--'. "total left
PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
WHEN 'L-'. "column left
PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
WHEN 'R+'. "column right
PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
WHEN 'R++'. "total right
PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
WHEN 'MARK'. "mark all filled lines
PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'DMRK'. "demark all filled lines
PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
CLEAR P_OK.
WHEN 'SASCEND' OR
'SDESCEND'. "sort column
PERFORM FCODE_SORT_TC USING P_TC_NAME
l_ok.
ENDCASE.
ENDFORM. " USER_OK_TC
*& Form FCODE_INSERT_ROW *
FORM fcode_insert_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_LINES_NAME LIKE FELD-NAME.
DATA L_SELLINE LIKE SY-STEPL.
DATA L_LASTLINE TYPE I.
DATA L_LINE TYPE I.
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE CXTAB_CONTROL.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
ASSIGN (L_LINES_NAME) TO <LINES>.
*&SPWIZARD: get current line *
GET CURSOR LINE L_SELLINE.
IF SY-SUBRC <> 0. " append line to table
L_SELLINE = <TC>-LINES + 1.
*&SPWIZARD: set top line *
IF L_SELLINE > <LINES>.
<TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
ELSE.
<TC>-TOP_LINE = 1.
ENDIF.
ELSE. " insert line into table
L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
<TC>-LINES = <TC>-LINES + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE L_LINE.
ENDFORM. " FCODE_INSERT_ROW
*& Form FCODE_DELETE_ROW *
FORM fcode_delete_row
USING P_TC_NAME TYPE DYNFNAM
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: delete marked lines *
DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
IF <MARK_FIELD> = 'X'.
DELETE <TABLE> INDEX SYST-TABIX.
IF SY-SUBRC = 0.
<TC>-LINES = <TC>-LINES - 1.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " FCODE_DELETE_ROW
*& Form COMPUTE_SCROLLING_IN_TC
text
-->P_TC_NAME name of tablecontrol
-->P_OK ok code
FORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
P_OK.
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TC_NEW_TOP_LINE TYPE I.
DATA L_TC_NAME LIKE FELD-NAME.
DATA L_TC_LINES_NAME LIKE FELD-NAME.
DATA L_TC_FIELD_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <LINES> TYPE I.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
ASSIGN (L_TC_LINES_NAME) TO <LINES>.
*&SPWIZARD: is no line filled? *
IF <TC>-LINES = 0.
*&SPWIZARD: yes, ... *
L_TC_NEW_TOP_LINE = 1.
ELSE.
*&SPWIZARD: no, ... *
CALL FUNCTION 'SCROLLING_IN_TABLE'
EXPORTING
ENTRY_ACT = <TC>-TOP_LINE
ENTRY_FROM = 1
ENTRY_TO = <TC>-LINES
LAST_PAGE_FULL = 'X'
LOOPS = <LINES>
OK_CODE = P_OK
OVERLAPPING = 'X'
IMPORTING
ENTRY_NEW = L_TC_NEW_TOP_LINE
EXCEPTIONS
NO_ENTRY_OR_PAGE_ACT = 01
NO_ENTRY_TO = 02
NO_OK_CODE_OR_PAGE_GO = 03
OTHERS = 0.
ENDIF.
*&SPWIZARD: get actual tc and column *
GET CURSOR FIELD L_TC_FIELD_NAME
AREA L_TC_NAME.
IF SYST-SUBRC = 0.
IF L_TC_NAME = P_TC_NAME.
*&SPWIZARD: et actual column *
SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
ENDIF.
ENDIF.
*&SPWIZARD: set the new top line *
<TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
ENDFORM. " COMPUTE_SCROLLING_IN_TC
*& Form FCODE_TC_MARK_LINES
marks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_MARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME.
&SPWIZARD: EGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: mark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = 'X'.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
*& Form FCODE_TC_DEMARK_LINES
demarks all TableControl lines
-->P_TC_NAME name of tablecontrol
FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
P_TABLE_NAME
P_MARK_NAME .
&SPWIZARD: BEGIN OF LOCAL DATA----
DATA L_TABLE_NAME LIKE FELD-NAME.
FIELD-SYMBOLS <TC> TYPE cxtab_control.
FIELD-SYMBOLS <TABLE> TYPE STANDARD TABLE.
FIELD-SYMBOLS <WA>.
FIELD-SYMBOLS <MARK_FIELD>.
&SPWIZARD: END OF LOCAL DATA----
ASSIGN (P_TC_NAME) TO <TC>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
ASSIGN (L_TABLE_NAME) TO <TABLE>. "not headerline
*&SPWIZARD: demark all filled lines *
LOOP AT <TABLE> ASSIGNING <WA>.
*&SPWIZARD: access to the component 'FLAG' of the table header *
ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
<MARK_FIELD> = SPACE.
ENDLOOP.
ENDFORM. "fcode_tc_mark_lines
FORM UPDATE_TABLE.
"Update physical database table
UPDATE Z07P4_REF FROM TABLE ITAB_HERA.
ENDFORM. "UPDATE_TABLE
Edited by: Evonne Gow on Jan 4, 2008 2:52 AMhey gary help me lei...
Edited by: Evonne Gow on Jan 4, 2008 2:55 AM -
Dropdown list in infotype table control
Hello,
I am creating a custom HR infotype with dropdown list field. This field holds a key but displays a text from text table. Dropdowns contents are dependant on Start Date of the infotype record and I am using PBO module to fetch this data. Everything works fine except one detail. Infotype has automatically generated overview table control, which holds various data including Start Date of infotype record and the dropdown field in question. And even that would work well if not for the date, in case when I drop the date check dropdowns in all rows get populated. Currently it seems to only use the date on the last row of the table control and subsequently fails to correctly populate dropdowns in all other rows. With no access to SAP code which populates table control, how do I get the date for each individual row?
Best regards, ArminsHi Marty,
For this you have to create 2 nodes
1. A node which will be bound to the table. This will be a singleton node.
2. A node for dropdown. This node should be inside the table node and should be a non-singleton one.
Check the singleton properties of both the nodes above.
Whenever you will create an element for table node, an instance of the dropdown node will be automatically created.
To set the value in this dropdown at leadselection, you can use the below logic
1. Assume you know the value of the fruit to be set in the dropdown
2. for(int i = 0; i < wdContext.nodeFruit().size(); i++)
if( wdContext.currentTableNode().nodeFruit().getFruitElementAt(i).getFruit().equals(fruitName) )
wdContext.currentTableNode().nodeFruit().setLeadSelection(i);
break;
Hope this helps you. -
How to Populate a Dropdown field for a table control with different keys
Hi All,
I have Table control with abt eight columns (fields). Out of these eight field one field is with dropdown list. In table control Project ID is Primary key column. Depending upon this Project ID value, i have different values which is to be populated in dropdown boxes. In table control if there is only one project ID value say 'P000715' i can populate it but when i have more than one project ID (P000715, p000716, P000717.....) in display in rows of table control i want to have different values in my dropdown field corresponding to that row of project id. Experts please tell me how to achieve this functionality.
Thankx in Advance
Rizwan Ahmad SiddiquiThe only way you may be able to do this is using
MODULE PROCESS ON VALUE-REQUEST. User-programmer F4 help
in your PAI routine.
In this routine you would build the list and get the returned value to update the field.
Something like this.
DATA: BEGIN OF value_tab OCCURS 0,
field1 TYPE zlmltype,
field2 TYPE zltypex,
END OF value_tab.
* Drop down values
REFRESH it_return_tab. CLEAR it_return_tab.
REFRESH value_tab. CLEAR value_tab.
SELECT ltype ltypex
INTO TABLE value_tab
FROM zlmltyp
WHERE auth NE '9'. "System Only
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD1'
value_org = 'S'
TABLES
value_tab = value_tab[]
return_tab = it_return_tab.
READ TABLE it_return_tab INDEX 1 INTO wa_return_tab.
CHECK sy-subrc EQ 0.
p_pleadtyp = wa_return_tab-fieldval. -
List Box with Variable Entries in a Table Control
Hi ,
I have a requirement where a certain column F of the table control should be designed as dropdown list box. The problem is, i have to populate different entries for field F in each row of the Table control.
Field List
First Line - A,B,C
Second Line - A,B
Third Line - A
Is it possible in ABAP to achieve this . I should not use an input help. Can i achieve this with Drop down list ?
Regards,
Krishna Chaitanya . AHi Priyaranjan,
Assoon as you enter records and save it it gets saved , that is ok , but when you do scroll system goes to PAI , so you need to chk the value of ok_code when scroll button is pressed and write the code according to that .
more over you need to increase the number of lines that can be displayed in a particular table control .
Try this it may help you .
<i>Reward points if helpful.</i>
Regards,
Amber S -
How to Display a Calender upon clicking the dropdown list inside a table co
Hi,
I have a Listbox inside my table control and I need to Display a Calender upon clicking the dropdown list.
Can any body help.
SrinivasHi,
Try this:
On your customizing screen,
PROCESS ON VALUE-REQUEST.
Field T_ZT-SDATE
module create_dateselect.
In your main program:
module create_dateselect.
data:p_date like sy-datum.
CALL FUNCTION 'F4_DATE'
EXPORTING
holiday_calendar_id = 'CN'
display = ' '
IMPORTING
select_date = p_date
EXCEPTIONS
OTHERS = 4.
t_zt-sdate = p_date.
endmodule.
Regards,
Pole -
Highlight dropdown by index in table control in FPM error
Hello,
I have a situation where I would like to point out to a user that they have to maintain a value in a dropdown field in a table control. I am trapping the error situation in the Process_Event method of the FPM in my component,
I would like to raise an FPM error to highlight this to the user. If I do this with a normal input field I can just pass the element and attribute that I want highlighting to the FPM error handler
eg:
wd_this->ao_fpm->mo_message_manager->report_bapiret2_message(
is_bapiret2 = ls_message-message_details
io_component = lo_component
io_element = ls_message-element
iv_attribute_name = ls_message-attribute_name ).
and the field is highlighted and linked to the error.
However, if the field is of a type dropdown by index, I can't seem to get it to highlight. I have tried passing the element that the dropdown text is bound to and the attribute/name of the text field, but this does not work. I even tried passing the child node name as the attribute, and the element as the parent element of the node holding the dropdown list - but unsuprisingly this doesn't work either.
Is there anyway to highlight/link a dropdown by index field to an FPM error message - or is this functionality currently unsupported? Or perhaps I am making a simple mistake somewhere?
Thanks for any suggestions!
Cheers,
ChrisChris Paine wrote:
> Is there anyway to highlight/link a dropdown by index field to an FPM error message - or is this functionality currently unsupported? Or perhaps I am making a simple mistake somewhere?
hi Chris,
As far as i know this functionality is not supported.I have had the same problem earlier. -
How to create a dropdown list to list the values from two different tables?
Hi,
I have the following requirement:
1. I have to create a dropdown list to display all the values from the second column of a table.
2. Another dropdown list to display all the values from the second column of another table.
3. A text box should help me to add the selected values.
How to get this done in a PDF? Please help.
Regards,
LathaIs this a LC form? Because Acrobat forms have no concept of tables, just
individual fields... -
Need help in creating a dropdown box inside a table control
Hi,
I need to display a calender upon click event of a dropdown box placed inside my table control.
Can any body help me out.
Regards,
SrinivasTry this ex
TYPE-POOLS VRM.
VALUES-KEY = 'D'.
VALUES-TEXT = 'Double Crate'.
APPEND VALUES.
VALUES-KEY = 'S'.
VALUES-TEXT = 'Single Crate'.
APPEND VALUES.
VALUES-KEY = 'C'.
VALUES-TEXT = 'Carton Box'.
APPEND VALUES.
VALUES-KEY = 'P'.
VALUES-TEXT = 'Pallet'.
APPEND VALUES.
VALUES-KEY = 'W'.
VALUES-TEXT = 'Wood.Case'.
APPEND VALUES.
VALUES-KEY = 'L'.
VALUES-TEXT = 'Loose'.
APPEND VALUES.
CLEAR VALUES.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'CRTYPE'
VALUES = VALUES[]
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
hope it helps..
Edited by: prabhu p on May 22, 2008 10:55 AM
Maybe you are looking for
-
Balance sheet required for current quarter and previous quarter
Hi Guys, I am using 0FIGL_C10 cube for balance sheet report,i need to create balances for current quarter and previous quarter. user will enter the fisper, based on fisper it has to show the current quarter and previous quarter balance.
-
Assining a bean attribute to a jsp variable
I am writing a struts application and am using <bean:write name="configattribute" property="name"/> to print out info on my jsp page. I was wondering if I could assign that value to a local jsp variable so I can check its value and change the colour
-
Unable to connect to unprotected wireless network
A couple of months ago, I upgraded to Snow Leopard (10.6.4) from Tiger with the Mac Box Set. Ever since then, I have had a pretty mysterious problem: the wireless internet in my apartment, only for MY computer, is extremely unreliable, allowing me to
-
Hello, One of our old system runs a SAP Kernel 640 OCI_920. DB server runs Oracle 9.2 We would like to backup it with RMAN to take advantage of backup as saveset with disk_copy_cmd = rman_set So according to OSS 1101530, we should run at least BrTool
-
How to enforce HTTP1.0 protocol in WL5.1 httpd?
Is it possible to enforce HTTP1.0 protocol in WL5.10 httpd? Thanks, Simon