Export data using SUBMIT

I want to export a field from program1 into selct-options of another program....i recieved some reply  for this but they all  have use of export and import statement. but I have to do this only by SUBMIT statement.please suggest me for this with vey clear concepts....as i have gone through help examples.(ONLY SUBMIT STATEMENT)

Hi,
This example will resolves ur problem...
This program imports the other program fields into program 1(main)
*" Tables declarations.................................................
TABLES:
  spfli.
*" Type declarations...................................................
Type declaration of the structure to hold data from table SPFLI     *
TYPES:
  BEGIN OF type_s_spfli,
    carrid LIKE spfli-carrid,          " Carrier Id
    connid LIKE spfli-connid,          " Connection Number
    cityfrom LIKE spfli-cityfrom,      " City from
    cityto LIKE spfli-cityto,          " City to
    airpfrom LIKE spfli-airpfrom,      " Airport from
    airpto LIKE spfli-airpto,          " Airport to
    countryfr LIKE spfli-countryfr,    " Country from
    countryto LIKE spfli-countryto,    " Country to
  END OF type_s_spfli.
Data Declaration...................................................*
     Field String To Hold Flight Details Record from SPFLI          *
DATA
  fs_spfli TYPE type_s_spfli.
Data Declaration...................................................*
     Internal Table To Hold Flight Details Records from SPFLI       *
DATA
  t_spfli LIKE STANDARD TABLE OF fs_spfli.
TYPES:
  BEGIN OF types_s_itab,
    carrid LIKE sflight-carrid,        " Carrier id
    connid LIKE sflight-connid,        " Connection number
    fldate LIKE sflight-fldate,        " Flight date
  END OF types_s_itab.
Data Declaration...................................................*
     Field String To Hold Flight Details Record from SFLIGHT        *
DATA
  fs_itab TYPE types_s_itab.
Data Declaration...................................................*
     Internal Table To Hold Flight Details Records from SFLIGHT     *
DATA
  t_itab LIKE STANDARD TABLE OF fs_itab.
*" Type declarations...................................................
Type declaration of the structure to hold data from table SBOOK     *
TYPES:
BEGIN OF type_s_sbook,
   carrid LIKE sbook-carrid,           " Carrier Id
   connid LIKE sbook-connid,           " Connection Number
   fldate LIKE sbook-fldate,           " Flight date
   bookid LIKE sbook-bookid,           " Booking number
   loccuram LIKE sbook-loccuram,       " Local currency
   loccurkey LIKE sbook-loccurkey,
   order_date LIKE sbook-order_date,   " Booking date
END OF type_s_sbook.
Data Declaration...................................................*
     Field String To Hold Flight Details Record from BOOK           *
DATA
  fs_sbook TYPE type_s_sbook.
Data Declaration...................................................*
     Internal Table To Hold Flight Details Records from SBOOK       *
DATA
  t_sbook LIKE STANDARD TABLE OF fs_sbook.
DATA
  w_checkbox.                          " Checkbox
SELECT-OPTIONS:
  s_carr FOR spfli-carrid.             " Carrier id range
                      START-OF-SELECTION EVENT                      *
START-OF-SELECTION.
  PERFORM selectq.
                      END-OF-SELECTION EVENT                        *
END-OF-SELECTION.
  SET PF-STATUS 'YH1315_030502'.
  PERFORM display_basic.
AT USER-COMMAND.
  PERFORM ucomm.
*&    Form  selectq
    This subroutine retreive data from SPFLI table
  There are no interface parameters to be passed to this subroutine.
FORM selectq .
  SELECT carrid                        " Carrier id
         connid                        " Connection number
         cityfrom                      " City from
         cityto                        " City to
         airpfrom                      " Airport from
         airpto                        " Airport to
         countryfr                     " Country from
         countryto                     " Country to
         INTO CORRESPONDING FIELDS OF TABLE t_spfli
         FROM spfli
         WHERE carrid IN s_carr.
ENDFORM.                               " Selectq
*&      Form  display_basic
    This subroutine displays data from internal table
  There are no interface parameters to be passed to this subroutine.
FORM display_basic .
  LOOP AT t_spfli INTO fs_spfli.
    WRITE:
      / w_checkbox AS CHECKBOX,
        fs_spfli-carrid,
        fs_spfli-connid,
        fs_spfli-cityfrom,
        fs_spfli-cityto,
        fs_spfli-airpfrom,
        fs_spfli-airpto,
        fs_spfli-countryfr,
        fs_spfli-countryto.
  ENDLOOP.                             " LOOP AT T-SPFLI INTO...
