How to create Form based on a table to display multiple record

Hello All,
Would somebody please tell me how to create a Form based on a single table ,
to view and insert multi record based on a single table.In other words I would like
to have a form as shown below ,where the users can Insert,update,delete,query and so on
Item Id PArt Number List Price
100 Item-1 $120.oo
200 Item-2 $150.00
300 Item-3 $50.00
I know I can do it as Single Record block using Tabular Format,but multiple record ?????
Thanks in Anticipation
Babu

Try this method,
1. Creat a Master Detail Form (Custom Layout and not tabular)
and in the master block select one field.
2. In the HTML layout for master remove the reference for
that field(so that nothing will appear in the master block
of the form).
3. Before the update (in the Pl/SQL event handler select the 'Save' event and write the following code to avoid updating master block).
p_session.set_value(p_block_name => 'MASTER_BLOCK',
p_attribute_name => 'MASTER_ACTION',
p_value => 'None');
doSave;
For eg, let's say
Master is from 'Dept' table and Detail is from 'Emp' table(with join condition Dept.dept_id = Emp.dept_id). In the master remove everything except dept_id field and in the HTML layout for master remove the reference of the dept_id field(you cannot remove this field physically from the master layout). Now the form will look like multirow form rather than master detail form but only problem with this workaround is 'Detail Action' will be present in the detail block.
I hope this will help you.
Thanks
-Krishnamurthy

