Dynamic append

hi all
i got a internal table, how to dynamic append the line to the internal?
below is my code
DATA: line(256) TYPE c,
      text_tab LIKE STANDARD TABLE OF line,
      field LIKE line.
this is a static append.
<b>line = '444444'.
  APPEND line TO text_tab.
  line = '555555'.
  APPEND line TO text_tab.
  line = '666666'.
  APPEND line TO text_tab.</b>
how to make it dynamic append to internal table
Thanks

Hi
Check this sample report
REPORT z_dynamic_program.
TABLES:dd02l,
vlcvehicle.
FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE,
<fs_warea> TYPE ANY,
<fs_any> TYPE ANY.
DATA:t_anytable TYPE REF TO data,
f_warea TYPE REF TO data,
tb_condition(72) TYPE c OCCURS 0 WITH HEADER LINE.
DATA:w_dynproname TYPE sy-repid,
w_msg(70) TYPE c.
DATA:t_code(72) TYPE c OCCURS 0 WITH HEADER LINE.
PARAMETERS:pa_tnam LIKE dd02l-tabname.
SELECT-OPTIONS:so_comm FOR vlcvehicle-zz_commnos.
START-OF-SELECTION.
SELECT SINGLE * FROM dd02l WHERE tabname = pa_tnam.
IF sy-subrc NE 0.
STOP.
ENDIF.
APPEND 'Program SubPool.' TO t_code.
APPEND ' ' TO t_code.
CONCATENATE 'TYPES TY_TABLE TYPE ' pa_tnam ' OCCURS 0.'
INTO t_code SEPARATED BY space.
APPEND t_code.
CONCATENATE 'TYPES TY_WAREA TYPE ' pa_tnam '.'
INTO t_code SEPARATED BY space.
APPEND t_code.
APPEND 'Form generate_table changing p_table type ref to data '
TO t_code.
APPEND ' p_warea type ref to data.'
TO t_code.
APPEND ' create data p_table type (''TY_TABLE''). '
TO t_code.
APPEND ' create data p_warea type (''TY_WAREA''). '
TO t_code.
APPEND 'Endform. ' TO t_code.
GENERATE SUBROUTINE POOL t_code
NAME w_dynproname
MESSAGE w_msg.
IF sy-subrc NE 0.
WRITE : / w_msg.
STOP.
ENDIF.
* Call the subroutine to get reference to dyn table
PERFORM generate_table IN PROGRAM (w_dynproname)
CHANGING t_anytable
f_warea.
ASSIGN t_anytable->* TO <fs_table>.
ASSIGN f_warea->* TO <fs_warea>.
***** Fetch the data from the database based on the Commission number
* and the Table name
SELECT *
INTO TABLE <fs_table>
FROM (pa_tnam)
WHERE Z_COMMNOS IN so_comm.
IF sy-subrc NE 0.
STOP.
ENDIF.
DELETE FROM (pa_tnam) WHERE Z_COMMNOS IN so_comm.
IF sy-subrc EQ 0.
WRITE:/ sy-dbcnt.
ENDIF.
END-OF-SELECTION.
Regards
Pavan

