Struts and Dynamic Fields of a Form

Hi all,
There's a form in a struts based web-application in which some fields will be made according to some variable parameters. I mean number of those text type fields may vary.
Any idea for building ActionForm class such that fields of that formBean be set automatically? I tried following solution :
<input type="text" name="varName" value="aaa" >
<input type="text" name="varName" value="bbb" >
<input type="text" name="varName" value="ccc" >
class MyForm extends ..... {
private String varName[];
public String[] getVarName() {}
public void setVarName(String[] varName) {
this.varName = varName;
In this case I am able to retrieve correct values in the Action Class. But when the form is populated with the values, it is not showing correct results. The reason behind this is I am unable to bind first text box with varName[0] and second with varName[1]. Please suggest solution.
Thanks and regards,
Sneha

Why don't you create the text boxes dynamically in the jsp?
<logic:iterate id="beanArray" name="yourBean">
<input type="text" name='<bean:write name="beanArray" property="beanName"/>' value='<bean:write name="beanArray" property="beanName"/>'>
</logic:iterate>

Similar Messages

  • How to capture the dynamic fields in the form...urgent...Please help me

    Hi Gurus,
    I'm working on Adobe Interactive form developed in WDP ABAP. I have a dynamic field called Roles. User can give n number of roles as Input. How can I capture them in my WDP. I know how to capture if there is a fixed field like name, age, email id etc.. Please give me the detail explaination on this.

    hi,
    when you create a form, the UI elements are created by either directlly dragging and dropping the context elements or map form elements with context elements.
    when pdf is online its contents are reflected in the Context Attributes.
    so if you change/modify the Context Attributes, the change is reflected in the corresponding form fields.
    regards,
    -amol gupta

  • Dynamic fields in PDF form

    Hello Experts,
                           I have a requirement to design all fields in a form dynamically..!
    It means if the user selects speific fields in a custom config, the form should be genarated with only those fields.
    I know it can be done placing fields at design time and then hiding it later.. but I am looking for dynamic fields creation and position and setting its properties dynamically.
    Thanx for Ur time.. !

    hi,
    Did you try creating a composite form ?? The sap.help link to creating Dynamic forms is give below
    [link|http://help.sap.com/saphelp_nwce10/helpdata/en/44/bca11fc60b7006e10000000a155369/content.htm]
    Hope this helps
    Regards
    Manthan.

  • Dynamic internal table and dynamic field catalog

    hi
    i need to decide the number of fields of the internal table at runtime
    and then need to pass value to this internal table.
    then i need to create the field catalog for this internal table (so here
    field catalog is also dynamic) to display in alv.
    how to achieve this dynamic internal table creation and dyanmic field catalog generation

    Hi Ajay,
      U can use the below code to create a dynamic internal table.
    *adding the field names only once for the dynamic table     .
          MOVE 'PRCTR' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
          MOVE 'RCNTR' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
          MOVE 'RACCT' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
          MOVE 'RYEAR' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
          MOVE 'YTDBAL' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
          MOVE 'OBAL' TO gw_component-name.
          gw_component-type ?= cl_abap_elemdescr=>get_string( ).
          INSERT gw_component INTO TABLE gt_components.
    *get structure descriptor -> GR_STRUCTDESCR
              gr_structdescr ?= cl_abap_structdescr=>create( gt_components ).
    create work area of structure GR_STRUCTDESCR -> GR_WA
              CREATE DATA gr_wa TYPE HANDLE gr_structdescr.
              ASSIGN gr_wa->* TO <gw_wa>.
    determine key components -> GT_KEYS
              MOVE lv_value1 TO gw_key-name.
              INSERT gw_key INTO TABLE gt_keys.
    create descriptor for internal table -> GR_TABLEDESCR
              gr_tabledescr ?= cl_abap_tabledescr=>create( p_line_type  = gr_structdescr
                                                           p_table_kind = cl_abap_tabledescr=>tablekind_hashed
                                                           p_unique     = abap_true
                                                           p_key        = gt_keys
                                                           p_key_kind   = cl_abap_tabledescr=>keydefkind_user ).
    create internal table -> GR_ITAB
              CREATE DATA gr_itab TYPE HANDLE gr_tabledescr.
              ASSIGN gr_itab->* TO <gt_itab>.
              CREATE DATA gr_itab LIKE STANDARD TABLE OF <gw_wa>.
              ASSIGN gr_itab->* TO <gt_sttab>.
    Now u r internal table named <gt_sttab> has been created with fields like RCNTR, PRCTR,RACCT, RYEAR etc whatever the field u need u can go ahead and create dynamically.
    then by using the table <gt_sttab> u can create u r field catalog.
    Regards,
    Rose.

  • Creating dynamic field in the form

    Hi,
    How to create a dynamic block?
    The item in the block could be autochanged with the changing of
    table's field.
    I don't want to rebuild the form.
    Thanks!

    You can base a block on a from clause.
    SO base your block on something like
    select ename a, deptno b from emp;
    define 2 fields in the block a and b.
    Now you can use set_block_property to change the underlying SQL
    for example select dname a ,loc b from dept.

  • ALV and dynamic fields

    Hallo colleagues,
    I have to create a dynamic structure and show it within an ALV.
    Therefore I have created my stuctrure like this:
      MOVE 'COMP1' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>get_string( ).
      INSERT gw_component INTO TABLE gt_components.
      MOVE 'COMP2' TO gw_component-name.
      gw_component-type ?= cl_abap_elemdescr=>get_i( ).
      INSERT gw_component INTO TABLE gt_components.
    get structure descriptor -> GR_STRUCTDESCR
      gr_structdescr ?= cl_abap_structdescr=>create( gt_components ).
    create work area of structure GR_STRUCTDESCR -> GR_WA
      CREATE DATA gr_wa TYPE HANDLE gr_structdescr.
      ASSIGN gr_wa->* TO <gw_wa>.
    So now I have my dynamic structure, but how i can create a field catalog, which fit into the function module 'REUSE_ALV_FIELDCATALOG_MERGE' and 'REUSE_ALV_LIST_DISPLAY'?
    Any help?
    Thanks in advance
    Irian

    Hi,
    REPORT zmtable LINE-SIZE 255
                   LINE-COUNT 65.
    Program written by Vijay Chaitanya Raju
    Maintain Table dynamicly (Table name is entered on Selection Screen)
    Very powerfull program. Please maintain authorisation access and
    restrict maintenance to Z-tables
    Version 6.20 and up
    (can be used in 4.6C with some modifications to block try - endtry
    and classes)
    Enhanced functionality with dynamic selection screen
    TABLES: sscrfields.                "Fields on selection screens
    TYPE-POOLS rsds.
    DATA ds_clauses TYPE rsds_where.
    DATA: BEGIN OF ifield OCCURS 0,
          fieldname LIKE dd03l-fieldname,
          position  LIKE dd03l-position,
          keyflag   LIKE dd03l-keyflag,
          datatype  LIKE dd03l-datatype.
    DATA: END OF ifield.
    DATA: sl_step    LIKE sy-tabix,
          ss_step    LIKE sy-subrc,
          ss_act(1)  TYPE c,
          sl_lines   LIKE sy-tfill,
          sl_status  LIKE sy-subrc,
          sl_subrc   LIKE sy-subrc,
          sl_update(1) TYPE c,
          sl_mandt(1)  TYPE c,
          len(6)       TYPE n,
          f_value(255) TYPE c,
          sl_datum     LIKE sy-datum,
          sl_uzeit     LIKE sy-uzeit,
          price1(15)   TYPE c,
          price2(15)   TYPE c,
          mess(60)     TYPE c,
          d_stat   LIKE sy-subrc,
          m_stat   LIKE sy-subrc,
          slchar(6) TYPE c.
    DATA: ref_ptr TYPE REF TO cx_root.      "Root class more common
    DATA: text TYPE string.
    DATA: sl_index LIKE sy-tabix.
    DATA: zauth LIKE dd02l-tabname.
    DATA: num TYPE i,
          max_len TYPE i,
          check_len TYPE i,
          sl_sel(1) TYPE c.
    TYPE-POOLS: icon.
    SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF LINE.
    text-012 - 'Table Name'
    SELECTION-SCREEN COMMENT 1(25) text-012.
    PARAMETERS: tabname LIKE dd02l-tabname DEFAULT 'ZSCARE'.
    text-003 - 'Selection'
    SELECTION-SCREEN PUSHBUTTON 75(9) text-003 USER-COMMAND sta1.
    SELECTION-SCREEN END OF LINE.
    numrows(text) - 'Max Number of ROWS'
    PARAMETERS: numrows LIKE sy-subrc DEFAULT '100'.
    At Selection-Screen                                                 *
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        WHEN 'STA1'.
          CLEAR sl_sel.
          CALL FUNCTION 'ZSTAN_SELECTIONS'
            EXPORTING
              tabname         = tabname
            IMPORTING
              ds_clauses      = ds_clauses
            EXCEPTIONS
              table_not_valid = 1
              other_error     = 2
              OTHERS          = 3.
          IF sy-subrc = 0.
            sl_sel = 'X'.
          ENDIF.
      ENDCASE.
    *At Selection-Screen Output                                            *
    AT SELECTION-SCREEN OUTPUT.
      SELECT SINGLE tabname
        INTO tabname
        FROM dd02l
        WHERE tabname  = tabname
          AND as4local = 'A'
          AND ( tabclass = 'TRANSP' OR tabclass = 'POOL'
                OR tabclass = 'CLUSTER' ).
      IF sy-subrc <> 0.
        MESSAGE 'Table is not valid' TYPE 'S'.
        RETURN.
      ENDIF.
    START-OF-SELECTION.
    START-OF-SELECTION.
      DEFINE: acheck.
        zauth = 'ZTABAUTH'.
        select single statu
          into sl_update
          from (zauth)
          where tabname = tabname
            and bname   = sy-uname.
        if sy-subrc <> 0.
          message 'You are not authorized to view this table' type 'S'.
          return.
        endif.
      END-OF-DEFINITION.
      SELECT SINGLE tabname
        INTO tabname
        FROM dd02l
        WHERE tabname  = tabname
          AND as4local = 'A'
          AND ( tabclass = 'TRANSP' OR tabclass = 'POOL'
                OR tabclass = 'CLUSTER' ).
      IF sy-subrc <> 0.
        MESSAGE 'Table is not valid' TYPE 'S'.
        RETURN.
      ENDIF.
      DATA: ptr_itab TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itab> TYPE STANDARD TABLE. "ANY TABLE.
      CREATE DATA ptr_itab TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itab->* TO <fs_itab>.
    For DELETION
      DATA: ptr_itd TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itd> TYPE STANDARD TABLE.
      CREATE DATA ptr_itd TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itd->* TO <fs_itd>.
    For MODIFICATION
      DATA: ptr_itm TYPE REF TO data.
      FIELD-SYMBOLS: <fs_itm> TYPE STANDARD TABLE.
      CREATE DATA ptr_itm TYPE STANDARD TABLE OF (tabname).
      ASSIGN ptr_itm->* TO <fs_itm>.
      DATA: ptr_wtab TYPE REF TO data.
      FIELD-SYMBOLS: <fs_wtab> TYPE ANY.
      CREATE DATA ptr_wtab TYPE (tabname).
      ASSIGN ptr_wtab->* TO <fs_wtab>.
      DATA: itabname(15) TYPE c.
      itabname = '<fs_wtab>'.
    Standard list status with 'SAVE' button
      SET PF-STATUS 'STLI'.
      CLEAR sl_update.
    Maintain authorisation access in table ZTABAUTH
    Key fields:  tabname - Table name
                 bname   = sy-uname - User name
                 statu   = 'X' - maintain
                           ' ' - view
    Check authorisation access
      acheck.
      SELECT fieldname position keyflag datatype
        INTO TABLE ifield
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
        ORDER BY position.
      FIELD-SYMBOLS: <f1> TYPE ANY.
      DATA: tab_field(60) TYPE c,
            sline LIKE sy-lisel.
      DATA: field_attr LIKE dfies.
      DATA: BEGIN OF tfield_attr OCCURS 0.
              INCLUDE STRUCTURE field_attr.
      DATA: END OF tfield_attr.
      LOOP AT ifield.
        CALL FUNCTION 'G_FIELD_READ'
          EXPORTING
            table      = tabname
            fieldname  = ifield-fieldname
            text_flag  = 'X'
          IMPORTING
            field_attr = field_attr.
        tfield_attr = field_attr.
        APPEND tfield_attr.
      ENDLOOP.
      IF sl_sel = 'X'.
        SELECT *
          FROM (tabname)
          INTO TABLE <fs_itab> UP TO numrows ROWS
          WHERE (ds_clauses-where_tab).
      ELSE.
        SELECT *
          FROM (tabname)
          INTO TABLE <fs_itab> UP TO numrows ROWS.
      ENDIF.
      DESCRIBE TABLE <fs_itab> LINES sl_lines.
    Show two extra lines to allow addition up to 2 new lines
      IF sl_update = 'X'.
        DO 2 TIMES.
          APPEND INITIAL LINE TO <fs_itab>.
        ENDDO.
      ENDIF.
      DATA: info(22) VALUE 'D - Delete, M - Modify'.
      WRITE: / icon_information AS ICON QUICKINFO info.
      WRITE ' '.
      CLEAR check_len.
      LOOP AT tfield_attr.
        IF tfield_attr-datatype = 'CLNT'.
          CONTINUE.
        ENDIF.
        len = tfield_attr-outputlen.
        IF tfield_attr-keyflag = 'X'.
          check_len = check_len + len + 1.
        ENDIF.
        IF tfield_attr-scrtext_m IS NOT INITIAL.
          WRITE: AT (len) tfield_attr-scrtext_m COLOR 1.
        ELSE.
          WRITE: AT (len) tfield_attr-fieldtext COLOR 1.
        ENDIF.
      ENDLOOP.
      CLEAR ss_step.
      CLEAR ss_act.
      LOOP AT <fs_itab> INTO <fs_wtab>.
        IF sy-tabix LE sl_lines.
          ss_step = 1.
        ELSE.
          CLEAR ss_step.
        ENDIF.
    In field SS_STEP put D -  to delete record
                         M -  to modify/add new record
        IF sl_update = 'X'.
          WRITE:/ icon_change AS ICON.
          IF ss_step = 1.
            WRITE:  ss_act INPUT ON.
          ELSE.
            ss_act = 'M'.
            WRITE:  ss_act.
            CLEAR ss_act.
          ENDIF.
        ELSE.
          WRITE:/ icon_display AS ICON.
          WRITE:  ss_act COLOR 2.
        ENDIF.
        LOOP AT ifield.
    Maintain client dependant tables in the same client
          IF ifield-datatype = 'CLNT'.
            sl_mandt = 'X'.
            CONTINUE.
          ENDIF.
          CONCATENATE itabname '-' ifield-fieldname INTO tab_field.
          ASSIGN (tab_field) TO <f1>.
          IF sl_update = 'X'.
            IF ifield-keyflag = 'X' AND ss_step IS NOT INITIAL.
              WRITE: <f1> COLOR 4.
            ELSE.
              WRITE: <f1> INPUT ON.
            ENDIF.
          ELSE.
            IF ifield-keyflag = 'X' AND ss_step IS NOT INITIAL.
              WRITE: <f1> COLOR 4.
            ELSE.
              WRITE: <f1> COLOR 2.
            ENDIF.
          ENDIF.
          UNASSIGN <f1>.
        ENDLOOP.
      ENDLOOP.
    END-OF-SELECTION.
    END-OF-SELECTION.
    AT USER-COMMAND.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'SAVE'.
          IF sl_update = 'X'.
            CLEAR: sl_step,
                   sl_status,
                   sl_subrc,
                   <fs_wtab>,
                   d_stat,
                   m_stat,
                   max_len.
            REFRESH <fs_itd>.
            REFRESH <fs_itm>.
            DO.
              IF sl_status <> 0.
                EXIT.
              ENDIF.
              ADD 1 TO sl_step.
              IF sl_subrc <> 0.
                EXIT.
              ENDIF.
              CLEAR ss_step.
              CLEAR ss_act.
              READ LINE sl_step
                   FIELD VALUE ss_act INTO f_value.
              sl_subrc = sy-subrc.
              IF f_value(1) EQ 'D' OR f_value(1) = 'd'.
                ss_step = 1.  "Delete
              ELSEIF f_value(1) EQ 'M' OR f_value(1) = 'm'.
                ss_step = 2.  "Modify
              ELSE.
                CLEAR ss_step.
              ENDIF.
              CHECK sy-lisel(3) = '0Z '.
              IF ss_step GT 0.
                CLEAR sline.
                sline = sy-lisel+5(250).
                max_len = 250.
                CHECK sline(check_len) <> ' '.
                LOOP AT tfield_attr.
                  CONCATENATE itabname '-' tfield_attr-fieldname
                                                  INTO tab_field.
                  ASSIGN (tab_field) TO <f1>.
                  IF tfield_attr-fieldname = 'MANDT'.
                    <f1> = sy-mandt.
                  ELSE.
                    CLEAR f_value.
                    IF max_len LT tfield_attr-outputlen.
                      max_len = 255.
                      ADD 1 TO sl_step.
                      READ LINE sl_step.
                      sline = sy-lisel.
                    ENDIF.
                    f_value = sline(tfield_attr-outputlen).
                    max_len = max_len - tfield_attr-outputlen - 1.
                    IF tfield_attr-inttype = 'D'.
                      IF f_value CO ' 0./-'.
                        CLEAR sl_datum.
                        <f1> = sl_datum.
                      ELSE.
                        CALL FUNCTION 'CONVERT_DATE_INPUT'
                          EXPORTING
                            input                     = f_value
                            plausibility_check        = 'X'
                          IMPORTING
                            output                    = sl_datum
                          EXCEPTIONS
                            plausibility_check_failed = 1
                            wrong_format_in_input     = 2
                            OTHERS                    = 3.
                        IF sy-subrc = 0.
                          <f1> = sl_datum.
                        ELSE.
                          text = 'Invalid Date'.
                          sl_status = 1.
                          EXIT.
                        ENDIF.
                      ENDIF.
                    ELSEIF tfield_attr-inttype = 'T'.
                      IF f_value CO ' 0:'.
                        CLEAR sl_uzeit.
                        <f1> = sl_uzeit.
                      ELSE.
                        CALL FUNCTION 'CONVERT_TIME_INPUT'
                          EXPORTING
                            input                     = f_value
                            plausibility_check        = 'X'
                          IMPORTING
                            output                    = sl_uzeit
                          EXCEPTIONS
                            plausibility_check_failed = 1
                            wrong_format_in_input     = 2
                            OTHERS                    = 3.
                        IF sy-subrc = 0.
                          <f1> = sl_uzeit.
                        ELSE.
                          text = 'Invalid Time'.
                          sl_status = 1.
                          EXIT.
                        ENDIF.
                      ENDIF.
                    ELSEIF tfield_attr-inttype = 'C'.
                      TRANSLATE f_value TO UPPER CASE.
                      <f1> = f_value.
                    ELSE.
                      TRANSLATE f_value USING ', '.
                      CONDENSE f_value NO-GAPS.
                      TRY.
                          <f1> = f_value.
                        CATCH cx_root INTO ref_ptr.
                          text = ref_ptr->get_text( ).
                          sl_status = 1.
                          EXIT.
                      ENDTRY.
                    ENDIF.
                    SHIFT sline BY tfield_attr-outputlen PLACES.
                    SHIFT sline LEFT.
                  ENDIF.
                  UNASSIGN <f1>.
                ENDLOOP.
                IF sl_status = 0.
                  CASE ss_step.
                    WHEN 1.  "Delete
                      ADD 1 TO d_stat.
                      APPEND <fs_wtab> TO <fs_itd>.
                    WHEN 2.  "Modify
                      ADD 1 TO m_stat.
                      APPEND <fs_wtab> TO <fs_itm>.
                  ENDCASE.
                ENDIF.
              ENDIF.
            ENDDO.
            IF sl_status = 0.
              IF d_stat IS NOT INITIAL.
                slchar = d_stat.
                CONCATENATE 'Deleted -' slchar 'record.' INTO text
                  SEPARATED BY space.
                DELETE (tabname) FROM TABLE <fs_itd>.
              ENDIF.
              IF m_stat IS NOT INITIAL.
                slchar = m_stat.
                CONCATENATE text 'Modified -' slchar 'record.' INTO text
                  SEPARATED BY space.
                MODIFY (tabname) FROM TABLE <fs_itm>.
              ENDIF.
              IF d_stat IS INITIAL AND m_stat IS INITIAL.
                MESSAGE 'No changes were done' TYPE 'S'.
              ELSE.
                MESSAGE text TYPE 'S'.
              ENDIF.
              LEAVE.
            ELSE.
              MESSAGE text TYPE 'I'.
              EXIT.
            ENDIF.
          ELSE.
            LEAVE.
          ENDIF.
      ENDCASE.
    *--END--
    Below is Function for a Dynamic Selection Screen
    FUNCTION zstan_selections.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(TABNAME) LIKE  DD02L-TABNAME DEFAULT 'ZSCARE'
    *"  EXPORTING
    *"     VALUE(DS_CLAUSES) TYPE  RSDS_WHERE
    *"  EXCEPTIONS
    *"      TABLE_NOT_VALID
    *"      OTHER_ERROR
      DATA texpr TYPE rsds_texpr.
      DATA twhere TYPE rsds_twhere.
      DATA trange TYPE rsds_trange.
      DATA BEGIN OF qcat.                    "Selections View for
              INCLUDE STRUCTURE rsdsqcat.    "Free Selectoptions
      DATA END OF qcat.
      DATA BEGIN OF tabs OCCURS 10.
              INCLUDE STRUCTURE rsdstabs.
      DATA END   OF tabs.
      DATA BEGIN OF fields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF fields.
      DATA BEGIN OF efields OCCURS 10.
              INCLUDE STRUCTURE rsdsfields.
      DATA END   OF efields.
      DATA selid LIKE rsdynsel-selid.
      DATA actnum LIKE sy-tfill.
      DATA title LIKE sy-title VALUE 'Selection Screen'.
      DATA: maxnum LIKE sy-subrc VALUE '69'.
      CLEAR    tabs.
      tabs-prim_tab = tabname.
      COLLECT  tabs.
      DATA: position LIKE dd03l-position.
      DATA: keyflag  LIKE dd03l-keyflag.
      CLEAR fields.
      fields-tablename = tabname.
      fields-sign      = 'I'.
      DATA: step LIKE sy-subrc.
      SELECT fieldname keyflag position
        INTO (fields-fieldname, keyflag, position)
        FROM dd03l
        WHERE tabname = tabname
          AND fieldname NOT LIKE '.INCLU%'
          AND datatype NE 'CLNT'
        ORDER BY position.
        ADD 1 TO step.
        CHECK step LE maxnum.
        IF keyflag <> 'X'.
          efields = fields.
          APPEND efields.
        ENDIF.
        APPEND fields.
      ENDSELECT.
      IF sy-subrc <> 0.
        RAISE table_not_valid.
      ENDIF.
      CALL FUNCTION 'FREE_SELECTIONS_INIT'
        EXPORTING
          expressions              = texpr
          kind                     = 'F'
        IMPORTING
          selection_id             = selid
          expressions              = texpr
          where_clauses            = twhere
          field_ranges             = trange
          number_of_active_fields  = actnum
        TABLES
          tables_tab               = tabs
          fields_tab               = fields
          fields_not_selected      = efields
        EXCEPTIONS
          fields_incomplete        = 01
          fields_no_join           = 02
          field_not_found          = 03
          no_tables                = 04
          table_not_found          = 05
          expression_not_supported = 06
          incorrect_expression     = 07
          illegal_kind             = 08
          area_not_found           = 09
          inconsistent_area        = 10
          kind_f_no_fields_left    = 11
          kind_f_no_fields         = 12
          too_many_fields          = 13.
      IF sy-subrc = 0.
        CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
          EXPORTING
            selection_id            = selid
            title                   = title
          IMPORTING
            where_clauses           = twhere
            expressions             = texpr
            field_ranges            = trange
            number_of_active_fields = actnum
          TABLES
            fields_tab              = fields
          EXCEPTIONS
            internal_error          = 01
            no_action               = 02
            no_fields_selected      = 03
            no_tables_selected      = 04
            selid_not_found         = 05.
        IF sy-subrc = 0.
          CLEAR ds_clauses.
          MOVE tabname TO ds_clauses-tablename.
          READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
          IF sy-subrc <> 0.
            RAISE other_error.
          ENDIF.
        ELSE.
          RAISE other_error.
        ENDIF.
      ELSE.
        RAISE other_error.
      ENDIF.
    ENDFUNCTION.
    Regards,
    Shiva

  • File upload using Struts and hidden field

    Hi,
    I have seen many examples to upload file using <html:file> tag. But my request is how to upload file using hidden form field and ActionServlet.
    I want to upload image without using Browse button options, through hidden field i will set the image file path and will upload to server using ActionForm.
    Please help me friends to solve this new issue,
    regards,'
    dhaya.

    That's not possible.
    If it was, it would be a huge security hole. What about mailicious websites with hidden field which points to "c:/my documents/passwords.txt" and automatically submits the form using Javascript?
    Consider a signed applet instead. If it is unsigned then you'll get a security popup "Do you trust this software?" anyway.

  • Fixed and dynamic field headings in field catalog

    i have to develop an ALV Report where certain column headings are fixed and other column heading will be changing from time to time.
    is there any method to do so.
    that is i have to show the report for 3 months and the names of months will be changing in due course.
    Waiting for a reply.
    A.Reshma

    hi,
    you have 4 texts
    SELTEXT_L
    SELTEXT_M
    SELTEXT_S
    and   DDIC_TEXT  (not sure about spelling)
    change this text dynamicly with month of your choice.
    Rgds

  • Dynamic graphic in Mail forms

    Hi All,
    I have a mail form which has been created in transaction CRMD_EMAIL. I have been asked to enhance it with a dynamic graphic image.
    There will be uploaded 1 image pr customer in transaction SE78.
    And for each document I must find the corresponding image.
    In normal smartform I can choose between 'Fixed value' and 'Dynamic field value' for graphichs name. And I can see that it works when I create a global variabel eg. 'TESTNAME' and assign it the value '123456'. if I then enter &TESTNAME& as dynamic graphic name, and test print it works fine and prints graphical image 123456.
    But in with the mail forms in CRMD_EMAIL, this is not available. If I enter a variable the field disaperes and in test mode i get the error 'Graphic cannot be displayed' - This is identical to the error I get in smartforms if I enter a name that does not exist.
    Does anybody knows if this is possible to do in mail forms. Or if I can use the smartforms instead of the Mail forms when working with campaigns.
    Best regards
    Dennis Lybecker

    Hi Gregor,
    Thanks for your quick response.
    The document was ment to include a technical drawing regarding the specific installation for the customer/prospect.
    It looks like we are going to include this drawing in a different document, which should be created in smartform.
    If anybody come up with a way to do this - please let us all know.
    Best regards
    Dennis

  • Buttons and text items on oracle forms 6i

    can i create dynamic buttons and text fields on oracle forms 6i.
    i mean when i insert record in database then automatically creat a button on form.
    Regards
    Munawer hussain

    Hi,
    One physical button is enough for a series of "functional buttons" per amount of simultanious visisble buttons. You can change the button prompt at run-time depending on a certain condition. That same condition can also be used when executing the when-button-pressed (wbp) trigger.
    Example:
    suppose you have 2 functions that you want to create buttons for: enter query and execute query. Only 1 button is visible at one time. In design time you create 1 button. In run-time, depending on :system.mode you set the button prompt to "enter query"or "execute query" and in the wbp trigger you write
    begin
    if :system.mode = 'QUERY'
    then
    execute_query;
    else
    enter_query;
    end if;
    end;
    Kind regards
    .

  • Dynamic field in select statment.

    Hello,
    I created a report in which i have two checkboxes in the selection screen. The first checkbox is for the option to bring or not, initial purchase requisitions (BANFN) from EKPO and the second is to bring initial or not, RFQs
    (ANFNR). I want the select statment to have this form:
    select ...
    from ekpo
    into g_table
    where ..
    and dynamic field = " ".
    Can this be done ?
    i tried to put it as a string but it didnt work. (data: dynamic field type string value "EKPO-BANFN")
    P.S i know that it can be by writing the same select code twice.
    I just wonder if this can be done by this way
    \Regards.

    Hey Nick,
    I have more conditions than the one i said before , should all be in the lv_where_clause ?
    check my code.
    DATA: G_CHBFLD type STRING.
    G_CHBFLD = 'P~BANFN = '' " '.
    FORM SELECT_DATA_EKPO_EKKO.
      SELECT  .....
          FROM EKPO AS P INNER JOIN EKKO AS K
            ON PEBELN = KEBELN
              INTO CORRESPONDING FIELDS OF TABLE GT_EKPOEKKO
                WHERE K~EBELN IN S_EBELN
                AND K~AEDAT IN S_AEDAT
                AND K~BSTYP IN S_BSTYP
                and ( G_CHBFLD ) .   -
    > //DEBUGER ")" is not a valid comparison operator. comparison operator.

  • Access 2013: Sum fields on a form suddenly showing up blank

    I have a simple Access database (originally built in 2010, now running 2013). Sometime in the last week or so all of the SUM fields in the database started showing up BLANK (one minute everything was working fine, the next it wasn't, not sure what happened
    in between). Even when I create a new, basic form, I can't seem to get my SUM fields working.
    For example, I have a table where I document number of miles traveled for work purposes, the fields include: TravelDate, ProjectID, Mileage, and Description. Mileage is a Number field, Long Integer. If I create a continuous form, connect it to the table
    (same thing happens if I connect to a query), add a field in the Detail section with
    Mileage as control source and txtMileage as name and a field in the FORM FOOTER that is: =Sum([txtMileage])...the SUM field is empty in
    Form View. And, there are no NULL values in the data set. This is happening across all of my forms and subforms, all SUM fields are now displaying as blank.
    Is it possible that I changed a global Access setting to cause this? A form setting? Any other ideas?
    Thanks!
    Laura

    I had the same sudden issue. But I was able to determine that it involved only one workstation. All the others were fine, as well as a test run on another Win 8 station outside the environment. From there I was able to determine that  a third party
    app had been installed near the time of the problem showing up. I uninstalled it and it immediately was resolved. The app was a C# based tool thought the authors have yet to identify why this caused a problem. My suspicion is that they wrote a 32 bit version
    and this was installed on a 64 bit station, and there is some issue with mso.dll, where I believe the function calls exist for sum. I am testing to see if there are similar function errors in Excel.
    What is noticeable was that Access did not throw a an Error# nor a #name. Just nothing appeared, and when you click on a row, the sum would appear, though it was incorrect.
    In Access 2010 I remember there were some footer field issues in continuous which eventually were patched.
    It was an opportunity to remind my client - do not install anything from any one on the live system without prior testing.

  • Disable header and item fields in VA02

    Hello, good day
    Could you please help me with next issue?
    I need to define how to inactivate some header and item fields in a sales order when VA02 is used, a logic to decide if the field must be desable will be applied, because of that I can't use standar customizing solution.
    I read a lot of threads, but many of them are not answered, and as far as I can see many recommended solutions are refered to similar code that I have now.
    I tried with next user exits:
    To block gray out header and item fields:
    User exit form USER_EXIT_FIELD_MODIFICATION Program: MV45AFZZ
    To gray out pricing grid
    User exit form: USEREXIT_FIELD_MODIFICATION Program: LV69AFZZ
    To gray out partner screens (item, header): No user exit identified, please advise
    to gray out new items in sales order: No user exit identified, please advise, I mean not allow new items.
    fields to block:
    XVBAK-LIFSK
    XVBAK-FAKSK
    XVBAK-KUNNR
    XVBKD-VSART
    XVBKD-INCO1
    XVBAP-UNTTO
    XVBAP-UEBTO
    XVBPA-KUNNR
    XVBPA-PARW
    XVBAP-ROUTE
    XVBAP-ABGRU
    The code is something like this in MV45AFZZ - USER_EXIT_FIELD_MODIFICATION
          CASE screen-name.
            WHEN    'XVBAK-KUNNR'
                 OR '*XVBAK-KUNNR'.    "Sold To
              screen-input = 0.
           END CASE
    but is not working. please advise.
    Disable Pricing grid: after apply this code, is possible to add new manual conditions, how can I disable input new item conditions?
    The code is something like this in  LV69AFZZ - USEREXIT_FIELD_MODIFICATION Program:
      Modify screen fields
        IF   SCREEN-NAME = 'RV61A-KOEIN'
          OR SCREEN-NAME = 'KOMV-KBETR'
          OR SCREEN-NAME = 'KOMV-KPEIN'
          OR SCREEN-NAME = 'KOMV-KMEIN'
          OR SCREEN-NAME = 'KOMV-KWERT'
          OR SCREEN-NAME = 'KOMV-KSCHL'
          OR SCREEN-NAME = 'KOMV-KUMZA'
          OR SCREEN-NAME = 'KOMV-KUMNE'
          OR SCREEN-NAME = '*RV61A-KOEIN'
          OR SCREEN-NAME = '*KOMV-KBETR'
          OR SCREEN-NAME = '*KOMV-KPEIN'
          OR SCREEN-NAME = '*KOMV-KMEIN'
          OR SCREEN-NAME = '*KOMV-KWERT'
          OR SCREEN-NAME = '*KOMV-KSCHL'
          OR SCREEN-NAME = '*KOMV-KUMZA'
          OR SCREEN-NAME = '*KOMV-KUMNE'.
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
      Modify buttons
        IF   SCREEN-NAME = 'BT_KOAN'    "Add
          OR SCREEN-NAME = 'BT_KOLO'.   "Delete
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
        IF   SCREEN-NAME = 'BT_KONY'.   "Update
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
    Thanks in advace.
    Regards!

    Thanks Sai, for your prompt answer, as far as understand variants, I can't add any logic, to allow change or only display, I do no't include the logic in the sample code, but that's my case, I need the user exit due a logic must be applied and standar solution like variant or customizing are not the better option.
    I Found that in order to gray pricing grid we just put the code in user exit form: userexit_field_modific_leer include  LV69AFZZ
    and to block the other fields  and to block partner functions:
    Include Program: MV45AF0P_PARTNER_PREPARE                    User Exit Form: partner_prepare
    Edited by: Jose Carrillo on Mar 30, 2008 4:21 AM

  • Currency and quantity fields in Smartforms

    Hi Experts,
    How to refer currency and quantity fields , in my form i am using FAKING and NETWR fields,
    in global definitions one tab is there currency and quantity fields  in that  in filed name column what i have to give and reference filed , PLease can u you give some examples, so that i can understand easily...
    Useful answers are awarded.
    Thanks

    The 'Currency/Quant. Fields' tab in the Global definitions allows you to link the field containing a value to the field containing its unit of measure.
    For example, my purchase order has two line items, one is for 6 eggs (which have unit of measure PC) and 2.5 kilogramms of flour (UOM is KG).  When these are written on the output the eggs have no decimal places, the flour has 2 (this is defined in configuration). So;
    Eggs  6    PC
    Flour 2.50 KG
    This happens only if I specify in the 'Currency/Quant. Fields' tab the field that holds my quantity and the reference field that hold the UOM, and specify data type QUAN.  Same concept applies for currency where they have different numbers of decimal places (for example Japanese Yen is always expressed as a whole number with no decimals).
    Regards,
    Nick

  • Dynamic Forms with Subforms and Text Fields

    I've been reading all of the messages relating to subforms and dynamic forms and have used many of the suggestions, but haven't found anything that addresses the problem I am having. I'm using Designer 7.0. I've saved my form as a dynamic form, I've set my text fields for multiple lines and expand to fit. My problem is that as soon as I set the parent subform to Flow Content, everything moves to the left margin. I've tried grouping items together within a subform in hopes that the items will maintain their position on the page, but everything always moves to the left margin. I'm creating a legal form that needs to have text and a text field centered at the top of the page. Below that to the left is a text field that needs to be able to expand with two text fields to the right of it. Below that are additional text fields that need to expand as needed.
    Am "stacking" my subforms incorrectly and setting the wrong subform to Flow Content? Or, can you now lock a field to a specific position? Any help would be greatly appreciated.

    Unfortunately, I hadn't understood that you needed the fields to expand in height and everything below them to move down the page. In that case, you'll need to use flowed subforms.
    Having all objects move to the left side of the page is expected when setting a subform to flowed. That's because the flow is top-down, left-right.
    One thing you could try is making the text field that needs to be centered exactly as wide as the flowed subform and then setting its left- and right-hand margins to an equal number. This would ensure an equal amount of space on the left- and right-hand sides and because the field would be as wide as its flowed container (subform), entering multiple lines of text would result in everything below moving down.
    I've attached a sample form where the page subform has been set to flowed, the text field at the top is a multi-line/height-expandable text field with its width set to the page width and its left- and right-hand margins both set to 2in and the button and check box objects are pushed below the text field.
    When text is entered into the text field, it expands in height and causes the button and check box to move down.
    To achieve other horizontal and vertical positioning/offsets, you could play with the margins of all the fields that need this.
    Stefan
    Adobe Systems

Maybe you are looking for

  • How can I create a full-screen view of Keynote slide in Snow Leopard?

    How can I create a full-screen view of my Keynote slides in Snow Leopard? I'm going to be importing into ScreenFlow to create a video. Thank you!!

  • Is it possible to connect a disk to an AirPort Extreme (802.11g)?

    I've got one of the fly saucer shaped Airport base stations with a USB plug for a printer. I don't ever really print anything, so on a whim (after seeing some info about Airport Disks) I plugged in my firewire backup drive via the USB cable instead.

  • Time issue of select statement

    Hi friends,    I have a doubt about select single statement in this particular statement below. i have the code which goes this way. loop at itab. concatenate *year *materail no * item type into dummy variable. select single dmbtr from bsis into itab

  • Is it OK to open a CR Report with JRC/Gemini which is modified by RAS SDK?

    Dear all Is it OK to open a CR Report with JRC/Gemini which is modified by RAS SDK? Especially after I use RAS SDK to change report database location. I test it OK, but my Customer need to confirm this. Thanks a lot. David

  • 8100 turning on then off repeatedly

    I have a Blackberry Pearl 8100 that started turning off and on today and is not stopping.  When it turns on you see the hour glass for about 20 secs and then it turns off and starts again.  Everything was working fine earlier today and then suddenly