Dynamic field population problem

All,
I have a form with several drop downs populated by dynamic methods. These methods retrieve data from an Oracle DB. Four of the drop downs allow the user to select a value for each field and based on these selections, I have a 5th drop down that should populate with a value derived from the other four selections. So we have field 1: value 1, field 2:value 2, field 3:value 3, and field 4:value 4. Field 5 should return a set of values based on the values of fields 1 through 4 being equal to the corresponding values in the database. However the query returns empty. Here is the SQL from Studio. Anyone have an idea why this is returning an empty record set?
Field5 as String[]
for each element in
SELECT Value5 from OracleDB.BPM.FOO
WHERE OracleDB.BPM.FOO.value1 = Form.value1 and OracleDB.BPM.FOO.value2 = Form.value2 and OracleDB.BPM.FOO.value3 = Form.value3 and OracleDB.BPM.FOO.value4 = Form.value4
do
     Field5[] = String(element.Value5)
end
return Field5
TIA,
IGS

Hi Ian,
Here are a few things to check:
1. Are you sure your logic is getting run once all 4 of the other fields have been selected? Put a logMessage statement at the top and bottom along with a logMessage statement that shows the values in your array.
2. Do you have your method set for attribute 5 to have its valid values populated dynamically using the method you have written?
3. When you change each of the 4 other attributes, do you have the changed field invoke a method (using the changed field's "On change invoke property) with the logic:
{code}refreshValidValues("value5"){code}
4. In the above method, did you leave in the double quotes surrounding the attrirbute's name?
{code}// this will not work
refreshValidValues(value5)
// this will work
refreshValidValues("value5"){code}
Hope this helps,
Dan

Similar Messages

  • File-to-Idoc - field population problem.

    Hi All,
    I’m getting the following problem.
    My scenario is File–to–idoc.
    Problem:
    In the interface mapping I’m able to see all the values are populated correctly for Idoc.but when I see in IDX5 or SXMB_MONI one value instead of populating correctly replacing ‘,’ in that field.
    I’m using Java mapping program also to convert the file in to desired structure.
    Thanks in advance.
    Venu.

    Hi All,
    The out put from the above java program is.
    <?xml version='1.0' encoding='UTF-8'?><ns0:MT_MeterReading_IntermediateForm xmlns:ns0="urn://MVP_SR3_01/MVP/MeterReading"><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>002</MetReaderId><TotRead>000015</TotRead><TotDevUploaded>000016</TotDevUploaded></H1></Recordset><Recordset><H1><Recordid>H1</Recordid><RouteNumber>10151G</RouteNumber><MetReaderId>SYSADMIN</MetReaderId><TotRead>000000</TotRead><TotDevUploaded>000000</TotDevUploaded></H1><Item><D1><HMetReaderId>SYSADMIN</HMetReaderId><HTotDevicesUploaded>000000</HTotDevicesUploaded><AccountNumber>6205</AccountNumber><MeterReadCode>0000001495</MeterReadCode><ReadDate>20060819</ReadDate><TroubleCode></TroubleCode></D1><D2><ChgdSplInstr>IN FOOTPATH DOG BITES information for service order</ChgdSplInstr></D2><U2><Data>33333300100451</Data></U2><UC><Data><u>SKIP TEST COMMENTS FROM METER READER FOR 4000734 MRo with RR '09'</u> </Data></UC></Item></Recordset></ns0:MT_MeterReading_IntermediateForm>
    In abobe result last Data field value is populated correctly . the above result is from interface mapping.
    but when the idoc is generated in XI. I'm unable to see the value.
    Thanks,
    venu.

  • Dynamic field population

    Hi,
    How to populate one field from other field in module pool table control................
    i have 3 fields....in table control..when I enter value in 3rd field manually ...2nd field value should get populated automatically....this is my requirement.
    how to do it...pls reply...
    thanks

    Hi,
    In the PAI event, inside the Loop of the table control->
    check for the OK code for SPACE (this is for ENTER key)
    field2 = fieldvalue.
    Regards
    Lekha

  • LiveCycle Designer 8 Saving Dynamic Field Problem

    Just updated to LiveCycle Designer 8 to get around the issue with my users not being able to save the PDF form data. Now my users can save the data using Acrobat Reader 8 but my dynamic fields are not working correctly.
    I have several fields that when you click a certain radio button or check a certain box, a previously invisible text field becomees visible. If one of those boxes is checked and data is entered in the now visible text field, then the users saves the form and reopens it, the data is saved but the field is invisible. Viewing the XML output confirms that the data is still there. When the form is reopened the checkbox that makes the field visible is still checked. But to see that data entered in the text field, you have to uncheck and then recheck the box to get the invisible field to become visible once more. Any idea on how to correct this "feature"?
    Thanks, Debra

    Hi Debra,
    To correct this 'feature', go in Form Properties > Defaults tab, set the Preserve Scripting Changes To Form When Saved option to Automatically.
    To correctly using Designer 7.x, youll have to write some script to achieve the same result. Currently, you have a script setting the fields state. All you need is to run the same script when the form is opened. In the example below, a form:ready script will execute the change event script when the form is opened. You can use the docReady event as well.
    For example:
    RadioButtonList: change event
    if (this.rawValue == "1")
    TextField1.presence = "visible";
    else
    TextField1.presence = "invisible";
    RadioButtonList: form:ready event
    this.execEvent("change");
    Hope this helps,
    Hélène
    Adobe Systems

  • Sum for Dynamic Fields in a Dynamic Table with Field Symbol

    Hi All,
    I currently have an report which I am looking to update with some totals.  The information is currently output in an ALV which is fed data from a dynamic table defined with a field symbol.  The modification that needs to be applied is a summation per currency code where each of the fields to be summed is a dynamically named field at runtime.  I am now just looking to see if anyone has any recommendations on how to obtain these totals it would be appreciated.  I have no problem doing the leg work in piecing the solution together but am just stuck on which approach I should be investigating here.  I have looked into several options but do to the fact that the totals are for dynamic fields in a dynamic table and it is a field symbol I am having some difficulties thinking of the easiest approach to obtain these totals.
    Below is a simple sample of what the report currently looks like and what we are looking to add.
    ====================================================================================
    As-Is Report:
    DETAILED DATA ALV
    Company Code  |  Plant  |  2006 Total  |  2007 Total  |  2008 Total |  CURRENCY
    0001          |   ABCD  |    1,500     |    1,200     |    1,700    |    USD
    0001          |   BCDE   |    2,300     |    4,100     |    3,600    |    GBP
    0003          |   DBCA  |    3,200     |    1,600     |    6,200    |    USD
    Addition 1:
    TOTALS PER CURRENCY
    Currency                |  2006 Total  |  2007 Total  |  2008 Total |
    USD              |    4,700     |    2,800     |    7,900    |
    GBP                       |    2,300     |    4,100     |    3,600    |
    Addition 2:
    CONVERSIONS TO USD
                                          |  2006 Curr   |  2006 USD    |  2008 Curr   |  2006 USD   |
    USD                       |  4,700 USD   |  4,700 USD   |  7,900 USD  |  7,900 USD  |
    GBP   (1.5GBP/1 USD)    |  2,300 GBP   |  1,150 USD   |  2,300 GBP  |  1,800 USD  |
    ====================================================================================
    Any recommendations will be appreciated.

    Hi,
    We cannot use the key word SUM in the loop at assigning statement.
    The way i see is
    When  you are creating the first dynamic internal table , create one more with  the structure below:
    Currency | 2006 Total | 2007 Total | 2008 Total |
    Then while populating the data into first itab,also move the contents to the second itab using collect statement.

  • How to convert internal table with dynamic fields to XML

    Dear all,
    I met a problem like the following:
    The aim is to transform the following parameter to XML
    IT_FIELD stores the dynamic filed name of the internal table,with these fields, the dynamic internal can be created by cl_abap_tabledescr=>create(it_field)
    IT_VALUE stores the value of the internal table dynamically created with dynamic fields.
    For example
    IT_FIELD =>
    line1: FIELD1
    line2: FIELD2
    line3: FIELD3,
    three lines in this internal table.
    dynamically created internal table structure FIELD1 FIELD2 FIELD3
    And IT_VALUE=>
    1          2          3   (First line)
    11        22        33
    two lines of data.
    Do you have any idea about how to transform the IT_VALUE to XML here? And also the transformed XML to the IT_VALUE.( we may need remember IT_FIELD here for later XML to IT_VALUE.)
    Hope I describe the problem clearly.
    Any inputs will be appreciated.
    Edited by: Max Tang on Jan 12, 2009 3:46 PM
    Edited by: Max Tang on Jan 12, 2009 4:14 PM

    Hi,
    you need to implement a bit of coding for that.
    With the 'do varying' statement abap provides a loop over those fields. Within this loop you can build up a new internal table with one entry for each period and amount.
    kind regards
    Siggi
    PS: I am not very familiar with CO, but I guess there will be a standard extractor for that.

  • Reg: Dynamic Field catalog in ALV

    Hi ,
    Can any one guide me to build a dynamic field catalog in ALV report?
    Below is the format which i expect..........
    Material    |     Plant1    |    Plant2    |    Plant3    | ....................|    Plant 20      |
    Qty
    Val
    Qty
    Val
    Qty
    Val
    Qty
    Val
    The plant 1 to 20 has to be brought dynamically as headings from T001W table. (Horizontally populate)
    Below each plant i need sub-headings "QTY" and "VAL".                                  (Horizontally populate)
    List of Materials should be brought vertically from MARA table.                          (Vertically populate)
    Can anyone suggest how to bring out this format for populating data accordingly into the o/p format?
    Ur help will be appreciated.
    Thanks,
    K.S.Kannan

    your part of the code is present in routine
    perform dynamic_table.
    *& Report ZCS_NAC_MAT_CHARACTERISTICS
    2/ Description ...: Business requirement is to get all materials
    without any characteristic values maintained in SAP
    which are given in the selection screen.
    REPORT znac_material_char.
    TYPE-POOLS : abap,
    slis.
    TABLES : kssk,
    klah,
    mara,
    makt,
    cabn,
    t134,
    t023.
    DATA : i_fieldcat TYPE slis_t_fieldcat_alv ,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA : w_layout TYPE slis_layout_alv.
    DATA : st_layout TYPE slis_layout_alv.
    DATA : t_header TYPE slis_t_listheader,
    w_header TYPE slis_listheader.
    TYPES : BEGIN OF ty_cabn,
    atinn TYPE cabn-atinn,
    atnam TYPE cabn-atnam,
    END OF ty_cabn.
    DATA : i_cabn TYPE STANDARD TABLE OF ty_cabn WITH HEADER LINE.
    DATA : w_cabn LIKE i_cabn.
    TYPES : BEGIN OF ty_ausp,
    objek TYPE ausp-objek,
    atinn TYPE ausp-atinn,
    klart TYPE ausp-klart,
    END OF ty_ausp.
    DATA : i_ausp TYPE STANDARD TABLE OF ty_ausp WITH HEADER LINE.
    DATA : w_ausp LIKE i_ausp.
    TYPES : BEGIN OF ty_mara,
    matnr TYPE mara-matnr,
    mtart TYPE mara-mtart,
    matkl TYPE mara-matkl,
    prdha TYPE mara-prdha,
    mstae TYPE mara-mstae,
    mstde TYPE mara-mstde,
    END OF ty_mara.
    DATA : i_mara TYPE STANDARD TABLE OF ty_mara WITH HEADER LINE.
    DATA : w_mara LIKE i_mara.
    DATA : i_mara_temp TYPE STANDARD TABLE OF ty_mara WITH HEADER LINE.
    DATA : w_mara_temp LIKE i_mara_temp.
    TYPES :BEGIN OF ty_data,
    atnam TYPE cabn-atnam,
    atinn TYPE cabn-atinn,
    objek TYPE ausp-objek,
    klart TYPE ausp-klart,
    matnr TYPE mara-matnr,
    maktx TYPE makt-maktx,
    mtart TYPE mara-mtart,
    matkl TYPE mara-matkl,
    prdha TYPE mara-prdha,
    mstae TYPE mara-mstae,
    mstde TYPE mara-mstde,
    END OF ty_data.
    DATA : i_data TYPE STANDARD TABLE OF ty_data WITH HEADER LINE.
    DATA : w_data LIKE i_data.
    DATA : i_class TYPE STANDARD TABLE OF sclass WITH HEADER LINE.
    DATA : w_class LIKE i_class.
    DATA : i_class_temp TYPE STANDARD TABLE OF sclass WITH HEADER LINE.
    DATA : w_class_temp LIKE i_class_temp.
    DATA : i_objdata TYPE STANDARD TABLE OF clobjdat WITH HEADER LINE.
    DATA : w_objdata LIKE i_objdata.
    TYPES : BEGIN OF ty_objdata_temp.
    TYPES: matnr TYPE mara-matnr.
    TYPES: maktx TYPE makt-maktx.
    INCLUDE STRUCTURE clobjdat.
    TYPES : prdha TYPE mara-prdha.
    TYPES : mstde TYPE mara-mstde.
    TYPES : END OF ty_objdata_temp.
    DATA : i_objdata_temp TYPE STANDARD TABLE OF ty_objdata_temp WITH HEADER LINE.
    DATA : w_objdata_temp LIKE i_objdata_temp.
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
    <fs_dyntable>,
    <fs_fldval> TYPE ANY.
    DATA: t_newtable TYPE REF TO data,
    t_newline TYPE REF TO data,
    fs_fldcat TYPE slis_t_fieldcat_alv,
    t_fldcat1 TYPE lvc_t_fcat,
    wa_it_fldcat TYPE lvc_s_fcat,
    wa_colno(2) TYPE n,
    wa_flname(30) TYPE c.
    DATA: fieldname(20) TYPE c.
    DATA: fieldvalue(40) TYPE c.
    DATA: index(3) TYPE c,
    v_time(60) TYPE c.
    DATA: wa_cat LIKE LINE OF fs_fldcat.
    CONSTANTS : c_nac TYPE klah-class VALUE 'NAC',
    c_klart TYPE ausp-klart VALUE '001',
    c_check TYPE c VALUE 'X' .
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (28) text-001 .
    SELECT-OPTIONS: s_atnam FOR cabn-atnam NO INTERVALS OBLIGATORY. " Characteristic name
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1 .
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_matnr FOR mara-matnr. " material Number
    SELECT-OPTIONS: s_mtart FOR mara-mtart. " material type
    SELECT-OPTIONS: s_matkl FOR mara-matkl. " material type
    SELECT-OPTIONS: s_mstae FOR mara-mstae. " X-Plant material status
    PARAMETERS : s_date LIKE sy-datum OBLIGATORY DEFAULT sy-datum . " date
    SELECTION-SCREEN END OF BLOCK b2 .
    AT SELECTION-SCREEN ON s_atnam.
    SELECT SINGLE * FROM cabn WHERE atnam IN s_atnam.
    IF sy-subrc 0.
    MESSAGE text-003 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON s_matnr.
    SELECT SINGLE * FROM mara WHERE matnr IN s_matnr.
    IF sy-subrc 0.
    MESSAGE text-004 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON s_mtart.
    SELECT SINGLE * FROM t134 WHERE mtart IN s_mtart.
    IF sy-subrc 0.
    MESSAGE text-005 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON s_matkl.
    SELECT SINGLE * FROM t023 WHERE matkl IN s_matkl.
    IF sy-subrc 0.
    MESSAGE text-006 TYPE 'E'.
    ENDIF.
    START-OF-SELECTION.
    PERFORM get_data.
    PERFORM get_data_keydate.
    PERFORM material_all_charname.
    PERFORM get_classification.
    PERFORM dynamic_table.
    *& Form dynamic_table
    text
    --> p1 text
    <-- p2 text
    FORM dynamic_table.
    PERFORM fieldcatalog.
    PERFORM dynamic_table_create.
    PERFORM final_data.
    PERFORM final_fieldcatalog.
    PERFORM layout_build.
    PERFORM grid_display.
    ENDFORM. " fieldcat
    *& Form layout_build
    text
    FORM layout_build .
    st_layout-zebra = c_check.
    st_layout-no_vline = ''.
    st_layout-colwidth_optimize = c_check.
    st_layout-detail_popup = c_check.
    st_layout-detail_initial_lines = c_check.
    st_layout-detail_titlebar = text-021.
    ENDFORM. " layout_build
    *& Form alv_top_of_page
    text
    FORM alv_top_of_page.
    REFRESH t_header.
    CLEAR t_header.
    w_header-typ = 'H'. "H=Header, S=Selection, A=Action
    w_header-key = ' '.
    w_header-info = text-019.
    APPEND w_header TO t_header.
    CONCATENATE sy-datum4(2) '-' sy-datum6(2) '-' sy-datum0(4) ' / ' sy-uzeit0(2) ':' sy-uzeit2(2) ':' sy-uzeit4(2) INTO v_time.
    w_header-typ = 'S'. "H=Header, S=Selection, A=Action
    w_header-key = text-020.
    w_header-info = v_time.
    APPEND w_header TO t_header.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = t_header.
    ENDFORM. "alv_top_of_page
    *& Form grid_display
    text
    --> p1 text
    <-- p2 text
    FORM grid_display .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_top_of_page = 'ALV_TOP_OF_PAGE'
    it_fieldcat = fs_fldcat
    is_layout = st_layout
    i_default = c_check
    i_save = 'A'
    it_events = v_events[]
    TABLES
    t_outtab = <t_dyntable>.
    ENDFORM. " grid_display
    *& Form FINAL_FIELDCATALOG
    text
    --> p1 text
    <-- p2 text
    FORM final_fieldcatalog .
    wa_cat-fieldname = text-009.
    wa_cat-seltext_m = text-015.
    wa_cat-outputlen = 18.
    APPEND wa_cat TO fs_fldcat.
    wa_cat-fieldname = text-011.
    wa_cat-seltext_m = text-016.
    wa_cat-outputlen = 40.
    APPEND wa_cat TO fs_fldcat.
    LOOP AT s_atnam.
    CLEAR wa_cat.
    wa_cat-fieldname = s_atnam-low.
    wa_cat-seltext_m = s_atnam-low.
    wa_cat-outputlen = '15'.
    APPEND wa_cat TO fs_fldcat.
    ENDLOOP.
    wa_cat-fieldname = text-012.
    wa_cat-seltext_m = text-017.
    wa_cat-outputlen = 18.
    APPEND wa_cat TO fs_fldcat.
    wa_cat-fieldname = text-013.
    wa_cat-seltext_m = text-018.
    wa_cat-outputlen = 8.
    APPEND wa_cat TO fs_fldcat.
    ENDFORM. " FINAL_FIELDCATALOG
    *& Form FIELDCATALOG
    text
    --> p1 text
    <-- p2 text
    FORM fieldcatalog .
    wa_it_fldcat-fieldname = text-009.
    wa_it_fldcat-datatype = text-010.
    wa_it_fldcat-intlen = 18.
    APPEND wa_it_fldcat TO t_fldcat1.
    wa_it_fldcat-fieldname = text-011.
    wa_it_fldcat-datatype = text-010.
    wa_it_fldcat-intlen = 40.
    APPEND wa_it_fldcat TO t_fldcat1.
    LOOP AT s_atnam.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = s_atnam-low.
    wa_it_fldcat-datatype = text-010.
    wa_it_fldcat-intlen = 30.
    APPEND wa_it_fldcat TO t_fldcat1.
    ENDLOOP.
    wa_it_fldcat-fieldname = text-012.
    wa_it_fldcat-datatype = text-010.
    wa_it_fldcat-intlen = 18.
    APPEND wa_it_fldcat TO t_fldcat1.
    wa_it_fldcat-fieldname = text-013.
    wa_it_fldcat-datatype = text-014.
    wa_it_fldcat-intlen = 8.
    APPEND wa_it_fldcat TO t_fldcat1.
    ENDFORM. " FIELDCATALOG
    *& Form DYNAMIC_TABLE_CREATE
    text
    --> p1 text
    <-- p2 text
    FORM dynamic_table_create .
    Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = t_fldcat1
    IMPORTING
    ep_table = t_newtable.
    ASSIGN t_newtable->* TO <t_dyntable>.
    Create dynamic work area and assign to FS
    CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
    ASSIGN t_newline->* TO <fs_dyntable>.
    ENDFORM. " DYNAMIC_TABLE_CREATE
    *& Form FINAL_DATA
    text
    --> p1 text
    <-- p2 text
    FORM final_data .
    LOOP AT i_objdata_temp INTO w_objdata_temp.
    *assign w_objdata_temp-matnr to <fs_dyntable>.
    AT NEW matnr.
    wa_flname = text-009.
    fieldvalue = w_objdata_temp-matnr.
    CONDENSE fieldvalue NO-GAPS.
    ASSIGN COMPONENT wa_flname
    OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> = fieldvalue.
    ENDAT.
    wa_flname = text-011.
    fieldvalue = w_objdata_temp-maktx.
    CONDENSE fieldvalue NO-GAPS.
    ASSIGN COMPONENT wa_flname
    OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> = fieldvalue.
    wa_flname = w_objdata_temp-atnam.
    fieldvalue = w_objdata_temp-ausp1.
    CONDENSE fieldvalue NO-GAPS.
    ASSIGN COMPONENT wa_flname
    OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> = fieldvalue.
    wa_flname = text-012.
    fieldvalue = w_objdata_temp-prdha.
    CONDENSE fieldvalue NO-GAPS.
    ASSIGN COMPONENT wa_flname
    OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> = fieldvalue.
    wa_flname = text-013.
    fieldvalue = w_objdata_temp-mstde.
    CONDENSE fieldvalue NO-GAPS.
    ASSIGN COMPONENT wa_flname
    OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
    <fs_fldval> = fieldvalue.
    AT END OF matnr.
    APPEND <fs_dyntable> TO <t_dyntable>.
    ENDAT.
    ENDLOOP.
    ENDFORM. " FINAL_DATA
    *& Form GET_CLASSIFICATION
    text
    --> p1 text
    <-- p2 text
    FORM get_classification .
    LOOP AT i_data INTO w_data.
    SELECT SINGLE * FROM klah WHERE class = c_nac.
    IF sy-subrc = 0.
    IF w_data-mstde >= klah-vondt.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
    EXPORTING
    class = c_nac
    classtext = c_check
    classtype = c_klart
    clint = 0
    features = c_check
    language = sy-langu
    object = w_data-objek
    TABLES
    t_class = i_class
    t_objectdata = i_objdata
    EXCEPTIONS
    no_classification = 1
    no_classtypes = 2
    invalid_class_type = 3
    OTHERS = 4.
    LOOP AT i_class INTO w_class.
    MOVE w_class TO w_class_temp.
    APPEND w_class_temp TO i_class_temp.
    ENDLOOP .
    LOOP AT s_atnam.
    READ TABLE i_objdata INTO w_objdata WITH KEY atnam = s_atnam-low.
    IF sy-subrc = 0.
    MOVE w_data-matnr TO w_objdata_temp-matnr.
    MOVE w_data-maktx TO w_objdata_temp-maktx.
    MOVE-CORRESPONDING w_objdata TO w_objdata_temp.
    MOVE w_data-prdha TO w_objdata_temp-prdha.
    MOVE w_data-mstde TO w_objdata_temp-mstde.
    APPEND w_objdata_temp TO i_objdata_temp.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM. " GET_CLASSIFICATION

  • Dynamic field labels in table control

    Hi experts,
        My requirement is to display dynamic field labels in table control can we do this. I am much aware
    that we can do it in alv_grid. Please let me know.
    Thanks in advance.
    Sri

    Hi Anubhab,
         Thanks. With your help i could able to solve the problem. Let me put this in some
    more detail.
    When we are pulling the field from a table to table control we need to make sure the fields should have a data elements. After pulling all the fields to a table control ,we need to drag out  and delete the current table control column headings and then drop in the (new) I/O fields into their place.  I then set the text on these new fields within the PBO.  If we try to drop the (new) I/O fields on top of the existing ones with out deleting it won't work.
    Thanks & Regards.
    Srikanth

  • How to access dynamic fields in a field symbol

    hi
    how do i access the dynamic fields created in side a field-symbol....
    wht i mean is i have a table, whose workarea i assign to field symbol. but this table is runtime, altough i have debugged and found the values in this table, I want to accees the field symbol in a generic way.
    say the table has 3 fields now fld1 fld2 and fld3 so i want to access the field symbol <fs> as <fs>-(name) where name can be anything fld1 or fld2 whichever i assign....
    thanks. Let me know if you have any further questions.

    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to a field symbol before you can address it in a program.
    Field symbols are similar to de-referenced pointers in the C programming language (that is, pointers to which the content operator * is applied). In ABAP, data references represent a real equivalent to pointers in the sense of variables that contain a memory address and can be used without the contents operator.
    All operations programmed with field symbols are applied to the field assigned to it. A MOVE statement between two field symbols, for example, assigns the contents of the field assigned to another source field symbol to the field assigned to the target field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before the MOVEstatement.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks during the field assignment whether the assigned field matches the type of field symbol.
    Field symbols provide greater flexibility when you address data objects:
    ·        You can assign one field symbol to another, which allows you to address subfields.
    ·        Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    ·        You can also force a field symbol to take different technical properties than those of the field assigned to it (casting).
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. The MOVE statement (with your own auxiliary variables, if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    To declare a field symbol, use the statement
    FIELD-SYMBOLS  .
    For field symbols, the angle brackets are part of the syntax. They identify field symbols in the program code.
    If you do not specify any additions, the field symbol.
    in a static ASSIGN and:
    ASSIGN (dobj) TO  from the second loop pass onwards.

  • Dynamic fields and conditions

    Hi!
    I have created a tabular form with:
    1. Fields that users can use to filter the table
    2. Filter button to filter the data
    3. Fields where they select the column name, input the value for update
    4. Update button that updates the filtered data in a dynamic PL\SQL
    I have a set SQL query on the report that always checks all the values, so I need to have nvl function in case users don't fill all the fields.
    Problem with this is that the query lasts very long.
    Another problem is, that since I have max 3 columns for update; in case they don't fill those columns, update doesn't work.
    Is it possible to maybe create fields in a dynamic way like it is default on a report?
    And does anyone know how I could solve the problem with the update in case users select just one column name and fill just one value for update?
    Regards,
    Ivan

    It is possible to dynamically generate PL/SQL. Your problem is, you need to generate the entire program. So, if you are manipulating PL/SQL tables in your dynamic SQL you need to declare those tables and populate them in the dynamic code. Although, I suppose you could pass PL/SQL tables as parameters to EXECUTE IMMEDIATE, I've never tried. Either way, I foresee a gnarly piece of code coming up. I'm glad I don't have to maintain it.
    In the following example I shall ignore all considerations of PL/SQL tables, etc. In other words, it won't work but it will give you the idea.
    plsql_stmt := 'DECLARE l1 number; l2 number; l3 number; l4 number; BEGIN '
    plsql_stmt := plsql_stmt||' l1 := :1; l2 := :2; l3 := :3;';
    FOR lrec IN ( SELECT rownum AS r, field_1, field_2, math_op, do_something FROM rules )
    LOOP
       IF lrec.r != 1
       THEN
          plsql_stmt := plsql_stmt||'ELSIF ';
       ELSE
          plsql_stmt := plsql_stmt||'IF ';
       END IF;
       plsql_stmt := plsql_stmt||lrec.field_1||' '||lrec.math_op||' '||lrec.field_2;
       plsql_stmt := plsql_stmt||' THEN '||lrec.do_something||' ;';
    END LOOP;
    plsql_stmt := plsql_stmt||' END IF; :4 := l4; END;';
    EXECUTE IMMEDIATE plsql_stmt USING ln_abc, ln_def, ln_ghi, ln_result;
    ...Good luck, APC

  • Comparing dynamic fields of objects using equals and hashCode methods

    To compare the different objects of the same class with their contents like jobTitleId, classificationId, deptId & classificationId was to be done and do some manipulations later using Set and Map. I was able to do that by simply overriding the equals and hashCode methods of Object class and was able to fetch the information (like in the following Map).
        Map<LocationData, List<LocationData>>
    The following is the class I used (its been shown to you so that it can be referred for my problem statement):
    LocationData class
        package com.astreait.bulkloader;
        public class LocationData {    
            String locId, deptId, jobTitleId, classificationId;
            @Override  
            public boolean equals(Object obj) {        
                LocationData ld = (LocationData)obj;       
                return this.deptId.equals(ld.deptId) && this.jobTitleId.equals(ld.jobTitleId) && this.classificationId.equals(ld.classificationId) &&
        this.locId.equals(ld.locId);   
            @Override  
            public int hashCode() {        
                return deptId.hashCode() + jobTitleId.hashCode() + classificationId.hashCode() +locId.hashCode();  
    Problem:
    I'm already known to which all fields of this object I need to make the comparison.
    i.e I'm bound to use the variables named classificationId, deptId, jobTitleId & locId etc.
    Need:
    I need to customize this logic such that the fields Names (classificationId, deptId, jobTitleId & locId etc) can be pulled dynamically along with their values. So, as far as my understanding I made use of 2 classes (TableClass and ColWithData) such that the List of ColWithData is there in TableClass object.
    I'm thinking what if I override the same two methods `equals() & hashCode();`
    such that the same can be achieved.
        TableClass class #1
        class TableClass{
            List<ColWithData> cwdList;
            @Override
            public boolean equals(Object obj) {
                boolean returnVal = false;
                        // I need to have the logic to be defined such that
                        // all of the dynamic fields can be compared
                return returnVal;
            @Override
            public int hashCode() {
                int returnVal = 0;
                        // I need to have the logic to be defined such that
                        // all of the dynamic fields can be found for their individual hashCodes
                return returnVal;
    ColWithData class #2
        class ColWithData{
            String col; // here the jobTitleId, classificationId, deptId, locId or any other more fields info can come.
            String data; // The corresponding data or value for each jobTitleId, classificationId, deptId, locId or any other more fields.
    Please let me know if I'm proceeding in the right direction or I should make some any other approach. If it is ok to use the current approach then what should be performed in the equals and hashCode methods?
    Finally I need to make the map as: (Its not the concern how I will make, but can be considered as my desired result from this logic)
        Map<TableClass, List<TableClass>> finalMap;

    Hello,
    What is the relation with the Oracle Forms tool ?
    Francois

  • How to get dynamic fields to spread to the next page?

    Thanks to a couple of wonderful folks on this board. I have found a way to get my dynamic field to move and I have gotten the static text fields below that to move. Now I have another problem. As my dynamic field has expanded towards the end of the page. The static fields ahead of it have disappeared. I know that there is a setting to have the static fields move to the next page. Or is there a way to do it? I would love some help on this.
    Thanks in advance

    I had this issue. I had to wrap the static fields below in a sub form and change the settings on that sub form to flow with content like I did with the original text box. This will push the static forms to the next page on the form, but there is one problem with this that I haven't gotten around. When the text box spans multiple pages, printing the page will not print all of the text. For example. A text box where 45 lines of text are entered, 20 are on the first page, 25 are on the second page. It will display properly, but when printed the text that prints on page 2 will be the same text you see on page one. If I wasn't clear enough on moving the static fields, let me know. I can give you the steps. Hopefully the printing thing won't cause you grief.

  • Get input for 100 dynamic fields in a single screen

    Hi all
    I got one requirement wherein i need to accept input for around 100 dynamic fields in a single screen. screen can scroll down if possible.
    Can anyone tell me whether it is possible. if yes please let me have the sample code.
    Thanks
    Ravindra Suvarna

    Ravi,
    Probably a TAB STRIP might help you.
    Seggregate your 100 fields logically, say 5 groups.
    Have a TAB STRIP CONTROL, with 5 tab strips and place 20 fields in each of the tabs. Each tab strip will have a sub screen.
    Regards,
    Ravi
    Note : Please mark the helpful answers.

  • Dynamic field value in Sales order item table control

    Hi
    I need to find the VBAP-VKAUS (Usage indicator) field value in run time of the creation of sale order ...these values stored in the  table TVLV.
    when i debug the program SAPMV45A in the screen 4900 this VBAP-VKAUS value gets empty in structure VBAP even though i can see other values like MATNR etc...
    this field is configurable (dynamic) field and not appear for all the ordertypes.
    i need to pass this VBAP-VKAUS  value to KOMPD-VKAUS
    Thru user-exit..so please let me know if somebody knows how to find this VBAP-VKAUS  value.
    Thanks in advance
    Madi

    hi,
    Plz Check the struc KOMP/KOMK. Let me know, if this helped.
    Rgds,
    Raghu.

  • How can we display dynamic fields from a XML CLOB?

    Jdeveloper Version : 11.1.1.4.0 (11g)
    We are calling a database package.procedure from a page VO and it returns a result set. The result set is mainly a XML CLOB. Within XML CLOB, we have various sections which we need to parse and display those on JSF page. Couple of sections within XML are having dynamic fields which means the number of fields returned under that section may change depending upon data conditions. We need to find technical way of displaying those dynamic fields (field name and its data – both are part of XML).
    Please suggest how can this be achieved.
    Thanks

    <?xml version="1.0" encoding="UTF-8" ?>
    <nodes>
    <node>
    <category_id>3</category_id>
    <parent_id>2</parent_id>
    <name>Mobile</name>
    <is_active>1</is_active>
    <position>1</position>
    <level>2</level>
    <children>
    <node name="Nokia" category_id="6" parent_id="3" is_active="1" position="1" level="3">
    <node name="Nokia N79" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N95" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N97" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    </node>
    <node name="Samsung" category_id="7" parent_id="3" is_active="1" position="2" level="3">
    </node>
    </children>
    </node>
    <node>
    <category_id>4</category_id>
    <parent_id>2</parent_id>
    <name>Laptop</name>
    <is_active>1</is_active>
    <position>2</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>5</category_id>
    <parent_id>2</parent_id>
    <name>Monitor</name>
    <is_active>1</is_active>
    <position>3</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>8</category_id>
    <parent_id>2</parent_id>
    <name>Camera</name>
    <is_active>1</is_active>
    <position>4</position>
    <level>2</level>
    <children></children>
    </node>
    </nodes>
    Is this correct format to create dynamic menu?

Maybe you are looking for