ENDFORM.                               " Display_basic
*&      Form  UCOMM
  This subroutine for at user-command event
  There are no interface parameters to be passed to this subroutine.
FORM ucomm .
  RANGES :
    r_carr FOR spfli-carrid,
    r_conn FOR spfli-connid,
    r_carrid FOR sflight-carrid,
    r_connid FOR sflight-connid,
    r_fldate FOR sflight-fldate.
  CASE sy-ucomm.
    WHEN 'DISPLAY'.
      DATA:
        lw_lines TYPE i,
        lw_lineno TYPE i VALUE 3.
      DESCRIBE TABLE t_spfli LINES lw_lines.
      DO lw_lines TIMES.
        READ LINE lw_lineno FIELD
             VALUE w_checkbox   INTO w_checkbox
                   fs_spfli-carrid INTO  fs_spfli-carrid
                   fs_spfli-connid INTO  fs_spfli-connid.
        IF sy-subrc = 0.
          IF w_checkbox = 'X'.
            r_carr-sign = 'I'.
            r_carr-option = 'EQ'.
            r_carr-low = fs_spfli-carrid.
            APPEND r_carr.
            r_conn-sign = 'I'.
            r_conn-option = 'EQ'.
            r_conn-low = fs_spfli-connid.
            APPEND r_conn.
          ENDIF.                       " IF W_CHECKBOX = 'X'
        ENDIF.                         " IF SY-SUBRC = 0
        ADD 1 TO lw_lineno.
      ENDDO.                           " DO LW_LINES TIMES
      SUBMIT yh1314_030502_call
        WITH s_carr IN r_carr
        WITH s_conn IN r_conn
         AND RETURN.
      IMPORT t_itab FROM MEMORY ID 'YH1315'.
      LOOP AT t_itab INTO fs_itab.
        r_carrid-sign = 'I'.
        r_carrid-option = 'EQ'.
        r_carrid-low = fs_itab-carrid.
        APPEND r_carrid.
        r_connid-sign = 'I'.
        r_connid-option = 'EQ'.
        r_connid-low = fs_itab-connid.
        APPEND r_connid.
        r_fldate-sign = 'I'.
        r_fldate-option = 'EQ'.
        r_fldate-low = fs_itab-fldate.
        APPEND r_fldate.
      ENDLOOP.                         " LOOP AT T_ITAB INTO.....
      SELECT carrid                    " Carriee Id
             connid                    " Connection number
             fldate                    " Flight date
             bookid                    " Booking number
             loccuram                  " Local Currency
             order_date                " Booking date
         INTO CORRESPONDING FIELDS OF TABLE t_sbook
         FROM sbook
         WHERE carrid IN r_carrid AND
               connid IN r_connid AND
               fldate IN r_fldate.
      IF SY-SUBRC NE 0.
        MESSAGE 'NO RECORDS FOUND'(006) TYPE 'S'.
      ENDIF.                           " IF SY-SUBRC NE 0
      LOOP AT t_sbook INTO fs_sbook.
        AT FIRST.
          WRITE: /5 'Carrier Id'(001),
                 20 'Conn Id'(002),
                 35 'Flight date'(003),
                 50 'Book Id'(004),
                 65 'Local Currency'(005).
        ENDAT.                         " AT FIRST
        WRITE: /5 fs_sbook-carrid,
               20 fs_sbook-connid,
               35 fs_sbook-fldate,
               50 fs_sbook-bookid,
               65 fs_sbook-loccuram CURRENCY fs_sbook-loccurkey.
      ENDLOOP.                         " LOOP AT T_SBOOK INTO.....
  ENDCASE.                             " CASE SY-UCOMM
ENDFORM.                               " UCOMM
Edited by: Kiran Saka on Feb 10, 2009 11:42 AM

