Data extraction into sap table from legacy oracle database
Hello All,
I have a scenario where I have two different software systems (SAP and xyz systems), where a intermediate table will be created in between the two systems that is shared. Data will be updated by the xyz systems into this shared table. Now, my questions regarding this shared table.
1) Can we write some program or something to get the data from shared table to update the SAP?
2) If possible send me the suggestions
3) Please also send me the sample code to get the data from the shared table
Thanks in advance,
SDN powered
this shared table should be compatiable to sap fields...write code to fetch data from this table and assign data to appropriate fields in SAP and insert the data into sap.
1. Push mechanism
Write a RFC on SAP side to insert entries into the table.
Call the RFC from xyz application passing the data you want to insert.
2. Pull mechanism
Write a ABAP Program, where you can somehow read the data of the xyz application and insert data into the table.
3. Flat file
Dump the data from xyz application into the file.
Write a ABAP program to read the file and update the table.
Similar Messages
-
How to import a table from another oracle database ?
Hi all ,
i could like to use pl/sql to import one table from another oracle database server ?
is it possible to do this ?
A server B server
table: test <------------------------> table : newtest
the tns profile already configurated . the connection is ready .
thanks a lot !
Best Regards,
Carlosif i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
SQL> help copy
COPY
COPY copies data from a query to a table in a local or remote
database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
COPY {FROM database | TO database | FROM database TO database}
APPENDCREATE|INSERT|REPLACE} destination_table
[(column, column, column, ...)] USING query
where database has the following syntax:
username[password]@connect_identifier -
Data load into SAP ECC from Non SAP system
Hi Experts,
I am very new to BODS and I have want to load historical data from non SAP source system into SAP R/3 tables like VBAK,VBAP using BODS, Can you please provide steps/documents or guidelines on how to achieve this.
Regards,
MonilHi
In order to load into SAP you have the following options
1. Use IDocs. There are several standard IDocs in ECC for specific objects (MATMAS for materials, DEBMAS for customers, etc., ) You can generate and send IDocs as messages to the SAP Target using BODS.
2. Use LSMW programs to load into SAP Target. These programs will require input files generated in specific layouts generated using BODS.
3. Direct Input - The direct input method is to write ABAP programs targetting on specific tables. This approach is very complex and hence a lot of thought process needs to be applied.
The OSS Notes supplied in previous messages are all excellent guidance to steer you in the right direction on the choice of load, etc.,
However, the data load into SAP needs to be object specific. So targetting merely the sales tables will not help as the sales document data held in VBAK and VBAP tables you mentioned are related to Articles. These tables will hold sales document data for already created articles. So if you want to specifically target these tables, then you may need to prepare an LSMW program for the purpose.
To answer your question on whether it is possible to load objects like Materials, customers, vendors etc using BODS, it is yes you can.
Below is a standard list of IDocs that you can use for this purpose to load into SAP ECC system from a non SAP system.
Customer Master - DEBMAS
Article Master - ARTMAS
Material Master - MATMAS
Vendor Master - CREMAS
Purchase Info Records (PIR) - INFREC
The list is endless.........
In order to achieve this, you will need to get the functional design consultants to provide ETL mapping for the legacy data to IDoc target schema and fields (better to ahve sa tech table names and fields too). You should then prepare the data after putting it through the standard check table validations for each object along with any business specific conversion rules and validations applied. Having prepared this data, you can either generate flat file output for load into SAP using LSMW programs or generate IDoc messages to the target SAPsystem.
If you are going to post IDocs directly into SAP target using BODS, you will need to create a partner profile for BODS to send IDocs and define the IDocs you need as inbound IDocs. There are few more setings like RFC connectivity, authorizations etc, in order for BODS to successfully send IDocs into the SAP Target.
Do let me know if you need more info on any specific queries or issues you may encounter.
kind regards
Raghu -
Insert into SAP table from external program
Hi Gurus,
I need to perform an insert of several records into a couple of SAP tables from an external program.
Do you know of an RFC (if it is remote enabled the better) that allows me to specify the table and records to perfom an insert?
Many thanks
Mauricio PegoI don't know ABAP and wanted to avoid writing my own function if one standard exists.
My requirement stands like this, I have a few z tables that need to populate from my C# application by use of the .Net connector.
I haven't found a BAPI or RFC that allows me to add records to any table, but I don't know all the RFCs.
May be one of you passed throu this already.
Mauricio -
How do I run a database procedure that inserts data into a table from withi
How do I run a database procedure that inserts data into a table from within a Crystal report?
I'm using CR 2008 with an Oracle 10i database containing a number of database tables, procedures and packages that provide the data for the reports I'm developing for my department. However, I'd like to know when a particular report is run and by whom. To do this I have created a database table called Report_Log and an associated procedure called prc_Insert_Entry that inserts a new line in the table each time it's called. The procedure has 2 imput parameters (Report_Name & Username), the report name is just text and I'd like the username to be the account name of the person logged onto the PC. How can I call this procedure from within a report when it's run and provide it with the 2 parameters? I know the procedure works, I just can't figure out how to call it from with a report.
I'd be grateful for any help.
ColinHi Colin,
Just so I'm clear about what you want:
You have a Stored procedure in your report. When the report runs, you want that same procedure to write to a table called Report_Log.
If this is what you want the simple answer is cannot be done. Crystal's fundamental prupose is to read only, not write. That being said, there are ways around this.
One way is to have a trigger in your database that updates the Report_Log table when the Stored Procedure is executed. This would be the most efficient.
The other way would be to have an application run the report and manage the entry.
Good luck,
Brian -
Query Data from other Oracle Database into current
Hi all,
I have to query data from another oracle database into the current oracle database. Because the customer has standard edition, I cannot use a pipe. I tried "SELECT column_name FROM external_oracle_db.schema.table WHERE column_name = 'column_value';" Unfortunately this does not work.
Does anyone have a suggestion?
Thanks
HansHave you tried with Database links?
SELECT column_name FROM schema.table@external_oracle_db WHERE column_name = 'column_value';
Satish -
How to convert the flat file data into sap tables . ?
how to upload flat file data into sap table . before upload mapping is also there in some filds . any one can give me some steps how to upload and mapping . ?
Hi
See the sample code
REPORT zmmupload.
Internal Table for Upload Data
DATA: i_mara like MARA occurs 0 with header line
PARAMETERS: p_file LIKE ibipparms-path. " Filename
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Upload the File into internal Table
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_mara
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Upload the Data from Internal Table
MODIFY MARA from TABLE i_MARA.
Regards
Anji. -
How to insert data into a table from an xml document
using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt.
if i use the xmlgen.insertXML(....)
requires a CLOB file, which i dont have, only the xml doc.
Cant i insert directly from the doc to the table?
the xmlgen examples I have seen first convert a table to a CLOB xmlString and then insert it into another table.
Isnt there any other way?Your question is little perplexing.
If you're using XML SQL Utility from
the commandline, just use putXML.
java OracleXML putXML
null -
Insert the data in sap tables from C SHARP application
Hi All,
I want to save some data in sap table from my CSharp(DOTNET) windows application.I tried with the help of SAP.Net Connector but that connector is not been supported visual studio 2005 or i not have visual studio 2003 .Soo plz any one can help how i can do this .
If any one have a idea then plz give me some example also how we did.
thanks
regards
sandeep DabralYou have to use SAP .NET connetor to make interface with SAP. This is better way of doing interface between .NET and SAP.
You create web service (wsdl) in .NET 2003 and try to use that in .NET 2005.
You're getting the two technologies confused ......
.Net Connector is used for RFC-type interfaces. It calls Bapi's directly. Web services are not involved for this type of interface.
WSDL files are used to generate proxies for the .Net client to call Web Services (typically web-enabled Bapi's). This type of interface uses SOAP protocol not RFC and does not use the .Net Connector. Enterprise Web Services may be discovered using the .Net Enterprise Service Explorer, which is a different component from the .Net Connector.
Regards,
D. -
To upload a data into SAP Table with the help of RFC function in BODS
Hi,
Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
but it did not help me.
Thanks,
AbhishekHi Abhishek,
Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
I hope this helps.
Jan. -
Insert data into fact table from source database tables
here i try to insert data into fact table from source database tables here is the query
ALTER procedure [dbo].[facttable]
as
insert into [pp dw].dbo.Dimfact(Prod_ID,Production_ID,Material_ID,Equip_ID,WC_ID,Recipe_ID,Quantity,costprice)
select Products.[Product ID],[Production ID],Materials.[Material ID],[Equipment ID],[Work Centre ID],[Recipy ID],Quantity,[cost price]
from
[PRODUCTION PLANNING 2].dbo.[Products],
[PRODUCTION PLANNING 2].dbo.[Production Detail],
[PRODUCTION PLANNING 2].dbo.[Material category],
[PRODUCTION PLANNING 2].dbo.[Materials],
[PRODUCTION PLANNING 2].dbo.[Equipment],
[PRODUCTION PLANNING 2].dbo.[Working Centre] ,
[PRODUCTION PLANNING 2].dbo.[Recipies]
where
Products.[Product ID] in (13, 14, 15, 16, 17) and
[Production Detail].[Production ID] in (1, 2, 3) and
[Materials].[Material ID] in (1, 2, 3, 4, 5) and
[Equipment].[Equipment ID] in (1, 2, 3, 4) and
[Working Centre].[Work Centre ID] in (1, 2, 3) and
[Recipies].[Recipy ID] in (1, 2, 3) and
[Material category].[Category ID] in (8, 9, 10, 11, 12, 13)
and when i execute query it shows me error
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Dimfact_Dimproduct". The conflict occurred in database "pp dw", table "dbo.Dimproduct", column 'Prod_ID'.
ERD IS
HOW TO SOLVE THIS PROBLEM?I cant see any join conditions in your query posted. Whats the purpose of the query above. It will just bring you a cartesian product (cross join) of tables involved subjected to filters. Are you sure this is the correct query?
The error you're getting may be because you've not yet populated DimProduct or may be because of logic you used in popultaing DimProduct causing it to miss some records which is what query is referring to in above case.
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 -
Insert Multiple rows into the table from that table data
Hi All,
I have a requirement like to insert mulitple rows into the table from that table data only(I need to replicate the data).
In this table primary key is composite primary key with all foreign keys.primary key also including the Date foreign key.I need to change that date at the of insertion.
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
VALUES
(SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510
But it is giving the error like missing Expression.
Could anyone please help to me.
Thanks and Regards
Swetha.You can have either VALUES or SELECT not both
INSERT
INTO myschema.Fact_page_performance
time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available ,
date_sk
SELECT time_sk ,
batch_id ,
delta_msec ,
delta_user_msec,
error_code_sk ,
content_errs ,
element_count ,
page_bytes ,
Available
FROM myschema.FACT_PAGE_PERFORMANCE_BACKUP
WHERE date_sk=20090509,20090510; -
Uploading field from excel sheet only of length 4 into SAP Table
Dear Friend,
I want to upload fields like Compny Code & Business Area of length 4 characters into SAP Tables. But in the excel sheet at some places Co Code & Business Area of length less than 4 characters is maintained which I want to ignore ie. those items should not be updated into the tables.
Plz guide me how this can b done, what code I shuld write for this.
Thanks,
NishuHi Nishu,
There is no way you can validate the fields and their lengths before you ipload them into internal tables.
First you should upload them and then loop the intrenal table to delete such records.
loop at itab.
if strlen(itab-comp_code) < 4.
delete itab index sy-tabix.
endif.
endloop.
Regards,
Ravi -
Custom Document & Custom Doc Legal Control Extraction into SAP BI
Dear All,
After all the business content for GTS was activated in GTS and SAP BI, the following configuration steps were taken in GTS to extract this data into BI for
reporting:
[1] Integration with Other mySAP.com Components > Data Transfer to the SAP Business Information Warehouse > General Settings > Maintain Control Parameters for Data Transfer [Used ECC as guide]
[2] Global Trade Services > General Settings > Organizational Structure > Control Settings at FTO Level for SAP NW Business Intelligence (BI)
Inserted new records missing when comparing to Assgmt of Feeder System Grouping Org.Units to LLS Org.Units table [/SAPSLL/TCOOGS]
Turned on BI Active flag for all records
[3] Global Trade Services > General Settings > Document Structure > Define Document Types for Application Areas
For each document type in all the folders, turned on ‘transfer to SAP Netweaver Business Intelligence Active’ flag where it was available to be turned on.
[4] Global Trade Services > General Settings > Document Structure > Define Item Categories for Application Areas
For each item category in all the folders, turned on ‘transfer to SAP Netweaver Business Intelligence Active’ flag where it was available to be turned on.
Focusing on custom document and custom document legal control extractors, the data comes from /SAPSLL/CUIT which contains 113K records in development, however, the amount of data extracted into BI is minimal. So I have a few questions:
Did I miss any additional configuration swithces to extract into BI?
SAP Documentation: You have entered a unit of weight in the table for GTS: Control Settings at Foreign Trade Organization Level. This unit of weight must be the common unit of weight that you want to be used in strategic reporting in BI . The values in the fields for gross weight (WEIGR), net weight (WEINE) and unit of weight (WEIDI)
depend on the unit of weight you maintain at FTO level in the IMG for converting weights for SAP BIDoes each FTO need to be insert with different unit of measure? ie FTO123 UoM = EA; FTO123 UoM = CS; FTO123 UoM = KG
Should all the data records from /SAPSLL/CUIT be extracted into Custom Document DSO [0SLL_DS01]? If no, why? If yes, refer to pt 1 and what am I missing?
SAP Documentation: Only data that belongs to the legal controls for the following legal regulations is transferred to BI:
German Foreign Trade Laws
Prohibitions and Restrictions
Other What is the significance of these legal controls that SAP has decided to only transfer this type into BI? If the client want additional legal controls, would it be possible to extract them into BI?
If anyone is currently using the std content for BI reporting, any assistance with my questions would be appreciated.
Sincerely,
ClaireHi Claire,
Your customizing looks correct. But the amount of data extracted depends on your condition you have defined during extraction(e.g. Creation Date)
Also in the coding only /SAPSLL/CUIT~ITSTA = space (Standard Item) and A (Item is allocated) is considered in 0SLL_CD_1.
You could find out reason by debugging to find out exact reason.
T-code: RSA2 , Enter Data source : 0SLL_CD_1. Then click display.
Click Extract check ( Shift + F8 ) and put break point in coding FM : /SAPSLL/BW_GET_CD_1
Best regards,
Vincent -
How do you join two tables from different Oracle schemas using a subquery
I am trying to join two tables from different Oracle schemas using a subquery. I can extract data from each of the tables without a problem. However, when I combine the select statements using a subquery I get the Oracle error *'ORA-00936: missing expression'*. Since each SELECT statement executes on its own without error I don't understand what is missing. The result set I am trying to get is to match up the LINE_ID from PDTABLE_12_1 in schema DD_12809 with the MAT_DESCRIPTION from table PDTABLE_201 in schema RA_12809.
The query is as follows:
sql = "SELECT [DD_12809].[PDTABLE_12_1].LINE_ID FROM [DD_12809].[PDTABLE_12_1] JOIN " _
+ "(SELECT [RA_12809].[PDTABLE_201].MAT_DESCRIPTION " _
+ "FROM [RA_12809].[PDTABLE_201]) AS FAB " _
+ "ON [DD_12809].[PDTABLE_12_1].PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS"
The format of the query is copied from a SQL programming manual.
I also tried executing the query using a straight JOIN on the two tables but got the same results. Any insight would be helpful. Thanks!
Edited by: user11338343 on Oct 19, 2009 6:55 AMI believe you are receiving the error because you are trying to JOIN on a column that doesn't exist. For example you are trying to join on FAB.PIPING_MATER_CLASS but that column does not exist in the subquery.
If you want to do a straight join without a subquery you could do the following
SELECT DD_12809.PDTABLE_12_1.LINE_ID
, FAB.MAT_DESCRIPTION
FROM DD_12809.PDTABLE_12_1
JOIN RA_12809.PDTABLE_201 AS FAB ON DD_12809.PDTABLE_12_1.PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS HTH!
Maybe you are looking for
-
PCI-e Graphics in Advanced Dock isn't worth the loss of the Undock Button !!
Greetings, After using ATI Radeon X1300 in the advanced Dock with my W500 (4061-38U) for over a year, I'm in clear position to conclude, it isn't worth it. Here are the reasons why you should not have this setup : - the complete loss of one of the T
-
Can I choose which Video Card SpeedGrade uses by default?
I have a Nvidia GTX 480 which has one monitor on it that I use for color correction. I also have a GTX 275 that I have 2 older monitors on it for extra realestate. When I use speed grade it appears to be utilizing my gtx 275 by default acording to th
-
Where can I download Adobe acrobat 9 startdard? My Adobe Acrobat 9 stardard Cd is not reading.
-
Hey. I got a problem with printing a file created with Pages on my iPad. As my HP printer is not supported by Airprint, I wanted to send the file as a PDF to my MacBook (OS X Lion) and then print it there. When I opened the PDF with Preview I unfortu
-
OS X Air Crash (Keychain Related)
Hi Guys, On an Air desktop application we've got we are seeing some odd crashes on OS X, specifically Mavericks. Multiple customers are seeing it and we weren't recording the crashes in our Scout Telemetry, it seemed to crash outside of Air's remit.