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
Ramesh
Hi 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
Similar Messages
-
How can we improve the performance while fetching data from RESB table.
Hi All,
Can any bosy suggest me the right way to improve the performance while fetching data from RESB table. Below is the select statement.
SELECT aufnr posnr roms1 roanz
INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
Here I am using 'KDAUF' & 'ABLAD' in condition. Can we use secondary index for improving the performance in this case.
Regards,
HimanshuHi ,
Declare intenal table with only those four fields.
and try the beloe code....
SELECT aufnr posnr roms1 roanz
INTO table itab
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
yes, you can also use secondary index for improving the performance in this case.
Regards,
Anand .
Reward if it is useful.... -
How do I print to wifi printer while keeping data from cellular?
How do I print to wifi printer while keeping data from cellular?
If you print to a WiFi printer no Cellular Data will be used.
-
Eliminate duplicate while fetching data from source
Hi All,
CUSTOMER TRANSACTION
CUST_LOC CUT_ID TRANSACTION_DATE TRANSACTION_TYPE
100 12345 01-jan-2009 CREDIT
100 23456 15-jan-2000 CREDIT
100 12345 01-jan-2010 DEBIT
100 12345 01-jan-2000 DEBITNow as per my requirement, i need to fetch data from CISTOMER_TRANSACTION table for those customer which has transaction in last 10 years. In my above data, customer 12345 has transaction in last 10 years, whereas for customer 23456, does not have transaction in last 10 years so will eliminate it.
Now, CUSTOMER_TRANSACTION table has approximately 100 million records. So, we are fectching data in batches. Batching is divided into months. Total 120 months. Below is my query.
select *
FROM CUSTOMER_TRANSACTION CT left outer join
(select distinct CUST_LOC, CUT_ID FROM CUSTOMER_TRANSACTION WHERE TRANSACTION_DATE >= ADD_MONTHS(SYSDATE, -120) and TRANSACTION_DATE < ADD_MONTHS(SYSDATE, -119) CUST
on CT.CUST_LOC = CUST.CUST_LOC and CT.CUT_ID = CUST.CUT_IDThru shell script, months number will change. -120:-119, -119:-118 ....., -1:-0.
Now the problem is duplication of records.
while fetching data for jan-2009, it will get cust_id 12345 and will fetch all 3 records and load it into target.
while fetching data for jan-2010, it will get cust_id 12345 and will fetch all 3 records and load in into target.
So instead of having only 3 records, for customer 12345 it will be having 6 records. Can someone help me on how can i eliminate duplicate records from getting in.
As of now i have 2 ways in mind.
1. Fetch all records at once. Which is impossible as it will give space issue.
2. After each batch, run a procedure which will delete duplicate records based on cust_loc, cut_id and transaction_date. But again it will have performance problem.
I want to eliminate it while fetching data from source.
Edited by: ace_friends22 on Apr 6, 2011 10:16 AMYou can do it this way....
SELECT DISTINCT cust_doc,
cut_id
FROM customer_transaction
WHERE transaction_date >= ADD_MONTHS(SYSDATE, -120)
AND transaction_date < ADD_MONTHS(SYSDATE, -119)However please note that - if want to get the transaction in a month like what you said earlier jan-2009 and jan-2010 and so on... you might need to use TRUNC...
Your date comparison could be like this... In this example I am checking if the transaction date is in the month of jan-2009
AND transaction_date BETWEEN ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27) AND LAST_DAY(ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27)) Your modified SQL...
SELECT *
FROM customer_transaction
WHERE transaction_date BETWEEN ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27) AND LAST_DAY(ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27))Testing..
--Sample Data
CREATE TABLE customer_transaction (
cust_loc number,
cut_id number,
transaction_date date,
transaction_type varchar2(20)
INSERT INTO customer_transaction VALUES (100,12345,TO_DATE('01-JAN-2009','dd-MON-yyyy'),'CREDIT');
INSERT INTO customer_transaction VALUES (100,23456,TO_DATE('15-JAN-2000','dd-MON-yyyy'),'CREDIT');
INSERT INTO customer_transaction VALUES (100,12345,TO_DATE('01-JAN-2010','dd-MON-yyyy'),'DEBIT');
INSERT INTO customer_transaction VALUES (100,12345,TO_DATE('01-JAN-2000','dd-MON-yyyy'),'DEBIT');
--To have three records in the month of jan-2009
UPDATE customer_transaction
SET transaction_date = TO_DATE('02-JAN-2009','dd-MON-yyyy')
WHERE cut_id = 12345
AND transaction_date = TO_DATE('01-JAN-2010','dd-MON-yyyy');
UPDATE customer_transaction
SET transaction_date = TO_DATE('03-JAN-2009','dd-MON-yyyy')
WHERE cut_id = 12345
AND transaction_date = TO_DATE('01-JAN-2000','dd-MON-yyyy');
commit;
--End of sample data
SELECT *
FROM customer_transaction
WHERE transaction_date BETWEEN ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27) AND LAST_DAY(ADD_MONTHS(TRUNC(SYSDATE,'MONTH'), -27));Results....
CUST_LOC CUT_ID TRANSACTI TRANSACTION_TYPE
100 12345 01-JAN-09 CREDIT
100 12345 02-JAN-09 DEBIT
100 12345 03-JAN-09 DEBITAs you can see, there are only 3 records for 12345
Regards,
Rakesh
Edited by: Rakesh on Apr 6, 2011 11:48 AM -
Fatal error while fetching data from bi
hi,
i am getting following error while fetching data from bi using select statement
i have written code in this way
SELECT [Measures].[D2GFTNHIOMI7KWV99SD7GPLTU] ON COLUMNS, NON EMPTY { [DEM_STATE].MEMBERS} ON ROWS FROM DEM_CUBE/TEST_F_8
error description when i click on test
Fatal Error
com.lighthammer.webservice.SoapException: The XML for Analysis provider encountered an errorthanks for answering .but when i tried writing the statement in transaction 'MDXTEST' and clicked on check i am getting following error
Error occurred when starting the parser: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
Message no. BRAINOLAPAPI011
Diagnosis
Failed to start the MDX parser.
System Response
timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
Procedure
Check the Sys Log in Transaction SM21 and test the TCP-IP connection MDX_PARSER in Transaction SM59.
SO I WENT IN SM 59 TO CHECK THE CONNECTION.
CAN U TELL ME WHAT CONFIGERATION I NEED TO DO FOR MAKING SELECT STATEMENTS WORK? -
How to fetch data from cluster tables
hi
i need to know how to fetch data from cluster tables please update me if any
i know that we cannot use joins in cluster table we use view etc
but i need detailed inforation on methods for fetching data from cluster tables
regards
NishantHi,
Check the following links
http://fuller.mit.edu/hr/cluster_tables.html
The specified item was not found.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33 -
Error while selecting date from external table
Hello all,
I am getting the follwing error while selecting data from external table. Any idea why?
SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
2 SE_CUST_ID NUMBER(38),
3 SE_TRAN_AMT_LCY FLOAT(126),
4 SE_REVERSAL_MARKER VARCHAR2(255))
5 ORGANIZATION EXTERNAL (
6 TYPE ORACLE_LOADER
7 DEFAULT DIRECTORY ext_tables
8 ACCESS PARAMETERS (
9 RECORDS DELIMITED BY NEWLINE
10 FIELDS TERMINATED BY ','
11 MISSING FIELD VALUES ARE NULL
12 (
13 country_code CHAR(5),
14 country_name CHAR(50),
15 country_language CHAR(50)
16 )
17 )
18 LOCATION ('SE2.csv')
19 )
20 PARALLEL 5
21 REJECT LIMIT UNLIMITED;
Table created.
SQL> select * from se2_ext;
SQL> select count(*) from se2_ext;
select count(*) from se2_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04043: table column not found in external source: SE_REF_NO
ORA-06512: at "SYS.ORACLE_LOADER", line 19It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
HTH -- Mark D Powell -- -
Error while activating data from new table of DSO to active table
HI,
while activating data from new table of DSO to active table i am getting
error message as "Error occurred while deciding partition number".
Plz any idea hoe to resolve this one.
thanks & regards
KPS MOORTHYHi
You are trying to update/upload the Records which are already been there in the DSO Active Data Table which has the partition.
Try to see the Record Nos already been activated and update/upload with selective, if possible.
You can trace the changes at Change log table for the same.
Hope it helps
Edited by: Aduri on Jan 21, 2009 10:38 AM -
How to fetch data from PTREQ tables
I need to display data in the customised webdynpro application from PTREQ tables.
Can anyone help me out how to fetch data from these tables.use the standard modules like
PT_ARQ_REQUEST_CHECK
PT_ARQ_REQUEST_EXECUTE
PT_ARQ_REQUEST_PREPARE -
Error while fetching data from OWB Client using External Table.
Dear All,
I am using Oracle Warehouse Builder 11g & Oracle 10gR2 as repository database on Windows 2000 Server.
I facing some issue in fetching data from a Flat File using external table from OWB Client.
I have perform all the steps without any error but when I try to view the data, I got the following error.
======================================
RA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
java.sql.SQLException: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file expense_categories.csv in SOURCE_LOCATION not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:774)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:386)
at oracle.wh.ui.owbcommon.QueryResult.<init>(QueryResult.java:18)
at oracle.wh.ui.owbcommon.dataviewer.relational.OracleQueryResult.<init>(OracleDVTableModel.java:48)
at oracle.wh.ui.owbcommon.dataviewer.relational.OracleDVTableModel.doFetch(OracleDVTableModel.java:20)
at oracle.wh.ui.owbcommon.dataviewer.RDVTableModel.fetch(RDVTableModel.java:46)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel$1.actionPerformed(BaseDataViewerPanel.java:218)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.AbstractButton.doClick(AbstractButton.java:282)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerPanel.executeQuery(BaseDataViewerPanel.java:493)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.init(BaseDataViewerEditor.java:116)
at oracle.wh.ui.owbcommon.dataviewer.BaseDataViewerEditor.<init>(BaseDataViewerEditor.java:58)
at oracle.wh.ui.owbcommon.dataviewer.relational.DataViewerEditor.<init>(DataViewerEditor.java:16)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at oracle.wh.ui.owbcommon.IdeUtils._tryLaunchEditorByClass(IdeUtils.java:1412)
at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1349)
at oracle.wh.ui.owbcommon.IdeUtils._doLaunchEditor(IdeUtils.java:1367)
at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:869)
at oracle.wh.ui.owbcommon.IdeUtils.showDataViewer(IdeUtils.java:856)
at oracle.wh.ui.console.commands.DataViewerCmd.performAction(DataViewerCmd.java:19)
at oracle.wh.ui.console.commands.TreeMenuHandler$1.run(TreeMenuHandler.java:188)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
===========================
In the error it is showing that file expense_categories.csv in SOURCE_LOCATION not found but I am 100% sure that file is very much there.
Is anybody face the same issue?
Do we need to configure something before loading data from a flat file from OWB Client?
Any help would higly appreciable.
Regards,
Manmohan SharmaHi Detlef / Gowtham,
Now I am able to fetch data from flat files from OWB Server as well as OWB Client.
One way I have achieved as suggested by you
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copy all flat files on OWB Server
5) Updated the location which I created at the client.
Other way
1) Creating location on the OWB Client
2) Samples the files at client
3) Created & Configured external table
4) Copied flat files on the sever in same drive & directory . like if my all flat files are on C:\data at OWB Client then I copied flat file C:\data on the OWB Server. But this is feasible for Non-Windows.
Hence my problem solved.
Thanks a lot.
Regards,
Manmohan -
Slow Speed While fetching data from SQL 2008 using DoQuery.
Hello,
I am working for an AddOn and tried to use DoQuery for fetching data from SQL 2008 in C#.
There are around 148 records which full fill this query condition but it takes much time to fetch the data.
I wanna know that is there any problem in this code by which my application is getting slower.
I used break Points and checked it, I founds that while connecting to the server it is taking time.
Code:
// Get an initialized SBObob object
oSBObob = (SAPbobsCOM.SBObob)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
//// Get an initialized Recordset object
oRecordset = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
string sqlstring = "select DocEntry,ItemCode From OWOR where OWOR.Status='R' and DocEntry not in ( Select distinct(BaseRef) from IGE1 where IGE1.BaseRef = OWOR.DocEntry)";
oRecordset.DoQuery(sqlstring);
var ProductList = new BindingList<KeyValuePair<string, string>>();
ProductList.Add(new KeyValuePair<string, string>("", "---Please Select---"));
while (!(oRecordset.EoF))
ProductList.Add(new KeyValuePair<string, string>(oRecordset.Fields.Item(0).Value.ToString(), oRecordset.Fields.Item(0).Value.ToString() + " ( " + oRecordset.Fields.Item(1).Value.ToString() + " ) "));
oRecordset.MoveNext();
cmbProductionOrder.ValueMember = "Key";
cmbProductionOrder.DisplayMember = "Value";
Thanks and Regards,
Ravi SharmaHi Ravi,
your code and query look correct. But can you ellaborate a little bit.
It seems to be a DI API program ( no UI API ) ?
When you say "I founds that while connecting to the server it is taking time." do you mean the recordset query or the DI API connection to SBO ? The later would be "normal" since the connection can take up to 30 seconds.
To get data it is usually better to use direct SQL connections.
regards,
Maik -
How to Fetch Data From Standard Table MARA and Display using BOPF ?
Hello All,
In BOPF creation of Quey to a node fetches data from the Data Base Table attached to that Node,
But in my requirement I have to fetch data Present in a Standard table and Display it in the FPM List Using FBI.
** Can we Fetch the data From Standard Table and fill the Node in BOPF, Is this possible as the standard Table do not contain KEY field which BOPF uses for Data Fetching ?
Kindly share your Idea's .
Thanks in Adv.Hi Dhivya,
Thanks For your Response.
In my Requirement I want to make ROOT Node as Transient Node.
When I create a Sub Node to a Root Node, I am able to get this option to make this sub node as a Transient Node .
By selecting 'Standard<-->Extended' option in the Menu item 'GoTo' I am able to get this Transient Node check box field for the Sub Nodes.
I want to make a ROOT Node as a Transient Node.
(Which Version you are using, and which transaction you are using to create BO . we are using BOBX Transaction, Version Ehp 6 )
Kindly Guide me .
Thanks,
Kranthi Kumar. -
Sessions opening\closing in oracle while fetching data from XI
Hi Friends,
I used JDBC adaptor to fetch data from Oracle. I set the poll interval 86400 seconds because we need to run it on daily basis.
Now when XI fetch data from Oracle, It will open session in oracle, but it is not closed automatically. So, I have nearly 100 channels, and all channels are activated. So, for each channel 1 session is opened in oracle. By this way, the oracle server performance goes down. It is not working properly at that time.
How can I close these sessions in oracle.
Regards,
NarendraDid u try this paramter in JDBC sender adapter...
Disconnect from Database After Processing Each Message
Set this indicator if the database connection is to be released and reestablished before every poll interval.
-Siva Maranani -
FETCHING DATA FROM A TABLE USING ARRAYLIST
how can we fetch data from database using arraylist????
Hi ,
This is the way to fetch data into 2d array , you can customize to fetch in array list .
we will assume that we have stm as Statement and rs as ResultSet
rs = stm.executeQuery("select * from emp");
int noOfColumns = rs.getMetaData.getColumnCount();
rs.last();
int noOfRows = rs.getRow;
rs.befpreFirst();
String [][] result = new String[noOfRows][noOfColumns];
for(int i = 0 ; i<noOfColumns;i++){
rs.next();
for(int y = 0;y<noOfColumns;y++){
result[i][y]=rs.getString(y+1);
rs.close; -
Error While Viewing Data from MARA Table
Hi All,
After Importing SAP Tables, ex MARA and viewing Data Getting "Error Calling RFC function to get table data: <DATA_BUFFER_EXCEEDED "r . After decreasing or applying filters on fields , still not able to get data.
Able to extract data from T001 table.
Need to pull data in volumes right, so how to tackle this problem.
Thanks,
RavindraHi Ravindra ,
You can check the OSS note - 1186277 for the resolution of this issue .
Note- 1186277 is a SAP knowledge article .
You can access it from here - [Note - 1186277|https://css.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3131383632373726]
Regards,
Lokesh
Maybe you are looking for
-
I have IPhone 5. Songs on phone do not match songs in my itunes library. Can't get rid of songs on phone because they don't show up in library.
-
i synced my phone to another computer to get the update and when i went to restore it, all my music was earased, but everything else was normal. how do i get my music back? I enabled the backup, but when i went to use the backup, the phone recovered
-
[JS][CS3/4] Hiding a library
Hi I have built some scripts that open libraries, use library items, and close the library. My question is can the library be hidden? At the moment it is displayed while being used, only at times for only 1 second, but I dont want to see it at all i
-
BAdI in CRMD_ORDER for replacing CRM Pricing
Hi Experts, I have a requirement to make a RFC call to retrieve the pricing from ECC in CRMD_ORDER Std Order transaction after hit enter key with product/qty entry. I'm searching a BAdI for CRMD_ORDER (so many BAdIs for this TC) that can RFC by custo
-
Insert into JComboBox....
I am trying to insert another option into a JComboBox, however, I do not wish to append it. I need to insert it in between two other options. I cannot seem to find a method to do this. I know this is possible with JLists as you can specify an int and