Varray type in table column - How to?

When defining a table column I don't see any way to use a TYPE which I have defined.
I would like to define a column as a Varray. Can this be done in ApEx ??
tankx

You can try it yourself - ApEx is Oracle. Everything that applies on Oracle applies to ApEx
as well. It only depends on what you want to do with it. I thought, you may want to show
multiple details per line - what nested tables or how you call it Varrays are all about.
See this example on how to query nested tables using ApEx (but it actually hasn't anything
to do with ApEx):
http://htmldb.oracle.com/pls/otn/f?p=31517:122
Denes Kubicek

Similar Messages

  • How to use simple types for table column names ?

    Hi,
    can any one tell how to to use simple types for table column names?
    It is required in internationalizing of webdynpro applications.
    Regards,
    Rajesh

    Hi,
    1: define required column names in <SimpleType>
    2:use the following code to get those values
    3:bind 'text' property of Column headers to context attributes
    4:take a context attribute 'Value' as type of <SimpleType>
    5:set these values to context attributes
    IWDAttributeInfo objAttrInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.VALUE);
    ISimpleTypeModifiable simple=objAttrInfo.getModifiableSimpleType();
    Map m=simple.getEnumerationTexts();
    Collection c=m.values();
    Iterator it=c.iterator();
    if(it.hasNext())
    wdContext.currentContextElement.set<att1>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att2>(it.next().toString);
    if(it.hasNext())
    wdContext.currentContextElement.set<att3>(it.next().toString);
    Regards
    LakshmiNarayana

  • Dynamic internal table column,How to create .

    Hi all
    My requirement is to convert the layout as bellow:
    before:
    column1   column2   column3
    1              A             1
    1              B             1
    1              C             2
    2              A             1
    2              C             1
    convert to :
    column1    A     B     C
    1              1      1      2
    2              1      0      1
    The detail requirement is first to select all the customers and then to get the customers sales informations . the customer's name should be the internal  field name .
    can anyone give me some suggestions? thanks a lot.

    hi,
    chk this.
    Types: begin of ttab,
    fld1(10) type c,
    fld2 type sy-datum,
    end of ttab.
    data: itab type table of ttab.
    You can also build an internal table at runtime.
    Here is a sample program.
    report zxy_0003
           no standard page heading.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    selection-screen begin of block b1 with frame title text-001.
    parameters: p_check type c.
    selection-screen end of block b1.
    start-of-selection.
      perform build_dyn_itab.
      perform build_report.
      loop at <dyn_table> into <dyn_wa>.
        write:/ <dyn_wa>.
      endloop.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
    * Create fields
      clear index.
      do 10 times.
        index = sy-index.
        clear wa_it_fldcat.
        concatenate 'Field' index into
                 wa_it_fldcat-fieldname .
        condense  wa_it_fldcat-fieldname no-gaps.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 5.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    *      Form  build_report
    form build_report.
      data: fieldname(20) type c.
      data: fieldvalue(5) type c.
      data: index(3) type c.
      field-symbols: <fs1>.
      do 10 times.
        index = sy-index.
    * Set up fieldname
        concatenate 'FIELD' index into
                 fieldname .
        condense   fieldname  no-gaps.
    * Set up fieldvalue
        concatenate 'FLD' index into
                 fieldvalue.
        condense   fieldvalue no-gaps.
        assign component  fieldname  of structure <dyn_wa> to <fs1>.
        <fs1> =  fieldvalue.
      enddo.
    * Append to the dynamic internal table
      append <dyn_wa> to <dyn_table>.
    endform.
    check these links:
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci554038,00.html
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    rgds
    Anver

  • Mvt Type Text Table T156HT - How to configure?

    Hi all,
    There is a text table to support movement types - it's a general description table, unlike T156T. Seems like none of the Z* movement types created (copied from standard mvt types) has made an entry in this table during config.
    Anyone know how to update this table?
    Regards,
    Mark

    Hi,
    It is suggested that you should not do any direct table entry.Always follow the transaction OMJJ to copy the std movement type to the customized movement type.
    If it is not possible then you can follow the steps:
    1. goto trnasaction SE11
    2. Enter the table and press display
    3.goto "Utilities"
    4.Select"Table Content"
    5.Select "Create entries"
    This is not a process which should be used as a practice.
    Cheers,
    Satish Purandare

  • Question about Unique Table Columns - How to Handle Alerts

    I have a table with a unique column, and I want to provide an error alert when a user tries to insert a record in which there is another record that already has the same value for that column.
    I tried just relying on the table constraint in the DB, but I just get a "cannot insert record" message on the form run-time.
    I put a query in the PRE-INSERT trigger to query and see if that value exists in another record and display the alert there, but my concern is that a record could be inserted by another user after my check query runs. In that case, I will still just get the "cannot insert record" message.
    What is a good way that I can give an error alert AND assure that another record is not being inserted in the mean time?
    Thanks,
    Kurz

    There is NO way you can absolutely trap all situations by checking in the when-validate triggers.
    Your user could even try to insert the same duplicate value in two rows at the same time.
    Or another user could commit at the same time as the first.
    The ONLY way to handle those errors is to trap for the error in the On-Error trigger, which fires
    when Forms returns the FRM-40508 or FRM-40509 code. Here is the standard code we have settled on here:
    -- On-Error form-level trigger                                       --*
    DECLARE
      Err_Code NUMBER(5)     := ERROR_CODE;
      Msg      VARCHAR2(150)
              := SUBSTR('   '||ERROR_TYPE||'-'||TO_CHAR(ERR_Code)||': '
                                         ||ERROR_TEXT,1,150);
      DBMS_TXT VARCHAR2(200);
    BEGIN
      -- 40508=Unable to insert rec.  40509=Unable to update rec.
      IF Err_Code IN(40508,40509) THEN
        DBMS_TXT := SUBSTR(DBMS_ERROR_TEXT,1,200);
        IF  DBMS_TXT like '%unique constraint%'
        AND DBMS_TXT like '%I_PK_ASGTABLE%'  THEN
          U73_ERR_TIMER('ASG.RESIDENCE_CODE');
          Message('   5011  DUPLICATE RESIDENCE CODE FOUND');
          Raise Form_trigger_failure;
        END IF;
      END IF;
      -- This handles all other on-error messages:
      Message(Msg);
      Raise Form_trigger_failure;
    END;U73_ERR_TIMER just assures that focus gets placed on the correct item, and sets its color red.

  • Content types, Required site columns, How are they supposed to work?

    Hi,
    I have 2 issues:
    I created a Folder level content type with many Required site columns. I was hoping that when I create a new folder the new content type screen will pop up and I must enter all the required properties (metadata) for this new folder.
    Issue 1) But it didn't work that way.  It just required me to enter the name of the folder and the folder was created.
    Issue 2) I then went to Edit Properties to enter enter all the required metadata.  I would like to have my newly created content type to be the default.  So that when I open up the Edit Properties the popup screen would defalt to my new
    content type.  But it defaults to "Folder" Content type.   even though in liberary setting, My new content type was the only one check "visible" and set as default.
    Can someone please help? Am I missing something?
    Thanks!

    I don't think you can do what you want to do using only out of the box features. A few notes:
    Users will need to click the New Document dropdown in the ribbon to select your new folder content type. (I.e. Don't click New Folder)
    The "default" option in the content type list is to pick the default content type to be selected when you click the New Document button. (I.e. it won't impact the New Folder ribbon button)
    The ribbon button for New Folder is hard coded to use the built in folder feature.
    You may want to look into the 2010 Document Set feature to create folders with metadata. It will do what your custom content type does and a lot more.
    Possible solutions:
    Create JavaScript hack that changes the New Folder link in the ribbon to go to the New Document link for your custom content type.
    Create a Visual Studio Feature to hide the New Folder button and add a new New Folder button that points to the New Document link for your custom content type.
    Leave the existing New Folder button there and create Feature to add a new custom button for your content type.
    Mike Smith TechTrainingNotes.blogspot.com
    my SP customization book

  • REPORT_ATTRIBUTE_ERROR_MESSAGE in table column?

    Hi all,
    I want to use REPORT_ATTRIBUTE_ERROR_MESSAGE on table column, how can we use this?? or any other way..
    and one more doubt.. i am displaying some message when no element is select on table, it is displaying error message,
    but lead selection is removing? i dont want to remove lead selection . how can we achieve this?
    thanks,
    Venkat.

    Hi,
    Please check this...
      DATA lo_nd_pack_mat TYPE REF TO if_wd_context_node.
      DATA lo_el_pack_mat TYPE REF TO if_wd_context_element.
      DATA ls_pack_mat TYPE wd_this->Element_pack_mat.
      DATA lt_pack_mat TYPE wd_this->Elements_pack_mat.
      DATA lv_pack_material TYPE wd_this->Element_pack_mat-pack_material.
      DATA: wa_temp TYPE REF TO if_wd_context_element,
            lt_temp TYPE wdr_context_element_set.
    navigate from <CONTEXT> to <PACK_MAT> via lead selection
      lo_nd_pack_mat = wd_context->get_child_node( name = wd_this->wdctx_pack_mat ).
      CALL METHOD lo_nd_pack_mat->get_selected_elements
        RECEIVING
          set = lt_temp.
    LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_pack_mat.
        lv_pack_material = ls_pack_mat-pack_material.
        if lv_pack_material is initial.
          lo_api_controller ?= wd_This->Wd_Get_Api( ).
          CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
            RECEIVING
              MESSAGE_MANAGER = lo_message_manager.
    report message
          CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE
            EXPORTING
              MESSAGE_TEXT         = 'Please Select Packing Material...'
              ELEMENT              = wa_temp
              ATTRIBUTE_NAME       = 'PACK_MATERIAL' .
       exit.
        endif.
        append ls_pack_mat to lt_pack_mat.
        CLEAR ls_pack_mat.
      ENDLOOP.
      lo_nd_pack_mat->bind_table( new_items = LT_PACK_MAT
                                     SET_INITIAL_ELEMENTS = abap_false ).
    Thanks,
    Venkat.

  • How do i find out  what is the data type of a column of a Table in oracle or SQL?

    a) What if i want to find out the  Datatype of a specific column in the Table.
    b) How do i find the Column Datatypes?
    Can anyone please help me. I am new to oracle and Trying to Learn some stuff

    Hi,
    How about doing
    SQL> desc <table_name>
    SQL> desc emp
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)

  • How to bind simple type to a table column

    Hi All,
    I have created a simple type in Dictionary. With some Key and value pair. I want to bind this simple type to a table column.
    Does any body have suggestion how can I do that?
    Regards,
    Maya.

    Hi Maya,
    There is another solution for ur Prblm.
    Plz let me know if ur table is having any key,Value(desc) for that perticular dropdown.If it is ther means u can populate the dropdown By using this code.
    1.ISimpleTypeModifiable objXX = null;
    2.IModifiableSimpleValueSet objYYY = null;
    objXX =      wdThis.wdGetAPI().getContext().getModifiableTypeOf("ctx_ConveyanceType");
    objYYY =                objSimpleTypeConveyanceTypeData.getSVServices().getModifiableSimpleValueSet();
    3.Get the size of that Table and get the Key and Value Descriptions.
    4.Finally set it to DropDown
    ex:objYYY .put(key,ValueDesc);
    One more thing u need to create one string attribute for that Dropdown lik:ctx_strXX,type is string.
    Populate this dropdown using above Code.
    This method is applicable only for table coontains Key,Value for that Dropdown.
    Let me know if u hav any doubts,
    Regards,
    Lavanya.G

  • How to retrieve the data type of a column of a table?

    Hi,
    I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
    Thanks in advance.
    Hashim

    Hi,
    This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
    In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
    #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
    #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
    If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
    Perhaps that will get you what you want.
    Regards,
    Mark

  • How to invisible perticular row of a table column?

    Hi All,
    I want to set invisible or blank in perticular row of table column.
    I have a table, contains 2 row in that , one of the column contains button. If i clik on this button(ex: 1st row button ) it add new row with different data, it contains button also in that column, but i want to invisible that button . I tried like this
    I create one attribute of type WDUI_VISIBILITY. and bind visible property of that column. and code in button action is..
         DATA lo_el_context TYPE REF TO if_wd_context_element.
       DATA ls_context TYPE wd_this->Element_context.
       DATA lv_visible TYPE wd_this->Element_context-visible.
    get element via lead selection
       lo_el_context = wd_context->get_element( ).
    get single attribute
       lo_el_context->set_attribute(
         EXPORTING
           name =  `VISIBLE`
           value = wdyn_ui_visibility_none ).
    But, All buttons are invisible here. i.e., in first 2 rows buttons also invisible. But i want to invisible 3 row button only. How to do this? It is possible?
    Thanks,
    Kris.

    Hi Sarbjeet,
    button1 - name1-marks.
    button2-sname1-marks.
    on click of button1 - output is ---name2-marks, if i click again on button getting name3-marks.
    if i click on button2 --- sname4-marks, but required output is  --- sname2-marks.
    if i click on button1 again o/p is -- name5-marks, but req is name4-marks.
    code :
      DATA lv_count LIKE ls_context-count.
      data count type char2.
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `COUNT`
        IMPORTING
          value = count ).
    count = count + 1.
    lo_el_context->set_attribute(
        EXPORTING
          name =  `COUNT`
          value = count ).
      data: lr_node type ref to if_wd_context_node,
            ls_data type if_main_view=>element_node,
            lt_data type if_main_view=>elements_node.
    data indx type i.
          DATA lo_el TYPE REF TO if_wd_context_element.
          lr_node = wd_context->get_child_node( 'NODE' ).
          lo_el = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
          indx = lo_el->get_index( ).
    if indx = 1.
         data seg type string value  'Nomenclature'.
    data count type char2.
      CONCATENATE seg count into seg.
      CONDENSE seg.
    ls_data-name = seg.
    ls_data-variant = 'NOBUTTON'.
    APPEND LS_DATA TO LT_dATA.
    LR_NODE->BIND_TABLE(
    NEW_ITEMS = LT_DATA
    SET_INITIAL_ELEMENTS = ABAP_false ).
    clear count.
    clear seg.
    endif.
    If indx = 2.
    clear count.
        data seg1 type string value  'Sub Nomenclature'.
      CONCATENATE seg1 count1 into seg1.
      CONDENSE seg1.
    ls_data-name = seg1.
    ls_data-variant = 'NOBUTTON'.
    APPEND LS_DATA TO LT_dATA.
    LR_NODE->BIND_TABLE(
    NEW_ITEMS = LT_DATA
    SET_INITIAL_ELEMENTS = ABAP_false ).
    clear count1.
    endif.
    Thanks,
    kris.
    Edited by: kissnas on Feb 1, 2011 7:05 AM

  • Determining data type of existing column in table

    Hi
    I've done some googling on this, and I know I've done it before, but i cant find/remember how to determine the data type of a column in an existing table..... i tried select dump(column_name) from table but it didnt work.
    any suggestions?
    Thanks in advance

    Hi try this
    SQL> select data_type from user_tab_columns
      2  where COLUMN_NAME='EMPNO'
      3  and table_name='EMP';
    DATA_TYPE
    NUMBER

  • Trigger how to get new and old value for nested table column?

    Hi,
    I have created a nested table based on the following details:
    CREATE TYPE typ_item AS OBJECT --create object
    (prodid NUMBER(5),
    price NUMBER(7,2) )
    CREATE TYPE typ_item_nst -- define nested table type
    AS TABLE OF typ_item
    CREATE TABLE pOrder ( -- create database table
    ordid NUMBER(5),
    supplier NUMBER(5),
    requester NUMBER(4),
    ordered DATE,
    items typ_item_nst)
    NESTED TABLE items STORE AS item_stor_tab
    INSERT INTO pOrder
    VALUES (800, 80, 8000, sysdate,
    typ_item_nst (typ_item (88, 888)));
    Now I would like to create a trigger on table pOrder for after insert or update or delete
    and I would like to track the new and old value for the columns inside nested table.
    Can anybody direct me how to do it?
    I would like to know the sytax for it like:
    declare
    x number;
    begin
    x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
    end;
    Hope my question is clear.
    Thanks,
    Lavan

    Hi,
    Try like this:
    CREATE OR REPLACE TRIGGER PORDER_I
    BEFORE INSERT
    ON PORDER
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    DECLARE
      items_new typ_item_nst;
      ordid_NEW NUMBER;
    BEGIN
    FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price:  ' || :new.items(I).price );
    END LOOP;
    END;Regards,
    Peter

  • How to modify a table column name

    Hi all,
    How to modify a table column name...
    Thanks

    could type the command here... but will not do that..because you are supposed to read the docs.
    You can find the command here..
    http://www.faqs.org/docs/ppbook/r22871.htm
    Regards,
    G.

  • How do I hide a table column

    Hi,
    I'm trying to create a link column in a table by declaring one column as link type and set its linkColumnKey to another column which contains the actual text of the http URL. I'd like to hide the second column in the table. How do I do that? One of the posts I found said that I can set the column type to USER and an empty title, then the column won't be displayed since I don't have a renderer. However, the column still gets displayed.
    Any help would be appreciated.
    Thanks,
    Jenny

    Try this
    this.model.getColumn("col1").setType(TableColumnType.LINK);
              this.model.getColumn("col1").setLinkClickTarget("_blank"); //to open in new win
              this.model.getColumn("col1 Opportunities").setLinkColumnKey("col2");