Similar Messages

  • Error creating form based on a table

    This is wierd. I am running WebDB2.2
    and up until now it has been no problem
    creating forms from tables. But now in
    this schema called SUMI I am unable to
    create a form based on a table. I get
    the error below. I have assigned SUMI
    almost every possible permission
    (DBA, WebDeveloper) so I
    don't think it is a permissions issue.
    Any ideas? Thanks in advance. Marvin.
    ---Error Message--
    14/Aug/2001:13:12:28
    ORA-06550: line 5, column 7:
    PLS-00302: component 'FORM_NOTWORK' must be declared
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 7:
    PLS-00302: component 'FORM_NOTWORK' must be declared
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    VARIABLES IN FORM NOT IN PROCEDURE:
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    null

    I am bumping this up. Can anybody help or
    at least point me in the right direction?
    Thanks!

  • How to create ODS based on a table (e.g. TCURR)

    Hello!
    I need to have access to V_TCURR in my BEx reports, cause I want to show relevant rates.
    Could you give me some links (if they exists) where I can find information about this?
    And I'd be really pleased if someone write a step-by-step instruction, because I tried to do it (I found some instructions in different topics) and failed.
    Thanks for responses.

    Hi,
    why dont you go for generic extraction to extract the data from the table TCURR to ODS.
    create the objects according to the fields in the table and design the ODS. map the fields with the objects and extract the data. The you can report on the ODS.
    Sunil

  • How to add a new row in Tabular Form based on a table

    Hi
    I have tabular form based on a table.
    I want the table to have an empty row when there is no data
    in the table so that I can enter data directly.
    But right now whenever the page is launched, its showing a no data found message and I have to press the 'Add Row' button to enter data.
    Can anyone help me out on this?
    Thanks

    Hi Leo
    Your suggestion works fine in the APEX 2.1
    But in 3.0.1 it gives this error :
    Error in add row internal routine: ORA-01476: divisor is equal to zero
    Error Unable to add rows.
    I am not sure why this happens.

  • Exception Handling for a Form Based on a Table

    I created a form based on a table. If a user tries to enter a
    record with key data that matches an existing record, Oracle
    Portal creates a page and displays:
    Error:
    An unexpected error occurred: ORA-00001: unique constraint
    (TIMETRACK.SYS_C007185) violated (WWV-16016)
    How can I capture this exception so that I can display a
    friendlier error message (via a JavaScript alert or other
    means) instead of this page?
    Fran

    James, I tried your suggestion as follows:
    doInsert;--- This is the default handler
    Exception
    when DUP_VAL_ON_INDEX then
    p_session.set_value(
    p_block_name => "_block",
    p_attribute_name => '_STATUS',
    p_value => ' Time has already been entered for this project on
    this date. Click the Back button to return to the MIM Time
    Entry page. ');
    Raise;
    end;
    It did nothing. All I got was the default message.
    I then changed '_STATUS' to 'A_STATUS'. The resulting error
    message was: "Error: (WWV-00000)"
    ON A RELATED NOTE...
    I discovered while testing this form on IE 5 on a Mac, that
    additional error messages are generated. With IE 5 on WindowsNT
    only a message regarding the unique constraint is produced. On
    the Mac there is an additional message "No conversion performed
    for type INTEGER, value is NsNu (WWC-49102)"
    Anyone have any thoughts as to why the output of system
    generated errors should differ between a PC and a Mac?
    Fran

  • Detail tabular form based on two tables

    db11gxe , apex 4.0 , firefox 24 ,
    hi all ,
    i have a master detail form based on two tables , the detail form ofcourse based on one table , the problem is i want to include a column of another
    table into the tabular form , so i have changed the query of the tabular form and included the column in it correctly ,
    but the problem is about saving data , i can not save the data , i think
    because the "mru" process is based on one table , that is because i face an error talking about "mru" process when i try to save the data ,
    Error in mru internal routine: ORA-20001: no data found in tabular form Unable to process update.
    so
    what should i do to save the data ? should i create another "mru" process based on the other table or what ?
    thanks

    Anything beyond "simple" requires that you do it yourself.  I believe that what you want is "beyond simple"
    As far as I know, you can only use the 'mru' on one table.
    (I could be wrong)
    If the conditions are right, you might be able to simplify things such that you can use the 'mru'.
    ie CREATE VIEW on the two tables.
    However, you need to understand how Oracle treats DML operations on views, what type of views can be updated, etc., etc.
    If just creating the view doesn't work, creating an INSTEAD OF trigger on the view come to mind...
    (lol) - at that point, you have already started down the 'dark path' of creating your own 'MRU'
    personal note:  triggers have a really baaaddd habit of hiding code from other developers.  you are better off, in the long run, creating your own 'mru'..
    ie a package with procedures to handle INSERT, UPDATE, and DELETES
    MK

  • Delete button on Form based on a table

    I created a form based on a table. For the delete button, how can I make it ask before deleting the record? ie, when the user hits Delete, a question comes up that asks: Do you really want to delete this record? The user then hits Yes or No.
    Please be specific, I'm new to Portal. Thanks for any help.

    1. Edit your Form and go to "Step 4 of 7, Formatting and Validation Options" section of the builder.
    2. In the left frame, click on DELETE_TOP and/or DELETE_BOTTOM link.
    3. In the right frame, you should see a section (i.e. "Javascript Event Handlers") where you can add your own javascript code. Click on the onClick event.
    4. In the adjacent free-text field, add the following code:
    javascript:if(confirm('Do you really want to delete this record?')){
    null;
    else
    window.stop();
    5. Click on OK to compile. That's it.
    The window.stop() is needed to prevent the PL/SQL event handler (i.e. Update) from running. Without window.stop(), if the user presses Cancel, the form will perform an update anyway. You'll need to remember that the Form will by default perform the Javascript handlers first, then the PL/SQL handler.

  • Open Form Based On A Table in same window

    Hi All,
    First to make things clearer I'll explain what I CAN do:
    Create a page which queries a session variable at the start and then
    depending on its value outputs different HTML, but always in the same
    format and more importantly the same window, to keep the look and feel etc...
    I have a link in a page which when clicked opens a form using wwa_app_module.link
    so it auto queries the form. This works fine.
    What I CAN NOT do is:
    The form was created using the "form based on a table wizard" and always opens
    in a new window.
    Can I make the form open in the same window that contains my wwa_app_module.link?
    Is this possible in a newer version that I have (I got Release 1)
    Any Suggestions?
    Cheers,
    Barry

    Firstly thanks Rahul Dubey for responding.
    What I mean by " contains my wwa_app_module.link? " :
    I have a form which contains a link similar to the one below:
    http://xxx.co.uk:8015/pls/pod130/PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=1389245486&p_arg_names=EMPNO&
    p_arg_values=7654&p_arg_names=_empno_cond&p_arg_values=%3D%3E
    When I click on this link it opens the form and runs a query automatically.
    The problem is I want to click on the link and have the form appear in the
    same window, not a new one.
    Cheers,
    Barry

  • Create form based on existing row : advice from specialists

    hello,
    i've coded a "create form" based on a row selected by the user.
    this create form displays the same information as the selected row (except for the primary key which is a sequence trigger-calculated) the user can then modify any field and then commit the creation. It's quicker for tables with many columns since the user will override only several fields instead of setting every field one by one.
    I've done it this way :
    1) creation of a createCustomMethod() in my ViewObject implementation class and published it in the client interface.
    2) drag and drop the method as a command button on the selection list page
    3) set the action of the command button to the navigation case value to open the create form when the button is clicked.
    the code of the createCustomMethod() is the following
    public void createCustomMethod() {       
    Row currentRow = this.getCurrentRow();
    Row newRow = this.createRow();
    newRow.setAttribute("Attribute1",currentRow.getAttribute("Attribute1"));
    newRow.setAttribute("Attribute2",currentRow.getAttribute("Attribute2"));
    /* more initialization code here */
    this.insertRow(newRow);
    this.setCurrentRow(newRow);
    it works fine but as i'm knew to ADF BC is this a good solution ? are there any drawbacks to it ?
    thanks
    -regards

    what's the advantage of exposing it in the application module rather than in the view object ?
    Message was edited by:
    user562278
    i've tried implementing the method in the application module (i had to call the findViewObject() now) but the "Row currentRow = vo.getCurrentRow();" instruction throws a NPE.

  • Can't create MDFORM based on detail table with upload field

    Has anyone suceeded in creating a Master Detail Form based on a detail form which has an upload field (blob column)?
    I created a table (workingorders) and I want to attach documents to these orders so I created a table (attachments) which holds the attached documents and created a FK between workingorders and attachments. When I create a MD-form based on these tables I get the error:
    Exception from wwv_generate_component.build_procedure (WWV-01821)
    Error creating module: ORA-01403: no data found (WWV-16042)
    When I use a detail table without the BLOB column I don't get this error and everything works just fine.
    any ideas?
    Edward

    Yes, there was a problem when there was a blob field only in the detail table. This has been addressed in patch 3.0.9.8.4 (to be released shortly).
    Till then you will have to put corresponding dummy blob columns in the master table to create the form.

  • How to create screen resolution in bdc table control

    hi gurus
    can anyone suggest me
    how to create screen resolution in bdc table control
    thanks&regards
    mark.

    Hi ,
    Using CTU_PARAMS table for screen resolution .
    For this sample code.
    This is for Transation  FB60.
    report ZZFB60
           no standard page heading line-size 255.
    tables t100.
    PARAMETERS : p_file1  like  rlgrap-filename,
                 p_doctyp like  RF05A-BUSCS,
                 p_invdat like  INVFO-BLDAT,
                 p_posdat like  INVFO-BUDAT.
    CONSTANTS  :  C_TRANS_FB60(4) VALUE 'FB60'.
    *Parameter string for runtime of CALL TRANSACTION
    data : l_option type ctu_params,
           l_subrc type sysubrc.
    DATA :  l_mstring(150).
    data      accnt type char17.
    data       : day   type char2,
                 month type char2,
                 year  type char4,
                 date1 type char10,
                 date2 type char10.
    data      :  cnt(2) TYPE n,
                 cnt1 type i,
                 fld(25) TYPE c.
    data : begin of excel occurs 0,
            fieldname(255) type c,
           end of excel.
    DATA:BEGIN OF it_mess OCCURS 0,
             msgtyp(5),
             lms(200),
              msgv1(50),
         END OF it_mess.
    data: begin of t_record occurs 0,
             BUKRS(004),
            ACCNT(017),
            XBLNR(016),
            WRBTR1(016),
            WAERS(005),
            SECCO(004) ,
            SGTXT(050),
            HKONT(010),
            WRBTR2(017),
            MWSKZ(002),
            GSBER(004),
            KOSTL(010),
         end of t_record.
    *Internal Table for Header Data
    DATA :  BEGIN OF t_head OCCURS 0,
            BUKRS(004),      "Company Code
            ACCNT(017),      "Account or Vendor
            XBLNR(016),      "Reference
            WRBTR1(017),     "Amount in document currency
            WAERS(005),      "Currency
            SECCO(004),      "Section Code
            SGTXT(050),      "Text
            END OF t_head.
    *Internal table for Item Data
    DATA :  BEGIN OF t_item OCCURS 0,
            ACCNT(017),      "Account
            HKONT(010),     "GL Account
            WRBTR2(017),    "Line item Amount in document currency
            MWSKZ(002),     "Tax Code
            GSBER(004),     " Business Area
            KOSTL(010),     "Cost centre
            END OF t_item.
    DATA: IT_BDCDATA      LIKE  BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_BDC_MESSAGES LIKE  BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    *include bdcrecx1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      PERFORM  file_selection.
      PERFORM  data_upload.
      PERFORM  table_control.
    start-of-selection.
    l_option-defsize = 'X'.
    l_option-dismode = 'A'.
    l_option-updmode = 'S'.
    day = p_invdat+6(2).
    month = p_invdat+4(2).
    year =  p_invdat+0(4).
    concatenate day month year into date1 SEPARATED BY '.'.
    day = p_posdat+6(2).
    month = p_posdat+4(2).
    year =  p_posdat+0(4).
    concatenate day month year into date2 SEPARATED BY '.'.
    *perform open_group.
    loop at t_head.
    CLEAR    IT_BDCDATA.
    REFRESH  IT_BDCDATA.
    perform bdc_dynpro      using   'SAPLACHD'         '1000'.
    perform bdc_field       using   'BDC_OKCODE'        '=ENTR'.
    perform bdc_field       using   'BKPF-BUKRS'        t_head-bukrs.
    perform bdc_dynpro      using   'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    perform bdc_field       using   'RF05A-BUSCS'       p_doctyp.
    perform bdc_field       using   'INVFO-ACCNT'       t_head-accnt.
    perform bdc_field       using   'INVFO-BLDAT'       date1.
    perform bdc_field       using   'INVFO-BUDAT'       date2.
    perform bdc_field       using   'INVFO-XBLNR'       t_head-xblnr.
    perform bdc_field       using   'INVFO-WRBTR'       t_head-wrbtr1.
    perform bdc_field       using   'INVFO-WAERS'       t_head-waers.
    perform bdc_field       using   'INVFO-SECCO'       t_head-secco.
    perform bdc_field       using   'INVFO-SGTXT'       t_head-sgtxt.
    cnt = 1.
    cnt1 = 1.
    loop at t_item where accnt = t_head-accnt.
    *if cnt > 4.
    *cnt = 4.
    *endif.
    if cnt1 gt 1.
    CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    perform bdc_field      using   fld                   'X'.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    endif.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-hkont.
    CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
    perform bdc_field  using       fld                t_item-wrbtr2.
    CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-mwskz.
    CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-gsber.
    CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-kostl.
    perform bdc_field      using  'BDC_CURSOR'  fld.
    *CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    *perform bdc_field      using   fld                   'X'.
    cnt1 = cnt1 + 1.
    *cnt = cnt + 1.
    *if cnt > 1.
    *perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    *perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    **perform bdc_field       using 'BDC_OKCODE'        '=0006'.
    *endif.
    endloop.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BS'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    *perform bdc_transaction using 'FB60'.
    CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA  options from l_option
                                 MESSAGES INTO IT_BDC_MESSAGES.
    perform error.
    perform errordownload.
    endloop.
    *perform close_group.
    *Form  data_upload
    FORM data_upload .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME              =  p_file1
       FILETYPE              = 'DAT'
      TABLES
        DATA_TAB             =  t_record.
    ENDFORM.                    " data_upload
    *Form  file_selection
    FORM file_selection .
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  =  syst-cprog
          dynpro_number =  syst-dynnr
          field_name    = 'p_file1'
        IMPORTING
          file_name     =  p_file1.
    ENDFORM.                    " file_selection
    Form  BDC_DYNPRO
    FORM BDC_DYNPRO using program dynpro.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND  IT_BDCDATA.
    endform.
    *Form  BDC_FIELD
    FORM  bdc_field using fnam fval.
      CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND  IT_BDCDATA.
    ENDFORM.
    Table Control
    FORM table_control .
      LOOP AT t_record.
        ON CHANGE OF t_record-accnt.
          MOVE-CORRESPONDING t_record TO t_head.
          APPEND t_head.
        ENDON.
      loop at t_head.
             t_item-accnt   =  t_head-accnt.
             t_item-hkont   =  t_record-hkont.
             t_item-wrbtr2  =  t_record-wrbtr2 .
             t_item-mwskz   =  t_record-mwskz .
             t_item-gsber   =  t_record-gsber .
             t_item-kostl   =  t_record-kostl.
        APPEND t_item.
    endloop.
         If t_record-level = 'H'.
             t_head-bukrs   =  t_record-text1.
             t_head-accnt   =  t_record-text2.
             t_head-xblnr   =  t_record-text3.
             t_head-wrbtr1  =  t_record-text4.
             t_head-waers   =  t_record-text5.
             t_head-secco   =  t_record-text6.
             t_head-sgtxt   =  t_record-text7.
          APPEND t_head.
         else.
            t_item-accnt   =  t_head-accnt.
            t_item-hkont   =  t_record-text1.
            t_item-wrbtr2  =  t_record-text2.
            t_item-mwskz   =  t_record-text3.
            t_item-gsber   =  t_record-text4.
            t_item-kostl   =  t_record-text5.
         APPEND t_item.
         endif.
      ENDLOOP.
    ENDFORM.
    FORM error .
      LOOP AT IT_BDC_MESSAGES.
        IF IT_BDC_MESSAGES-msgtyp = 'E'.
       SELECT single  * FROM t100  WHERE
                                    sprsl = it_BDC_MESSAGES-msgspra
                                    AND   arbgb = IT_BDC_MESSAGES-msgid
                                    AND   msgnr = IT_BDC_MESSAGES-msgnr.
          IF sy-subrc = 0.
            l_mstring = t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ENDIF.
            CONDENSE l_mstring.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ELSE.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    form errordownload.
    *down the internal table to excel file.
    call function 'EXCEL_OLE_STANDARD_DAT'
               EXPORTING
                    file_name                 = 'c:/Error.xls'
               TABLES
                    data_tab                  = it_mess
                    fieldnames                = excel
               EXCEPTIONS
                    file_not_exist            = 1
                    filename_expected         = 2
                    communication_error       = 3
                    ole_object_method_error   = 4
                    ole_object_property_error = 5
                    invalid_filename          = 6
                    invalid_pivot_fields      = 7
                    download_problem          = 8
                    others                    = 9.
    endform.
    Reward if useful
    Regards,
    Narasimha
    Edited by: narasimha marella on May 13, 2008 12:12 PM

  • Create Fieldcatalog based on internal table (dynamic)

    Hi ,
    Is there a way to create Create Fieldcatalog based on internal table (dynamic).
    while creating fieldcat we usually many give the fields "fieldname" and "tabname".
    is there a way to get the fieldname from the main table ?
    Eg ..
    I have i_tab as the output table. It has 3 fields "a", "b" and "c"
    Now when i created fieldcat manually ( in case i cannot use fieldcat_merge FM) , i have to append 3 throws in fieldcat table.
    These rows would have "a", "b" and "c".
    Now i want to know if there is a way in which i can find "a" "b" and "c" fieldnames from the createdd internal tables.
    i can then append the same to fieldcat.

    Hi Anuj,
    I created a FORM routine for this 4 or 5 years ago and made a couple of refinements. Meanwhile it has prooved as very useful.
    The disadvantag is that it creates the oldfashioned field catalog for the function calls. But I already used it for OO fieldcatalog of LVC type - there is a function module for this but I do not have the name here.
    You need the two forms (second called in first) to build the field catalog from any internal table that can be used for ALV display.
    *&      Form  ALV_FIELDCAT_FOR_ITAB
    *       Feldkatalog from (arbitrary) internal Table (c) Clemens Li
    *       * build field catalog from        type description
    form alv_fieldcat_for_itab                                  "#EC *
      tables   pt_outtab                      type table        "#EC *
      changing pt_alv_fieldcat                type slis_t_fieldcat_alv."#EC *
      data:
        lv_desc                               type sydes_desc,
        ls_alv_fieldcat                       type slis_fieldcat_alv,
        lv_longfield                          type text80."CRM<=R/3 fname.
      field-symbols:
        <typeinfo>                            type sydes_typeinfo,
        <nameinfo>                            type sydes_nameinfo.
      describe field pt_outtab into lv_desc.                    "#EC *
      loop at lv_desc-types
          assigning <typeinfo>
          where not idx_name is initial
            and table_kind is initial "no entries for deep table like color
            and back                          = 1. "top-level-entries only.
        read table lv_desc-names index <typeinfo>-idx_name
          assigning <nameinfo>.
        check <nameinfo>-name                 <> 'INCLUDE'.
        ls_alv_fieldcat-fieldname             = <nameinfo>-name.
        while not <nameinfo>-continue is initial.
          add 1 to <typeinfo>-idx_name.
          read table lv_desc-names index <typeinfo>-idx_name
            assigning <nameinfo>.
          concatenate
            ls_alv_fieldcat-fieldname
            <nameinfo>-name
            into ls_alv_fieldcat-fieldname.
        endwhile." not <nameinfo>-continue IS INITIAL.
        read table lv_desc-names index <typeinfo>-idx_help_id
          assigning <nameinfo>.
        if sy-subrc                           = 0.
    * Caution: Help-ID may be Tablename-Fieldname and thus longer
    * than 30 Chars; ls_alv_fieldcat-rollname is 30 Chars only
          ls_alv_fieldcat-rollname            = <nameinfo>-name.
          lv_longfield                        = <nameinfo>-name.
          while not <nameinfo>-continue is initial.
            add 1 to <typeinfo>-idx_help_id.
            read table lv_desc-names index <typeinfo>-idx_help_id
              assigning <nameinfo>.
            concatenate
              lv_longfield
              <nameinfo>-name
              into lv_longfield.
          endwhile." not lv_desc-continue is initial.
    * help id may be data element or <table>-<field>
          if lv_longfield ca '-'.
    * get data                                type for table field
            perform get_rollname_4_tabfield
              using lv_longfield changing ls_alv_fieldcat.
          endif." lv_longfield ca '-'.
        else.
    * No Help-ID: Use Fieldname as text
          ls_alv_fieldcat-seltext_s           =
          ls_alv_fieldcat-seltext_m           =
          ls_alv_fieldcat-seltext_l           =
          ls_alv_fieldcat-reptext_ddic        =
          <nameinfo>-name.
        endif." sy-subrc                      = 0.
    * Starting 4.7: get edit mask
        if not <typeinfo>-idx_edit_mask is initial.
          read table lv_desc-names index <typeinfo>-idx_edit_mask
            assigning <nameinfo>.
          ls_alv_fieldcat-edit_mask           = <nameinfo>-name.
          if not <nameinfo>-continue is initial.
            add 1 to <typeinfo>-idx_edit_mask.
            read table lv_desc-names index <typeinfo>-idx_edit_mask
              assigning <nameinfo>.
            concatenate
              ls_alv_fieldcat-edit_mask
              <nameinfo>-name
              into ls_alv_fieldcat-edit_mask.
          endif." not <nameinfo>-continue IS INITIAL.
        endif." not <typeinfo>-IDX_EDIT_MASK is initial.
    * assign length, output length and decimals
        ls_alv_fieldcat-intlen                = <typeinfo>-length.
        ls_alv_fieldcat-outputlen             = <typeinfo>-output_length.
        ls_alv_fieldcat-decimals_out          = <typeinfo>-decimals.
        ls_alv_fieldcat-inttype               = <typeinfo>-type.
        append ls_alv_fieldcat to pt_alv_fieldcat.
        clear:  "prevent anything 2 B  taken for subsequent fields
          ls_alv_fieldcat.
      endloop." at lv_desc-types where not IDX_NAME is in initial.
    endform.                    " ALV_FIELDCAT_FOR_ITAB
    *&      Form  get_rollname_4_tabfield
    *       Get Data                          type for Table field
    form get_rollname_4_tabfield
      using    p_fname                        type text80 ""CRM<=R/3 fname
      changing p_alv_fieldcat                 type slis_fieldcat_alv.
      field-symbols:
        <dfies>                               type dfies.
      data:
        lv_tabname                            type tabname,
         lt_dfies                             type table of dfies,
        lv_fieldname                          type fieldname.
      split p_fname at '-'
        into lv_tabname lv_fieldname.
      clear p_alv_fieldcat-rollname.
      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname                             = lv_tabname
          fieldname                           = lv_fieldname
    *   LANGU                                 = SY-LANGU
    *   LFIELDNAME                            = ' '
    *   ALL_TYPES                             = ' '
    * IMPORTING
    *   X030L_WA                              =
    *   DDOBJTYPE                             =
    *   DFIES_WA                              =
    *   LINES_DESCR                           =
       tables
         dfies_tab                            =  lt_dfies
    *   FIXED_VALUES                          =
       exceptions
         not_found                            = 1
         internal_error                       = 2
         others                               = 3
      if sy-subrc                             <> 0.
        message id sy-msgid                   type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        read table   lt_dfies assigning <dfies> index 1.
        p_alv_fieldcat-rollname               = <dfies>-rollname.
    * Und wenn keinerlei Twexte gepflegt sind?
        if <dfies>-reptext is initial and
           <dfies>-scrtext_s is initial and
           <dfies>-scrtext_m is initial and
           <dfies>-scrtext_l is initial.
    * No Text: Use Fieldname as text
          p_alv_fieldcat-seltext_s            =
          p_alv_fieldcat-seltext_m            =
          p_alv_fieldcat-seltext_l            =
          p_alv_fieldcat-reptext_ddic         =
          p_alv_fieldcat-fieldname.
        endif." <dfies>-reptext IS INITIAL AND
      endif.
    endform.                    " get_rollname_4_tabfield
    Regards,
    Clemens

  • Dynamically change the value of a select list in form based on a table

    Hi Friends,
    I am using a form based on a table. I want to display two fields as select lists instead of text boxes and when a value
    in a select list is selected, the corresponding values will be listed in the next select list. For example if department
    value is selected in a select list the employees in that department will be listed in the employee select list. I saw a
    metthod using ajax for achieving this in tabular form in Denes's sample application[Click Here| http://apex.oracle.com/pls/otn/f?p=31517:176:462842537250908::NO] .
    Is there any way to achieve the same for a form based on a table,
    Thanks,
    Tj

    Hi Andy,
    Could you tell me how I could use your example with multiple Application Items?
    My page has 3 cascading select lists. The second is dependent on the first and the third is dependent on both the first and second. I thought I would just need to add the second application item as a get, but not sure what the syntax would be. I have troubleshooted to the point where my select list refreshes when I have one in the javascript...just not sure how to add the additional one?
    Here's what I have (I have been referencing your 'Get Employees' page)
    My Page Items:
    P0_VENDOR_ID
    P0_VENDOR_SITE_ID
    P0_INVENTORY_ITEM_ID
    My Application Items:
    F_VDR_ID
    F_VDR_SITE_ID
    My query in the application process has both F_VDR_SITE_ID and F_VDR_ID in it.
    My javascript function...this worked OK until I added the additional get.add('F_VDR_SITE_ID')
    function getItems(filter, listName)
    var xml = null;
    var list = document.getElementById(listName);
    var listvalue = list.value;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=Set_Items',4);
    get.add('F_VDR_ID', filter.value);
    get.add('F_VDR_SITE_ID', filter.value);
    ret = get.get('XML');
    if(ret)
    var s = ret.getElementsByTagName("select");
    if(s){
    var o = ret.getElementsByTagName("option");
    var oCount = o.length;
    list.options.length = 0;
    for(var i = 0; i < oCount; i++){
    var l_Opt_Xml = o;
    appendToSelect(list, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue);
    list.value = listvalue;
    if (list.selectedIndex == -1)
    list.selectedIndex = 0;
    get = null;
    Thanks,
    Janel

  • Create graph based on dynamic table data

    Hi experts ;
    i have JDeve Version 11.1.2.2.0 , i'm create dynamic table based on dynamic SQL query this query return by function in database by based on passing parameter .
    My question :-
    1- How create graph based on dynamic table and contral it at run time ?
    Thanks & Best Regards

    Hi Mostafa,
    You can retrieve the data from your sql query in a backing bean and pass it on to Graph using the setTabularData method.
    Here is the javadoc for the setTabulardata method:
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/dataView/CommonDataview.html#setTabularData%28java.util.List%29
    Hope this helps
    Katia

  • Need to build a form based on a table in a different schema

    Hello all,
    I am still new to APEX. I have been playing with it for a few days.
    I have an APEX user 'demo' whose default schema is demo1.
    But I need to create a form that can insert,update and delete based on table 'employee' in schema demo2.
    Demo has all the rights on employee table in demo2. I also assigned the demo2 schema to demo user's workspace.
    But when I am building the form, demo1 is th eparsing schema, but in table/view owner only demo1 is available. I don't see demo2 even though I assigned it to demo user's workspace.
    Is it possible to build a form based on a table in a different schema? I tried creating a synonym, but it doesn't show up in the list of tables to select from.
    I don't want to create views or anything because there are many tables in different schemas and it's not possible to go on creating views or such for each one.
    I was able to access th etable in a report though by prefixing the table name with the schema name.
    I would appreciate if someone could point me in the right direction.
    Thanks!

    Varad,
    Thank you for the explanation. So from what I understand, every time I create a form or report based on a table in a different schema, just change the parsing schema in application definition to the new one and create the form or report. So this way my forms and reports or whatever can be based on different tables in different schemas and they would run fine when deployed in a runtime environment (provided the appropriate privileges are there on the objects in context)?
    I tried this and I was able to see the different schema and select the table and create the form. I haven't tested in runtime though.
    Seems like a feasible option, need to test all scenarios though. If this is a feasible solution then there is no need to create synonyms or views (I am not talking about others' scenarios such as security etc) etc. Just appropriate privileges will do it.
    Thanks Varad. Have you used this way of creating a form in your apps? I need to explore more to see if it breaks anything.
    So, every time I need to select an object, say a table, in a different schema I need to temporarily change the parsing schema to that schema in the application definition? Is that a correct statement?
    I will leave the thread open to see if anybody has any comments.

Maybe you are looking for

  • Admin rights to validate/execute business rules

    Hello everyone, we set access priviliges and administration rights in shared services by assigning users to particular groups. We assigned two users to the administration group 'hypadmins' who now have access to all applications. In Essbase they can

  • Asset & Capital Expenditure Budgeting

    Hi I am struck in Asset Purchases and Budgeting. We want to monitor & COntrol the Cpital Expenditure ( Assets). There for I tried to use the Internal orders to control the assets being purchased more than the budget value. The process is as follwos.

  • Logic of determination of delivery in subcontracting

    Subcontracting with delivery we can issue material to subcontractor via delivery also. how the delivery is determined by the system when there is no sales order. I know the customizing settings from MM and SD side , but am not able to find the logic

  • Terrible iChat video quality. What gives?

    My brother and I are trying to use iChat video. We both have an iMac, his is newer than mine, but we both have the same OS. On both ends the video quality is very poor and the audio is bad (hearing every other word). We both have high speed internet,

  • Pressure sensitive pen tool for flash

    Hi! ! Well i'm new to this forum. What I need is a <b>pressure sensitive pen tool plug-in for flash</b>, which will be very helpful for me in my animations. pls reply