How to extract data from CLOB and insert them into DB?

Hi PL/SQL Gurus,
I have no experience in PL/SQL, but I have a requirement now where I have to use it.
We have a table with 10 columns, one of them is a CLOB and it holds XML data. The XMLs are very huge in size.
Two new columns are added to the table and the data has to be filled for the existing records from the corresponding XML. The XML has all the data as attributes. I started searching on the internet and tried if I could extract the data out of XML.
SELECT extractValue(value(x), '/Order/Package/@Code',
'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"' )
FROM ORDER_TABLE A
, TABLE(
XMLSequence(
extract(
xmltype(A.XML_DATA)
, '/ns0:Root'
, 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"'
) x;
But this isn't working. Could anyone please provide some ideas.
I just want to confirm that I am able to extract data. Once this is done I would like to create a procedure so that all the existing records can be updated.
Thanks in advance.
Regards,
Fazzy

Can this be acheived using a SQL statement.Yes, you can do it with the DML error logging clause.
Here's a quick example I've just set up :
Base table
SQL> create table order_table (
  2   order_id number,
  3   package_code varchar2(30),
  4   package_desc varchar2(100),
  5   xml_data clob
  6  );
Table created
SQL> alter table order_table add constraint order_table_pk primary key (order_id);
Table altered
Adding data...
SQL> insert into order_table (order_id, xml_data)
  2  values (1, '<?xml version="1.0" encoding="UTF-8"?>
  3  <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
  4  <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
  5  <ns0:Package Code="0001" Desc="ProductName1"/>
  6  <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
  7  <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
  8  <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
  9  <ns0:SellingCurrency Code="EUR" Name="Euro"/>
10  <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
11  <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
12  </ns0:Root>');
1 row inserted
SQL> insert into order_table (order_id, xml_data)
  2  values (2, '<?xml version="1.0" encoding="UTF-8"?>
  3  <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
  4  <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
  5  <ns0:Package Code="0002" Desc="ProductName2/>
  6  <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
  7  <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
  8  <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
  9  <ns0:SellingCurrency Code="EUR" Name="Euro"/>
10  <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
11  <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
12  </ns0:Root>');
1 row inserted
SQL> commit;
Commit complete
{code}
Note that the second row inserted contains a not well-formed XML (no closing quote for the /Root/Package/@Desc attribute).
*Creating the error logging table...*
{code}
SQL> create table error_log_table (
  2   ora_err_number$ number,
  3   ora_err_mesg$   varchar2(2000),
  4   ora_err_rowid$  rowid,
  5   ora_err_optyp$  varchar2(2),
  6   ora_err_tag$    varchar2(2000)
  7  );
Table created
{code}
*Updating...*
{code}
SQL> update (
  2    select extractvalue(doc, '/ns0:Root/ns0:Package/@Code', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_code
  3         , extractvalue(doc, '/ns0:Root/ns0:Package/@Desc', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_desc
  4         , package_code
  5         , package_desc
  6    from (
  7      select package_code
  8           , package_desc
  9           , xmltype(xml_data) doc
10      from order_table t
11    )
12  )
13  set package_code = new_package_code
14    , package_desc = new_package_desc
15  log errors into error_log_table ('My update process')
16  reject limit unlimited
17  ;
1 row updated
SQL> select order_id, package_code, package_desc from order_table;
  ORDER_ID PACKAGE_CODE                   PACKAGE_DESC
         1 0001                           ProductName1
         2                               
{code}
One row has been updated as expected, the other has been rejected and logged into the error table :
{code}
SQL> select * from error_log_table;
ORA_ERR_NUMBER$ ORA_ERR_MESG$                                                                    ORA_ERR_ROWID$     ORA_ERR_OPTYP$ ORA_ERR_TAG$
          31011 ORA-31011: XML parsing failed                                                    AAAF6PAAEAAAASnAAB U              My update process
                ORA-19202: Error occurred in XML processing                                                                       
                LPX-00244: invalid use of less-than ('<') character (use &lt;)                                                    
                Error at line 5                                                                                                   
                ORA-06512: at "SYS.XMLTYPE", line 272                                                                             
                ORA-06512: at line 1                                                                                              
{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • How to Extract Data from SAP and Load it into Essbase

    Hi All,
    Can you recommend some ways to extract data from SAP and load it into Essbase?. I have no knowledge about SAP, not sure how I can perform this task. Can I use ODI for this job?
    Thanks

    hi,
    Not sure if this helps but give a try
    you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
    or
    below are steps
    1. In EASPATH\console, open components.xml in a text editor.
    2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
    3. Save and close the file.
    4. In EASPATH\console\bin, open admincon.lax in a text editor.
    5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
    6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
    7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
    8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
    9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
    let me know if it works :)

  • How to extract data from SAP and COBOL using ODI

    Hi Folks,
    Can you please let me know the procedures in ODI to extract data from SAP and COBOL?
    Thank you all for the help.

    Hi
    You can download Patch 8571830 from Oracle metalink.
    It has a new technology "SAP ABAP" and KMs to extract and load data -
    RKM SAP ERP and LKM SAP ERP to Oracle.
    Thanks

  • How to pull data from EJB and present them using Swing ?

    Hi all,
    I've written stateful session bean which connect to Oracle database, and now I must write stand alone client application using Swing.
    The client app must present the data and then let users add,delete and edit data and it must be flexible enough to iterate through the records.
    The swing components can be JTextField,JTable etc.
    How to pull the data from EJB and present them to users with the most efficient network trip ?
    Thanks in advance
    Setya

    Thanks,
    Since the whole app originally was client-server app and I want to make it more scalable, so I decide to separate business logic in the EJB but I also want to keep the performance and the userfriendliness of the original user interface, and I want to continue using Swing as the original user interface does.
    I've read about using Rowset and I need some opinions about this from you guys who already have some experience with it.
    Any suggestions would be greatly appreciated.
    Thanks
    Setya

  • How to extract data from CLOB Datatype having XML values

    Hi,
    I am facing problem in extracting data from a TAble FCT_A where OBJECT_CONTENT field(Datatype CLOB) is having data of XML type.
    Below are the value:
    <ras-cube>
    <jndiDataSourceName>datasource_etl</jndiDataSourceName>
    <dimensions class="vector">
    <string>CUG_IND</string>
    <string>EVENT_DATE</string>
    <string>EVENT_DIRECTION_KEY</string>
    <string>EVENT_TIME_SLOT_KEY</string>
    <string>EVENT_TYPE_KEY</string>
    <string>FAF_IND</string>
    <string>FILTERED_OUT_FLAG</string>
    <string>IN_TG_ID_KEY</string>
    <string>LONG_EVENT_IND</string>
    <string>NE_ID_KEY</string>
    <string>NODE_ADDRESS</string>
    <string>OTHER_MSISDN_DIAL_DIGIT_KEY</string>
    <string>OUT_TG_ID_KEY</string>
    <string>RATING_DELAY_IND</string>
    <string>RI_MISMATCH_IND</string>
    <string>SERVED_MSISDN_DIAL_DIGIT_KEY</string>
    <string>SERVED_MSRN_DIAL_DIGIT_KEY</string>
    <string>SRV_TYPE_KEY</string>
    <string>SUBS_BU_KEY</string>
    <string>SYS_ID_KEY</string>
    <string>TERMINATION_REASON_KEY</string>
    <string>THIRD_PARTY_DIAL_DIGIT_KEY</string>
    <string>ZERO_FLAG_KEY</string>
    </dimensions>
    <measures class="vector">
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>CHARGE</targetName>
    <expression>SUM(FCT_RATED.CHARGE)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>COMPUTED_VOLUME</targetName>
    <expression>SUM(FCT_RATED.COMPUTED_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>DOWNLINK_VOLUME</targetName>
    <expression>SUM(FCT_RATED.DOWNLINK_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>ORIGINAL_DUR</targetName>
    <expression>SUM(FCT_RATED.ORIGINAL_DUR)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>RA_CHARGE</targetName>
    <expression>SUM(FCT_RATED.RA_CHARGE)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>RECORD_COUNT</targetName>
    <expression>COUNT(FCT_RATED.*)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>UPLINK_VOLUME</targetName>
    <expression>SUM(FCT_RATED.UPLINK_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    </measures>
    <dimensionMap class="linked-hash-map">
    <entry>
    <string>FCT_RATED</string>
    <null/>
    </entry>
    </dimensionMap>
    <cubeStorageConfig>
    <partitionColumn>EVENT_DATE</partitionColumn>
    <tableSpaceName>ORV5_ETL_DFLT</tableSpaceName>
    <isLogging>false</isLogging>
    <isCompressed>false</isCompressed>
    <noOfHashPartition>10</noOfHashPartition>
    <partitionScheme>1</partitionScheme>
    </cubeStorageConfig>
    <cubeType>1</cubeType>
    <name>MX_RATED</name>
    <label></label>
    <parentNames>
    <string>FCT_RATED</string>
    </parentNames>
    <otherProperties class="linked-hash-map"/>
    </ras-cube>
    I want to extract expression tag in the above XML types
    Kindly any help will be needful for me
    Thanks and Regards

    9i
    with FCT_A as (
    select xmltype('
    <ras-cube>
    <jndiDataSourceName>datasource_etl</jndiDataSourceName>
    <dimensions class="vector">
    <string>CUG_IND</string>
    <string>EVENT_DATE</string>
    <string>EVENT_DIRECTION_KEY</string>
    <string>EVENT_TIME_SLOT_KEY</string>
    <string>EVENT_TYPE_KEY</string>
    <string>FAF_IND</string>
    <string>FILTERED_OUT_FLAG</string>
    <string>IN_TG_ID_KEY</string>
    <string>LONG_EVENT_IND</string>
    <string>NE_ID_KEY</string>
    <string>NODE_ADDRESS</string>
    <string>OTHER_MSISDN_DIAL_DIGIT_KEY</string>
    <string>OUT_TG_ID_KEY</string>
    <string>RATING_DELAY_IND</string>
    <string>RI_MISMATCH_IND</string>
    <string>SERVED_MSISDN_DIAL_DIGIT_KEY</string>
    <string>SERVED_MSRN_DIAL_DIGIT_KEY</string>
    <string>SRV_TYPE_KEY</string>
    <string>SUBS_BU_KEY</string>
    <string>SYS_ID_KEY</string>
    <string>TERMINATION_REASON_KEY</string>
    <string>THIRD_PARTY_DIAL_DIGIT_KEY</string>
    <string>ZERO_FLAG_KEY</string>
    </dimensions>
    <measures class="vector">
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>CHARGE</targetName>
    <expression>SUM(FCT_RATED.CHARGE)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>COMPUTED_VOLUME</targetName>
    <expression>SUM(FCT_RATED.COMPUTED_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>DOWNLINK_VOLUME</targetName>
    <expression>SUM(FCT_RATED.DOWNLINK_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>ORIGINAL_DUR</targetName>
    <expression>SUM(FCT_RATED.ORIGINAL_DUR)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>RA_CHARGE</targetName>
    <expression>SUM(FCT_RATED.RA_CHARGE)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>RECORD_COUNT</targetName>
    <expression>COUNT(FCT_RATED.*)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    <targetName>UPLINK_VOLUME</targetName>
    <expression>SUM(FCT_RATED.UPLINK_VOLUME)</expression>
    <persist>true</persist>
    </com.connectiva.onereview.rasobjects.cube.CubeMeasure>
    </measures>
    <dimensionMap class="linked-hash-map">
    <entry>
    <string>FCT_RATED</string>
    <null/>
    </entry>
    </dimensionMap>
    <cubeStorageConfig>
    <partitionColumn>EVENT_DATE</partitionColumn>
    <tableSpaceName>ORV5_ETL_DFLT</tableSpaceName>
    <isLogging>false</isLogging>
    <isCompressed>false</isCompressed>
    <noOfHashPartition>10</noOfHashPartition>
    <partitionScheme>1</partitionScheme>
    </cubeStorageConfig>
    <cubeType>1</cubeType>
    <name>MX_RATED</name>
    <label></label>
    <parentNames>
    <string>FCT_RATED</string>
    </parentNames>
    <otherProperties class="linked-hash-map"/>
    </ras-cube>') OBJECT_CONTENT from dual
    SELECT   EXTRACTVALUE(value(d), '//expression/text()', '') exp
    FROM     fct_a t,
             TABLE(XMLSEQUENCE(EXTRACT (
                                 t.object_content,
                                 '//ras-cube/measures/com.connectiva.onereview.rasobjects.cube.CubeMeasure/expression'
                               ))) dEdited by: Beijing on Aug 10, 2009 9:21 AM

  • OIM 11g, Get users from table and insert them into Approval Task

    Hi All,
    I have OIM 11.1.1.5.4 in Solaris 10 and I have an Oracle Table configured as Trusted Source.
    I am using Database_App_Tables_9.1.0.5.0 connector.
    I want Reconciliate new users from a Oracle Table as follow:
    1. I ran the scheduled job
    2. The new users reconciled Must get into an Approval Task before of insert them into USR Table.
    3. The Administrator User Approved o Rejected the new users.
    4. The new users that were approval Must insert them into USR Table.
    Is there any form of implement this?, Can you guide me please?.
    Thanks for your Help.

    Through your Schedule Task, generate "*Create User*" (Request Type) request and assign approval workflow for such requests.
    After completion of approval ONLY, users will get created into OIM 11g.

  • How to fetch data from SolMan and move it into SAP BI?

    Hi all,
         I have the portal activity report data residing in the SolMan ( achieved by configuring portal and SolMan).  I need to extract this data from Solution Manager into SAP BI, such that i can report on the data in SAP BI using the BEx tools. How will i proceed with it ? Your response is higly appreciated.
    Regards,
    Divya.

    Hello Divya,
    You must set up E2E Diagnostics for the managed system (portal system).
    You can accomplish this by running transaction solman_setup  in the Sollution Manager and ensure that Initial and Basic Configurations are performed. Afterwards, you must follow the Managed System Configuration (also in solman_setup) for the managed system.
    Afterwards you must activate some specific Portal Activity Data Collectors following the note 1309740.
    Best regards,
    Guilherme Balbinot

  • Extracting data from SAP and dumping it into Non SAP System

    Hi All,
    We have an MS based in house system.  For our business process improvement, we need to import our customer's data and dump it into our application that has SQL server database - Our customers are running SAP.  Wanted to find out what steps we need to follow from the design perspective... also I am assuming we wll need an access to our customer's system to  code RFCs - is that correct ? Any information will be highly appreciated.
    Thanks,
    Neelima.

    Hi,
    it's really hard to answer your question without additional knowledge of your landscape. SAP support many ways of integrations. One way is using RFC. You would simply call function modules from your .NET application using RFC library. Another way is using web services. You can easily expose any RFC enabled function module as web service (if you are on NetWeaver). Another solution is using REST interface. Recently, there have been many articles dedicated to this approach here on SDN. This can be pretty nifty solution. Another way is file based integration (IDocs or simple flat files transfered via FTP).
    Cheers

  • How to extract data from Buffer and create a RTP stream

    Hi
    I'm working on a project where I need to interrupt a media stream (video and audio) and extract the data. Send the data with a custom protocol. On the recieveing side I would like to reconstruct the stream using only the data chunks.
    I'm currently looking at [DataSourceReader.java|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/DataSourceReader.java] and more specifically at a method like printDataInfo(Buffer buffer) to extract the data.
    Is it possible to create a RTP stream, only having access to the byte array "data" in Buffer ?
    Thanks in advance.

    camelstrike wrote:
    Hi
    I'm working on a project where I need to interrupt a media stream (video and audio) and extract the data. Send the data with a custom protocol. On the recieveing side I would like to reconstruct the stream using only the data chunks.
    I'm currently looking at [DataSourceReader.java|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/DataSourceReader.java] and more specifically at a method like printDataInfo(Buffer buffer) to extract the data.
    There are a couple of different ways to get the data. Reading it from inside a DataSink is perfectly fine...
    Is it possible to create a RTP stream, only having access to the byte array "data" in Buffer ?Yes and no.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/CustomPayload.html]
    You need to know the format of the media in addition to the actual media data...

  • How to read data from flatfile and insert into other relevant tables ? Please suggest me the query ?

    Hi to all,
    I have flat files in different location through FTP i need to fetch those files and load in the relavant table of the database.
    Please share me the query to do it ..

    You would need a ForEach Loop to iterate though the files. Initially the FTP task will pull the files from locations to a landing folder. Once thats done the ForEachLoop will iterate through files in the folder and will have a data flow task inside to transfer
    file data to tables.
    If you want a more secure option you can also use SFTP (Secured FTP) and can implement it using free WinSCP clinet. I've explained a method of doing it fo dynamic files here
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    for iterating through files see this example
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    you may not need the validation step inside the loop in your case
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to extract data from idocs and store to target

    I recently started on BODS project, i am really not sure how does teh idocs work.
    Is the sap r3 produces Idocs and the bods need to perform the ETL on idocs? or is it the otherway?
    Thank you very much for the helpful info.
    Kind regards.

    hi,
    Not sure if this helps but give a try
    you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
    or
    below are steps
    1. In EASPATH\console, open components.xml in a text editor.
    2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
    3. Save and close the file.
    4. In EASPATH\console\bin, open admincon.lax in a text editor.
    5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
    6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
    7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
    8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
    9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
    let me know if it works :)

  • How to query data from database and store it into Managed Bean ?

    Hi all,
    In our application we have requirement to store information within Managed Bean to be accessed by ADF pages.
    The information is stored in database tables.
    The question is :
    What is the efficient / recommended way to do that ?
    I do not use apps module to query the data because the information is required in View layer not the model layer
    Thank you for your help,
    xtanto

    Xtanto,
    if the information is stored in the database then the question is if there is a database connect open already. If yes, then why not using this connection to query for the data you want to access and store. Alternatively you can directly open a JDBC connection in a managed bean or access an EJB session bean. However, this comes with the price of an extra database connection.
    Make sure the managed bean is in session scope if you want to share the information without re-fetching it
    Frank

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • How to extract data from SAP 4.7 and upload data to SAP ECC 6.0

    Hi,
        How to extract data from SAP 4.7 and upload data to SAP ECC 6.0? Can i use BDC,BAPI,LSMW? Help me please.

    hi
    good
    both works not possible simultaneously.
    If you want to do it in two separate task than you can use the GUI_UPLOAD function module to fulfill your requirement.
    thanks
    mrutyun^

Maybe you are looking for

  • TS1567 ipad not detected by windows 7 pc

    I have installed the 64 bit version of iTunes, I have made sure the Apple Mobile devices thing is working... nothing. It's like absolutely nothing is happening when I plug the iPad (current generation) into my computer. VERY aggravating and I want to

  • White screen after a command line IPA creation

    Hello, I am working on an iPad application. I use several swc files as library assets for my visual elements. I compile my swf with Flex SDK using FlashDevelop and then with command line PFI to generate the final IPA. My IPA application is generated

  • Date Conditional Formating

    I know this is a simple question but don't have a lot of time to research it. I want to apply 3 different font color formats to a date field. How do I manipulate the dates in the formulas so that i can get the following: Over 9 Months old = Green Ove

  • International billing

    If I am on the International Calling Plan and I call someone in the Philippines, will the $0.23 per minute be the only charge for the call and be charged to me only?  My concern is that I want to call someone in the Philippines but want to pay for th

  • Displaying video with 16 Bit imagedata

    Hi there. In the the past weeks, i learned a lot about JMF. I managed to create a player/processor pair to display a serie of 8BIT RGB formatted imagedata. I adapted the JPEGtoVideo sample from sun for this. My next step is to do the same for 16bit i