Similar Messages

  • Can we use Data Pump to export data, using a SQL query, doing a join

    Folks,
    I have a quick question.
    Using Oracle 10g R2 on Solaris 10.
    Can Data Pump be used to export data, using a SQL query which is doing a join between 3 tables ?
    Thanks,
    Ashish

    Hello,
    No , this is from expdp help=Y
    QUERY                 Predicate clause used to export a subset of a table.
    Regards

  • Export Data Using Escape Character

    Hi All
    I have got a requirement where i need to export data from oracle with escape character.
    eg. I am using a delimiter 237(í) and if the same character is present in data it should be escaped by escape character eg. /.
    Once this file will get created i need to load this file in Netezza database which supports escape character.
    Data in oracle table
    FirstName     Lastname     Designation
    abc     xyz     mnz
    def     ghío     pqr
    Data should be exported like below
    FirstnameíLastnameíDesignation
    abcíxyzímnz
    defígh/íoípqr
    Thanks.

    943994 wrote:
    Thanks for the reply. I am new to Oracle and i am not able to find any command for exporting data in Oracle. I know we can do it manually using select statement but in that case we need to replace this delimiter with escape character and delimiter for all char fields.
    In netezza we can directly do that without this. Please see below example and let me know if any such thing is present in Oracle.
    SQL> CREATE EXTERNAL TABLE '/temp/test.csv' USING (REMOTESOURCE 'ODBC' DELIMITER 236 DATESTYLE 'YMD' DATEDELIM '-' TIMESTYLE '24HOUR' TIMEDELIM ':' MAXERRORS 0 ESCAPECHAR '\' NULLVALUE '' ) AS SELECT * FROM temp;
    .CSV file created by above command:
    abcíxyzímnz
    defígh/íoípqr
    Thankshttp://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm#sthref1293

  • Exporting Data using exp not working

    I am trying to export data from an applicaion and the vendor gave me a par file to help. Here is my problem.
    This is what I have tried.
    exp \"sys/****@Fieldmgr as SYSDBA\" parfile=fm_export.par
    I get this...
    About to export specified tables via Conventional Path ...
    EXP-00011: SYS.MATSRC does not exist
    EXP-00011: SYS.FIELDS does not exist
    Export terminated successfully with warnings.
    It is prefixing sys. Before everything and that seems to be the problem.
    This is how I have modified the par file.
    FILE="D:\exported\fm43.dmp"
    LOG="D:\exported\fm43_log.log"
    BUFFER=100000
    ROWS=yes
    GRANTS=yes
    INDEXES=yes
    TABLES =(MATSRC,
    FIELDS,
    SETTINGS,
    CHARLARG)
    What is causing the command to prefix sys before the table names and how can I prevent this?
    Thanks,
    Jim

    Too much is missing from your posts.
    1. Can you list both the export.par file and the import.par file. This will help clear things up.
    1) Create a new database (schema & instance) in 10g.
    Not sure what they mean by schema & instance. I've created a new database called Fieldmgr
    This means to create the database and the users. Specifically the user where you want the data to live.
    grant connect,resource to user1_name identified by user1_password;
    2) Modify the export par file as appropriate for your Oracle environment.
    I prefixed fmdb. to the tablenames.You say that you prefixed fmdb to the tablenames. I'm not sure why you did this. The dumpfile has names tab1, tab2, tab3.
    If you said tables=fmdb_tab1, fmdb_tab2, fmdb_tab3. These are not in the dumpfile. The imp utilitye will look for tables called fmdb_tab1, etc and won't find any. This is probably your biggest problem. Don't change the tablenames in the parfile. If you exported
    tables=tab1, tab2, tab3
    You need to import
    tables=tab1, tab2, tab3
    or a subset like:
    tables=tab2
    >
    3) Use the export par file on the disc to create a dump of the 9i database.
    This appeared to work and I got a 63 MB data file which seems about right and there were no warnings or errors.
    4) Modify the import par file for your environment.
    Not sure what to do here other than point to the files. I've already explained what they said here which seems incorrect from your post.
    According to the applicaion vendor I should replace these variables in the import file.
    REM * <fm_source_db> - database the dmp file was from *
    REM * <fm_dest_db> - database to load the dmp file intoThe above 2 parameters are not valid parameters for imp. I would remove them from the parfile.
    FROMUSER=<fm_source_db>
    TOUSER=<fm_dest_db>These 2 parameters are for remapping a schema name. If the source database has a user called source_user1 and you wanted these imported into the target database as targer_user5, then you would use:
    FROMUSER=SOURCE_USER1
    TOUSER=TARGET_USER5
    This would mean that in step 1 above you would use
    grant connect,resource to target_user5 identified by my_password;
    >
    5) Run the import par to move the 9i dump into the new 10g database.
    This never works. The commands I am trying are.
    imp \"sys/****@fieldmgr as sysdba\" parfile="filename.par"
    imp \"sys/**** as sysdba\" parfile="filename.par"This didn't work because you renamed the table names, you appended fmdb to the tables. These tables are not in the dumpfile so that is why you get the table not found error.
    Dean

  • How to Export data using DATA Cluster?

    Hi,
    I am trying to export around 10000 records using Memory ID concept  in the same session to another spot. 
    IF sy-subrc = 0.
    Exporting the number of total records
      EXPORT g_tot_line FROM g_tot_line TO MEMORY ID c_tline.
    ENDIF.
    My issue : - It throws dump saying
    ''When the SAP paging overflow occurred, the ABAP/4 memory contained
    entries for 8 of different IDs.''
    insufficent space and i need to use the clustres.
    I am not sure how to use Clusters in this scenario....
    Any suggestions will be appreciated..
    Regards,
    Charan

    What is so complicated about Data Clusters ?
    Did you do an F1 or read the online documentation: [http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm], [http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm]
    If you've any specific question, shoot !!!
    BR,
    Suhas

  • Export data using stored procedure to excel

    How to export and save data from SQL Server to MS Excel using stored procedure.
    Thanks in advance
    Abhinav

    You can use multiple options
    1. distributed query like OPENROWSET/OPENDATASOURCE
    http://www.excel-sql-server.com/excel-import-to-sql-server-using-distributed-queries.htm
    2. Using linked server /OPENQUERY
    http://sqlwithmanoj.com/2010/11/12/query-excel-file-source-through-linked-server/
    also see
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Exporting data using a script

    I quite often use the export facility in SQLD to extract data from a subset of tables in my schema and generate a script of insert commands to rebuild those tables elsewhere (on MySQL database actually).
    Is there any of automating the selection process, or specifying the required output in a command line? I define the same criteria every time, which takes longer than the export process itself. :)
    Thanks for any tips you can suggest.
    CS

    Not possible (yet). You can vote on and add your comments to the existing requests for automation/command line at the SQL Developer Exchange, to add weight for possible future implementation.
    At least until then, can't you schedule a normal 'SPOOL', and automate an import with MySQL?
    Have fun,
    K.

  • How to export data using application adapter for EBS?

    my scenario is : there're some external apps need to communicate with EBS,
    and the intermedia layer supposed to be implemented by SOA suite/Fusion adapters.
    my confusion is:
    in oracle integration repository, most of APIs are CUD (create, update, delete) without R (read). but many of our usecase was querying data from EBS.
    my question is : although, considering performance and unpridictable query object and granularity,it's not a good idea using app adatper to querying data from EBS via app api, but if I using db adapter to query data directly, it seems not easy as expected because it need to know the detail table structure and relationship and to build sql by hand.
    so, is there other proper way to get outbound data integration using fusion middleware? additional, I'm not clear about the ODI functionality , is it possible and easy to use ODI perform this task, eg, is ODI has enough API to interact with fusion adapter?

    In the Adapter Wizard look under "Other Interfaces/Custom Objects/PLSQL APIs". There are many many "Get" APIs here. None of these are identified or explained in the Integration Repository but the Trading Community Architecture - Technical Implementation Guide does give a little bit of information about what they do.

  • Export data - uses new connection?

    I've set up SQLdeveloper to automatically execute a script when a connection is started (tools->preferences->database->filename for connection startup script). The script does an "alter session set current_schema=blah" so that I don't have to keep typing the schema that I want to query. It's working fine, until I try to export the data. I get an error in the Logging page :ORA-00942: table or view does not exist. If I change my query to put in the schema name, it works fine. It looks like SQLdeveloper is creating a new connection to export the data, and isn't execuint the startup script I specified. Is there any way to get the script to execute on start of a data export connection? If not, the startup script seems pretty useless to me.

    How are the queries manipulated? I could change my queries in some way to accomodate the mainpulation. Although hopefully it would be simpler than adding the schema name to the beginning of all tables.
    What's the suggestion with the synonyms? Create synonyms in the schema that logs in for all the tables you want to access? The issue is there are literally huntreds of tables across many schemas, so it would be a bit tough to maintain.

  • How to export data from Elimination Value dimension member by HAL HFM adapter?

    Good day!<BR><BR>Is it possible to export HFM 4.0.5 data with HAL from the <Elimination> Value dimension member?<BR><BR>In 3.* versions it wasn't and there is Known Issue in the "HFM 3.* Adapter Read Me" file: "The Hyperion Financial Management Adapter exports data using the <entity currency> Value dimension member. The documentation erroneously states that there is a port available for the Value dimension"<BR>But there is not such point in the same file for HFM 4.0.5 AND there is Value port in the HFM 4.0.5. Adapter.<BR><BR>Thanks!<BR><BR>Regards,<BR>Georgy<BR>

    In the first approch, try to change the exporting parameter type REF TO DATA.
    Try like:
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        DATA: t_mara TYPE HASHED TABLE OF mara WITH UNIQUE KEY matnr.
        METHODS:
          constructor,
          get
            IMPORTING
              if_matnr TYPE matnr
            EXPORTING
              ea_mara  TYPE REF TO data.
    ENDCLASS.                    "lcl_test DEFINITION
    START-OF-SELECTION.
      DATA: lo_test TYPE REF TO lcl_test,
            lr_data TYPE REF TO data.
      FIELD-SYMBOLS: <fa_mara> TYPE ANY,
                     <f_field> TYPE ANY.
      CREATE OBJECT lo_test.
      lo_test->get(
        EXPORTING
          if_matnr = '000000000077000000'   " << Replace Your Material
        IMPORTING
          ea_mara  = lr_data ).
      ASSIGN lr_data->* TO <fa_mara>.
      ASSIGN COMPONENT 'ERSDA' OF STRUCTURE <fa_mara> TO <f_field>.
      <f_field> = space.
      WRITE: 'Done'.
    CLASS lcl_test IMPLEMENTATION.
      METHOD constructor.
        SELECT * INTO TABLE t_mara
               FROM mara
               UP TO 10 ROWS.
      ENDMETHOD.                    "constructor
      METHOD get.
        FIELD-SYMBOLS: <lfs_mara> LIKE LINE OF me->t_mara.
        READ TABLE me->t_mara ASSIGNING <lfs_mara> WITH KEY matnr = if_matnr.
        GET REFERENCE OF <lfs_mara> INTO ea_mara.
      ENDMETHOD.                    "get
    ENDCLASS.                    "lcl_test IMPLEMENTATION
    Regards,
    Naimesh Patel

  • How to get data from the called program using SUBMIT in a background job?

    Hi Experts,
    I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
    Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
    My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
    I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
    Kindly let me know your inputs and valuable suggestions.

    Kumar,
    When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
    Check these threads to get some idea
    submit report to spool & import spool id
    Re: Generate Spool for a report
    K.Kiran.

  • How to export to memory using submit statement?

    hi friends,
    There is a standard report RPTQTA10.
    After executing this report using submit statement i want get the result from the QTTRANS itable of RPTQTA10 to our local itab of BSP.
    After this from local itab of BSP i want display some fields of local itba.
    Any solutions plz....
    Regards,
    shankar.

    hi,
    thanks for ur reply.
    but i am getting error like this in IE.
    Note
    The following error text was processed in the system IT3 : Exception condition "CNTL_ERROR" raised.
    The error occurred on the application server itcsvr_IT3_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Form: CONSTRUCTOR of program CL_GUI_CUSTOM_CONTAINER=======CP
    Form: PBO of program SAPLSLVC_FULLSCREEN
    Module: PBO of program SAPLSLVC_FULLSCREEN
    Function: REUSE_ALV_GRID_DISPLAY of program SAPLSLVC_FULLSCREEN
    Form: DISPLAY_LIST of program RPTQTA10
    END-OF-SELECTION of program RPTQTA10
    And my BSP code is like this in OnInitialization event.
    SUBMIT rptqta10
             WITH PNPPERNR-LOW = w_pernr
             EXPORTING LIST TO MEMORY AND RETURN.
    data: field(25).
    field-symbols: <fs_tab> type STANDARD table.
    field = '(RPTQTA10)QTTRANS[]'.
    assign (field) to <fs_tab>.
    MOVE <FS_TAB>[] TO it_qttrans[].
    Here it_qttrans is local itab of BSP.
    Regards,
    Shankar.

  • Help needed with Export Data Pump using API

    Hi All,
    Am trying to do an export data pump feature using the API.
    while the export as well as import works fine from the command line, its failing with the API.
    This is the command line program:
    expdp pxperf/dba@APPN QUERY=dev_pool_data:\"WHERE TIME_NUM > 1204884480100\" DUMPFILE=EXP_DEV.dmp tables=PXPERF.dev_pool_data
    Could you help me how should i achieve the same as above in Oracle Data Pump API
    DECLARE
    h1 NUMBER;
    h1 := dbms_datapump.open('EXPORT','TABLE',NULL,'DP_EXAMPLE10','LATEST');
    dbms_datapump.add_file(h1,'example3.dmp','DATA_PUMP_TEST',NULL,1);
    dbms_datapump.add_file(h1,'example3_dump.log','DATA_PUMP_TEST',NULL,3);
    dbms_datapump.metadata_filter(h1,'NAME_LIST','(''DEV_POOL_DATA'')');
    END;
    Also in the API i want to know how to export and import multiple tables (selective tables only) using one single criteria like "WHERE TIME_NUM > 1204884480100\"

    Yes, I have read the Oracle doc.
    I was able to proceed as below: but it gives error.
    ============================================================
    SQL> SET SERVEROUTPUT ON SIZE 1000000
    SQL> DECLARE
    2 l_dp_handle NUMBER;
    3 l_last_job_state VARCHAR2(30) := 'UNDEFINED';
    4 l_job_state VARCHAR2(30) := 'UNDEFINED';
    5 l_sts KU$_STATUS;
    6 BEGIN
    7 l_dp_handle := DBMS_DATAPUMP.open(
    8 operation => 'EXPORT',
    9 job_mode => 'TABLE',
    10 remote_link => NULL,
    11 job_name => '1835_XP_EXPORT',
    12 version => 'LATEST');
    13
    14 DBMS_DATAPUMP.add_file(
    15 handle => l_dp_handle,
    16 filename => 'x1835_XP_EXPORT.dmp',
    17 directory => 'DATA_PUMP_DIR');
    18
    19 DBMS_DATAPUMP.add_file(
    20 handle => l_dp_handle,
    21 filename => 'x1835_XP_EXPORT.log',
    22 directory => 'DATA_PUMP_DIR',
    23 filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
    24
    25 DBMS_DATAPUMP.data_filter(
    26 handle => l_dp_handle,
    27 name => 'SUBQUERY',
    28 value => '(where "XP_TIME_NUM > 1204884480100")',
    29 table_name => 'ldev_perf_data',
    30 schema_name => 'XPSLPERF'
    31 );
    32
    33 DBMS_DATAPUMP.start_job(l_dp_handle);
    34
    35 DBMS_DATAPUMP.detach(l_dp_handle);
    36 END;
    37 /
    DECLARE
    ERROR at line 1:
    ORA-39001: invalid argument value
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3043
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3688
    ORA-06512: at line 25
    ============================================================
    i have a table called LDEV_PERF_DATA and its in schema XPSLPERF.
    value => '(where "XP_TIME_NUM > 1204884480100")',above is the condition i want to filter the data.
    However, the below snippet works fine.
    ============================================================
    SET SERVEROUTPUT ON SIZE 1000000
    DECLARE
    l_dp_handle NUMBER;
    l_last_job_state VARCHAR2(30) := 'UNDEFINED';
    l_job_state VARCHAR2(30) := 'UNDEFINED';
    l_sts KU$_STATUS;
    BEGIN
    l_dp_handle := DBMS_DATAPUMP.open(
    operation => 'EXPORT',
    job_mode => 'SCHEMA',
    remote_link => NULL,
    job_name => 'ldev_may20',
    version => 'LATEST');
    DBMS_DATAPUMP.add_file(
    handle => l_dp_handle,
    filename => 'ldev_may20.dmp',
    directory => 'DATA_PUMP_DIR');
    DBMS_DATAPUMP.add_file(
    handle => l_dp_handle,
    filename => 'ldev_may20.log',
    directory => 'DATA_PUMP_DIR',
    filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
    DBMS_DATAPUMP.start_job(l_dp_handle);
    DBMS_DATAPUMP.detach(l_dp_handle);
    END;
    ============================================================
    I dont want to export all contents as the above, but want to export data based on some conditions and only on selective tables.
    Any help is highly appreciated.

  • Exporting data from table to Excel in a particular format using BSP.

    Hello all,
          I am creating a application in BSP  wherein i have to export data to excel sheet.
      I am able to do that but the output in excel sheet is not formatted. it is displaying the data in a single 
    column. For example, the internal table which i am exporting to excel contains fields "product
    name", "area name", country name", "values". all these should be displayed in different columns.How 
    can i achieve this functionality.A sample code will be of great help..
    Below is the code i hav written for exporting to excel :
         data: l_len type i,
               l_string type string,
               app_type type string,
               file_content type xstring,
               file_mime_type type string.
         create OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
         cached_response->set_data( file_content ).
         cached_response->set_header_field(
                          name = if_http_header_fields=>content_type
                          value = file_mime_type ).
    LOOP AT itab_xls INTO wa_xls.
       CONCATENATE L_STRING wa_xls-product_name
       wa_xls-area_name
       wa_xls-landx
       CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
    ENDLOOP.
      APP_TYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'.
      data: l_xstring type xstring.
    call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text = l_string
          MIMETYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'
        IMPORTING
          BUFFER = l_xstring.
    Add the Byte Order Mark - UTF-16 Little Endian
      concatenate  cl_abap_char_utilities=>byte_order_mark_little
                   l_xstring
                   into l_xstring in byte mode.
       cached_response->set_data( l_xstring ).
       cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = 'APPLICATION/MSEXCEL; charset=utf-16le' ).
    *Set the filename into the response header
       cached_response->set_header_field( name  = 'Content-Disposition'
                                  value = 'attachment; filename=gkb_excel.xls' ).
    *Set the Response Status
       cached_response->set_status( code = 200 reason = 'OK' ).
    *Set the Cache Timeout - 60 seconds - we only need this in the cache
    *long enough to build the page and allow the IFrame on the Client to request it.
       cached_response->server_cache_expire_rel( expires_rel = 60 ).
        CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = guid.
        CONCATENATE runtime->application_url '/' guid '.xls' INTO url.
        cl_http_server=>server_cache_upload( url      = url
                                           response = cached_response ).
    Can anyone help me with some solution.
    Thanks in advance.
    Gurmahima.

    the issue is here
    LOOP AT itab_xls INTO wa_xls.
    CONCATENATE L_STRING wa_xls-product_name
    wa_xls-area_name
    wa_xls-landx
    CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING SEPARATED BY SPACE.
    ENDLOOP.
    instead do the following
    LOOP AT itab_xls INTO wa_xls.
    CONCATENATE L_STRING wa_xls-product_name ','
    wa_xls-area_name  ','
    wa_xls-landx  ','
    CL_ABAP_CHAR_UTILITIES=>CR_LF INTO L_STRING .
    ENDLOOP.
    and then change the file name extension from xls to csv. it should open properly in excel.
    Note that this is only excel csv file. if you want a proper excel excel file, then
    option one: build a html table with your data into a string and pass it to excel
    option 2: build excel xml using your data into a string and pass it to excel.
    Regards
    Raja

  • How to Export data from a Table to Excel using PL/SQL Code

    Hi,
    I need to export data from a table to the excel sheet using PL/SQL script.
    could you pls provide with custom codes or sample procedures.
    Bobby

    http://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049

Maybe you are looking for

  • Cannot send email from mobile devices in 2013

    We recently implemented our new Exchange 2013 server,everything ok except for mobile devices. In mobiles i can receive emails, but cant send or reply to any emails. I tried in both android and iphone, not working. Can anyone help to solve this proble

  • Actions Not Showing Up After Import

    I imported a bunch of actions into Acrobat 11 (Creative Cloud version) from Acrobat 10 (the Version that came with CS6). They are not showing up in the Action Wizard panel, and the program will not let me reimport them because "The action has the sam

  • Can't disable share button on Mavericks

    It seeps that Share Button appears in Notification Center every time I restart my mac. I go to Settings/Notifications and untick "Show share button in Notification Center". The button disappears but as soon as I restart my mac it is there in Notifica

  • Open Enrollment Text

    Within benefits open enrollment in ESS there is text at the top that states: 'This is your selection of benefit plans. From this list, you can add, edit or remove plans as needed. Whenever you edit a plan, its options are displayed. For every plan, y

  • Abrupt ending of music from Ipod Shuffle

    I have had a continuous problem with my shuffle. When either set to random or play straight through, it will almost start playing a particular song then it will lock up or just make a scratch noise like a record player would when the area couldn't pl