Drop down box in alv
hi to all , my querry is as follows how to give dropdown box for one paricular column in alv grid . pls give sample code . i have searched for it in forum . but i could not get correct answer . pls give coding . points will be rwewarded.
2, pls tell how to make one particular cell of one column editable . we know that we can make one column editable by using is _layout- edit = 'x'.pls give coding . one sample program
Hi.
for editable ALV,
refer the following link , it is havine one complete editable ALV program
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm
for drill down run the following code.
REPORT yfi7g_ing_mic_001 .
*PROGRAM YFI7G_ING_MIC_001.
TABLES: vbak .
TABLES: mara .
TYPES: BEGIN OF tp_vbak ,
vbeln TYPE vbak-vbeln,
erdat TYPE vbak-erdat,
erzet TYPE vbak-erzet,
ernam TYPE vbak-ernam,
vbtyp TYPE vbak-vbtyp,
trvog TYPE vbak-trvog,
auart TYPE vbak-auart,
lifsk TYPE vbak-lifsk,
faksk TYPE vbak-faksk,
waerk TYPE vbak-waerk,
vkorg TYPE vbak-vkorg,
kunnr TYPE vbak-kunnr,
vgbel TYPE vbak-vgbel,
vgtyp TYPE vbak-vgtyp,
END OF tp_vbak .
TYPES: BEGIN OF tp_mara ,
matnr TYPE mara-matnr,
END OF tp_mara .
TYPES: BEGIN OF tp_alv1_data.
INCLUDE TYPE tp_vbak .
TYPES: END OF tp_alv1_data.
TYPES: BEGIN OF tp_alv2_data.
INCLUDE TYPE tp_mara .
TYPES: END OF tp_alv2_data.
TYPE-POOLS: slis.
DATA: gt_vbak TYPE STANDARD TABLE OF tp_vbak WITH HEADER LINE.
DATA: gt_mara TYPE STANDARD TABLE OF tp_mara WITH HEADER LINE.
DATA: gs_variant LIKE disvariant.
DATA: gt_alv1_data TYPE STANDARD TABLE OF tp_alv1_data WITH HEADER LINE.
DATA: gt_alv2_data TYPE STANDARD TABLE OF tp_alv2_data WITH HEADER LINE.
SELECTION-SCREEN *
BLOCK b0 *
SELECTION-SCREEN BEGIN OF BLOCK b0 WITH FRAME.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln. "<field not defined?>
PARAMETERS: p_matnr LIKE mara-matnr. "<field not defined?>
SELECTION-SCREEN END OF BLOCK b0.
BLOCK bvar *
SELECTION-SCREEN BEGIN OF BLOCK bvar WITH FRAME.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK bvar.
BLOCK bbox *
SELECTION-SCREEN BEGIN OF BLOCK bbox WITH FRAME.
PARAMETERS: p_box_up RADIOBUTTON GROUP b1,
p_box_do RADIOBUTTON GROUP b1 DEFAULT 'X',
p_box_no RADIOBUTTON GROUP b1.
SELECTION-SCREEN END OF BLOCK bbox.
AT SELECTION-SCREEN ON P_VARI *
AT SELECTION-SCREEN ON p_vari.
PERFORM alv_variant_existence USING p_vari
CHANGING gs_variant.
AT SELECTION-SCREEN ON VALUE REQUEST FOR P_VARI *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM alv_variant_f4 CHANGING p_vari
gs_variant.
INITIALIZATION *
INITIALIZATION.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM authority_check.
PERFORM get_control_data.
PERFORM get_transaction_data.
PERFORM process_transaction_data.
END-OF-SELECTION *
END-OF-SELECTION.
PERFORM output_data.
F O R M S *
FORM AUTHORITY_CHECK *
Perform authority checks for the report *
FORM authority_check.
!!! Note: authorisation checks are application-dependent.
!!! Some common cases are listed below - please select one of them
!!! or add new authorisation checks.
!!! If the report is creating batch input session or using LDB
!!! it may be sufficient to use automatic SAP auth.checks.
Authorisation for displaying documents in a single company code
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field p_bukrs
id 'ACTVT' field '03'.
if sy-subrc <> 0.
message e001(z9) with 'No authorisation to display documents'
'in company code' p_bukrs.
endif.
Displaying documents from a list of company codes (select-options)
call function 'Y_BUKRS_AUTHORITY_CHECK'
EXPORTING
ACTVT = '03'
NOMESSAGE = ' '
tables
s_bukrs = s_bukrs.
ENDFORM. " AUTHORITY_CHECK
FORM GET_CONTROL_DATA *
Read configuration etc. *
FORM get_control_data.
ENDFORM. " GET_CONTROL_DATA
FORM GET_TRANSACTION_DATA *
Read documents etc. *
FORM get_transaction_data.
!!! Data selection statement below has been generated automatically.
!!! Please check if it is correct and complete.
!!! Use table joins or 'SELECT FOR ALL ENTRIES' when selecting data
!!! from related tables.
SELECT
vbeln
erdat
erzet
ernam
FROM vbak
INTO CORRESPONDING FIELDS OF TABLE gt_vbak
CHECK NOT gt_vbak[] IS INITIAL.
SELECT
matnr
FROM mara
INTO CORRESPONDING FIELDS OF TABLE gt_mara
FOR ALL ENTRIES IN gt_vbak
WHERE ernam = gt_vbak-ernam
ENDFORM. " GET_TRANSACTION_DATA
FORM PROCESS_TRANSACTION_DATA *
FORM process_transaction_data.
LOOP AT gt_vbak .
MOVE-CORRESPONDING gt_vbak TO gt_alv1_data .
APPEND gt_alv1_data .
ENDLOOP.
FREE gt_vbak .
LOOP AT gt_mara .
MOVE-CORRESPONDING gt_mara TO gt_alv2_data .
APPEND gt_alv2_data .
ENDLOOP.
FREE gt_mara .
ENDFORM. " PROCESS_TRANSACTION_DATA
FORM OUTPUT_DATA *
FORM output_data.
PERFORM alv_list_display.
ENDFORM. " OUTPUT_DATA
FORM DISPLAY_RECORD *
Display object associated with the current ALV line *
FORM display_record USING is_selfield TYPE slis_selfield.
READ TABLE gt_alv1_data INDEX is_selfield-tabindex.
CHECK sy-subrc = 0.
!!! SAMPLE IMPLEMENTATION FOR DISPLAYING FI DOCUMENTS:
SET PARAMETER ID 'BUK' FIELD gt_alv1_data-vbeln.
set parameter id 'BLN' field gt_alv1_data-belnr.
set parameter id 'GJR' field gt_alv1_data-gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDFORM. " DISPLAY_RECORD
FORM ALV_LIST_DISPLAY *
Invoke main ALV function to format and show the report *
FORM alv_list_display.
DATA: ls_layout TYPE slis_layout_alv,
ls_print TYPE slis_print_alv,
ls_keyinfo TYPE slis_keyinfo_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv,
lt_exctab TYPE slis_t_extab,
lt_sorttab TYPE slis_t_sortinfo_alv,
lt_events TYPE slis_t_event.
PERFORM alv_init_report_events TABLES lt_events.
PERFORM alv_init_report_layout TABLES lt_fieldcat
lt_exctab
lt_sorttab
CHANGING ls_layout
ls_print
ls_keyinfo.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
i_callback_program = sy-cprog
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_excluding = lt_exctab
IT_SPECIAL_GROUPS =
it_sort = lt_sorttab
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
i_save = 'A'
is_variant = gs_variant
it_events = lt_events
IT_EVENT_EXIT =
i_tabname_header = 'GT_ALV1_DATA'
i_tabname_item = 'GT_ALV2_DATA'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = ls_keyinfo
is_print = ls_print
IS_REPREP_ID =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab_header = gt_alv1_data
t_outtab_item = gt_alv2_data.
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDFORM. " ALV_LIST_DISPLAY
FORM ALV_INIT_REPORT_LAYOUT *
Set up report layout definition for ALV_LIST_DISPLAY *
<-- OT_FIELDCAT list of fields *
<-- OT_EXCTAB excluded menu options *
<-- OT_SORTTAB sorting/grouping definition *
<-- OS_LAYOUT global report layout settings *
<-- OS_PRINT global report printout settings *
<-- OS_KEYINFO itab key fields (required only for hier.lists) *
FORM alv_init_report_layout TABLES ot_fieldcat TYPE slis_t_fieldcat_alv
ot_exctab TYPE slis_t_extab
ot_sorttab TYPE slis_t_sortinfo_alv
CHANGING cs_layout TYPE slis_layout_alv
cs_print TYPE slis_print_alv
cs_keyinfo TYPE slis_keyinfo_alv.
add menu items to be excluded to ot_exctab.
REFRESH ot_exctab.
REFRESH ot_fieldcat.
REFRESH ot_sorttab.
!!! List all ALV data fields for display here:
DD-struct = data dictionary structure name
DD-field = field of data dictionary structure
itab = internal table for output data
itab-field = internal table field name
key = set to 'X' if key field
sum = set to 'X' for totals
hid = set to 'X' if field is initially hidden
row = list row number (multi-line list if >1)
DD-struct DD-field itab itab-field key sum hid row
PERFORM alv_build_fieldcat TABLES ot_fieldcat USING:
'VBAK' 'VBELN' 'GT_ALV1_DATA' 'VBELN' ' ' ' ' ' ' 1 ,
'VBAK' 'ERDAT' 'GT_ALV1_DATA' 'ERDAT' ' ' ' ' ' ' 1 ,
'VBAK' 'ERZET' 'GT_ALV1_DATA' 'ERZET' ' ' ' ' ' ' 1 ,
'VBAK' 'ERNAM' 'GT_ALV1_DATA' 'ERNAM' ' ' ' ' ' ' 1.
PERFORM alv_build_fieldcat TABLES ot_fieldcat USING:
'MARA' 'MATNR' 'GT_ALV2_DATA' 'MATNR' ' ' ' ' ' ' 1 .
!!! List all ALV data fields for sorting/grouping here
itab = internal table for output data
itab-field = internal table field name
up = sort ascending
down = sort descending
grp = group by
comp = group initially compressed
pos = field position in sort sequence
itab field up down grp comp pos
PERFORM alv_build_sorttab TABLES ot_sorttab USING:
'GT_ALV1_DATA' 'VBELN' 'X' ' ' ' ' ' ' 1.
PERFORM alv_build_sorttab TABLES ot_sorttab USING:
'GT_ALV2_DATA' 'MATNR' 'X' ' ' ' ' ' ' 1.
!!! key definition - required only for hierarchical display (2 itabs)
cs_keyinfo-header01 = 'VBELN' .
cs_keyinfo-item01 = 'MATNR' .
!!! See the declaration of type SLIS_LAYOUT_ALV and set the fields
!!! of OS_LAYOUT record to change list-level attributes
os_layout-no_colhead = 'X'. " no headings
cs_layout-zebra = 'X'. " stripped pattern
os_layout-no_vline = 'X'. " columns separated by space
os_layout-totals_only = 'X'. " show only totals
os_layout-totals_text = 'Total'. " totals line label
os_layout-subtotals_text = 'Subtotal'. " subtotals line label
os_layout-subtotals_text = 'Subtotal'. " subtotals line label
os_layout-key_hotspot = 'X'. " keys as hotspot
os_layout-expand_all = 'X'. " Expand all positions
os_layout...
cs_print-no_print_selinfos = 'X'. " Skip selection statistics
cs_print-no_print_listinfos = 'X'. " Skip list statistics
os_print-...
ENDFORM. " INIT_REPORT_LAYOUT
FORM ALV_BUILD_FIELDCAT *
Format a single line for ALV_INIT_REPORT_LAYOUT *
FORM alv_build_fieldcat TABLES ot_fieldcat
USING iv_ref_tabname "ref to a table/field
iv_ref_fieldname
iv_tabname "actual table/field name
iv_fieldname
iv_key
iv_do_sum
iv_no_out
iv_row_pos.
status variables for auto-numbering of field column position
(column number reset when a new table or row begins)
STATICS: sv_last_tabname TYPE slis_tabname,
sv_last_row_pos TYPE i,
sv_current_col TYPE i.
IF sv_last_tabname <> iv_tabname OR sv_last_row_pos <> iv_row_pos.
sv_current_col = 1.
ELSE.
ADD 1 TO sv_current_col.
ENDIF.
sv_last_tabname = iv_tabname.
sv_last_row_pos = iv_row_pos.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
DATA: lv_fieldname TYPE slis_fieldname.
lv_fieldname = iv_fieldname.
!!! List all the special formatting requirements in cases below
case lv_fieldname.
when 'WRBTR'. "<-- link with currency required
ls_fieldcat-cfieldname = 'WAERS'.
ls_fieldcat-ctabname = iv_tabname.
when 'HKONT'. "<-- change default column header
ls_fieldcat-seltext_s = 'GL Acc.'.
ls_fieldcat-ddictxt = 'S'. " (S)hort (M)iddle (L)ong
when 'SOME_NUMBER' "<-- change number formatting
ls_fieldcat-nosign = 'X'.
ls_fieldcat-nozero = 'X'.
ls_fieldcat-just = 'L'. " (L)eft (R)ight (C)enter
endcase.
ls_fieldcat-ref_tabname = iv_ref_tabname.
ls_fieldcat-ref_fieldname = iv_ref_fieldname.
ls_fieldcat-tabname = iv_tabname.
ls_fieldcat-fieldname = iv_fieldname.
ls_fieldcat-key = iv_key.
ls_fieldcat-do_sum = iv_do_sum.
ls_fieldcat-no_out = iv_no_out.
ls_fieldcat-row_pos = iv_row_pos.
ls_fieldcat-col_pos = sv_current_col.
APPEND ls_fieldcat TO ot_fieldcat.
ENDFORM. " ALV_BUILD_FIELDCAT
FORM ALV_BUILD_SORTTAB *
Set up sorting information for ALV_INIT_REPORT_LAYOUT *
FORM alv_build_sorttab TABLES ot_sorttab TYPE slis_t_sortinfo_alv
USING iv_tabname TYPE slis_fieldname
iv_fieldname TYPE slis_fieldname
iv_up TYPE c
iv_down TYPE c
iv_subtot TYPE c
iv_comp TYPE c
iv_spos TYPE n.
ot_sorttab-spos = iv_spos.
ot_sorttab-fieldname = iv_fieldname.
ot_sorttab-tabname = iv_tabname.
ot_sorttab-up = iv_up.
ot_sorttab-down = iv_down.
ot_sorttab-subtot = iv_subtot.
ot_sorttab-comp = iv_comp.
APPEND ot_sorttab.
ENDFORM. " ALV_BUILD_SORTTAB
FORM ALV_INIT_REPORT_EVENTS *
Set up program events for ALV_LIST_DISPLAY *
<-- OT_EVENTS list of events and associated report subroutines *
FORM alv_init_report_events TABLES ot_events TYPE slis_t_event.
CLEAR ot_events.
REFRESH ot_events.
ot_events-name = slis_ev_user_command.
ot_events-form = 'USER_COMMAND'.
APPEND ot_events.
ot_events-name = slis_ev_pf_status_set.
ot_events-form = ''. "'PF_STATUS_SET'.
APPEND ot_events.
ot_events-name = slis_ev_top_of_list.
ot_events-form = 'TOP_OF_LIST'.
APPEND ot_events.
ot_events-name = slis_ev_end_of_list.
ot_events-form = 'END_OF_LIST'.
APPEND ot_events.
ot_events-name = slis_ev_top_of_page.
ot_events-form = 'TOP_OF_PAGE'.
APPEND ot_events.
ot_events-name = slis_ev_end_of_page.
ot_events-form = 'END_OF_PAGE'.
APPEND ot_events.
ot_events-name = slis_ev_foreign_top_of_page.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_foreign_end_of_page.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_top_of_coverpage.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_end_of_coverpage.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_before_line_output.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_after_line_output.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_caller_exit_at_start.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_list_modify.
ot_events-form = ''.
APPEND ot_events.
ot_events-name = slis_ev_subtotal_text.
ot_events-form = ''.
APPEND ot_events.
ENDFORM. " ALV_INIT_REPORT_EVENTS
FORM USER_COMMAND *
Subroutine attached as callback form to ABAP List Viewer *
--> UCOMM - user command code passed from ALV *
--> SELFIELD - information record describing current line/field *
FORM user_command USING value(iv_ucomm) LIKE sy-ucomm
is_selfield TYPE slis_selfield.
CASE iv_ucomm.
WHEN '&IC1'. "ALV record selection
PERFORM display_record USING is_selfield.
when ...
ENDCASE.
ENDFORM. " USER_COMMAND
FORM PF_STATUS_SET *
Subroutine attached as callback form to ABAP List Viewer, *
allows setting alternative menu. If necessary: *
1. Copy 'STANDARD' menu from SAPLKKBL and modify as required, *
2. Activate callback *
FORM pf_status_set USING it_exctab TYPE slis_t_extab.
set pf-status 'STANDARD' excluding it_exctab.
ENDFORM. " PF_STATUS_SET
FORM TOP_OF_LIST *
Subroutine attached as callback form to ABAP List Viewer, *
executed once at the start of list output. *
FORM top_of_list.
DATA: lt_seltab TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.
DATA: lv_report LIKE sy-repid.
lv_report = sy-repid. "do not pass sy-repid to function!
IF p_box_up = 'X'. "display select options at report start
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = lv_report
TABLES
selection_table = lt_seltab.
remove 'technical' parameters with 'DELETE LT_SELTAB WHERE...'
before display, if necessary
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = lv_report
seltext = 'X'
dyn_range =
newpage = ' '
screennr = 1000
TABLES
sel_tab = lt_seltab
EXCEPTIONS
sel_tab_empty = 1.
ENDIF. "p_box_up = 'X'
ENDFORM. " TOP_OF_LIST
FORM END_OF_LIST *
Subroutine attached as callback form to ABAP List Viewer *
executed once at the end of list output. *
FORM end_of_list.
DATA: lt_seltab TYPE STANDARD TABLE OF rsparams WITH HEADER LINE.
DATA: lv_report LIKE sy-repid.
lv_report = sy-repid. "do not pass sy-repid to function!
IF p_box_do = 'X'. "display select options at report end
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = lv_report
TABLES
selection_table = lt_seltab.
remove 'technical' parameters with 'DELETE LT_SELTAB WHERE...'
before display, if necessary
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = lv_report
seltext = 'X'
dyn_range =
newpage = ' '
screennr = 1000
TABLES
sel_tab = lt_seltab
EXCEPTIONS
sel_tab_empty = 1.
ENDIF. "p_box_do = 'X'
ENDFORM. " END_OF_LIST
FORM TOP_OF_PAGE *
Subroutine attached as callback form to ABAP List Viewer *
FORM top_of_page.
standard Ingram Micro report page heading
DATA: lv_coco_pos TYPE i, "CurPos of 'Company confidential'
lv_title_pos TYPE i, "CurPos of report title
lv_title(70) TYPE c, "Truncated report title
lv_page_pos TYPE i, "CurPos of page number
lv_date_pos TYPE i, "CurPos of date and time
lv_page_no(10) TYPE c,
lv_date(25) TYPE c,
lv_time(20) TYPE c,
lv_page(10) TYPE c.
We may need to truncate title if the line size is < 81.
IF sy-linsz < 81.
lv_title = sy-title+0(50).
ELSE.
lv_title = sy-title.
ENDIF.
Decide on positioning of text depending on width of page
lv_title_pos = ( sy-linsz / 2 ) - ( STRLEN( lv_title ) / 2 ).
lv_coco_pos = sy-linsz - 20.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE: / 'Ingram Micro',
AT lv_title_pos lv_title,
AT lv_coco_pos 'Company Confidential'.
Setup data correctly in the correct format for the display fields.
lv_page = sy-pagno.
SHIFT lv_page LEFT DELETING LEADING ' '.
CONCATENATE sy-datum6(2) sy-datum4(2) sy-datum+0(4)
INTO lv_date SEPARATED BY '.'.
CONCATENATE sy-uzeit0(2) ':' sy-uzeit2(2) INTO lv_time.
CONCATENATE lv_date lv_time INTO lv_date SEPARATED BY ' '.
CONCATENATE 'Page' lv_page INTO lv_page_no SEPARATED BY ' '.
Decide on positioning of text depending on width of page.
lv_page_pos = sy-linsz - ( STRLEN( lv_page_no ) ).
WRITE: / lv_date,
AT lv_page_pos lv_page_no.
ULINE.
ENDFORM. " TOP_OF_PAGE
FORM END_OF_PAGE *
Subroutine attached as callback form to ABAP List Viewer *
FORM end_of_page.
ENDFORM. " END_OF_PAGE
Form ALV_VARIANT_EXISTENCE
Reads ALV variant definition
FORM alv_variant_existence USING iv_variant LIKE disvariant-variant
CHANGING os_variant LIKE disvariant.
CHECK NOT iv_variant IS INITIAL.
os_variant-report = sy-repid.
os_variant-variant = iv_variant.
IF iv_variant CP '/*'. "user-specific variants begin with slash
os_variant-username = sy-uname.
ENDIF.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = os_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e001(z9) WITH 'Please select a valid display variant.'.
ENDIF.
ENDFORM. " ALV_VARIANT_EXISTENCE
FORM ALV_VARIANT_F4 *
Display list of layout variants on report selection screen *
FORM alv_variant_f4 CHANGING cv_varname LIKE disvariant-variant
cs_variant LIKE disvariant.
DATA: lv_exit(1) TYPE c.
cs_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = cs_variant
i_save = 'A'
it_default_fieldcat =
IMPORTING
e_exit = lv_exit
es_variant = cs_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF lv_exit = space.
cv_varname = cs_variant-variant.
ENDIF.
ENDIF.
here in output. if you will click on material. you can go to other transaction.
also for drill down you can refer one standard program.
DEMO_DYNPRO_DROPDOWN_LISTBOX
regards
Ruchika
reward if useful.
Similar Messages
-
How to add a dropdown box in an alv table ?
this is what i did :
DATA : list_field TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
CREATE OBJECT list_field
EXPORTING selected_key_fieldname = 'COLUMN_ID'.
ls_columns-r_column->set_cell_editor( list_field ).
but how to populate the dropdown box ??Hi Mayaa,
Please use this method.
insert the value u wish to see in dropdown in this table itab_dropdown and call this method.
wa_dropdown-handle = '3'.
wa_dropdown-value = 'abc'.
APPEND wa_dropdown TO itab_dropdown.
CALL METHOD wa_grid->set_drop_down_table
EXPORTING
it_drop_down = itab_dropdown.
Hope this helps........
Regards,
Kunjal -
Dear Expert,
I am new to OOPS ,
I want to display drop down list for a particular field in my output, so I am using OOPS but in my below code
I am facing problem in displaying the output as I am getting the error message
Field catalog not found...
Also advice me how to display drop down list in a particular field.
Please advice
MODULE pbo OUTPUT.
SET PF-STATUS 'ZTEST'.
IF g_custom_container IS INITIAL.
DATA: lt_exclude TYPE ui_functions,
lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
CREATE OBJECT g_custom_container
EXPORTING
container_name = g_container.
CREATE OBJECT g_grid
EXPORTING
i_parent = g_custom_container.
PERFORM field_catalog TABLES it_lvc_t_fcat
USING: 'S_FINAL' 'MATNR' ' ' 'Part Number' ' ' ' ',
'S_FINAL' 'MAKTX' ' ' 'Part Description' ' ' ' ',
'S_FINAL' 'MBLNR' ' ' 'Document No' ' ' ' ',
'S_FINAL' 'BLDAT' ' ' 'Document date' ' ' ' ',
'S_FINAL' 'LIFNR' ' ' 'Vendor Number' ' ' ' ',
'S_FINAL' 'STATUS' ' ' 'Acknowledgement' ' ' 'X',
'S_FINAL' 'REMARKS' ' ' 'Remarks' ' ' 'X'.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
* I_STRUCTURE_NAME =
is_layout = it_lvc_s_layo
CHANGING
it_outtab = i_final
it_fieldcatalog = it_lvc_t_fcat
ENDIF.
ENDMODULE. " PBO OUTPUT
FORM field_catalog TABLES t_field_catalog STRUCTURE wt_lvc_s_fcat
USING fp_tabname TYPE any
fp_fieldname TYPE any
fp_key TYPE any
fp_text TYPE any
fp_do_sum TYPE any
fp_edit TYPE any.
t_field_catalog-tabname = fp_tabname.
t_field_catalog-fieldname = fp_fieldname.
t_field_catalog-key = fp_key.
t_field_catalog-seltext = fp_text.
t_field_catalog-do_sum = fp_do_sum .
t_field_catalog-edit = fp_edit .
ENDFORM. "field_catalog
Edited by: Karthik R on Mar 15, 2010 6:11 PMHi Karthik,
Below mentioned is a Simple code for creating dropdown lists for columns in ALV grid output
REPORT z_alv_dropdown.
*Type pools declarations for ALV
TYPE-POOLS : slis.
*data declarations for ALV container, ALV grid, Field catalogues & layout
DATA: g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.
*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
wa_outtab TYPE t517a.
*initialisation event
INITIALIZATION.
*Start of selection event
START-OF-SELECTION.
*Call to ALV
CALL SCREEN 600.
*On this statement double click it takes you to the screen painter SE51.
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen , Here we can give a title and customized menus
Here we also call the subroutine for ALV output.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
set pf-status 'xxx'.
set titlebar 'MAIN100'.
Subroutine to display the output in alv
PERFORM alv_output.
ENDMODULE. "pbo OUTPUT
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes and
based on the user command we can do the coding.
MODULE PAI INPUT *
MODULE pai INPUT.
ENDMODULE. "pai INPUT
*& Form BUILD_FIELDCAT
FORM build_fieldcat.
DATA ls_fcat TYPE lvc_s_fcat.
*Build the field catalogue
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'T517A'
CHANGING
ct_fieldcat = gt_fieldcat.
To assign dropdown in the fieldcataogue
LOOP AT gt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'SLART'.
*drdn-hndl = '1' is the first list box
ls_fcat-drdn_hndl = '1'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
*drdn-hndl = '2' is the second list box
WHEN 'ABART'.
ls_fcat-drdn_hndl = '2'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
ENDCASE.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form ALV_OUTPUT
FORM alv_output .
*Create object for container
CREATE OBJECT g_custom_container
EXPORTING container_name = 'CCONT'.
*create object for grid
CREATE OBJECT g_grid
EXPORTING i_parent = g_custom_container.
Build fieldcat and set column
*Assign a handle for the dropdown listbox.
PERFORM build_fieldcat.
*Build layout
PERFORM build_layout.
Define a drop down table.
PERFORM dropdown_table.
*fetch values from the T517A table
SELECT * FROM t517a INTO TABLE gt_outtab.
*Display ALV output
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab.
ENDFORM. "ALV_OUTPUT
*& Form dropdown_table
text
--> p1 text
<-- p2 text
FORM dropdown_table.
*Declarations for drop down lists in ALV.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
First SLART listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = '01 Pink'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '02 Yellow'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '03 Green'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '04 Black'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '05 White'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '06 Blue'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '09 Other Colors'.
APPEND ls_dropdown TO lt_dropdown.
*method to display the dropdown in ALV
CALL METHOD g_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " dropdown_table
*& Form build_layout
text
*layout for ALV output
FORM build_layout .
gs_layout-cwidth_opt = 'X'.
gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
gs_layout-no_toolbar = 'X'.
ENDFORM. " build_layout
Hope it is helpful,
Regards,
Soundarya. -
Hello Friends,
I have developed a SAP QUERY using SQ01, SQ02, SQ03. It displays an ALV output.
Now for some particular fields, I want a drop down box in the output ALV. Since in SAP QUERY output alv and final table runs at runtime I am not able to put any of two options I have i.e. VRM_SET_VALUES or DROP_DOWN_HANDLE.
Can you suggest me the way with which I can display a drop down in the output ALV.
Please revert if the questions seems confusing.
Thanks,
HarjeetDear Sai,
The Data provider should be the same which is being used by the table and more over you have an option of Read mode over there to display the values in the report based on the Dimension Table values or Posted values or Master data table values.
Moreover in the specific properties panel of the Drop down, you need to mention on which characteristic you want the drop down box.
Post back if your issue doest resolve.
Cheers
Gattu -
How to get ALL values as default for a drop down box in JSF
Hi,
I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
Could any body help me? Any help must be appreciated.
Thanks,
AseetThanks Nikhil. But I am fetching the values from the LOVCache.java.
I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
I mean to say can I write
unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
where LOVCache.entityTypeSelectionList is used to populate the drop down box.
Regards,
Aseet -
HELP!!! Can anyone please provide some guidance on how to create a dynamic form where selected text boxes appears, based on options chosen in a drop-down box.
I have a form which – based on the department that's selected from a drop-down box – will have different form fields/text boxes, etc, made available.
Is this possible in LiveCycle, if so, can you please provide the script/info - as needed.
Thanks,In the preOpen event of the second dropdown list you put something like (in formCalc):
if (dropdown1 == 1) then
$.clearItems()
$.setItems("Year, 2 Year, 3 Year")
elseif (dropdown1 == 2) then
$.clearItems()
$.setItems("3 Year, 4 Year")
endif -
Hebrew fonts from drop-down box not displaying in text box.
I am using InDesign CS 5.5 on a Mac 10.8.4.
When in ID, the fonts I am seeing on the Font dropdown menu when I try to use in a text box are not displaying correctly. They only display as boxes. The fonts are in the Hebrew language. They are properly installed in the FontBook.
Please help!! Thank you.Reema,
I followed most of your steps. I have a question reg. step 3 ie populating data in node 1.
Here is my code:
method WDDOINIT .
types: begin of zs,
zktokd type kna1-ktokd,
end of zs.
data: handle1 type ref to if_wd_context_node,
begin of zstruct,
zktokd type kna1-ktokd,
end of zstruct,
zitab type table of zs.
handle1 = wd_context->get_child_node( name = 'NODE1' ).
*select ktokd into corresponding fields of zstruct from kna1.
*append zstruct to zitab.
*endselect.
zstruct-zktokd = 'Sold-to party'.
append zstruct to zitab.
zstruct-zktokd = 'Goods recipient'.
append zstruct to zitab.
zstruct-zktokd = 'Payer'.
append zstruct to zitab.
zstruct-zktokd = 'Bill-to party'.
append zstruct to zitab.
zstruct-zktokd = 'Prospective Customer'.
append zstruct to zitab.
zstruct-zktokd = 'Competitor'.
append zstruct to zitab.
zstruct-zktokd = 'Sales partners'.
append zstruct to zitab.
zstruct-zktokd = 'Hierarchy Node'.
append zstruct to zitab.
zstruct-zktokd = 'Named List of Accounts'.
append zstruct to zitab.
zstruct-zktokd = 'Distribution center'.
append zstruct to zitab.
zstruct-zktokd = 'Payer'.
append zstruct to zitab.
handle1->bind_table( new_items = zitab ).
endmethod.
Please let me know if this is the best way to populate the node and then bind the table values from the node to the drop down box.
Thanks and Regards. -
How to get values from a multiple drop-down box.
On my first page, I have a multiple drop-down box as the following code.
<select name="selInterMethod" class="textbox" multiple>
<option selected value="CH">Chicago</option>
<option value="NY">New York</option>
<option value="SF">San Francisco</option>
</select>
On my second transaction page, I need to save "CH-NY" into my Database column: city if the user selected Chicago and New York.
How can I accomplish this in JSP?
Thanks for your help.I figured out the solution. Here it is. FYI
String inter_method = "";
String Inter_Method[]=request.getParameterValues("selInterMethod");
if( Inter_Method.length > 0 ) {
for (int i = 0; i < Inter_Method.length; i++) {
inter_method = inter_method + '-' +Inter_Method;
inter_method = inter_method.substring(1,inter_method.length());
System.out.println("trx inter_method = " + inter_method); -
How to show the selected item in a drop-down box......
hi,
i m using the following code for selecting from the drop-down box...
<html:select property="lddate" style="width:160">
<html:options collection="load_dt" name="AlmCurrencyRiskAnalysisBO" property="load_dt" labelProperty="load_dt"/>
</html:select>
but what happng when i m select any date from the dropdown box it does not show that date. it only shows the last entry date in the load_dt arraylist.
i m trying to implement this on a jsp page..can anyone plz tell me what shuld i do to show selected date...plzz help..its vry urgent.........Vini,
He seems to be using Struts not ADF Faces.
Seems, you have given list to to property and labelProperty, Can you re-check these properties?
Sireesha -
How to get th selected value of a Drop Down Box
hi,
i have a drop down box with two items. each item contains a text and a value.
i tried to get the actual value of a dropdown box but i get the value of the first item.
in the change event of a dropdown box i entered the following code:
app.alert(this.boundItem("text of an item"));
this messagebox shows everytime the value of fist item in my drop down box.
any idea?
thanksMake sure you use xfa.event.change to get the correct value from the change event on the drop-down listbox
I have the following
xfa.host.messageBox("Data Value is " + this.boundItem(xfa.event.change));
on the change event (javascript) of a dropdown list box and it returns me the correct value -
How can we get a value in a drop down box without refreshing the page
In my application i am having 14 drop down boxes. On selcting a particular value in a drop down box i am doing its corresponding functionality. I would like to get these values without refreshing the page each and every time i select a text box, Is it possible to get these values without refreshing the page each and every time.
RaghuThere is a new hype going on called AJAX. It is either that, or dumping a lot of information in javascript arrays and reading the information from there when you make selections. I would choose AJAX.
-
How to create a drop down box and text box in screen painter?
Hi i am totally new to this concept of screen painter..please can any tell me
how to create drop down box in screen painter?
How to create or display default date and time values?
How to create text box for giving comments?
How to store the records that we are entering in a table?
Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.Hi,
Check all these.
1.how to create drop down box in screen painter?
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).
6.
The following code should be written under PROCESS BEFORE EVENT in the MODULE.
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.
2.1.How to create or display default date and time values?
1.
create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
2.
Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
3.How to create text box for giving comments?
1.
Define one variable in the TOP include with type STRING means Global variable.
2.
Create one input field by giving screen field name which u have defined in the above step.
4.How to store the records that we are entering in a table?
For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
Check the following steps to handle Table control.
1).
U should take one variable in your internal table or in structure which
is used for table control fields
ex :
data :
begin of itab occurs 0 ,
mark type c , "This is to select the record.
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .
Controls: TABC types TABLEVIEW using screen 100.
2).
This mark variable should be given in Table control properties.
follow the path
double click on the table control-->attributes .->select
w/SelColumn and in that itab-mark. Check in the figure.
[Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
3).
After that. Take this example.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL tabc
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.
In this Module read_table_control, You should write the following code
MODULE read_table_control INPUT.
MODIFY itab INDEX tabc-current_line."( This will update the
"ITAB table MARK field with 'X ' whatever we have selected
"on table control.)
ENDMODULE.
4)
If you want to Delete some of the records from Table control
follow this code Create one pushbutton and give Fucnction code to that
and write below code
CASE OKCODE.
WHEN 'CREATE'.
LOOP AT itab WHERE mark = 'X'.
"Use UPDATE statement to create new record.
ENDLOOP.
ENDCASE.
I hope that you will get something.
Regards,
Venkat.O -
Fetching values from database into a drop down box
in my JSP page there are 3 drop down boxes for date of birth......
what i need is i want to get the values from database into that drop down box when i access the JSP page.......
session is there....'m getting all other values.......
I will attach the JSP page.....
Please help me...........
Thanks in Advance......
<%@ taglib uri='/WEB-INF/taglib/struts-bean.tld' prefix='bean'%>
<%@ taglib uri='/WEB-INF/taglib/struts-logic.tld' prefix='logic'%>
<%@ taglib uri='/WEB-INF/taglib/dyna.tld' prefix='dyna'%>
<%@ taglib uri='/WEB-INF/taglib/struts-html.tld' prefix='html'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><bean:message key="page_title"/></title>
<link href="<bean:message key="context"/>/CSS/default.css" rel="stylesheet" type="text/css" />
<script src="<bean:message key="context"/>/js/AC_RunActiveContent.js" type="text/javascript"></script>
<link href="<bean:message key="context"/>/CSS/screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%!
Membership mShip = null;
%>
<script language="javascript" >
function checkDate(Form){
var d;
d = Form.year.value+"-"+Form.month.value+"-"+Form.day.value;
alert("Date is:"+d);
Form.dob.value = d;
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<jsp:include flush="true" page="../templates/header.jsp"/> </td>
</tr>
<tr>
<td class="menuTD">
<jsp:include flush="true" page="../templates/menu.jsp"/> </td>
</tr>
<tr>
<td class="sub_menuTR"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="column" valign="top" width="170"><jsp:include flush="true" page="../templates/left_panel.jsp"/></td>
<td valign="top" align="left">
<dyna:message error="error" warning="warning" message="message"/>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" valign="top" align="left">
<%
if(session != null){
mShip = (Membership)session.getAttribute("member");
%>
<form action="updateContactDetails.dy" method="post" name="form1">
<input type="hidden" name="m" value="<%=request.getParameter("m")%>" />
<table width="100%" border="0">
<tr>
<td>First Name</td>
<td><input name="first_name" type="text" id= "first_name" value = "<bean:write name = "member" property = "first_name" />" /></td>
</tr>
<tr>
<td>Last Name </td>
<td><input name="last_name" type="text" id="last_name" value = "<bean:write name = "member" property = "last_name" />" > </td>
</tr>
<tr>
<td>Address</td>
<td><input name="address1" type="text" id="address1" value = "<bean:write name = "member" property = "address1" />" ></td>
</tr>
<tr>
<td> </td>
<td><input name="address2" type="text" id="address2" value = "<bean:write name = "member" property = "address2" />" ></td>
</tr>
<tr>
<td>Suburb/City </td>
<td><input name="city" type="text" id="city" value= "<bean:write name = "member" property = "city" />" ></td>
</tr>
<tr>
<td>State/Territory</td>
<td><input type="text" name="state" value = "<bean:write name = "member" property = "state" />" ></td>
</tr>
<tr>
<td>Postcode</td>
<td><input type="text" name="postcode" value = "<bean:write name = "member" property = "postcode" />" ></td>
</tr>
<tr>
<td>Contact Phone</td>
<td><input type="text" name="home_phone" value = "<bean:write name = "member" property = "home_phone" />" ></td>
</tr>
<tr>
<td>Mobile</td>
<td><input type="text" name="mobile" value = "<bean:write name = "member" property = "mobile" />" ></td>
</tr>
<tr>
<td>Date of birth</td>
<td nowrap="nowrap"><select name="day">
<option>Day</option>
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="month">
<option>Month</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">Decembber</option>
</select>
<select name="year" onChange = "checkDate(this.form);" >
<option>Year</option>
<option value="1957">1957</option>
<option value="1956">1956</option>
<option value="1955">1955</option>
<option value="1954">1954</option>
<option value="1955">1955</option>
<option value="1956">1956</option>
<option value="1957">1957</option>
<option value="1958">1958</option>
<option value="1959">1959</option>
<option value="1960">1960</option>
<option value="1961">1961</option>
<option value="1962">1962</option>
<option value="1963">1963</option>
<option value="1964">1964</option>
<option value="1965">1965</option>
<option value="1966">1966</option>
<option value="1967">1967</option>
<option value="1968">1968</option>
<option value="1969">1969</option>
<option value="1970">1970</option>
<option value="1971">1971</option>
<option value="1972">1972</option>
<option value="1973">1973</option>
<option value="1974">1974</option>
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
<option value="2003">2003</option>
<option value="2004">2004</option>
<option value="2005">2005</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
</select ></td></tr>
<tr>
<td><input type="hidden" name = "dob" /> </td>
<td nowrap="nowrap"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
</td>
<td width="40"></td>
<td width="200" valign="top">
<div id="headlines">
<jsp:include flush="true" page="../templates/profile.jsp"/>
</div>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td><jsp:include flush="true" page="../templates/footer.jsp"/></td>
</tr>
</table>
</body>
</html>i think normally u will get data from databsae as objects.they are like java beans having getter and setter methods.so you create a collection of those objects like collect all the objects coming from database into an arraylist or....
suppose you want to populate the dropdown box with say "username" from database object s, your code will look like that
<html:select property="name">
<html:options collection="databaseList" property="username" />
</html:select>
"databaseList" is collection(say.. ArrayList) of objects you are getting from database.this dropdown will contain all the "usernames" you are getting from database. -
How to create a drop down box values on design time?
Hello,
I have a drop down box that I would like to edit on design time to have the valus 1 to 10.
Is it possible to doo it on design it or do I have to create a loop in the code to do that?See go to LocalDictionary->Data Type-> SimpleType Right Click and create a Simple Type giving some Package Name
Once u have created
There u will see Enumeration Tab and give Key Value Pairs by pressing New Button
Now Create a Context Attr and at Type property select that three dots
Then go to Dictionary Simple Type and select the Package u have given
then select the Simple type u have created
Then assign the context Attr to the UI Element
Message was edited by: krish kanth -
How can I remove a mailbox address from the "From" drop down box in a new e-mail my old e-mail address continue to populate as the sender address
Hello,
Try Mail>Preferences>Accounts icon>Account Information tab>Click on the Outgoing SMTP server drop down, choose edit Server list, highlight the old one & click Remove.
(Such convolution is worthy of Windows® in my estimation)
Maybe you are looking for
-
My 160gb classic Keeps freezing every so often on some songs
Could any one help me out some times when i hit play on a song(all songs are cd rips that it does it on), the song willeither take a good 30 seconds to one minute to work or my i pod will freeze, have tried restoring but still happens after restorati
-
PO - Change Condition pricing date
Can we change Condition pricing date in PO.If Yes , then How?? Thanx, Viru
-
Discoverer 10g Limitations....
Hi, Is there any document or can you give me some info about Discoverer 10g limitations.... such as the maximum folders per business areas , hierarchies.... e.t.c. Regards, Simon
-
VM live migration during OVM server upgrade
Hi Guys, I'm planning to upgrade OVM 3.1.1 to 3.2.7. There are 4 OVM Servers in server pool and all is using the same CPU family which means the live migration is possible. I just wondering if I upgrade one OVM server to 3.2.7 first and then is it st
-
Veritas vs Sun Disk Mgmt. regarding DG portability.
Veritas allows Disk groups to be moved between hosts. Is this feature available in Sun's native suite? If so, has anyone deployed this in production and what is your feelings about it. If we run SUN's native disk mgmtm suite we can save thousands of