Similar Messages

  • Sample code to dynamically append bytes to pdf

    Hi,
    I need to dynamically append bytes to pdf. It would be great if some one post sample code for that.
    Thanks,
    Veerabhadrarao

    user10710231 wrote:
    i am unable to append the bytes to pdf file . Can you send me some code snippet.It is unnecessary to ask someone to invest time in you when you can easily google for the hundreds or thousands of example snippets already out there. You know what to look for now, now make some effort yourself. Its like asking someone to go buy a tooth brush for you when you know there is one somewhere upstairs, you just refuse to go look for it and make someone else do the work.

  • DYNAMIC APPENDING....

    Hi, guys!.
    I've got a little technical doubt....
    I've got to internal tables I_SEGMENTOS, which holds the names of the segments it's being used
    E1EDK01
    E1EDK02
    E1EDK03...
    2.- I_SALIDA, with the following structure
         SEGMENTO, CAMPO, VALOR.
         E1EDK01,  CURCY, EUR
         E1EDK02,  NETWR, 10000
    What I pretend is to fill dynamically the internal table.
    I mean:
      loop at i_segmentos.
        loop at i_salida where segmento = i_segmentos-segmento.
    and, with every step of the loop, will procedure as follows...
         I_.
    Does anybody have an easy clue for it to be done with field symbols???
    Thank you so much!!!
    Raú

    FIELD-SYMBOLS : <it_final> TYPE STANDARD TABLE,
                    <wa_final> TYPE ANY,
                    <w_field> TYPE ANY.
      wa_fieldcatalog-fieldname  = 'FIELD1'.
      wa_fieldcatalog-ref_table  = 'E070'.
      wa_fieldcatalog-outputlen  = '13'.
      wa_fieldcatalog-reptext    = 'Created On'.
      wa_fieldcatalog-seltext    = 'Created On'.
      APPEND wa_fieldcatalog TO it_fieldcatalog.
      CLEAR wa_fieldcatalog.
    etc etc...it_fiedlcatalog: contains the fields of the internal table
    CALL the following method to CREATE DYNAMIC TABLE
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = it_fieldcatalog
        IMPORTING
          ep_table                  = new_table
        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 new_table->* TO <it_final>.
    Try this out it may solve your problem....
    Thanks,
    Suman

  • How can I create an action that dynamically appends the filename, when saving?

    I have created a batch file that watches a folder for .jpgs. When a jpg is found, it runs a Photoshop droplet that resizes and exports six different sizes of the same image, then closes the image. This all works fine, however the step I am stuck on is getting Photoshop to dynamically rename the files. What I mean is when I drop in a file named something like filename.jpg, I want the images to be named according to the width of resize. Exported files should be filename-1400.jpg, filename-1200.jpg, filename-800.jpg, etc. filename2.jpg would become filename2-1400.jpg, filename2-1200.jpg, filename-800.jpg. As it is now, Photoshop names the files the same names I saved them as, while creating the actions.
    I am using Photoshop CS6.

    What OS and verson of AI? Along with what Myle said, in the Actions panel is a column which allows the dialogs to be turned on/off. Make sure this is unchecked at all levels of the Action.

  • Dynamically appending records to an existing cursor---URGENT !!!

    Hi all,
    I'm right now creating dynamic statistical reports in Oracle 8.1.6 on Win NT.
    My query is as below:
    select
         TO_CHAR(a.jobpostingdate,'MM-DD-YYYY') jobpostingdate ,count(a.jobpostingid) no_jobs
    FROM
         JOBPOSTING a, EMPLOYEE f
    WHERE
         a.employeeid = f.employeeid AND
         f.companyid = 2 AND
         a.jobpostingdate between to_date('10-01-2002 00:00:00','mm-dd-yyyy hh24:mi:ss') AND
         to_date('10-01-2003 00:00:00','mm-dd-yyyy hh24:mi:ss')
    GROUP BY
         TO_CHAR(a.jobpostingdate,'MM-DD-YYYY')
    ORDER BY
         TO_CHAR(a.jobpostingdate,'MM-DD-YYYY')     
    This query will give me records for everyday. But if there is no record for a certain date, then I don't get that record. This is how it works.
    The result of the above query is as below:
    jobpostingdate no_jobs
    10-11-2002 1
    10-12-2002 5
    10-15-2002 4
    10-16-2002 2
    In the above resultset, There are no records displayed for 10-13-2002 and 10-14-2002. But my requirement is that I need both the records for 10-13-2002 and 10-14-2002 with the count as 0.
    Can anybody please tell me how I can do this? Is there a way in Oracle 8.1.6? And if I need to write a function for this how do I do it ? I'm not able to find any way to do this. Or Do I need to dynamically appened cursor or something? How do I solve this problem?
    Please give me a solution as soon as possible...this is very URGENT for me !!!
    Thanx,
    Madhavi

    I did not test this, but it should work.
    I understand from your posting that the missing dates are existing in the table but there is no match on these rows with employeeid join. If this is correct then the following should work,SELECT * FROM
    Select TO_CHAR(a.jobpostingdate,'MM-DD-YYYY') jobpostingdate, count(*) no_jobs
    FROM JOBPOSTING a, EMPLOYEE e
    WHERE e.companyid = 2
    AND   a.employeeid = e.employeeid
    AND   a.jobpostingdate between
          to_date('10-01-2002 00:00:00','mm-dd-yyyy hh24:mi:ss') AND
          to_date('10-01-2003 00:00:00','mm-dd-yyyy hh24:mi:ss')
    GROUP BY TO_CHAR(a.jobpostingdate,'MM-DD-YYYY')
    UNION
    Select TO_CHAR(a.jobpostingdate,'MM-DD-YYYY') jobpostingdate, 0 no_jobs
    FROM JOBPOSTING a
    WHERE NOT EXISTS( Select 'x' From EMPLOYEE e
                      WHERE e.companyid = 2 -- you might not need this condition
                AND   e.employeeid = a.employeeid)
    ORDER BY jobpostingdate;Thx,
    SriDHAR

  • Dynamically append values to http url in BPEL http bindings

    hi ,
    I have a requirement where I have to post an xml over the http url 'http://todm2344:67033/access/auth'.
    I have created a wsdl file with http bindings and the schema that this url expects and invoked that wsdl from my bpel process.
    But now the requirement is that I need to send a value of an id appended to the above url.
    Each time when i post an xml i should send it as say ''http://todm2344:67033/access/auth/34372''.
    That appended value is some value that comes in the request of the my BPEL.
    Please let me know on how this can be done.
    Thanks in advance!!!

    See thread Re: Noob Q - Override a WSDL location attribute
    Several good answers. I wrote:
    If you want to set the WS address at run time, e.g. from a property in your BPEL process that knows whether you in in DEV versus PROD, you just do a copy/assign from a variable with an XML fragment straight to the partnerlink. Looks weird, but it works (at least in 10.1.3):
    +<assign name="asn_set_endpoint">+
    +<copy>+
    +<from variable="var_endPointAddress" query='/ns1:EndpointAddress"/>+
    +<to partnerLink="myPartnerLinkName"/>+
    +</copy>+
    +</assign>+
    +There's a good walkthrough at:+
    +http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html+
    +They define a variable called partnerReference, and then show screen shots of how to assign it to the partnerlink (step 8).+
    Good luck, Andy

  • Dynamic File name in FTP Communication Channel

    Hi All,
    We have requirement where ,we create a filenames dynamically ( runtime).These filenames whihc do change for every execution needs to be added in FTP communication channel.
    1. How can we add the this generated file name in FTP CC Communication Channel.
    2. Does this file needs to part of target structure during graphical mapping ?
    3. Can we also dynamically append the Directory name to file names aswell ?
    Please provide your valuable sugestions.
    Thanks for your support.

    1. How can we add the this generated file name in FTP CC Communication Channel.
    3. Can we also dynamically append the Directory name to file names aswell ?
    to get the FileName:
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    To get the Directory:
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    Then append:
    key+key1
    And then in the CC select the Directory checkbox under the ASMA properties...
    2. Does this file needs to part of target structure during graphical mapping ?
    The file which is sent using the CC will have the FileName as configured in the UDF of the graphical mapping....and if i am not wrong then the target structure resembles the file (if there is no FCC done)....
    Regards,
    Abhishek.

  • To create a deep structure for dynamic internal table.

    Hello
    My ALV has fields which are defined dynamically during execution.
    so, i did it in the following way,
    Declared Field symbolds, DREF and fieldcatalog as,
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,
                  <fs_dyntable>.
    DATA:   dref_dyntab    TYPE REF TO data,
            dref_dynwa     TYPE REF TO data.
    DATA: ts_fieldcatalog TYPE lvc_t_fcat.
    DATA: wa_fieldcatalog TYPE lvc_s_fcat.
    Updated Fieldcatalog dynamically as,
    *function module to read segment structure
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp           = v_segment_name
          TABLES
            segmentstructure     = ts_seg_structure
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.
        IF sy-subrc <> 0.
          CASE sy-subrc.
            WHEN '1'.
              MESSAGE e024.
              STOP.
            WHEN '2'.
              MESSAGE e025 WITH v_segment_name.
              STOP.
            WHEN OTHERS.
              MESSAGE e023.
          ENDCASE.
        ENDIF.
    *FETCH FIELDS FROM STRUCTURE OF SEGMENT AND CREATE FIELDCATALOG FOR
    EACH FIELD OF SEGMENT (DYNAMIC FIELD CATALOG)
        LOOP AT ts_seg_structure INTO wa_seg_structure.
          ADD 1 TO v_counter.
          wa_fieldcatalog-fieldname = wa_seg_structure-fieldname.
          wa_fieldcatalog-col_pos   = v_counter.
          wa_fieldcatalog-ref_table = wa_seg_structure-segtyp.
          APPEND wa_fieldcatalog TO ts_fieldcatalog.
          CLEAR wa_fieldcatalog.
        ENDLOOP.
    and generated dynamic internal table using fieldcatalog as,
    *--Method to get the structure of table using fieldcatalog.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ts_fieldcatalog
        IMPORTING
    *--Variable of type REF TO DATA.
          ep_table        = dref_dyntab.
      IF sy-subrc <> 0.
        MESSAGE e023.
      ENDIF.
    *--Dynamic internal tables required when show segments selected
      IF p_selseg IS NOT INITIAL.
        ASSIGN dref_dyntab->* TO <t_dyntable>.
    *--Create dynamic work area and assign to FS
      CREATE DATA dref_dynwa LIKE LINE OF <t_dyntable>.
        ASSIGN dref_dynwa->* TO <fs_dyntable>.
    And then i populated this <t_dyntable> which is being passed as data-table to method
    CL_GUI_ALV_GRID => SET_TABLE_FOR_FIRST_DISPLAY
    for ALV grid Display along with above used filedcatalog ts_fieldcatalog.
    Things are fine till here, but now i have the requirement to edit selected rows of the ALV display..
    As you might be aware, we need a field
            TS_STYLEROW  TYPE lvc_t_styl, (i.e, a field of type 'h' and we can say as an internal table inside an internal table or else as a deep structure)
    in the output internal table <t_dyntable> to meet our requirement.
    My issue is about declaring one such field of type 'h' in this dynamically created internal table ''<t_dyntable>".
    I tried in the following way by adding one such field to fieldcatalog :
    *Field for Styling
      ADD 1 TO v_counter.
      wa_fieldcatalog-fieldname   = 'TS_STYLEROW'.
      wa_fieldcatalog-tabname     = 'TS_STYLE'.
      wa_fieldcatalog-col_pos     = v_counter.
      wa_fieldcatalog-no_out      = 'X'.
      wa_fieldcatalog-inttype     = 'h'.      " I even mentioned this
      APPEND wa_fieldcatalog TO ts_fieldcatalog.
      CLEAR  wa_fieldcatalog.
    But this is creating a field of type 'C' in the table <t_dyntable> instead of what i was expecting
    Guyz and respected,
    Please advice me with the solution or ur ideas....
    Note : The overall requirement is create a deep structure for dynamically generated internal table.
    Your help is highly appreciated and unforgettable..!!!!!!!

    hi,
    Dynamic append
    Dynamic internal table
    Dynamic internal table
    dynamic columns in ALV
    Variant for dynamic selection
    thanks

  • Dynamic query with Data Access Layer

    I have a program that has a multiselect box (JSP form) to select certifications and then search to see which employee may have them.
    I have no issues when searching by only one, but if I select multiple certifications from the multiselect box, it doesn't work. I've tried and tried and I can't seem to figure this out.
    Below is the code for returning employees that match what certifications were chosen. Again, it works fine if only 1 was selected. I wish for it to return only the employees that match all selections.
    the arguments passed to the DataAccess Layer are an array of certification ID's and the size variable is how many certifications were chosen. The for loop is supposed to dynamically append to the end of the query an extra "AND" sql operator to match up. The 3 tables selected in the query are Employee (a list of employees and ID's), Certificates (a list of possible certificates and their ID's) and Employee_Certificate (a table that matches which employees have which certificates).
    What am I doing wrong?
    public List certSearch(int cert[], int size) throws Exception{
             // connection instance
             ArrayList list = new ArrayList();
             Connection connection=null;
             PreparedStatement pstatement = null;
             try
                    list.clear();
                    StringBuffer queryString = new StringBuffer("SELECT * from EMPLOYEE, EMPLOYEE_CERTIFICATE, CERTIFICATE" +
                                         " WHERE employee_certificate.employee_id = employee.employee_id " +
                                         "AND certificate.certificate_id = employee_certificate.certificate_id ");
                    for (int incr = 0; incr < size; incr++){
                        queryString.append("AND certificate.certificate_id = " + cert[incr] + " ");
                    String query;
                    query = queryString.toString();
                    // Send query to database and store results.
                    Class.forName(Driver);
                    //Establish network connection to the db
                    connection = (Connection) DriverManager.getConnection(url, username, password);
                    pstatement = (PreparedStatement) connection.prepareStatement(query);
                    ResultSet rs = pstatement.executeQuery();
                    while (rs.next())
                        Employee emp = new Employee();
                        int empID=Integer.parseInt(rs.getString("employee_id"));
                        String first=rs.getString("first_name");
                        String last=rs.getString("last_name");
                        emp.setID(empID);
                        emp.setFirstName(first);
                        emp.setLastName(last);
                        list.add(emp);
               catch(Exception readerr)
                    System.err.println("Error reading  "+ readerr);
               finally
                try
                    // close the connection so it can be returned to the
                    // connection pool then return the SubjectCounselor instance
                    connection.close();
                catch (SQLException ex)
                       System.err.println("Error reading employee data: " + ex);
                return list;
        }Edited by: Snadinator on Aug 1, 2009 1:35 PM

    You don't get it.
    This should work :
    public List certSearch(int cert[], int size) throws Exception{
             // connection instance
             ArrayList list = new ArrayList();
             Connection connection=null;
             PreparedStatement pstatement = null;
             try
                    list.clear();
                    String query = buildQuery(cert);
                    // Send query to database and store results.
                    Class.forName(Driver);
                    //Establish network connection to the db
                    connection = (Connection) DriverManager.getConnection(url, username, password);
                    pstatement = (PreparedStatement) connection.prepareStatement(query);
                    ResultSet rs = pstatement.executeQuery();
                    while (rs.next())
                        Employee emp = new Employee();
                        int empID=Integer.parseInt(rs.getString("employee_id"));
                        String first=rs.getString("first_name");
                        String last=rs.getString("last_name");
                        emp.setID(empID);
                        emp.setFirstName(first);
                        emp.setLastName(last);
                        list.add(emp);
               catch(Exception readerr)
                    System.err.println("Error reading  "+ readerr);
               finally
                try
                    // close the connection so it can be returned to the
                    // connection pool then return the SubjectCounselor instance
                    connection.close();
                catch (SQLException ex)
                       System.err.println("Error reading employee data: " + ex);
                return list;
        // I used the MySQL syntax; if it doesn't work : just enclose the values by single quotes
        private String buildQuery(int[] cert) {
            StringBuffer queryString = new StringBuffer("SELECT * from EMPLOYEE, EMPLOYEE_CERTIFICATE, CERTIFICATE" +
                    " WHERE employee_certificate.employee_id = employee.employee_id " +
                    "AND certificate.certificate_id = employee_certificate.certificate_id " +
                    "AND certificate.certificate_id IN ( ");
            queryString.append(cert[0]);
            for (int i = 1; i < cert.length; i++) {
                queryString.append(" ,");
                queryString.append(cert);
    queryString.append(" )");
    return queryString.toString();

  • Dynamic reverse context node mapping at runtime

    Hi!
    I have an application which uses another embedded component containing a ALV table which shows the data of a transparent table.
    Everything works fine if i'm working with a static table with static attributes and map the context node of the application to the node in the embedded component. The context node in the embedded component is reversed mapped and gets its data from the application's context node.
    Now i want to do it dynamically. Inside the application the user should choose the name of a table and I'm using RTTI functions to get it's technical informations. At runtime i'm adding dynamically attributes (i.e. fieldname, type, length) to a static context node called 'DATA'.
    The ALV component of the embedded component is mapped to an interface context node named 'DATA' which uses reverse mapping to receive data from the applications context node 'DATA'.
    What I need to know is how to create the mapping between application context node and interface context node of the embedded component at runtime after i have created the attributes of the node dynamically. Is that basically possible?
    I've already tried to map the both nodes statically to see if the dynamically created attributes are mapped automatically then. The mapping seems to be fine at node level, but doesn't work for the later dynamically added attributes.
    Could someone point me to informations if dynamic mapping context nodes is basically possible and how to do it?
    Regards
    Ralf-J.

    Hi Lars!
    Thanks for the link! The problem isn't to fill the context node dynamically. That's already working using RTTI etc.
    It seems to me that the interface context node of the ALV in the embedded component doesn't recognize the dynamically added attributes. As i wrote the binding on node level (DATA->DATA), which i'm doing at design time, is working as expected, but the added attributes are only shown in the context node of the using component but not in the embedded.
    I'm still thinking there must be a way to do a binding at runtime. On the other hand the comment of Glenn in the thread you've pointed me to, seems to suggest that the ALV itself might have problems with dynamically appended attributes.
    Regards
    Ralf-J.

  • Expert mode query in View objects and appended where clause

    My company is Oracle Member Partner and we are developing enterprise web applications using Oracle database and BC4J.
    I have the following problem...
    When I enable EXPERT MODE option in View Object I have trouble appending to query statement in my client code.
    I need expert mode because I must use "SELECT DISTINCT" insted of "SELECT" in my query.
    It looks something like this:
    viewObject.setWhereClause("CLA_ID = " + claId);
    viewObject.executeQuery();
    SQL query from View Object becomes sub-query and fails to execute:
    select * from (original view object query) where (... appended where clause)
    Order by part of the query causes sql errors because original query is now sub-query.
    Is there any way around this?

    I tried creating an expert mode SQL query:
    SELECT DISTINCT EMPNO, ENAME FROM EMP.
    Then at runtime I do:
    vo.setWhereClause("ENAME LIKE '%'||?||'%');
    vo.setWhereClauseParam(0,'A');.
    and this works fine. The trick is that since expert-mode view objects get wrapped as inline views (to allow runtime appending of WHERE clause, actually), you need to select any column in the select statement to which you want to later refer in a dynamically-appended where clause.
    If you want to prevent the inline-view wrapping, you can write the following code in your view object's ViewObjectImpl subclass to force the VO to NOT be treated as an expert-mode SQL VO.
      // Goes in your view object impl subclass
      public void create() {
         // Force this VO to NOT be treated as an expert-mode SQL, so that
         // its query does not get wrapped as an inline view.
         getViewDef().setFullSql(false);
      }I used this trick above to create an expert mode query like:
    SELECT DISTINCT deptno FROM empand then at runtime I add a dynamic where clause that refers to a column
    in EMP that is not in the select list like this:
        ViewObject vo = am.findViewObject("View1");
        vo.setWhereClause("ename like '%A%'");
        vo.executeQuery();
        System.out.println(vo.first().getAttribute(0));and this causes the query to come out as:
    SELECT DISTINCT deptno FROM emp WHERE ename like '%A%'.
    instead of:
    SELECT * FROM (SELECT DISTINCT deptno FROM emp) QRSLT WHERE ename like '%A%'which would cause an error due to the fact that ename is not in the select list of the original (wrapped, inline) query.

  • Dynamic export query for archiver

    Is there a way to pass custom query at run time and call export_archive method.
    Thing is I do not want to do automatic replication but create batch files on need basis and manually trigger transfer.
    regards,
    deepak

    The query for a ViewObject is either provided at design time (and "lives" in your ViewObject's XML metadata file), or the query can be dynamically set by creating a dynamic view object, as you've noted.
    In the former case, you can set additional where clause restrictions, or set the values of existing or dynamically appended WHERE clause bind variables, however you cannot completely replace the query.
    Are you having a problem using the chart renderer with a ViewObject created dynamically?
    null

  • Dynamic Internal Table for reading data from external file

    Hello All,
    The task was to create a internal table with dynamic columns,
    Actually this is my first task in the WebAS 6.20, my program is based on input file provided by user with certain effort. this file can have different effort for a one yr to five year frame..
    I needed to read the raw data from file, based on months create a internal table to hold the data, after this i need to validate the data...
    I have browsed thru dynamic internal table topic, but couldn't find any dynamic appending structure, the dynamic structure would contains 12 month fileds.
    can any one help me in getting my task completed..
    Thanks
    Kumar

    Hi,
    I see that you posted the same question a couple of days ago at Dynamic Internal Table for reading data from external file Didn't Charles's response address your problem?
    Regards

  • Dynamic SQL Command Queries Using Parameters

    Post Author: tdoman
    CA Forum: Data Connectivity and SQL
    I'm using Crystal Reports 11 and am trying to dynamically build part of the "Where" clause in the SQL command query to filter data on the server before the results are sent to the client. I'm doing this to decrease the load time of my reports by not having to send a large set of data to the client, then filter the results on the client side.
    I want to create a parameter list that is dynamically generated from a table in a database and allows you to select mutiple values from that list. For example: I have two tables. One employee table and one employee type table. The employee table lists all employees and their related employee types (full-time, part-time, and contractor). The employee type table lists the employee types that will dynamically be loaded into the parameters list.
    Employee Table
    ID    Name       TypeID
    1     Bob          2
    2     Steve        1
    3     John         3
    4     Bill            1
    Employee Type Table
    ID   Type
    1     Full-Time
    2     Part-Time
    3     Contractor
    Assuming the user selects u2018Full-Timeu2019 and u2018Contractoru2019 from the parameter list, the SQL command query I want to generate is as follows:
    SELECT *
    FROM emp, emp_type
    WHERE emp.ID = emp_type.ID and emp.TypeID in (u20181u2019, u20183u2019)
    I tried building the following SQL command query so it would dynamically replace {?EmpType} with the IDu2019s of the types the user selected but it doesnu2019t work. Any ideas how to fix this?
    SELECT *
    FROM emp, emp_type
    WHERE emp.ID = emp_type.ID and emp.TypeID in ({?EmpType})

    Post Author: tdoman
    CA Forum: Data Connectivity and SQL
    btw...I just realized I had a typo in my "where" clause of the previous example. It should have been like so:WHERE emp.TypeID = emp_type.ID and emp.TypeID in (u20181u2019, u20183u2019)  satish_nair31:
    Instead of passing the filter condition as parameter it would be fine if you pass it by ReportViewer.SelectionFormula Property.
    The selection formula property of report viewer control will dynamically append the where condition with the SQL value. You will pass the filter condition as per the syntax of language supported by crystal reports.I believe using the ReportViewer.SelectionFormula property you are referring to is only available if I'm loading the report through a VB application. If this is true, then this option will not work for me because I'm loading the report in a browser from the Crystal Report web server and currently don't have a VB application that can load the report. If I did, then I could dynamically build the SQL string using VB then pass it to the Crystal Report on the fly.But I'm trying to figure out if it's possible to do it without loading the report using VB. Please correct me if I'm wrong on these assumptions.

  • Dynamically Named Restore Points?

    Does anyone know how to create dynamically named restore points? I have an RMAN script that is currently setup like this:
    sql 'drop restore point lv_restore';
    sql 'create restore point lv_restore';
    backup database plus archivelog;
    delete noprompt obsolete;
    exit;
    The first line is where I drop the restore point and the second line is where I create it again. This way the restore point is set just before the backup begins.
    Okay - it's setup like this because when I don't drop the restore point ahead of time I get the following error:
    sql statement: create restore point lv_restore
    RMAN-00571: =================================================
    RMAN-00569: ======== ERROR MESSAGE STACK FOLLOWS ===========
    RMAN-00571: =================================================
    RMAN-03009: failure of sql command on default channel at 04/29/2008 15:22:44
    RMAN-11003: failure during parse/execution of SQL statement: create restore point lv_restore
    ORA-38778: Restore point 'LV_RESTORE' already exists.
    This makes sense to me, actually. What I would love to do is to dynamically append the current date to the end of the restore point name. The idea is to have the restore points named something like this:
    lv_restore_2008-04-25
    lv_restore_2008-04-26
    lv_restore_2008-04-27
    lv_restore_2008-04-28
    lv_restore_2008-04-29
    etc...
    Is there any way I can dynamically name restore points?

    Can anyone explain to me how to use the syntax provided by damorgan to actually append a value to the restore point name in the script I provided?
    Any help is greatly appreciated.

Maybe you are looking for