Creating rich table programmatically

hi all!
I'm using ADF 11g v2.
I was able to create the adf table programmatically but the the columns does not displays. I inspect the it doesn't have javax.faces.webapp.COMPONENT_IDS key in the properties, is this the reason why the column will not displays? If so, how to add it in the table and columns?
here's my code snippet:
RichTable myTable = new RichTable();
myTable.setId('t1');
myTable.setRowBandingInterval(0);
myTable.setValueExpression("value", resolveExpression('#{bean.data}'));
RichOutputText myText = new RichOutputText();
myText .setId('ot1');
myText.setValue("#{row.col1}" );
RichColumn myCol = new RichColumn();
myCol.setId('r1');
myCol.setSortable(false);
myCol.setHeaderText('Col1')
myCol.getChildren().add(myText);
myTable.getChildren().add(myCol);
public static Object resolveExpression(String expression) {
FacesContext facesContext = getFacesContext();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
Object.class);
return valueExp.getValue(elContext);
Where did I miss? Btw, the fething record keeps on spinning until it hangs. Thank in advance.

hi Frank,
Thanks for replying.
Yes, the data is an ArrayList. And have typo error in the last post, the Fetching Data message displays endlessly but it doesn't hang and the table has var attribute which is "row".
I bind the #{bean.data} to a declarative table and it is working fine. But the implementation is to be programmatic :-)

