Fill data in table( on view ) dynamically from internal table

Hi,
How can I populate a table on view with data from an internal table?
Thanks,
Ronita

Hi,
if you have an internal table named xyz.
Then create a structure in se11 for this internal table.
Then create a node with this structure with cardinality 0:n
Navigate into method WDDOMODIFYVIEW of view MAIN_VIEW. Insert coding for:
-     Create a new context node for the table
Hint: Use method Create_nodeinfo_from_struct of class Cl_wd_dynamic_tool.
-     Remove “old” dynamic table IE element from view , if one exists. If it exists, it is a child of group GROUP_1 and has the name TESTTAB.
-     Create a new UI element for a table named TESTTAB
-     Create an internal table, fill it with the data from the database table and bind it to the newly created dynamic context node.
METHOD wddomodifyview .
  DATA:
  UI Elements
    group_1       TYPE REF TO cl_wd_uielement_container,
    new_tab       TYPE REF TO cl_wd_table,
  Context Nodes
    dyn_node      TYPE REF TO if_wd_context_node,
    tabname_node  TYPE REF TO if_wd_context_node,
  Node Info
    rootnode_info TYPE REF TO if_wd_context_node_info,
  Data Reference (for internal table)
    stru_tab      TYPE REF TO data,
  String (for table name)
    tablename     TYPE string.
  FIELD-SYMBOLS:
    <tab> TYPE table.
create context node ***************************************************************
get node info of context root node
  rootnode_info = wd_context->get_node_info( ).
Get the name of the table to be created
  tabname_node = wd_context->get_child_node( name = 'TABLE_DATA' ).
  tabname_node->get_attribute( EXPORTING name = 'NAME' IMPORTING value = tablename ).
  translate tablename to upper case.
create sub node named TEST1 of structure (tablename)
  cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
    parent_info = rootnode_info
    node_name = tablename
    structure_name = tablename
    is_multiple = abap_true ).
get instance of new node
  dyn_node = wd_context->get_child_node( name = tablename ).
remove "old" table UI element from view , if necessary ****************************
  group_1 ?= view->get_element( 'GROUP_1' ).
  group_1->remove_child( id = 'TESTTAB' ).
create new UI element table *******************************************************
  new_tab = cl_wd_dynamic_tool=>create_table_from_node(
ui_parent = group_1
table_id  = 'TESTTAB'
node      = dyn_node ).
fill context node with data *******************************************************
create internal table of (tabletype)
  CREATE DATA stru_tab TYPE TABLE OF (tablename).
  ASSIGN stru_tab->* TO <tab>.
Get table content
  SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
Bind internal table to context node.
  dyn_node->bind_table( <tab> ).
ENDMETHOD.
Edited by: Sridevi D on Apr 19, 2008 10:30 AM

