How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar Shukla
Hi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif
Similar Messages
-
How to Retrieve data from Variant Table
Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?
Hello Mohan,
if u already have data and u want to populate it in F4 help then use below code -
u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
Import data from few tables and export into the same tables on different db
I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
to the same tables. how can i do the import?
Its urgent can anyone please help me do this?
Thanks.Hello Junior DBA,
maybe try it with the "copy command".
http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
Have a look at the section "Understanding COPY Command Syntax".
Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
Stefan -
How to retrieve data from edcauditentity table?
Hello!
I am interested how to connect to edcauditentity table and retrieve data from this table.
I have sql query but i don't have idea how to start. For now i can connect to LiveCycle and retrieve policy name.
Thank in advance!Hello Mohan,
if u already have data and u want to populate it in F4 help then use below code -
u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
How to retreive data from a table and a structure
Hi experts,
I have a requirement to create an ALV report. I have to include fields from two tables 'PA0001' and 'CATSDB' and from one structure 'CATSAPPR'. I am able to retrieve data from tables using INNERJOIN. But i have no idea how to deal with Structure.
I know that structure does not contain any data.
But i am not able to find any transparent table which has field 'ORDERTEXT' . I found field 'ORDERTEXT' only in structure 'CATSAPPR'.
So please anyone tell me, either any transparent table which has field 'ORDERTEXT' or please tell me how to deal with structure, in this case.
Please help me,
Thanks in advance
Anucheck this
Table-Fields Short descriptn
AUFK- KTEXT Order master data
COCH- KTXT Process Management: Control Recipe Header
COCHP- KTXT PI sheet: Control Recipe Header
COMPHDR- KTEXT OCM: Comparison results, indiv. records for order headers
HIKO- KTEXT Order master data history
MAAVC_MDO- KTEXT MPO: Individual Master Data for Orders
MCHPVS- AUFTEXT Batch Record: Shadow Table for Link to Archive
OCMHOMO_ARCH- KFELD Backup Table of Homogeneity List in Case of Archiving
PSJHIEDATA- KTEXT Hierarchy data to test LDB PSJ
TEWOCODEST- DESCRIPTION Order Codes (Texts)
TEWOCODET- KTEXT Allocation of Message Codes to Order
VLCSMORDER- KTEXT VELO : Service Order
VSAUFK_CN- KTEXT Version: Order master data
Yogesh N -
Retrieve data from two tables and store it in one itab
Hi All,
i have an internal table of structure which has fields ar_object and objecttext.
I want to retrieve all the ar_object from table toaom for object type BUS2012 and then the corresponding objecttext from toasp where toaom-ar_object = toasp-ar_object and then store both this values in my internal table.
what is the best method to do it ? Please let me know if you want to know how i am doing it right now
thanks,
GoluHi,
You can get many ways
1. using For all entries in
2. using Inner join
3. you can get 2 tables data into 2 different internal tables and loop first internal table and read second internal using key fields append it another internal table or modify second internaltable.
In above ways 1st and 2nd are performance issues. the best way is
get TOAOM table data into itab1 and get TOASP table data into itab2 you can append data into another itab3 or modify itab2
regards,
Ganesh -
How to get the data from one table and insert into another table
Hi,
We have requirement to build OA page with the data needs to be populated from one table and on save data into another table.
For the above requirement what the best way to implement in OAF.
I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
ThanksYou can achieve this in many different ways, one is
1. Create another VO based on the EO which is based on the dest table.
2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
3. commiting the transaction will push the data into the dest table on which the dest VO is based.
I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
Tapash -
How to retrieve data from plsql table in BI publisher Data template
Hi All,
I have created a data template for XML publisher report. In data template i m getting data from plsql table. for that i have created one package with pipelined function. I am able to run that sql from sql developer .But if i run the concurrent program then i got error like "java.sql.SQLSyntaxErrorException: ORA-00904: "XXXXX": invalid identifier".
I have used the same parameters in Data template and concurrent program....
please clarify me what needs to be done....
thanks in advance....
Regards,
DossHi Alex ,
i am using pipelined function and get the data from cursor and load it into plsql table (nested table). and i use the below in my data template to fetch the data:
<sqlStatement name="Q1">
<![CDATA[select * from table(PO_SPEND_RPT_PKG.generate_report(P_ORG_ID,P_SOB_ID,P_ORG_NAME,P_PERIOD_NAME,P_CLOSE_STATUS,P_E_PCARD_NEED,P_REPORT_TYPE))]]>
</sqlStatement>
if i run the above in sql developer i can get the result....from apps if i run i got the error "java.sql.SQLSyntaxErrorException: ORA-00904: "P_ORG_ID": invalid identifier"
Edited by: kalidoss on Sep 14, 2012 4:32 AM -
How to Extract data from Cluster table and transperant table
Hello BW Experts ,
I want to extract the data from cluster table BSEG and a transperant table BKPF .
The primary fields are BELNR , GJHAR and BUKRS.
the fields of table BKPF to extarct is BUDAT and fields of BSEG table is HKONT , BSCHL , ZUONR and POSID.
I can not create a view over these two tables as BSEG is a Cluster table.
Please guide me.
Regadrs ,
Amol.hi Amol,
take a look Sigg's weblog
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
you can use RSAX_BIW_GET_DATA_SIMPLE as sample, there specified import parameters
FUNCTION RSAX_BIW_GET_DATA_SIMPLE.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE SFLIGHT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER -
Fetch data from one table and insert into two tables in desired format
I have similar to the following data in a table and it is not normalized. The groupID is being used to group two records of similar nature.
DECLARE @OldDoc TABLE (oldDocID INT, groupID INT, deptID INT)
INSERT INTO @OldDoc (oldDocID, groupID) VALUES (1, NULL, 111),(2,NULL,111),(3,1,111),(4,NULL,333),(5,1,222),(6,NULL,333),(7,2,222),(8,2,333),(9,NULL,111),(10,3,222),(11,NULL,333),(12,3,444)
I need to process the data from the above table (@OldDoc) and write into two new tables (@NewDoc and @NewDocGroup) as follows.
oldDocID should be stored as newDocID when inserting to @NewDoc table. Only records with groupID NULL and one record (first one) per group should be considered (For example, oldDocID 5 is not considered as 3 and 5 belong to the same groupID 1) for insertion.
DECLARE @NewDoc TABLE (newDocID INT)
INSERT INTO @NewDoc (newDocID) VALUES (1),(2),(3),(4),(6),(7),(9),(10),(11)
All records from @OldDoc should be considered for insertion into @NewDocGroup table. OldDocID is inserted as NewDocID and deptID is as-is. Instead of groupID, the ID of the first record in the
group should be considered as parentNewDocID (For example, 3 is considered as parentNewDocID for newDocID 5 as 3 and 5 belong to the same groupID in @OldDoc table) for the newDocID.
DECLARE @NewDocGroup (newDocID INT, parentNewDocID INT, deptID INT)
INSERT INTO @NewDocGroup (newDocID, parentNewDocID, deptID) VALUES (1,1,111),(2,2,111),(3,3,111),(4,4,333),(5,3,222),(6,6,333),(7,7,222),(8,7,333),(9,9,111),(10,10,222),(11,11,333),(12,10,444)
How do I accomplish the above using SQL ? Thanks for the help.>> I have similar to the following data in a table and it is not normalized. The group_id is being used to group two records [sic] of similar nature. <<
Rows are not records. Tables have to have a key by definition. You do not do math with identifiers, so they should not be numeric. Let's ignore that error for now. In short, you are posting garbage. If you had followed Forum Netiquette, would you have posted
this?
CREATE TABLE Old_Documents
(old_doc_id INTEGER NOT NULL PRIMARY KEY,
group_id INTEGER,
dept_nbr INTEGER NOT NULL
REFERENCES Departments (dept_nbr));
INSERT INTO Old_Documents(old_doc_id, group_id, dept_nbr)
VALUES (1, NULL, 111),
(2, NULL, 111),
(3, 1, 111),
(4, NULL, 333),
(5, 1, 222),
(6, NULL, 333),
(7, 2, 222),
(8, 2, 333),
(9, NULL, 111),
(10, 3, 222),
(11, NULL, 333),
(12, 3, 444);
>> I need to process the data from the above table (Old_Documents) and write into two new tables (New_Documents and New_Documents_Groups) as follows. <<
Just like punch cards and mag tape data processing! Being old and being new are a status, not another kind of entity. But that is how mag tapes work. And you even use the verb "fetch" from tape files. This design flaw is called attribute splitting.
Do you have a Male_Personnel and Female_Personnel table? NO! It is just Personnel!
>> old_doc_id should be stored as new_doc_id when inserting to New_Documents table. Only records [sic] with group_id NULL and one record [sic] (first [sic; no ordering in a table] one) per group should be considered (For example, old_doc_id 5 is not considered
as 3 and 5 belong to the same group_id =1) for insertion. <<
Think about your punch card mindset. Why did you physically materialize that redundant New_Documents table? Let me answer that: this is how you work with punch cards! In SQL we use a VIEW:
CREATE VIEW New_Documents (new_doc_id)
AS
SELECT old_doc_id
FROM Old_Documents;
>> All records [sic] from Old_Documents should be considered for insertion into New_Documents_Groups table. The old_doc_id is inserted as new_doc_id and dept_nbr is as-is. Instead of group_id, the ID [sic: which identifier??] of the first [sic: tables
have no ordering like a deck of punch cards] record [sic] in the group should be considered as parent_new_doc_id (For example, 3 is considered as parent_new_doc_id for new_doc_id 5 as 3 and 5 belong to the same group_id in Old_Documents table) for the new_doc_id.
<<
Why not use 5 as the parent? My guess is that you are trying to form equivalence classes. See:
https://www.simple-talk.com/content/print.aspx?article=2020
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Read data from E$ table and insert into staging table
Hi all,
I am a new to ODI. I want your help in understanding how to read data from an "E$" table and insert into a staging table.
Scenario:
Two columns in a flat file, employee id and employee name, needs to be loaded into a datastore EMP+. A check constraint is added to allow data with employee names in upper case only to be loaded into the datastore. Check control is set to flow and static. Right click on the datastore, select control and then check. The rows that have violated the check constraint are kept in E$_EMP+ table.
Problem:
Issue is that I want to read the data from the E$_EMP+ table and transform the employee name into uppercase and move the corrected data from E$_EMP+ into EMP+. Please advise me on how to automatically handle "soft" exceptions in ODI.
Thank youHi Himanshu,
I have tried the approach you suggested already. That works. However, the scenario I described was very basic. Based on the error logged into the E$_EMP table, I will have to design the interface to apply more business logic before the data is actually merged into the target table.
Before the business logic is applied, I need to read each row from the E$EMP table first and I do not know how to read from E$EMP table. -
How to retrieve data from a table?
I creat a Java application that connect to a database at address 10.4.4.204 and I also creat a table in this database by SQL Navigator. This table contain colums PID, Name, history.
How can I retrieve these colums and put results to Microsoft Word. I also want these results arrange to colums in Microsoft Word too.
Then how this line become?
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.4.4.204:1999:db", "tung", "tung12345");
I need documents and sample code in this case ( retrive and display data from remote database host). Any one help me?This may not answer your question, but what about a pure SQL solution?
NOTE THIS IS UNTESTED:
SELECT *
FROM ERROR_TABLE
WHERE ERROR_CD IN
SELECT 1
FROM table1
HAVING COUNT(*) > 0
UNION ALL
SELECT 2
FROM table2
HAVING COUNT(*) > 0
)HTH! -
How to retrieve data from a table that match values in a varray?
Using - Oracle 10g Release 1.2
How to do write a sql to retrieve data matching values in a varray?
I have the following:
declare
v_ct NATURAL := 0;
type t_cur is REF CURSOR;
v_cursor t_cur;
TYPE t_array IS VARRAY(100) OF NUMBER;
l_codes t_array := t_array();
begin
select count(*)
into v_ct
from table1
where ind_cd IS NULL;
IF v_ct = 0 THEN
l_codes(1) := 1;
END IF;
select count(*)
into v_ct
from table2
where cd IS NULL;
IF v_ct = 0 THEN
l_codes(2) := 2;
END IF;
OPEN v_cursor for
select * from error_table where error_cd in (SELECT * FROM TABLE(CAST(l_codes AS t_array)) );
end;This may not answer your question, but what about a pure SQL solution?
NOTE THIS IS UNTESTED:
SELECT *
FROM ERROR_TABLE
WHERE ERROR_CD IN
SELECT 1
FROM table1
HAVING COUNT(*) > 0
UNION ALL
SELECT 2
FROM table2
HAVING COUNT(*) > 0
)HTH! -
HOW TO READ DATA FROM A FILE AND INSERT INTO A TABLE USING UTL_FILE
Hi..
I have a file.I want to read the data from file and load it into a table using utl_file.
how can I do it?
Any reply apreciated...Hi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif -
How to read LONG RAW data from one table and insert into another table
Hello EVERYBODY
I have a table called sound with the following attributes. in the music attribute i have stored some messages in the different language like hindi, english etc. i want to concatinate all hindi messages and store in the another table with only one attribute of type LONG RAW.and this attribute is attached with the sound item.
when i click the play button of sound item the all the messages recorded in hindi will play one by one automatically. for that i'm doing the following.
i have written the following when button pressed trigger which will concatinate all the messages of any selected language from the sound table, and store in another table called temp.
and then sound will be played from the temp table.
declare
tmp sound.music%type;
temp1 sound.music%type;
item_id ITEM;
cursor c1
is select music
from sound
where lang=:LIST10;
begin
open c1;
loop
fetch c1 into tmp; //THIS LINE GENERATES THE ERROR
temp1:=temp1||tmp;
exit when c1%notfound;
end loop;
CLOSE C1;
insert into temp values(temp1);
item_id:=Find_Item('Music');
go_item('music');
play_sound(item_id);
end;
but when i'm clicking the button it generates the following error.
WHEN-BUTTON-PRESSED TRIGGER RAISED UNHANDLED EXCEPTION ORA-06502.
ORA-06502: PL/SQL: numeric or value error
SQL> desc sound;
Name Null? Type
SL_NO NUMBER(2)
MUSIC LONG RAW
LANG CHAR(10)
IF MY PROCESS TO SOLVE THE ABOVE PROBLEM IS OK THEN PLESE TELL ME THE SOLUTION FOR THE ERROR. OTHER WISE PLEASE SUGGEST ME,IF ANY OTHER WAY IS THERE TO SOLVE THE ABOVE PROBLEM.
THANKS IN ADVANCE.
D. PrasadYou can achieve this in many different ways, one is
1. Create another VO based on the EO which is based on the dest table.
2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
3. commiting the transaction will push the data into the dest table on which the dest VO is based.
I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
Tapash
Maybe you are looking for
-
Photoshop will not work in Yosemite OS 10.10
Yosemite looks cool but it did not warn me that Photoshop and my wacom tablet would not function. I actually have Photoshop CS5. Which as far I am concern worked great in Mac OS X. I was given warning after downloading and installing I need to to
-
I have Two apple ids: one apple id will not authorize on same computer.
I just purchased a new imac. I have two apple ids. Stupid, I know. I was able to authorize one of the apple ids on my iMac. When I try to authorize the other apple id, I get the message "We could not complete your iTunes Store request. The iTunes Sto
-
Premier Elements 13 bundled with Photoshop Elements 13 for $70
Black Friday at B&H. This is the latest version and a very low price. Free shipping and, in most places, no sales tax. http://www.bhphotovideo.com/c/product/1077543-REG/adobe_65234906_photoshop_elements_13.htm lhttp://
-
I am new at using dw and building sites and now I came accross a problem that I can't figure out. I was going to add new content to one of my pages in my site and this happened above. I quickly exited before saving and when I reopened the file it rem
-
Currency Symbol and FND FORMAT_CURRENCY
I want FND FORMAT_CURRENCY for format the number with the correct currency symbol in the text. Is this possible? Thanks, Kurz