Similar Messages

  • Create ADF Table programmatically.

    I'm trying to populate an af:table programmatically from the backing bean. I have successfully generated the table and the rows/columns. I'm however unable to specify the value of each cell.
    Here's my code snippet for populating a dummy table with just one column displaying employee's name.
    public class Employee {
          private String name;
          // A bean class with getters/setters
    public RichTable generateTable(){
          //create an array list of Employee as data
          List<Employee> data = createSampleData(); 
          RichTable _t = new RichTable();
          //set id, visible, etc. omitted.
          _t.setValue(data);
          _t.setVar("row");
          RichColumn rc = new RichColumn();
          RichOutputText rot = new RichOutputText();
    /**** Here's where the problem occurs ****/
         rot.setValue("#{row.name}");
    //set id, header etc for RichColumn. omitted
    //add output text and rich column as children to the table. omitted
    return _t;
    Using the codes shown I can get the table rendered with however many rows I created in the array list. Yet in each cell, instead having the name of the employee, the table shows the string #{row.name}
    The EL is not resolved but interpreted as a literal string.
    How can I set the value of the output text to refer to the value of the name attribute of each row?
    Thanks

    Hi,
    ELContext elContext = FacesContext.getCurrentInstance().getELContext();
    ExpressionFactory efact = FacesContext.getCurrentInstance(). getApplication().getExpressionFactory();
    ValueExpression valExpr = efact.createValueExpression( elContext,elExpression,Object.class);
    rot.setValueExpression( "value", valExpr);
    Frank

  • How to Create multiple rows in Rich table programatically

    Hello ADF Exparts.
    I am Using below Code to create Rich Table Programatically on Clicking a button but I can't able to Create multiple tables will you please help me to create new row programatically
    public class NewTable {
        private RichInputText txtSearching;
        private RichShowDetailItem resultTab;
        private RichShowDetailItem simpleSearchTab;
        private RichColumn firstColumn;
        private RichOutputText outPutText;
        private String searchString;
        AdfFacesContext ctx=AdfFacesContext.getCurrentInstance();
        Connection conn;
        RichTable table;
        Statement stmt;
        private RichShowDetailItem basicSearchTab;
        private RichTable basicResultTable;
        private RichPanelGroupLayout panelGL;
        public NewTable() {
        public String buttonClicked() {
            // Add event code here...
            //Starrt Creating Table
            table =new RichTable();
            table.setId("demo");
            table.setVisible(true);
            table.setWidth("1024px");
            table.setValue("mat_search");
            table.setVar("Search");
            table.setFilterVisible(true);
            table.setAllDetailsEnabled(true);
            table.setRowKey("0");
            table.setFetchSize(25);
            table.setRows(10);
            table.setRowBandingInterval(0);
            table.setRowSelection("single");
           // table.setHorizontalGridVisible(false);
            //table.setVerticalGridVisible(false);      
            //Start Table Header Text Declaretion and Assignment
            RichOutputText colTextMat_No = new RichOutputText(); 
            colTextMat_No.setValue("Material No ");
            RichOutputText colTextShotDes = new RichOutputText(); 
            colTextShotDes.setValue("Short Description");
            RichOutputText colTextLongDes = new RichOutputText(); 
            colTextLongDes.setValue("Long Description");
            //Start Table Columan Creatin
            RichColumn colMat_No = new RichColumn(); 
            colMat_No.setVisible(true);
            colMat_No.setHeader(colTextMat_No);
            colMat_No.setWidth("100px");  
            colMat_No.setSortProperty("Material No");
            colMat_No.setSortable(true);
            colMat_No.setFilterable(true);
            colMat_No.setSeparateRows(true);
            RichColumn colShotDes = new RichColumn(); 
            colShotDes .setVisible(true);
            colShotDes .setHeader(colTextShotDes);
            colShotDes.setWidth("500px");
            colShotDes.setSortProperty("Short Description");
            colShotDes.setSortable(true);
            colShotDes.setFilterable(true);
            colShotDes.setSeparateRows(true);
            RichColumn colLongDes = new RichColumn(); 
            colLongDes .setVisible(true);
            colLongDes .setHeader(colTextLongDes);
            colLongDes.setWidth("500px");
            colLongDes.setFilterable(true);
            colLongDes.setSeparateRows(true);
            //End Table Columan Creatin
            //Start Creating table Children
            List<UIComponent> tblChild;
            tblChild=table.getChildren();
            //Start adding Columan to Table
            tblChild.add(colMat_No);
            tblChild.add(colShotDes);
            tblChild.add(colLongDes);
           List<UIComponent> displayPanel;
           displayPanel=panelGL.getChildren();
            List<UIComponent> matChild;
            matChild=colMat_No.getChildren();
            RichOutputText rot=new RichOutputText();
            rot.setValue("15000");
            matChild.add(rot);
           displayPanel.add(table);
             System.out.println("RowIndex="+table.getRowIndex());
             System.out.println("Row Count="+table.getRowCount());
            return null;
    Thank you very much

    Maybe you can get some ideas from here -
    http://adfdeveloper.blogspot.com/2011/07/simple-implementation-of-af.html

  • Trying to create repeating table headings

    I am creating an Excel table with many rows. In Excel, I can "freeze" the headings so user can always see them even when scrolling far down.
    Is there any way to duplicate this behavior in a pdf or to repeat the table headings on every page when the table is viewed in Reader or when it is printed?
    Thanks,
    John

    You can also create the tables programmatically using the CatalogManager APIs - have a look at ftcmd=createtable.  There is a GSF facade over creating tables too which is really easy to work with:
    TableCreator (Sites GST: Site Foundation 11.6.0 API)
    and here's an example of how to use it (check out the install() method):
    https://github.com/dolfdijkstra/gst-foundation/blob/master/gsf-tagging/src/main/java/com/fatwire/gst/foundation/tagging/db/TableTaggingServiceImpl.java

  • ADF Faces - How to create an editable rich table at runtime

    Hi,
    JDeveloper version - 11.1.1.4.0
    I have been trying to create an editable table (wherein the user can enter text into the input text boxes contained in the columns added at runtime). The values thus entered are to be captured in the backing bean for further processing.
    Below are my attempts to achieve this in various ways but without success.
    Attempt 1 : Created a Read-Only Dynamic table by dropping the view object instance from the Data Control. Here, the default being output text components, I used input text components and programatically make it updatable in the backing bean, which however, shows as an output text component.
    1) UI - .jspx file
    <af:table rows="#{bindings.TestViewObject1.rangeSize}"
                        fetchSize="#{bindings.TestViewObject1.rangeSize}"
                        emptyText="#{bindings.TestViewObject1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        var="row" rowBandingInterval="0"
                        value="#{bindings.TestViewObject1.collectionModel}"
                        selectedRowKeys="#{bindings.TestViewObject1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.TestViewObject1.collectionModel.makeCurrent}"
                        rowSelection="single"
                        id="t1"
                        partialTriggers="::cb1 ::cb2"
                        binding="#{TestDynamicTable.t1}">
                <af:forEach items="#{TestDynamicTable.attributeDefns}"
                            var="def">
                  <af:column headerText="#{def.name}"
                             sortable="true" sortProperty="#{def.name}" id="c1">
                    <af:inputText value="#{row[def.name]}" id="it1"
                                  label="Label 1"
                                  autoSubmit="true" />               
                  </af:column>
                </af:forEach>
              </af:table>2) Backing bean -
        public void listenMeForAction(ActionEvent ae) {
           //adding attribute dynamically
          ViewAttributeDefImpl def = (ViewAttributeDefImpl)vo.addDynamicAttribute("testDynamicAttr"+columnCount);
          def.setUpdateableFlag(def.UPDATEABLE);
         byte b = def.UPDATEABLE;
         def.setEditable(true);
         //def.setProperty(def.ATTRIBUTE_CTL_TYPE,);
         //def.getUIHelper().HINT_NAME_UPDATEABLE
         def.setProperty(def.ATTRIBUTE_DISPLAY_HINT_DISPLAY, def.HINT_NAME_UPDATEABLE);
         columnCount ++ ;
         AdfFacesContext.getCurrentInstance().addPartialTarget(this.t1);
    Attempt 2 : Created a ADF table by dropping the view object instance from the Data Control. Here, the columns and its cells are added programatically in the backing bean. However
    1) UI - .jspx file
    <af:table value="#{bindings.Test5ViewObj1.collectionModel}" var="row"
                        rows="#{bindings.Test5ViewObj1.rangeSize}"
                        emptyText="#{bindings.Test5ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.Test5ViewObj1.rangeSize}"
                        rowBandingInterval="0"
                        id="richDynamicTable"
                        binding="#{TestDynamicTable.richDynamicTable}">
    </af:table>2) Backing bean - When the buildRichTable method is invoked from the constructor, the table shows the input text boxes as required, but the entered values is not getting retrieved (). Tried adding a valuchangelistener to the added cell, but this does not fire as well.
    Below code however, creates a new instance of RichTable. Also, if an overloaded method is invoked on an ActionEvent, the columns added are not displayed.
      //called from costructor 
      public void buildRichTable() {
        dynamicVO.clearCache();
        //create this table
        richDynamicTable = new RichTable();
        int noOfCols = 2;
        for(int i=0; i<noOfCols; i++) {
          //create new column for the table
          richDynamicCol = new RichColumn();
          richDynamicCol.setHeaderText("ColTest"+i);
           // richDynamicCol.isVisible()
           // richDynamicCol.setVisible(arg0);
          richDynamicCol.setParent(richDynamicTable);
          richDynamicTable.getChildren().add(richDynamicCol);
          richDynamicTable.getChildCount();
          richDynamicTable.getRowCount();
          richDynamicCell = new RichInputText();
          richDynamicCell.setLabel("aCell"+i);
         // richDynamicCell.isVisible()
            MethodExpression methodExpression = FacesContext.getCurrentInstance().getApplication().
                                                                      getExpressionFactory().createMethodExpression(
                                                                        FacesContext.getCurrentInstance().getELContext(),
                                                                        "#{TestDynamicTable.inputBoxValueChangeListener}",
                                                                        null,
                                                                        new Class[] {ValueChangeEvent.class});
          //this does not work too - on adding some text and tabbing out
          richDynamicCell.addValueChangeListener(new MethodExpressionValueChangeListener(methodExpression));
          richDynamicCell.setParent(richDynamicCol);
          richDynamicCell.setValue("#{row.ColTest"+i+"}");
          richDynamicCol.getChildCount();
          richDynamicCol.getChildren().add(richDynamicCell);
         dynamicVO.addDynamicAttribute("ColTest"+i);
        //dynamicVO.insertRow(dynamicVO.createRow());
        dynamicVO.getRowCount();
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
       AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
       buildTable = false;
       this.setDynamicVO(dynamicVO);
    //captures the input data
      public void captureRichTableData(ActionEvent ae) {
    //gives null below
        this.getDynamicVO().getCurrentRow().getAttribute("ColTest0");
        this.getDynamicVO().getCurrentRow().getAttribute("ColTest1");
    //again null   
        List<UIComponent> listCols = richDynamicTable.getChildren();
        for(UIComponent aColComp : listCols) {
            RichColumn aCol = (RichColumn)aColComp;
            List<UIComponent> listCells = aCol.getChildren();
            for(UIComponent aCellComp : listCells) {
              RichInputText anInputText = (RichInputText)aCellComp;
                anInputText.getValue();
      }Not sure what I must be missing. May be I need to add bindings to the text boxes added but cant figure how to go about it. I found some posts on dynamically adding columns pointing to displaying contained data. Any help would be highly appreciated.
    Thanks for your time.
    Dinu

    Hi,
    Not too sure if I am heading the right way, but tried adding the bindings and value expression at runtime for the added columns. The values added at the screen is again found null at the VO and RichInputText child / cell. The updated method is as below -
          buildRichTable() {
          //adding binding for the added cell
          DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
          if(bc.findCtrlBinding("ColTest"+i) == null) {
              bc.addControlBinding("ColTest"+i, new JUCtrlAttrsBinding(null,
                                                     bc.findIteratorBinding("Test5ViewObj1Iterator"),
                                                         new String[]{"ColTest"+i}));
          //the expression to be set in value attribute for richInputText component 
          String theExpression = "#{row.bindings."+"ColTest"+i+".inputValue}";
          //setting the expression
          richDynamicCell.setValueExpression("ColTest"+i, getValueExpression(theExpression)); 
          richDynamicCell.setAutoSubmit(true);
          richDynamicCol.getChildCount();
          richDynamicCol.getChildren().add(richDynamicCell);
        dynamicVO.addDynamicAttribute("ColTest"+i);
        dynamicVO.insertRow(dynamicVO.createRow());
        dynamicVO.getRowCount();
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicTable());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCol());
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.getRichDynamicCell());
       buildTable = false;
       this.setDynamicVO(dynamicVO);
      private ValueExpression getValueExpression(String theExpression) {
       FacesContext fc = FacesContext.getCurrentInstance();
       Application app = fc.getApplication();
       ExpressionFactory elFactory = app.getExpressionFactory();
       ELContext elContext = fc.getELContext();
       return elFactory.createValueExpression(elContext, theExpression, Object.class);
      }It would be great help to have any leads.
    Thanks,
    Dinu

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        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>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

  • Can we create internal table dynamically ? how?

    hi to all experts,
                           can we create internal table dynamically ? how?plz explain me with an example.Anybody with good example  will be rewarded.it was asked in an interview what the answer for it

    HI
    Yes you can create
    see this
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    JUST USE THIS CODE AND DO THE ESSENTIAL CHANGES ACCORDING TO YOU
    STEP: 1 - get backend field catalog (currently displayed alv)
    CLEAR: tl_fieldcatalog. REFRESH: tl_fieldcatalog.
    CALL METHOD w_grid->get_backend_fieldcatalog
    IMPORTING
    et_fieldcatalog = tl_fieldcatalog.
    STEP: 2 - create a new fieldcatalog for dynamic internal table
    CLEAR: sl_fieldcatalog.
    CLEAR: t_outtab_fieldname. REFRESH: t_outtab_fieldname.
    CLEAR: tl_fieldcatalog_new. REFRESH: tl_fieldcatalog_new.
    CLEAR: t_download_fieldname. REFRESH: t_download_fieldname.
    CLEAR: t_download_fieldheading. REFRESH: t_download_fieldheading.
    LOOP AT tl_fieldcatalog INTO sl_fieldcatalog.
    STEP: 2.1 - populate data in T_OUTTAB_FIELDNAME
    APPEND sl_fieldcatalog-fieldname TO t_outtab_fieldname.
    STEP: 2.2 - populate TL_FIELDCATALOG_NEW & T_DOWNLOAD_FIELDNAME
    IF sl_fieldcatalog-no_out EQ ''.
    IF sl_fieldcatalog-fieldname NE 'STATUS'
    OR sl_fieldcatalog-fieldname NE 'MESG_STATUS'
    OR sl_fieldcatalog-fieldname NE 'ZLOCK'
    OR sl_fieldcatalog-fieldname NE 'T_PLANT'
    OR sl_fieldcatalog-fieldname NE 'T_CSR'.
    If field is COMM_PLANT, change its length
    IF sl_fieldcatalog-fieldname EQ 'COMM_PLANT'.
    sl_fieldcatalog-outputlen = 1800.
    sl_fieldcatalog-intlen = 1800.
    sl_fieldcatalog-dd_outlen = 1800.
    ENDIF. "comm_plant
    sl_fieldcatalog_new = sl_fieldcatalog.
    APPEND sl_fieldcatalog_new TO tl_fieldcatalog_new.
    APPEND sl_fieldcatalog-fieldname TO t_download_fieldname.
    APPEND sl_fieldcatalog-scrtext_l TO t_download_fieldheading.
    CLEAR: sl_fieldcatalog, sl_fieldcatalog_new.
    ENDIF.
    ENDIF.
    ENDLOOP.
    STEP: 3 - create dynamic internal table
    FREE: ref_download.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    I_STYLE_TABLE =
    it_fieldcatalog = tl_fieldcatalog_new
    IMPORTING
    ep_table = ref_download
    E_STYLE_FNAME =
    EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ASSIGN ref_download->* TO <ft_download>.
    CREATE DATA ref_wa LIKE LINE OF <ft_download>.
    ASSIGN ref_wa->* TO <fs_download>.
    STEP: 4 - populate data in dynamic internal table
    LOOP AT t_outtab INTO wa_outtab.
    LOOP AT t_download_fieldname.
    ASSIGN COMPONENT t_download_fieldname OF STRUCTURE
    <fs_download> TO <fs_download_field>.
    IF t_download_fieldname-field EQ 'COMM_PLANT'.
    STEP: 4.1 - get long text from database table
    CLEAR: wal_table.
    SELECT SINGLE * FROM zshaven_plnt_txt
    INTO wal_table
    WHERE vbeln = wa_outtab-vbeln
    AND posnr = wa_outtab-posnr
    AND del_no = wa_outtab-del_no
    AND del_itm = wa_outtab-del_itm.
    IF sy-subrc EQ 0.
    STEP: 4.2 - break long-text into separate lines
    CLEAR: tl_text. REFRESH: tl_text.
    SPLIT wal_table-plant_comm
    AT '~'
    INTO TABLE tl_text.
    STEP: 4.3 - Combine these separate lines with space in
    between two lines
    CLEAR: wal_text, final_text.
    LOOP AT tl_text INTO wal_text.
    IF final_text IS INITIAL.
    final_text = wal_text.
    ELSE.
    CONCATENATE final_text '-' wal_text
    INTO final_text.
    REPLACE '-' WITH ' ' INTO final_text.
    ENDIF.
    ENDLOOP.
    STEP: 4.4 - move long text to work-area
    <fs_download_field> = final_text.
    ENDIF. "subrc
    ELSE. "t_download_fieldname
    READ TABLE t_outtab_fieldname
    WITH KEY field = t_download_fieldname-field.
    ASSIGN COMPONENT t_outtab_fieldname-field OF STRUCTURE
    wa_outtab TO <fs_outtab_field>.
    <fs_download_field> = <fs_outtab_field>.
    ENDIF.
    ENDLOOP.
    STEP: 4.5 - Move data from work-area to dynamic internal table
    APPEND <fs_download> TO <ft_download>.
    CLEAR: <fs_download>.
    ENDLOOP.
    STEP: 5 - download
    CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    filename = 'C:\zshaven.xls'
    filetype = 'DAT'
    filetype_no_show = 'X'
    filetype_no_change = 'X'
    TABLES
    data_tab = <ft_download>
    fieldnames = t_download_fieldheading
    EXCEPTIONS
    invalid_filesize = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    customer_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  • Create adf treetable programmatically

    How can we create an adf tree table programmatically? We are not using a data control for its creation. We have to use POJO to create the tree table from webservices. The requirement is to create a webservice proxy and use this proxy to write POJO for creating treetable programmatically. We CANNOT create a data control and use it to build the tree. Any help would be deeply appreciated.

    Thanks for the reply. I actually found a better solution which is done in ADF 11g.
    [http://technology.amis.nl/blog/2094/building-adf-faces-tree-based-on-pojos-without-using-the-adf-tree-data-binding]

  • Create Check Box Programmatically

    Hi ALL
    Let me know how to Create Check Box Programmatically using table column.
    Thanking You
    Rehards
    Lakmal

    You can't create Forms widgets dynamically. What you have to do is create them at design time and then hide/unhide them at runtime using things like stacked canvases.
    Regards
    Grant Ronald

  • Error while creating temporary table

    Hi All,
    I am trying to integrate ODI and BAM . I have followed all the steps given in the guide.While creating interface i am getting the error while LKM is working.
    I am using LKM SQL to SQL and IKM Oracle BAM Insert ( as the inserted data should be captured after inserting).
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/bam_odi.htm
    Please use this link for clarification.For me drop work table and create work table failed (C$ -work table). Anyone have any idea about this could you help me?
    Thanks in advance,
    Gnanaprakasam

    It seems the table(MMMORDERFILE_C$_REQUEST ) already exist in the work schema,so cant able to create and throw an error. can you tell me which KM you are using?

  • Error while creating new table

    Hi
    First I had deleted one custom table. Then I try to create the same table with different fields. Now I am gettinh the errors.
    1.    ZLV_COMP_TABLE: Inconsistency DD <-> DB (check table with analysis tool)
    2.   A table called ZLV_COMP_TABLE exists in the database
    3.   No active nametab exists for ZLV_COMP_TABLE
    4.   Termination due to inconsistencies
    5.  Table ZLV_COMP_TABLE (Statements could not be generated)
      6.  Error number in DD_DECIDE (9)
    Please help me ... how can I create a table with same name.
    thanks
    Subhankar

    Hello,
    goto SE14 -- Give the table name
    use Tables Radio button
    click on Edit
    check the Delete Data Radio button
    click on ACTIVATE AND ADJUST DATABASE.
    Now check the table in SE11.
    If it still exits you can change the same table or Delete it again & create a new table with Same Name.
    This might help your query.
    Anil.

  • Error while creating database table

    Hi
    I am creating a table with 2 key fields of length 255 chars each. its giving me error Key field is greater than 780. Please suggest.
    Regards
    Aditya

    Hi,
    Since table key can be max of 255 length,we rarely make use of a single key field of 255,
    so, reduce the length of field.
    Constraints
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.
    Edited by: Sreesudha Gullapalli on Feb 6, 2009 8:19 AM

  • Error while creating external table

    Hi i tried to create external table. The table is created but while selecting that table it is throwing below errors
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19I've created temp directory in window under oracle directory " C:\oracle\product\10.2.0\temp"
    In the temp directory i've a text file countries1.txt
    the text file has the below information
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,WelshI've connected to system user and created one directory and granted the read and write permissions to user SCOTT.
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp\';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.The creation of external table query is
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
      LOCATION ('Countries1.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;And the error is
    SQL> select *from countries_ext;
    select *from countries_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    SQL> Please help me in this

    You are missing something. Most probably the file does not exists in your specified path. This is working in my 10.2.0.3
    Step1: Check the file is actually there.
    C:\oracle\product\10.2.0>mkdir temp
    C:\oracle\product\10.2.0>cd temp
    C:\oracle\product\10.2.0\temp>dir
    Volume in drive C is C_Drive
    Volume Serial Number is 8A93-1441
    Directory of C:\oracle\product\10.2.0\temp
    07/30/2011  12:00 PM    <DIR>          .
    07/30/2011  12:00 PM    <DIR>          ..
    07/30/2011  12:00 PM                79 countries1.txt
                   1 File(s)             79 bytes
                   2 Dir(s)  50,110,582,784 bytes free
    C:\oracle\product\10.2.0\temp>type countries1.txt
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,Welsh
    C:\oracle\product\10.2.0\temp>Step 2: Creating the directory object.
    SQL> show user
    USER is "SYS"
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    SQL> create or replace directory ext_tables as 'C:\oracle\product\10.2.0\temp';
    Directory created.
    SQL> grant read,write on directory ext_tables to scott;
    Grant succeeded.
    SQL>Step 3: Table definition.
    C:\>sqlplus scott@orclsb/tiger
    SQL*Plus: Release 10.1.0.4.2 - Production on Sat Jul 30 12:04:24 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE TABLE countries_ext (
      2    country_code      VARCHAR2(5),
      3    country_name      VARCHAR2(50),
      4    country_language  VARCHAR2(50)
      5  )
      6  ORGANIZATION EXTERNAL (
      7    TYPE ORACLE_LOADER
      8    DEFAULT DIRECTORY ext_tables
      9    ACCESS PARAMETERS (
    10      RECORDS DELIMITED BY NEWLINE
    11      FIELDS TERMINATED BY ','
    12      MISSING FIELD VALUES ARE NULL
    13      (
    14        country_code      CHAR(5),
    15        country_name      CHAR(50),
    16        country_language  CHAR(50)
    17      )
    18    )
    19    LOCATION ('Countries1.txt')
    20  )
    21  PARALLEL 5
    22  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> SELECT * FROM countries_ext;
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    ENG   England
    English
    SCO   Scotland
    English
    IRE   Ireland
    English
    COUNT COUNTRY_NAME
    COUNTRY_LANGUAGE
    WAL   Wales
    Welsh

  • Error while creating partition table

    Hi frnds i am getting error while i am trying to create a partition table using range
    getting error ORA-00906: missing left parenthesis.I used the following statement to create partition table
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION SO99Q1 VALUES LESS THAN TO_DATE(‘01-APR-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q2 VALUES LESS THAN TO_DATE(‘01-JUL-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q3 VALUES LESS THAN TO_DATE(‘01-OCT-1999’, ‘DD-MON-YYYY’),
    PARTITION SO99Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q1 VALUES LESS THAN TO_DATE(‘01-APR-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q2 VALUES LESS THAN TO_DATE(‘01-JUL-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q3 VALUES LESS THAN TO_DATE(‘01-OCT-2000’, ‘DD-MON-YYYY’),
    PARTITION SO00Q4 VALUES LESS THAN TO_DATE(‘01-JAN-2001’, ‘DD-MON-YYYY’)
    ;

    More than one of them. Try this instead:
    CREATE TABLE SAMPLE_ORDERS
    (ORDER_NUMBER NUMBER,
    ORDER_DATE DATE,
    CUST_NUM NUMBER,
    TOTAL_PRICE NUMBER,
    TOTAL_TAX NUMBER,
    TOTAL_SHIPPING NUMBER)
    PARTITION BY RANGE(ORDER_DATE) (
    PARTITION SO99Q1 VALUES LESS THAN (TO_DATE('01-APR-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q2 VALUES LESS THAN (TO_DATE('01-JUL-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q3 VALUES LESS THAN (TO_DATE('01-OCT-1999', 'DD-MON-YYYY')),
    PARTITION SO99Q4 VALUES LESS THAN (TO_DATE('01-JAN-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q1 VALUES LESS THAN (TO_DATE('01-APR-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q2 VALUES LESS THAN (TO_DATE('01-JUL-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q3 VALUES LESS THAN (TO_DATE('01-OCT-2000', 'DD-MON-YYYY')),
    PARTITION SO00Q4 VALUES LESS THAN (TO_DATE('01-JAN-2001', 'DD-MON-YYYY')))In the future, if you are having problems, go to Morgan's Library at www.psoug.org.
    Find a working demo, copy it, then modify it for your purposes.

  • Getting error while creating a table

    Hi there,
    I have created a user 'ram' and gave "create table" permissions for that user.
    After that, when I tried to create a table using the command
    create table countries as select * from hr.countries;
    where hr is another user and countries is the name of table in that schemagetting error message
    ERROR at line 1:
    ORA-00942: table or view does not existNOTE: The same error occurs even while creating a table in 'ram' schema after granting sysdba rights to 'ram'
    Thanks
    Rajiv

    Hi,
    dose the user ram has SELECT rights on the table hr.countries. Can he do SELECT in that table.
    Thanks

Maybe you are looking for

  • Using BAPI_PO_CREATE1 to create a PO - MoT from contract is overwriting input

    We're using BAPI    BAPI_PO_CREATE1  to create a PO with reference to a conract. On that contract, we assign a MoT Group - a MoT value that corresponds to several MoT values. For instance, MoT 91 allows MoT 07, 08, and 09. When we pass a value to the

  • Difference between the G4 and G5. Should I buy the G5

    What kind of difference is there between a G4 duel 1.25 vs. G5 duel 1.8 machines? I have the G4 and wonder if I should buy the G5(used).. Is the G5 that much faster? Such as rendering video.

  • Availability of Java Wireless Toolkit (J2ME) for linux

    Hi, Could anyone tell me when will be available the Java wireless toolkit for Linux again ? According to download page is offline since March 20 Sun Java Wireless Toolkit for CLDC 2.5.2 ML - March 20, 2012 - This download is being updated and will be

  • Wildcard empty variable query generator

    Hi all, I am using the typical [%1] variables in the query generator.  However, my latest query needs to have many different variable parameters and I would like to leave some of them blank. For example, the parameters are: Warehouse Code [%0] Item G

  • Photoshop, Indesign and Illustrator changing random fonts

    Ever since I installed (and yes reinstalled) PS, ID and AI CC it seems to change several seemingly random fonts into another font. For instance Arial regular, narrow, black all work normal, but when I set it to Arial bold it changes to M6 bold.Someti