Similar Messages

  • How do I figure where is the data in a materialized view coming from

    Hi: when I run select NAME, OWNER from dba_mview_refresh_times, I see a number of materialized views. How do I find more details about this view i.e where is the data coming from and which fields. The source table that is in another database changed. But the view on my database where the materialized view exist has not changed. I want to confirm from where is data coming in this view
    TIA
    Ravi

    SQL>  select * from dict where table_name like 'ALL%MVIEW%'
    TABLE_NAME                     COMMENTS                                                             
    ALL_BASE_TABLE_MVIEWS          All materialized views with log(s) in the database that the user can s
                                   ee                                                                   
    ALL_MVIEWS                     All materialized views in the database                               
    ALL_MVIEW_AGGREGATES           Description of the materialized view aggregates accessible to the user
    ALL_MVIEW_ANALYSIS             Description of the materialized views accessible to the user         
    ALL_MVIEW_COMMENTS             Comments on materialized views accessible to the user                
    ALL_MVIEW_DETAIL_PARTITION     Freshness information of all PCT materialized views in the database  
    ALL_MVIEW_DETAIL_RELATIONS     Description of the materialized view detail tables accessible to the u
                                   ser                                                                  
    ALL_MVIEW_DETAIL_SUBPARTITION  Freshness information of all PCT materialized views in the database  
    ALL_MVIEW_JOINS                Description of a join between two columns in the                     
                                   WHERE clause of a materialized view accessible to the user           
    ALL_MVIEW_KEYS                 Description of the columns that appear in the GROUP BY               
                                   list of a materialized view accessible to the user                   
    ALL_MVIEW_LOGS                 All materialized view logs in the database that the user can see     
    ALL_MVIEW_REFRESH_TIMES        Materialized views and their last refresh times  for each master table
                                    that the user can look at                                           
    ALL_REGISTERED_MVIEWS          Remote materialized views of local tables that the user can see      
    13 rows selected.

  • Choosing the view dynamically from mm02

    Hi Experts,
    I am making a BDC Program  of transaction MM02, As per the requirement I need to choose a particular  view
    and  change the value of a field (which is a custom field added through extention)
    now  i have cheked many materials , with change of material no the  position of the views differs in the sequence,
    for eg : if the view  is sales org 
    for material 001 it is on 5th No and for material 002 it is  on 4th noi
    i need to pick the same view for every material irrespective of the position of  the view in the sequence
    if record with matarial 001 the cursor would go 5th no ;while uploading materials like 002  the program would pick the view on 5th no which would not be sales org.
    Could u please tell me if there is a way through which we can pick a particular view for all materials dynamically.
    Edited by: sabsvk on Sep 21, 2009 12:54 PM

    Since the views are dependent on material types so you have to go by the material type of the material which you can find out in MARA table.
    Apart from the previuos replies you can check the following code for your BDC.
    DATA: lv_tkstatus(15),
          lv_dispstatus LIKE t130m-pstat.
    DATA: BEGIN OF lt_bildtab OCCURS 30.
            INCLUDE STRUCTURE mbildtab.
    DATA: END OF lt_bildtab.
    PARAMETERS : p_mtart LIKE t134-mtart.
    SELECT SINGLE pstat INTO lv_tkstatus FROM t134 WHERE mtart = p_mtart.
    CALL FUNCTION 'SELECTION_VIEWS_FIND'
      EXPORTING
        bildsequenz  = '21'
        pflegestatus = lv_tkstatus"mara-pstat
      TABLES
        bildtab      = lt_bildtab.
    LOOP AT lt_bildtab.
      IF lt_bildtab-pstat CA lv_tkstatus.
        IF lt_bildtab-kzanz IS INITIAL.
          lt_bildtab-kzanz = 'X'.
          MODIFY lt_bildtab.
        ENDIF.
      ELSE.
        IF NOT lt_bildtab-kzanz IS INITIAL.
          CLEAR lt_bildtab-kzanz.
          MODIFY lt_bildtab.
        ENDIF.
      ENDIF.
    ENDLOOP.
    READ TABLE lt_bildtab WITH KEY dytxt = 'MRP 1'.
    * Take the SY-TABIX value to locate the position.
    May be some help you will get.
    Regards
    Shiba Prasad Dutta

  • How to auto-fill data into Acrobat 9 PDF created from scanned paper form/document

    Hello,
    I am new to Adobe Acrobat Pro 9.  I have scanned a paper form/document that
    originally  had various data lines to be written on using an ink pen.  I saved
    the scanned PDF as an Acrobat 9 PDF.  I have added various pertinent text fields
    and checkboxs to PDF form and saved it with appropriate extended setting to
    allow end-user to type on PDF and save a copy.  At the bottom form there is a
    name/signature text field for end-user name to be typed and a calendar text date
    when name/signature text field is entered .
    I need to send this PDF form to various end-users using (Groupwise/Novell) email
    to have them sign or type their name and date at bottom of form.  Is there a way
    that Adobe Acrobat 9/PDF will recognize the email sender and allow the
    name/signature field to automatically fill-in signature/name textbox.  Are there
    tools like javascript, etc. that will help me accomplish this task?
    I don't know where to begin. I am a newbie.  Please help!

    You are on the Connect forum   Try the Acrobat Pro forum for your question.  Thanks
    matt rock  |  Technical Response Team, Connect

  • Problems with data import to Static view object... Need help...

    Hi! I have problem when I import data to my Static View object from *.csv.
    I followed tutorial - http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcquerying.htm#CEGCGFCA
    Lets take a look to Figure 5-14 Sample Data Ready to Import from CSV Flat File. There are 3 columns. For Example in column C I have only lines. Bun in A and B column I have all 5 lines. I want to import data from one CSV file. So when I imported data and have some empty fields in column C. When I create SelectOneChoice object in my form, and run it, then it takes also empty fields as choices in my SelectOneChoice object. It is when I create Select one choice from column C Why it is so? And what to do?
    Waiting for response from anyone...
    Best regards!

    HI! Can someone give me opinion on my problem?
    Best regards

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • Filling billing setup table with documents from a given date

    Hi
    I would like to fill the setup table in R/3 with SD Billing Documents which have been created from 01/05-2007 until now. Is this possible somehow?
    (SBIW --> Business Warehouse --> Settings for App Specific Datasources --> Logistics --> Managing Extract Structures --> Initialization --> Filling in the Setup Table --> App. specific setup of statistical data --> Perform Setup - SD Billing Documents)
    The only fields I see are:
    - Archiving run
    - Sales organization
    - Company code
    - Sales document
    Kind regards,
    Torben

    Hi Torben,
    I dont think if you dont have option to see the date to select, probably you wont be able to fill your setup table based on date. Otherwise you can pull in the data from R/3 based on this date restriction in your infopackage after filling your setup table without any restriction.
    Regards.

  • 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

  • How to view data in tables by selecting the synonym from the database objec

    I could not figure out how to view data in tables by selecting the synonym from the database objects navigation tree. I had to first choose the synonym, view the details of the synonym to determine the table name, and then select the table from the database objects tree. Is this the only way available?

    This functionality currently does not exist. I don't see it on the 1.1 statement of direction either, so perhaps someone from Oracle can give some insight as to when this could be expected.
    Eric

  • How to display data in table with dynamic rows, section wise in a page.

    Hello all,
    I work on report creation in BI Publisher where I need to display data from xml in a table in pdf format.The output page is divided into two vertical sections , containing tables, with exactly same columns on left and right sections. The number of rows in table depends on the output of the fetching query. The page is to be populated in such a way that, at first, the left table is populated, then the next rows fill up the table on the right section of the page, if more rows are left, they fill up the tables on next page[first the left table, and then the right one, in a similar fashion as in page 1]
    On a bird's eye view, the data needs to be simply mapped to a table, with dynamic number of rows, and so can span number of pages depending on size of data. On a implementation level, I am stuck in getting the left section of the page populated first, then the right section[in place of the right page], and then the next page.
    Please guide me if someone has any idea in getting this achieved.
    Thanks in advance.

    Thanks for the response...
    I am able to get the desired functionality. I just need the tables to be inside a bigger table, that also has a dividing line between the two columns. This is was is intended in the req. provided to me. The column formatting option provides me a line ,but that is not further modifiable .Please help me in getting a perpendicular line between the two columns, which I need to be of a specified width and color.

  • How to delete a field from a Dynamically created internal table

    Hi friends,
    I have got a requirement in which, I will be entering the table name and Excel file from seletion-screen.
    based on the Table I have entered in the selection-screen I need to create a dynamic internal table so that I can fill that Execel data into that internal table and later i using BDC i can I can fill the database table using SM30 transaction.
    here. my problem is that, When I am creating internal table dynamically, MANDT filed is also getting created in the internal table.
    please, help in deleteing the filed MANDT from the internal able.
    following is the code which creates the dynamic internal table.
    CREATE DATA dy_table TYPE TABLE OF (p_tabname).
    assign dy_table->* to <dyn_table>.
    please provide, if any sample code is available.
    Regards,
    Xavier.P

    Hi,
    You can use this logic,
    While creating the Dynamic filed catalog try to avoid MANDT field.
    Ex:
    *Dynamic creation of a structure
      CREATE DATA LP_STRUCT TYPE (V_TABLE).
      ASSIGN LP_STRUCT->* TO <FS>.
    *Fields Structure
      OF_SDESCR ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <FS> ).
    LOOP AT OF_SDESCR->COMPONENTS ASSIGNING <COMPONENTS>.
    *Field MANDT not displayed
        IF SY-TABIX = 1 AND <COMPONENTS>-NAME = 'MANDT'.
          CONTINUE. " Next loop
        ENDIF.
    *Build Fieldcatalog
        LS_LVC_CAT-FIELDNAME = <COMPONENTS>-NAME.
        LS_LVC_CAT-REF_TABLE = V_TABLE.
        APPEND LS_LVC_CAT TO LT_LVC_CAT.
        CLEAR LS_LVC_CAT.
      ENDLOOP.

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • How to fill data in a table automatically

    Hello Experts,
    I would like to know if its possible to fill data in a table by looping.
    I have the following table:
    Draws(
    NUM NUMBER,
    START_DATE DATE NOT NULL,
    END_DATE DATE NOT NULL,
    ACTIVE CHAR(1 BYTE) DEFAULT 'Y')
    Now my table should contain the foll:
    Num start_date end_date active
    1 23/01/2010 21:00:00 30/01/2010 19:00:00 Y
    2 30/01/2010 21:00:00 06/02/2010 19:00:00 Y
    I have an initial start date and the end_date is always (start_date + 7) and the next start date starts with the previous end_date but time changes from 19:00 to 21:00.
    Is there a way i can enter those values on a weekly basis???
    Thanks
    Edited by: Kevin CK on Jul 5, 2010 3:07 AM

    there are a number of ways to do weekly inserts. it just depends on your environment and what you want to manage.
    1. write a PL/SQL procedure to do the periodic insert. i assume you know how to do this since you only asked about doing the insert weekly.
    2. options for running the procedure weekly:
    a. using your OS job scheduler, schedule a batch job to run a sql script to execute the procedure.
    b. inside the Oracle database, use DBMS_SCHEDULER (or DBMS_JOB if you are on a version older than 10g) to run the procedure.
    c. write yourself a reminder on a sticky note to run the procedure each week, post it on your computer, and run it manually.
    if you need more details, just say so.

  • No data coming while filling up setup table

    Hi All,
    We have to two datasources
    1.  2LIS_12_VCSCL Sales-Shipping Schedule Line Delivery
    2.  2LIS_12_VCITM  Delivery Item Data
    When i am filling up setup table it is only filling it for Delivery Item datasource, its not filling up for Schedule line datasource.
    Is there any setting to be done before filling up the setup ???
    Regards,
    Viren.

    Hi Anil,
    Thank you very much...
    Now its working. I have another problem my extraction is still running .
    I have selected status to ok automatically,activate the ods data automatically, and update data target automatically.
    when i checked sm50 in source as well bw system its not showing any thing.then i checked job in monitor, it showing transfered records in yellow and updated records in greeen.
    Can anybody tell me how to change extraction status from yellow to green??
    I dont want to do it mannually..
    Regards,
    Viren.

Maybe you are looking for