Populating values in to dropdownbyindex?

Hi
i have dropdownbyindex with label Academic Year, now i need to populate values in to it in the form of 2000-2001,2001-2002.....2049-2050.can u tell me the required code to populate the values(from 2000-2001 to 2049-2050)
thanks
kishore

Hi,
Iam assuming that u have bound ur dropDownByIndex to a
string type context.
Create a node say ctx_vn_year and create a value attribute
say ctx_va_year into it .Bind ctx_va_year to ur
dropDownByIndex ,use following code to fulfill ur
requirement.
IPrivateMyappView.ICtx_vn_yearElement ele;
wdContext.nodeCtx_vn_year().invalidate();
for(int i =2000;i<2050;i++)
     ele=wdContext.nodeCtx_vn_year().createCtx_vn_yearElement();
     ele.setCtx_va_year(i+"-"+(i+1));
     wdContext.nodeCtx_vn_year().addElement(ele);
Regards
Surender Dahiya

Similar Messages

  • How to select a default value in a DropDownByIndex

    Hi,
    I have a dropdownbyindex in a table. I need to make default selection of an item in the dropdown.
    I have prepopulated dropdown from bapi result, "1", "2", "3", "4". I have another bapi result which gives me a selected value "2". I need to default this to the dropdown when my page gets loaded.
    1st bapi result  - (model nodes)
    _input
    _output
    _list
    attribute (1,2,3,4) (list of elements)
    I have a context node created for the table items.
    nodeitems
    str (2) -element to be defaulted.
    I am writing this code:
    int lead = 0;
    for(int i = 0; i < X.size; i++){
    IWDNodeElement elem = wdContext.nodeDataNode().getElementAt(i);
    if(X.equalsIgnoreCase("2"))
    lead = i;
    break;
    wdContext.nodeX.setLeadSelection(lead);
    For size of X, I am taking
    nodeInput.nodeOutput.nodeList.size()
    But this gives me size of thelist 0 whereas it is populating the whole list.
    Hope I have made it clear.
    Please help.
    Thanks

    Cardinality                Selection              Singleton
    _input -      0..n          0..1          true
    _output -      0..1          0..1          true
    _list -      0..n          0..1          true
    nodeItem - 0..n          0..1          true
    Thanks

  • Table not populating values

    Hello All,
    I am populating Table for a Search Region and the values are not getting populated. I am altering the where clause in PFR of the CO. Please find the code in PFR.
    String eNum = pageContext.getParameter("SearchEmpNum");
    System.out.println("Employee Number " + eNum);
    System.out.println("Post initQuery ");
    OAViewObject vo = (OAViewObject)am.findViewObject("ZenPerSearchVO1");
    if (vo != null) {
    vo.clearCache();
    vo.setWhereClause(null);
    vo.setWhereClause("PERSON_ID in (select selected_person_id from hr_working_person_lists where owning_person_id = zen_person_details.get_person_id(:1))");
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0, eNum);
    System.out.println("Params " + eNum);
    //System.out.println("Post Clause " + vo.getQuery());
    vo.executeQuery();
    System.out.println("Post whereclause ");
    The following is the Page
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <page xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui" version="10.1.3_1312" xml:lang="en-US" xmlns:user="http://xmlns.oracle.com/jrad/user" xmlns="http://xmlns.oracle.com/jrad" file-version="$Header$">
    <content>
    <oa:pageLayout id="PageLayoutRN" amDefName="zenith.oracle.apps.hxc.asg.server.ZenPerSearchAM" windowTitle="Employee Search Window" title="Employees">
    <ui:corporateBranding>
    <oa:image id="corporateBrandingImage" source="/OA_MEDIA/FNDSSCORP.gif"/>
    </ui:corporateBranding>
    <ui:contents>
    <oa:query id="QueryRN" dispSimple="true" dispCustomized="false" dispAdvanced="false" mode="autoCustomizationCriteria" amDefName="zenith.oracle.apps.hxc.asg.server.ZenPerSearchAM" controllerClass="zenith.oracle.apps.hxc.asg.webui.ZenPersonSearchCO">
    <ui:contents>
    <oa:table id="ResultsTable" userCustomizable="true" shortDesc="Employees Assigned Table" amDefName="zenith.oracle.apps.hxc.asg.server.ZenPerSearchAM">
    <ui:contents>
    <oa:messageStyledText id="EmpNum" viewName="ZenPerSearchVO1" viewAttr="EmployeeNumber" queryable="true" sortState="ascending" prompt="Employee Number" selectiveSearchCriteria="true" initSortSeq="first" userCustomizable="true"/>
    <oa:messageStyledText id="EmpName" queryable="true" sortState="no" viewName="ZenPerSearchVO1" viewAttr="FullName" prompt="Employee" unvalidated="true" selectiveSearchCriteria="true" userCustomizable="true"/>
    </ui:contents>
    </oa:table>
    </ui:contents>
    <oa:simpleSearchPanel>
    <oa:header text="Employee Search" id="SimpleSearchHdr">
    <ui:contents>
    <oa:messageComponentLayout id="CustomSimpleSearch">
    <ui:contents>
    <oa:messageLovInput id="SearchEmpName" selectiveSearchCriteria="true" prompt="Employee Name" unvalidated="true" externalListOfValues="/zenith/oracle/apps/hxc/asg/lov/webui/ZenEmpLovRN" required="yes">
    <lovMappings>
    <lovMap id="EnameMap" lovItem="EmpName" resultTo="SearchEmpName" criteriaFrom="SearchEmpName"/>
    <lovMap id="ENumMap" lovItem="EmpNum" resultTo="SearchEmpNum" criteriaFrom="SearchEmpNum"/>
    </lovMappings>
    </oa:messageLovInput>
    <oa:messageTextInput id="SearchEmpNum" selectiveSearchCriteria="true" prompt="Employee Number"/>
    </ui:contents>
    </oa:messageComponentLayout>
    </ui:contents>
    </oa:header>
    </oa:simpleSearchPanel>
    <oa:simpleSearchMappings>
    <oa:queryCriteriaMap id="EmpNameMap" criteriaItem="SearchEmpName" resultsItem="EmpName"/>
    <oa:queryCriteriaMap id="EmpNumMap" criteriaItem="SearchEmpNum" resultsItem="EmpNum"/>
    </oa:simpleSearchMappings>
    </oa:query>
    <oa:defaultSingleColumn id="ApplyRN">
    <ui:contents>
    <oa:submitButton id="SButton" text="Save" prompt="Save">
    <ui:primaryClientAction>
    <ui:fireAction/>
    </ui:primaryClientAction>
    </oa:submitButton>
    </ui:contents>
    </oa:defaultSingleColumn>
    </ui:contents>
    </oa:pageLayout>
    </content>
    </page>

    Hi,
    Some of the column values are not getting populated or few rows which you are expecting is not getting populated?
    Could you please try the following 2 changes, in both the cases, after executing the query, print all the query and rows in the VO using the below code (change your object names accordingly).
    if(appraisalVO !=null)
    AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.first();
    if(appraisalVORow !=null)
    int attrCount = appraisalVO.getAttributeCount();
    writeLog("XXRBG",pageContext,"Attrbuute count "+attrCount);
    String[] attributeNames = appraisalVORow.getAttributeNames();
    for (int i = 0 ;i< attributeNames.length ;i++ )
    writeLog("XXRBG",pageContext," Name "+attributeNames[i] +" = "+appraisalVORow.getAttribute(i));
    1)
    instead of calling the function to get the owning_person_id, hard code the value and check you are getting the expected result.
    like,
    vo.setWhereClause("PERSON_ID in (select selected_person_id from hr_working_person_lists where owning_person_id = 54)");
    2)
    instead of the below code
    vo.setWhereClause("PERSON_ID in (select selected_person_id from hr_working_person_lists where owning_person_id = zen_person_details.get_person_id(:1))");
    vo.setWhereClauseParams(null);
    vo.setWhereClauseParam(0, eNum);
    System.out.println("Params " + eNum);
    try without binding the parameter like,
    vo.setWhereClause("PERSON_ID in (select selected_person_id from hr_working_person_lists where owning_person_id = zen_person_details.get_person_id("+eNum+"))");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • Using SQL Query for page item source does not insert populated value

    Hi All,
    Following are the attribute details of a certain page item on an edit form:
    Display As: Text Field
    Page Item Source Type: SQL Query
    Source value Expression: SELECT a from tab where id = 'ABC'
    Although the field appears populated on the screen, but the value is not inserted in the table.
    Can anyone help on this?
    Thanks in advance,
    Annie

    Annie:
    One solution is to define a pl/sql function that given a date will return the 'run-date'. Something like create or replace function get_prod_date(p_date in date) return date is
    retval date;
    begin
    select run_date into retval from tab_x where run_date=p_date;
    return retval;
    end;Change the Source Type for the page-item back to 'Database Column'
    Set Source value or expression to the 'database column name'
    Set 'Post calculation computation' to be
    get_prod_date(:pxx_date)
    Varad

  • Populating values to internal table created dynamically

    Hi,
    I am creating an internal table(it1) dynamically and assigned it to a field symbol. now i want to upload values
    which are present in a field of another internal table being populated from a Funct Module.Could you tell me
    how to assign those values across the fields of field symbol?
    loop at itab_char.
    LS_ALV_CAT-FIELDNAME = itab_char-charact.
    append LS_ALV_CAT to I_ALV_CAT.
    endloop.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
      EXPORTING
        IT_FIELDCATALOG = I_ALV_CAT
      IMPORTING
        EP_TABLE        = D_REF.
    ASSIGN D_REF->* TO <F_FS>.
    (Above my int tab is generated and now stored in <f_FS>)
    loop at itab into w_lifnr.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
      EXPORTING
       CLASS                      = p_cname
       CLASSTYPE                  = w_ctype
       OBJECT                     = w_lifnr
      TABLES
        T_CLASS                    = t_class
        T_OBJECTDATA               = t_objectdata
    w-lifnr is vendor number. and here we are populating t_objectdata with that vendor related datas. now i want to pass t_objectdata-ausp1 values for each vendor across the fields in <F_FS>.
    FIELD-SYMBOLS : <F_FS> TYPE TABLE.
    Please refer me the solution to this problem.
    Thanks

    Check below code and try to add in ur code....
        IF NOT it_bom_expl[] IS INITIAL.
    The material number data varies from run to run. For this purpose
    the data is been used to build dynamic internal table which stores the
    material number data along the x-axis
          PERFORM build_matnr_table.
    The material numbers data which is stored in the temp internal table
    is been assigned to the dynamic internal table created along the
    x-axis for the materials
          PERFORM assign_matnr_val_fields.
    The component data which is stored in the internal table needs to be
    moved to the dynamic internal table
          PERFORM move_bom_data_to_matnr_table.
    *&      Form  build_matnr_table
    Using the material number data the dynamic internal tables are been
    built which holds the material number data along x-axis. Here the
    first 3 columns are always constant which are Components-List,
    Description, Count. From 4th column it depends on number of materials
    FORM build_matnr_table .
      DATA: l_val(3) TYPE n,
            lf_mat(18) TYPE c.
    Moving the Components-List details to the internal table 1st column
    which will be used for creation of dynamic internal table
      CLEAR gf_xfc.
      gf_xfc-fieldname = text-t03.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 18.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Description details to the internal table 2nd column
    which will be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t04.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 40.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ipc.
      CLEAR gf_xfc.
    Moving the Count details to the internal table 3rd column which will
    be used for creation of dynamic internal table
      gf_xfc-fieldname = text-t05.
      gf_xfc-datatype = c_val_c.
      gf_xfc-inttype = c_val_c.
      gf_xfc-intlen = 5.
      gf_xfc-decimals = 0.
      APPEND gf_xfc TO gf_ifc.
      APPEND gf_xfc TO gf_ipc.
    Moving the Material numbers are moved to the internal table from 4th
    column onwards till all the material numbers are moved to the columns
    which will be used for creation of dynamic internal table. Here
    columns will be reffered to as Material001 ..... Materialxxn
      LOOP AT it_mat.
        CLEAR gf_xfc.
        l_val = l_val + 1.
        CONCATENATE text-t06 l_val INTO lf_mat.
        gf_xfc-fieldname = lf_mat.
        gf_xfc-datatype = c_val_c.
        gf_xfc-inttype = c_val_c.
        gf_xfc-intlen = 18.
        gf_xfc-decimals = 0.
        APPEND gf_xfc TO gf_ifc.
        APPEND gf_xfc TO gf_ipc.
      ENDLOOP.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table->* TO <fs_dyn_table>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line LIKE LINE OF <fs_dyn_table>.
      ASSIGN gf_line->* TO <fs_dyn_wa>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ipc
        IMPORTING
          ep_table        = gf_table1.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table1->* TO <fs_dyn_table1>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line1 LIKE LINE OF <fs_dyn_table1>.
      ASSIGN gf_line1->* TO <fs_dyn_wa1>.
    Using the above data dynamic internal table is been created
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gf_ifc
        IMPORTING
          ep_table        = gf_table2.
    The dynamic internal table which is created is been assigned to
    field-symbol which holds the data of the columns of X-axis
      ASSIGN gf_table2->* TO <fs_dyn_table2>.
    Dynamic work area is been created usng the reference to the
    field-symbol which has the data and the line item is been assign to
    field-symbol to hold line item data for reading purposes line by line
      CREATE DATA gf_line2 LIKE LINE OF <fs_dyn_table2>.
      ASSIGN gf_line2->* TO <fs_dyn_wa2>.
    ENDFORM.                    " build_matnr_table
    *&      Form  assign_matnr_val_fields
    The material numbers data stored in the temp internal table needs to
    be assigned to the dynamic internal table along x-axis as the first
    record. The temp internal table is been looped and using the field
    symbol concept the data is moved to the dynamic internal table
    FORM assign_matnr_val_fields .
      DATA: l_cnt(3) TYPE n,
            l_nam(12),
            g_total(3) TYPE n.
      DESCRIBE TABLE it_mat LINES g_total.
      CLEAR l_cnt.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDIF.
      ENDLOOP.
    Looping the temp internal table and concatenating material as
    material001 and the same is been checked against the dynamic
    internal table and the material number value is moved to the
    internal table. Finally, the data is been appened as first record.
    This is been used for downloading of data to excel sheet as it
    contains additional field which is Description field.
      CLEAR l_cnt.
      LOOP AT it_mat.
        l_nam = c_mat.
        l_cnt = l_cnt + 1.
        CONCATENATE l_nam l_cnt INTO l_nam.
    Material which is in form Materialxxn is been assigned to the field
    symbol which is checked against the field of dynamic internal table
    and the value of the Material Number is been passed to the dynamic
    internal table field value.
    After all materials are been assigned the record is been appended
    to the dynamic internal table.
        ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_field>.
        <fs_field> = it_mat-matnr.
        IF l_cnt = g_total.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDIF.
      ENDLOOP.
    The contents of one internal table is passed on to other internal
    table for use while moving the component data for count purposes.
      <fs_dyn_table2>[] = <fs_dyn_table>[].
    ENDFORM.                    " assign_matnr_val_fields
    *&      Form  move_bom_data_to_matnr_table
    The component data is been appended to the dynamic internal table
    The component is checked against a material and if exists the corresp-
    onding level is been appended to the record
    The total count is derived as the in how many materials the component
    exists
    FORM move_bom_data_to_matnr_table .
      DATA: l_cnt(2) TYPE n,
            l_cnt1(3) TYPE n,
            l_nam(12),
            l_con(18) TYPE c,
            l_con1(18) TYPE c,
            lf_mat TYPE matnr.
      SORT it_bom_expl BY bom_comp bom_mat level.
      CLEAR: l_cnt1, <fs_dyn_wa>.
    Looping the component internal table
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
        AT END OF bom_comp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa> INTO TABLE <fs_dyn_table>.
        ENDAT.
      ENDLOOP.
    Looping the component internal table. This is used for the additional
    Description field which is shown in the excel sheet
      LOOP AT it_bom_expl INTO gf_it_bom_expl.
        CLEAR: l_cnt1.
        AT NEW bom_comp.
          CLEAR: l_cnt, <fs_dyn_wa1>, lf_mat.
    For every new bom component the material data is moved to
    temp material table which will be used for assigning the levels
    checking the count
          it_mat_temp[] = it_mat[].
    Component data is been assigned to the field symbol which is checked
    against the field of dynamic internal table and the value of the
    component number is been passed to the dynamic internal table field
    value.
          ASSIGN COMPONENT c_comp_list OF STRUCTURE <fs_dyn_wa1> TO
          <fs_check>.
          <fs_check> = gf_it_bom_expl-bom_comp.
        ENDAT.
        AT NEW bom_mat.
          CLEAR l_con.
        ENDAT.
        lf_mat = gf_it_bom_expl-bom_mat.
    Looping the temp internal table and looping the dynamic internal table
    *by reading line by line into workarea, the materialxxn is been assigned
    to field symbol which will be checked and used.
        LOOP AT it_mat_temp.
          l_nam = c_mat.
          l_cnt1 = l_cnt1 + 1.
          CONCATENATE l_nam l_cnt1 INTO l_nam.
          LOOP AT <fs_dyn_table2> ASSIGNING <fs_dyn_wa2>.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa2> TO <fs_xy>.
          ENDLOOP.
          IF <fs_xy> = lf_mat.
            CLEAR lf_mat.
            l_con1 = l_con.
          ENDIF.
    Checking whether the material exists for a component and if so it is
    been assigned to the field symbol which is checked against the field
    of dynamic internal table and the level of the component number
    against material is been passed to the dynamic internal table field
    value.
          IF <fs_xy> = gf_it_bom_expl-bom_mat.
            ASSIGN COMPONENT l_nam OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
            CLEAR l_con.
            MOVE gf_it_bom_expl-level TO l_con.
            CONCATENATE c_val_l l_con INTO l_con.
            CONDENSE l_con NO-GAPS.
            IF l_con1 NE space.
              CONCATENATE l_con1 l_con INTO l_con SEPARATED BY c_comma.
              CLEAR l_con1.
              l_cnt = l_cnt - 1.
            ENDIF.
            <fs_check> = l_con.
            l_cnt = l_cnt + 1.
          ENDIF.
        ENDLOOP.
    The description is moved to the field symbol which is checked against
    the field of dynamic internal table and the count is been passed to
    the dynamic internal table field value.
        ASSIGN COMPONENT c_description OF STRUCTURE <fs_dyn_wa1> TO
        <fs_check>.
        <fs_check> = gf_it_bom_expl-ojtxp.
    At end of every new bom component the count is moved to the field
    symbol which is checked against the field of dynamic internal table
    and the count is been passed to the dynamic internal table field
    value.
        AT END OF bom_comp.
          ASSIGN COMPONENT c_count OF STRUCTURE <fs_dyn_wa1> TO <fs_check>.
          <fs_check> = l_cnt.
          INSERT <fs_dyn_wa1> INTO TABLE <fs_dyn_table1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " move_bom_data_to_matnr_table

  • Populating values in dynamically generated internal table

    Hi,
    We can generate internal tables dynamically and also populate them with values from database.But is there any way to populate the dynamically generated internal table(has 2-3 selected fields) with values from another internal table(has all fields required by the program) being populated within the same program?
    Thanks & Regards,
    Savitha

    Hi
    Dynamic internal table is internal table that we create on the fly with flexible column numbers.
    For sample code, please look at this code tutorial. Hopefully it can help you
    Check this link:
    http://www.****************/Tutorials/ABAP/DynamicInternaltable/DynamicInternalTable.htm
    Reward points if useful
    Regards
    Anji

  • IDOC Segment is missing in the IDOC even though I have populated values

    Hi Experts,
       I face a problem in the IDOC processing.
       I have a custom IDoc type with 2 segments in the same Hierarchy.
       In the Z program I populate both the segments and send the internal table to the MASTER_IDOC_DISTRIBUTE Fun.Module.
       When the IDOC is generated, I see the IDOC with only one segment and the 2nd segment is missing.
       When I debugged the program, I see the 2nd Segment also getting populated.
       Can you give some info that can resolve my issues.
    Thanks,
    Micheal

    Check the below points,
    1. Check the internal table IDOC_DATA in MASTER_IDOC_DISTRIBUTE in debug mode whether the segement with values are populated.
    2. Are you populating the parent & hierarchy level in segment, if yes check whether the values are right one.
    3. There may be a possiblity the std SAP code would delete the custom segment if its any syntax error in segment defenition.
    Check this and if you still have the issue come back.

  • Please help: Populating values in drop down list by onchange - javascript !

    I am working on a task - I need to populate drop down named "year" dynamically (from database) depending upon the select of an element from drop down list "carLine" . I am calling javascript funtion on onchange event of the html select and setting property of the selected element.The environment is Struts and dynaactionform is being used . Here is the my html select for both the drop down list s and javascript funtion to set value. The getYears method is defined in the locatoraction action class. But after doing all these carLine is not getting populated with the values corresponding to selected carline.
    Database side is working fine .
    <script type="text/javascript">
    function getYearsForCarline(){
    document.getElementById('method').value = 'getYears';
    document.forms[0].submit();
    alert("submitted");
    </script>
    <html:form styleId="locatorForm" action="/locator/locatorAction" method="post">
              <input type="hidden" name="method" value="getYears" />
              <tr>
                   <td align="center">
                   <table border="0" width="300" cellpadding="0" cellspacing="5">
                        <tr>
                             <td><span class="formLabelEM"><bean:message
                                  key="label.locator.carLine" />*</span>
                             <html:select styleId="carLineBox" property="carLine" onchange="javascript:getYearsForCarline()">
                                  <html:option value="">Select a Carline</html:option>
                                  <html:optionsCollection property="carLines" />
                             </html:select></td>
                        </tr>
                        <tr>
                             <td><span class="formLabelEM"><bean:message
                                  key="label.locator.modelYear" />*</span>
                             <html:select property="year" >
                             <html:option value="">Select Year</html:option>
                                  <html:optionsCollection property="years" />
    Any advise will be highly appreciated . Thanks in advance.

    Thanks both of you for the advise ! My code worked perfectly fine after adding separate action mapping for Year and using that as action in the form though the new action mapping point to the same action class locatorAction ..I still do not understand the reason behind this exactly(any suggestion are most welcome) but it works. Here is code for my action mapping :
    <action path="/locator/locatorYearAction" name="locatorForm"
                   input="/locator/locatorMain.jsp"
                   type="com.apps.sales.web.salesin.actions.LocatorAction"
                   parameter="method" validate="true">
                   <forward name="showCarlines" path="/locator/locatorMain.jsp"
                        redirect="false" />
                   <forward name="showModels" path="/locator/locatorModels.jsp"
                        redirect="false" />     
              </action>

  • Populating values in Boolean Property

    Hi ,
    I am working on version 11.1.2 . I have created a Boolean property - 'Country Flag' . Made that property as Defined , Boolean and Local Node.
    I am trying to import a file with this property value as 'TRUE' . But in the imported hierarchy , this boolean property does not show up any value(True / False).
    The below is the file i am trying to import-
    [hier]
    Product|P000000
    [relation]
    P000000|NA|Total Product|True
    P100000|P000000|Cars|True
    P110000|P100000|Hatchback|False
    P121000|P110000|Yaris|True
    P121100|P121000|Yaris - 3 Door Liftback|False
    The last value does not get populated in the hierarchy in DRM.
    Please help in this
    Thanks.
    Edited by: user10979332 on Jun 22, 2011 10:18 PM

    Hi ,
    I visited the link - http://otndnld.oracle.co.jp/document/products/epm/111200/E-17236/epm.1112/drm_1112000_readme.pdf
    Its mentioned there that this is known issue
    Defect no - 9450750
    Imported hierarchy-level properties of type Boolean do not get set.
    But in my case I created a local node property and not a hierarchy level property so does this defect applies to local node properties as well?
    Thanks for the clarification in advance!!
    Edited by: user10979332 on Jun 26, 2011 9:13 PM

  • Populating values in interactive form drop

    Hi,
    I have created an adobe form, in which I have to create drop down box which has to read values from simple type. for this i have created context attribute whose type is simple type, and i have draged that context attribute in adobe form, and made it to drop down list, but values r not getting populating here,
    how to poin this to simple type.

    Hi venki,
    Do 1 thing plaec a ActiveX typ eDropDown from the library tab,
    then from the Object>>Binding tab, bind that dropdown to the attribute..
    Hope this helps,
    Thanks,
    Amita

  • Populating values in dropdown fields on interactive adobe forms.

    Hi,
    In HCM Forms & Process, I have populated dropdown fields using generic service. But today I came to know we can also populate the dropdown field values using webdynpro lookup tables. First question, Is that a wrong method to populate the dropdown field values using generic service. Second question, If I populate the dropdown field values using lookup tables does the performance will increase when compared to populating from generic service. Please let me know.
    Regards,
    Nayani.

    Hi,
    In HCM Forms & Process, I have populated dropdown fields using generic service. But today I came to know we can also populate the dropdown field values using webdynpro lookup tables. First question, Is that a wrong method to populate the dropdown field values using generic service. Second question, If I populate the dropdown field values using lookup tables does the performance will increase when compared to populating from generic service. Please let me know.
    Regards,
    Nayani.

  • Populating values in a dropdown field on the interactive form using WD ABAP

    Hi All,
        I want to populate values in a dropdown field( of cardinality 0:n ) on interactive form,The values which i want to populate is from a 'z' table which i have created.I used a select query to fetch the entries but on my interactive form the values are flowing in many rows and not in the drop down.I want all the values to be in the dropdown.The dropdown is not showin even one value under it.I am using webdynpro abap and controls from webdynpro native.Can anyone guide me on this with a step by step procedure.
    Useful suggestions will be rewarded.
    Thanks and Regards,
    Srividya.

    You mean in PFR of controller , ie after user selects a record from LOV window and after its populated back into to the textItem on the main entry form ??
    The value is displayed correctly in the intended textItem which has viewInstance and viewValue attached to it .
    so this is what setup looks like
    Entry form
    Customer Name - lov
    Customer Number(d) - Display Only - Populated by Lovmappings from LOV - mapped to Customer Number attribute on LOV window. It also has viewInstance and ViewAttrib assigned to it .
    Save Action
    At this point of time , i am assuming i already have value in Customer Number(d)since its displayed on the screen,rite ??
    or Do i have to take the value in formValue and then explicitly do a setAttribute to set that value to view object /Customer Number(d)
    hope this helps to understand the scenario

  • Dynamically populating values in 2 dependent select in jsp

    hello users
    i am confronted with a probelm.
    i am having 2 select fields that are dependant on each other. i.e. select one and in the other select, values are automatically populated..
    the only problem here is that it has to be dynamically done
    i dunno javascript can do it dynamic ally but by hardquoting values, it can be done.(which obviously i dont want)
    i can't solve it by using arraylist or vector either. it may be i'm not using the correct method. but aneways, plz reply me asap
    thanks a lot in advance
    Rajeev

    hello sure
    thanx for taking the time to reply...i can email u my files there are 2 jsp files and 1 bean file ...u'll have to arrange them in a package (bean) under the folder WEB-INF if you are using tomcat..
    give me ur email id , i'll mail u the code in a zip format
    thanks once again
    Rajeev

  • Populating values of one table to other in dynamic tables

    Hi Experts ,
    An issues here.
    <lt_data> is a table with different field lenghts.
    <itab> is a table of different field lenghts.
    Here how do i need to excatly put the records of each field into corresponding fileds of itab.
    the two tables are not compatible.
    eg:
    in table <lt_data>
    field1 --> length 6char
    field2 ---> lenght 2  char
    field 3 ---> length 2 char.
    in table <itab>
    field1 --> is of length 10 char.
    so the 3 field values of <lt_data> is sitting in only 1 field of <itab>
    <itab> is a dynamic table created throuth create internal table method.
    <lt_data> is populated from select query.
    both are field symobls having type table reference.
    The following is the piece of code.
      LOOP AT <lt_data> ASSIGNING <itab_wa>.
        ASSIGN COMPONENT sy-index OF STRUCTURE <itab_wa> TO <itab_wa1>.
        w_data-text = <itab_wa1>.
        APPEND w_data TO <itab>.
      ENDLOOP.
    Help is appreciated

    Hi Vadnalav,
    is it correct that you want to combine the contents of the 3 source table fields in one field of the target table?
    FIELD-SYMBOLS:
      <table_source>            TYPE STANDARD TABLE,
      <table_destination>       TYPE STANDARD TABLE,
      <table_line_source>       TYPE any,
      <table_line_destination>  TYPE any,
      <field_source>            TYPE any,
      <field_destination>       TYPE any.
    LOOP AT <table_source> ASSIGNING <table_line_source>.
      APPEND INITIAL LINE TO <table_destination> ASSIGNING <table_line_destination>.
      ASSIGN COMPONENT 1 OF STRUCTURE <table_line_destination> TO <field_destination>.
      DO 3 TIMES.
        ASSIGN COMPONENT sy-index OF STRUCTURE <table_line_source> TO <field_source>.
        CONCATENATE <field_destination> <field_source> INTO <field_destination>.
      ENDDO.
    ENDLOOP.
    Please modify according to your needs.
    Regards,
    Clemens

  • Module pool program - populating values for columns in Table control

    Hi all,
    In my module pool program Table control i  am having 10 columns fields.
    in one of the column field i have used 'PROCESS ON VALUE-REQUEST'   to get the material no.
    in that F4 search help list is having releated information of the material like material group, company code, description etc.
    user while searching for material  they will use F4 search help and in that list they will select the material .
    From the list I need releated information of the materials like material group, company code, description etc
    to be populated in other columns while selecting the material .( User is not ready to enter all the values for the fileds)
    I appended the releated values for the material in the Table control Internal table in the Process on value-request  Module.
    (after selecting material by the user from F4 search help)
    even then I am not getting the data in the screen.
    kindly help me how to proceed  to get the data in other columns.
    Thanks in advance,
    sharma

    Hi Himanshu Verma ,
    Thanks for fast reply.
    but i tried with field names available in F4  Internal table.
    even then I am not getting.
    T_DYNPFLD_MAPPING-FLDNAME = ' MTART.
    APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
    T_DYNPFLD_MAPPING-FLDNAME = 'MBRSH'.
    APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
      SELECT
      MATNR
    MTART
    MBRSH
    MATKL
    BISMT
    MEINS
    BSTME
      FROM MARA
      INTO TABLE INT_F4
      up to 5000 rows
      CLEAR INT_F4.
    ****function module to get pop-up window of f4.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'MATNR'
          DYNPPROG        = W_PROGNAME
          DYNPNR          = W_SCR_NUM
          DYNPROFIELD     = 'V_TAB-MATNR'
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB       = INT_F4
          RETURN_TAB      = RETURN_VALUES
          DYNPFLD_MAPPING = ITAB_DYNPFLD_MAPPING
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS          = 3.
      IF SY-SUBRC NE 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE .
        V_TAB-matnr = RETURN_VALUES-FIELDVAL.
    endif.
    I have used the above code.  I am not getting the field values available in ITAB_DYNPFLD_MAPPING.
    kindly help me how to get the exact row for the F4 table.
    Thanks in advance.
    sharma

Maybe you are looking for

  • How to restore the backup files on time capsule after reinstalled the system

    please can someone help me to restore my backups on time capsule after reinstalled the new system. I tried after finished reinstall but it could not find. I also tried with the migration assistant in utilities, it also doesn't work. I always have tim

  • Nokie E5 Bluetooth quality in car

    I use bluetooth to connect to my blaupunkt car audio system and use it to make and receive calls while driving. The quality of my voice as heard by the person on the other side of the line is bad and sounds hollow. It used to work perfectly with my e

  • Oracle Error - statement handle not executed state

    Hello, A BCA scheduled job has failed and returned with the following error. Does anyone have an idea to fix this error. Connection or SQL sentence error: (DA0005): [Exception: DBD, ORA-24338: statement handle not executed State: N/A] The following d

  • Workbench crash leads to server crash? (xpost from configuration forum)

    I have two issues, first a workbench crash which I suspect led to a server crash. Please read this in its entirety as I am including the workbench log and then the server log entry. Any advise is greatly appreciated. Thanks. I have a process with onl

  • External files to exe issue

    Hi. I have an application that calls external swf files with loadMovie. When i publish it in .exe, the external files do not appear anymore. Anyone knows why? Thanks.