Using data from mutliple tables in COOIS
We are in the process of upgrading from 4.6C to ECC60. In 4.6C, we
implemented the modification as described in Note 434123 to add custom
fields to the COOIS report.
Our custom list contains data from both the order header and order
operations. Therefore, data was drawn from tables IOOPER_TAB and
IOHEADER_TAB, which were both present in the old solution. However, the
BADI solution used in ECC60 only contains data in the structure belonging to the list
type selected at the selection screen. The list types are defined in
domain 'PPIO_LISTTYPE'. The structure that is filled with data is set inprogram PPIO_ENTRY_FILL_TCOA, form 'fill_tcoa'. Unfortunately, there is
no list type available that activates both IOOPER and IOHEADER.
I also cannot find a method in the BADI to influence the content of TCOA.
However, I don't want to create lengthy code to retrieve the data myself.
The most tempting solution (modification) is to:
1. extend the value range of PPIO_LISTTYPE with the cusom list
2. add an entry to the CASE statement in form FILL_TCOA to place an 'X' in both 'cs_tcoa-oper_sel' and 'cs_tcoa-header_sel'.
When (using list type PPIOO00-operations), and manually setting 'cs_tcoa-header_sel' to 'X' in the debugger, all data needed to create
the desired output is present. Is it truly necessary to implement this as a modification, or is there a better solution (without implementing a modification) to activate data
retrieval of multiple tables form logical database IOC?
Thanks very much for your quick response Anup.
1. If I create a view in R/3, please let me know how should I bring this information in to BW. Should I create a table in bw or should I create a generic datasource attaching this view?
Also, please let me know what will be the logic (not the abap code) to create a view on these 4 tables. I need to incorporate this logic in to my spec.
2. Do I write a function module in BW?
Thanks!!
Similar Messages
-
Creating XML file using data from database table
I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
It would be great if you can suggest some approach to achieve my requirement.
Thanks,
-VinodAn example from the forum: Re: How to generate xml file from database table
Edited by: Marco Gralike on Oct 18, 2012 9:41 PM -
I don't even know if this is posible.
I'm using iwork '09
View PDFI hope I can clarify:
For our purposes here:
Table 1 = "Step 2 - Product Sizes"
Table 2 = "Option id Master"
Table 3 = "Export - Product Info"
Table 1:
The user would enter values for "productcode," "Horz," and "Vert"
"Size" would auto fill based on values in Horiz and Vert (I have this taken care of already).
Table 2: This is a completely static table that I want to search against. - Data from other tables in the doc does not alter or change the data in this doc.
We just want to look at table 2. Find the existing value in "table 2 : size" column that matches the "table 1 : size" column and then pull the "optionids" and "productprice" from that row.
Can the value from "Table 1 : Size" be used as a search term in "Table 2 : Size?"
Table 3: The user does not enter any values on this table.
"productcode" is pulled from table 1 - "Table 1 :: A5" = "Table 3 :: A5"
"optionids" and "productprice" are pulled from Table 2 columns "D" and "E" - however we do not know which Table 2 row it is pulling from until we enter data in Table 1.
As I'm writing this I'm realizing that
A. this is probably really confusing to you.
B. this may be impossible inside of numbers.
If you have some other method that would facilitate the same out come but be structured differently please let me know.
--- maybe to help you understand further what I am doing here is my current workflow:
I record the size of a piece of art.
Then I manually go to my "Option id Master" and find the same size.
I then copy the corresponding "optionids" and "productprice" cells. (these options control the prices displayed on my website)
I got to my "Export - Product Info" table and paste the values in the corresponding cells.
I was hoping to automate this as it takes a long time when you have hundreds of products.
Thanks for the help! -
Report using Data from different tables
Hello,
I am trying to convert a Cobol batch program to Oracle 6i tabular report.
The data is fetched from many different tables and there are lots of processing(i.e, based on the value of a column from one table need additional processing from different tables) required to generate the desired columns in the final report.
I would like to know what is the best strategy to follow in Oracle Reports 6i. I heard that CREATE GLOBAL TEMPORARY TABLE is an option. ( or REF CURSOR ?) I do not know much about its usage. Can somebody guide me about this or any other better way to achieve the result.
Thank you in advance
PriyaHello,
There are many, many options available to you, each of which has advantages and disadvantages. This is why it is difficult to answer "what is best?" without alot more details about your specific circumstances.
In general, you're going to be writing PL/SQL to do any conditional logic that cannot be expressed as pure SQL. It can executed in the database, or it can executed within Reports itself. And most reports developers do some of both.
As a general rule, you want to send only the data you need from the database to the report. This means you want to do as much filtering and aggregating of the data as is readily possible within the database. If this cannot be expressed as plain SQL queries, then you'll want to create a stored procedures to help do this work.
Generally, the PL/SQL you create for executing within the report should be focused on control of the formatting, such as controlling whether a field is visible, or controlling display attributes for conditional formatting.
But these are not hard and fast rules. In some cases, it is difficult to get all the stored procedures you might like installed into the database. Perhaps the dba is reluctant to let you install that many stored procedures. Perhaps there are restrictions when and how often updates can be made to stored procedures in a production database, which makes it difficult to incrementally adjust your reports based on user feedback. Or perhaps there are restrictions for how long queries are allowed to run.
So, Reports offers lots of options and features to let you do data manipulation operations from within the report data model.
In any case, Oracle does offer temporary table capabilities. You can populate a temp table by running stored procedures that do queries, calculations and aggregations. And you can define and initiate a dynamic query statement within the database and pass a handle to this query off to the report to execute (ref cursor).
From the reports side, you can have as many queries as you want in the data model, arranged in any hierarchy via links. You can parameterize and change the queries dynamically using bind variables and lexicals. And you can add calculations, aggregations, and filters.
Again, most people do data manipulation both in the database and in Reports, using the database for what it excels at, and Reports for what it excels at.
Hope this helps.
Regards,
The Oracle Reports Team --skw -
Using data from one table in another
Can anyone help me? I'm new to this.
I have a table called Mileage; Column A = Location, B = Number of miles
I want to use the data in my Business Accounts table so that when I enter a location it will automatically enter the number of miles in the cell next to it from the Mileage table.Brilliant! Thank you.
If the Mileage table does not have a location in yet (if I've not entered it into the table yet) how can I get the result to enter an error or an oops rather than the number to the one nearest to it?
I've looked on the function descriptions but none of it is written in english
Thanks
Paula -
Loading data from one table to another using cursor
Hi,
I have given the below command to load the data from 1 table to another using cursor.
declare
cursor mycursor IS
SELECT extract_name,from_date,to_date,BETA from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';
Begin
for mycursor_1 IN mycursor loop
insert into tmp_tab columns(col1,col2,col3,col5) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA);
End loop;
commit;
end;
It is working fine.
But I want to hard code some of the columns ( like flags ) which are not there in 1st table and load them into 2nd table.
In db2 we will give commands like
varSqlStatus=`db2 "declare mycurs cursor for select extract_name,from_date,to_date,BETA,'N','Y' from temp_table"`
varSqlStatus=`db2 "load from mycurs of cursor modified by identityignore insert into tmp_tab(col1,col2,col3,col5,col6,col7) nonrecoverable"`
But I want it in oracle 10g, Can any one help me in this.Have you tried either of the two options :
1. Modify the CURSOR itself :
cursor mycursor IS
SELECT extract_name,from_date,to_date,BETA,'N','Y' from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';2. Modify the INSERT statement itself :
insert into tmp_tab columns(col1,col2,col3,col5,col6,col7) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA,'N','Y'); -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
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.
Bobbyhttp://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049
-
Export data from a table to text file using srcipt task
Hi
i am new to SSIS
i have to export data from a table and append it into a existing file through SSIS script task
please help
Thanks
UmeshHi Umesh,
The data structure of the source table and the structure of the destination file are the same, right? Is the destination file a flat file? Do you have to do it through Script Task? If the destination file is a flat file, this can be done easily by using
the stock tasks/components other than .NET code. In the Data Flow Task, we choose the appropriate source adapter (such as OLE DB Source or ADO.NET Source) to extract data from the source table, perform transformation if necessary, and then load to the destination
file via a Flat File Destination. When setting up the Flat File Destination, uncheck the “Overwrite data in the file” option so that the extracted data will be appended to the existing file.
If you need to implement it through Script Task/Component indeed, you may benefit from the following code examples:
http://stackoverflow.com/questions/8070163/how-to-add-custom-footer-to-an-ssis-flat-file-seperate-component-or-script-tas
http://stackoverflow.com/questions/8467326/add-header-and-footer-row-flat-file-ssis
If you need further help about the script, I suggest that you ask a new question in .NET forums where you can get more dedicated support:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment
Regards,
Mike Yin
TechNet Community Support -
Using FDM to load data from oracle table (Integration Import Script)
Hi,
I am using Integration Import Script to load data from oracle table to worktables in FDM.
i am getting following error while running the script.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Attaching the full error report
ERROR:
Code............................................. -2147217887
Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
At line: 22
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 6260
IDENTIFICATION:
User............................................. ******
Computer Name.................................... *******
App Name......................................... FDMAPP
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... DBNAME
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SCRTEST
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... FDM ACTUAL
Category ID...................................... 13
Period........................................... Jun - 2011
Period ID........................................ 6/30/2011
POV Local........................................ True
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I am using the following script
Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Oracle Hyperion FDM Integration Import Script:
'Created By: Dhananjay
'Date Created: 1/17/2012 10:29:53 AM
'Purpose:A test script to import data from Oracle EBS tables
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to SQL Server database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
'Create query string
strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Fields("Desc1") = rs.fields("Description").Value
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
Please help me on this
Thanks,
Dhananjay
Edited by: DBS on Feb 9, 2012 10:21 PMHi,
I found the problem.It was because of the connection string.The format was different for oracle tables.
PFB the format
*cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
And thanks *SH* for quick response.
So closing the thread......
Thanks,
Dhananjay -
Using a substitution variable to pull data from a table
Hello,
I am working with a simple program that asks the user to enter any info that will relate to a table in the db.
Thus far I have read 1,000 ways to accomplish this, and none of them work.
PROMPT
ACCEPT var PROMPT 'Enter var'
DECLARE
BEGIN
SELECT &var
FROM &table
WHERE var=tablevar;
END;Thanks for the feedback. Though I understand your logic, it doesn't seem to properly apply here. This is a more detailed explanation of what I've done.
First, I create the table
CREATE TABLE starbright
(planet_num VARCHAR2(3),
planet VARCHAR2(20));
INSERT INTO starbright VALUES
(257, 'Neptune');
INSERT INTO starbright VALUES
(367, 'Venus');
INSERT INTO starbright VALUES
(586, 'Mars');
INSERT INTO starbright VALUES
(725, 'Earth');Now, with that table created, I want to be able to periodically use PL/SQL to call data from the table, such as below
DECLARE
p_no := '&planet_num';
BEGIN
INSERT p_no
INTO starbright;
SELECT planet_num
INTO p_no
FROM starbright
WHERE planet_num := p_no;
dbms_output.put_line( 'Result: ' || planet );
END;This is my generic error
Error report:
ORA-06550: line 2, column 6:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char time timestamp interval date binary national character
nchar
The symbol "<an identifier>" was substituted for "=" to continue.
ORA-06550: line 6, column 8:
PLS-00103: Encountered the symbol "P_NO" when expecting one of the following:
into <a SQL statement>
ORA-06550: line 11, column 18:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
. ( * @ % & = - + ; < / > at for in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between group h
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: -
How to use for all entires clause while fetching data from archived tables
How to use for all entires clause while fetching data from archived tables using the FM
/PBS/SELECT_INTO_TABLE' .
I need to fetch data from an Archived table for all the entries in an internal table.
Kindly provide some inputs for the same.
thanks n Regards
RameshHi Ramesh,
I have a query regarding accessing archived data through PBS.
I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
The call to the above FM is as follows :
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
archiv = 'CFI'
OPTION = ''
tabname = 'BKPF'
SCHL1_NAME = 'BELNR'
SCHL1_VON = belnr-low
SCHL1_BIS = belnr-low
SCHL2_NAME = 'GJAHR'
SCHL2_VON = GJAHR-LOW
SCHL2_BIS = GJAHR-LOW
SCHL3_NAME = 'BUKRS'
SCHL3_VON = bukrs-low
SCHL3_BIS = bukrs-low
SCHL4_NAME =
SCHL4_VON =
SCHL4_BIS =
CLR_ITAB = 'X'
MAX_ZAHL =
tables
i_tabelle = t_bkpf
SCHL1_IN =
SCHL2_IN =
SCHL3_IN =
SCHL4_IN =
EXCEPTIONS
EOF = 1
OTHERS = 2
OTHERS = 3
It gives me the following error :
Index for table not supported ! BKPF BELNR.
Please help ASAP.
Thnaks and Regards
Gurpreet Singh -
Hi
how to create a external content type for Read and Update data from two tables in sqlserver using sharepoint designer 2010
i created a bcs service using centraladministration site
i have two tables in sqlserver
1)Employee
-empno
-firstname
-lastname
2)EmpDepartment
-empno
-deptno
-location
i want to just create a list to display employee details from two tables
empid firstname deptno location
and same time update in two tables
adilWhen I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list. When I attempt to edit it, I get an error:
External List fails when attached to a SQL view
Sorry, something went wrong
Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
I can edit the view in SQL Manager, so it seems strange that it fails.
Any advice would be greatly GREATLY appreciated.
Thanks,
Randy -
Using FDM Import Action script to import data from ERPI table "tdataseg_t"
Hi Experts
I have extracted data from EBS using ERPI and loaded into the intermediate table "tdataseg_t"
I am trying to use Import Action script within FDM to extract data from "tdataseg_t" table (where ERPI extract data is stored) as i could not use the normal import script.
Requirement : I have to restrict the custom 2 dimension based on Account dimension.
Dim Account
Account = ???? ( i am struck here)
If Account = 1000 to 5000 Then
Custom2 = Right( product , 5)
End If
but , I could not find the exact syntax to call the Account dimension from the "tdataseg_t" table.
Please Advise
Thanks
Sak
Edited by: user12292415 on Feb 26, 2012 1:19 AMHello,
Importing data via a manual script defeats the purpose of ERPi. As it will not provide you an audit trail, drill-through/drill-back, etc.
Your best bet is to use the default settings by the software. Just because it returns more records than you want is not a bad thing. You can conditionally change/alter the information either in an EventScript inside of FDM or by mapping the un-needed information to IGNORE.
Thank you, -
Retreiving data from 2 tables using a sender JDBC Channel
Hi all,
We got anew requirement where we have to select data from 2 tables and update fields in 2 tables at the sametime.
I have a few queries regarding this.
Can we retrieve data from 2 tables using select query in sender JDBC channel?
If yes, how we can achieve this?
Can we use inner/outer joins in the select query?
Can we update field of 2 tables using the Update query in Sender JDBC channel?
Your help is greatly rewarded.
With Regards
Sudha.Hi,
Even i have the same requirement where data has to be read from 2 tables and later update the falg once done .
SELECT query :
SELECT t1.KUNNR,t1.SETT_KEY,t1.QUART_START,t1.QUART_END,t2.PAY_METH,t2.MAT_NDC,t2.AMOUNT FROM TSAP_REBATE_MEDI t1 INNER JOIN TSAP_REBATE_LINE t2 ON t1.KUNNR=t2.KUNNR AND t1.SETT_KEY=t2.SETT_KEY WHERE t1.PROCESSING_STATUS = 'N' AND t2.PROCESSING_STATUS = 'N'
This is working fine.
Can somebody help me with update query with this. where flag PROCESSING_STATUS has to be updated with 'P'.
I tried a lot but couldnt get the answer
Br,
Manoj
Maybe you are looking for
-
Hi , I would like to appear for SAP fico certification exams and would like to know how can I look for the exams dates ..also the course highlights...I really appreciate all your advise, Thanks Hirav
-
Mac Pro Photoshop CS6 problems.
Hello All, I have a new Mac Pro 3.2 Ghz quad core intel Xeon running 16GB of Ram (for now) on a Apple Display 30" When running very large files on PS CS6 the layers start breaking up into strange streaks and white blocks. Sometimes if I quit PS it g
-
"General Error" when I attempt to load any Autosave file
I've had this problem for some time now. Final Cut begins loading an autosave, but hits a General Error about halfway through every time. I tried resetting my preferences as I had read this advice on here, but that doesn't work. Any ideas?
-
My desktop (Windows 7) has been my main PC and contains my iTunes library. I now have a laptop (Winodws 7) in addition to the desktop. How can I sync with both machines without losing any data or apps. Can I make my laptop my main machine for syncing
-
i have been trying since 2 oclock it is now quater to 8......it just wont work