Maybe you are looking for

  • 2.1 RC1 - Can not get data in Object viewer

    Hi, I open the table and change the tab to "Data" then error message is shown in the Data Editor Log panel. The message is "ORA-00923: FROM keyword not found where expected". This table has more than 100 columns. I guess that the SQL statement is too

  • Why can't I use any of my CC apps?

    There was a billing problem but was corrected this morning with the billing dept.  I was informed that my subscription is good and would be able to use the CC apps with no problem.  But when I start one, it tries to validate the subscription and says

  • Importing folders as playlists in itunes

    I have a large volume of folders on my hard disk containing .aiff files. I want to import them so the folders become playlists with the same .aiff files inside them. That cannot be done in itunes 10.7 -- the folders are obliterated and playlists must

  • Looking for a Java tutor/mentor.

    Greetings. I've recently had quite a hard time figuring out the programing projects for my university computer science course. Seeing as how the teaching assistants aren't very helpful, I am in search of somebody who would be able to help me/discuss

  • Outlook 2010 Sending' reported error (0x8004010F): "Outlook data file cannot be accessed.'

    I recently moved my outlook directory to a different drive as my C: drive was getting full.  Everything went smoothly except for now I cannot send emails from any of my addresses with the error "Sending' reported error (0x8004010F): "Outlook data fil