Data fetch from two table without refresh
hi Friends,
I have a problem i want to extract data from two table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
eg. there two table A and B.
Table A has Colunm
s_id Number;
c_id Varchar2(30);
sec varchar2(4);
Second Table B Colunm Name
s_id Number;
f_name varchar(30);
l_name varchar(20);
when i enter s_id 101 in a text field then the c_id ,sec,first_name and last_name should come in to corressponding text fields without refresh.
How Can I do this.
Thanks
Manoj
Hi Manoj,
You have to make an Ajax call to display data without refreshing the page. Search this forum for Ajax and you can find lots of related posts. This link might help too. http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
Thanks,
Manish.
Similar Messages
-
Hi,
I have used smartforms for generating suppler payment statement for financial department. more time duration is taken by the program when it is generating.
I think this problem comes while data fetching from BSEG table. because, it has more records for one vendor ID.
I want reduce this time duration.
Please guide me.Have you tried this selection in se16? I'm quite sure that It will take
a long time.
The problem has been explained in this group before and I think you
should search for bseg in the answers given.
As a hint: It has to do with the selection universe. You are restricting
only bukrs from the primary key (all the other restrictions in your
where clause are filters that are applied on SAP's side (not on the
database side)). The problem is that bseg isn't stored as separated
fields in the RDBMS, but as a table with the primary key and a stream of
bits in a raw field.
You should review and change the logic you're using before reading bseg.
It's the only way you'll improve the performance of this select. (for
example, you could use one or more secondary index tables - bi or ba
to retrieve belnr and access bseg with a better where clause). -
Data fetching from Standard tables or transaction to SAP PI
Dear Friends !
Good day ! How are you ?
I have one requirement , My client asks me to develop a solution in that I should get the data from standard SAP tables like EKKO, EKPO ( MM related ) etc.. and send it to PI system and then PI system sends it to third party system database system.
We have current scenario is working fine, I have abap proxy that I called in various standard transaction codes ( MIRO, MIGO, etc ) ' Baddis just beforethe commit stament and it passed the data to SAP PI system and it sends to SQL system.
but my client dont want me to use Baddis. Client wants like u should read from those EKKO,EKPO tables as soon as you get new entry there and send it to PI system. I have no clue How can I go further in that. Shall I use events ? but then question is same I need to trgger them somewere? Is any one have idea How I can send the data to PI system frm SAP standard tcodes and tables without using Baddis.
Please reply me. your any help will be appreciated.
Regards
NaeemThe current Approach of your development perfectly good approach,
it is not possbiel to read data directly from SAP Tables, you have to use IDoc/RFC/Proxy,if you want to avoid BADI's then better to contact ABAP Team, they will help you different approches .
But you have to use Porxy/IDoc/BAPI for sure.
Regards,
Raj -
Can we create a BAM data Object from two tables
Hi ,
I want to pull the data from two tables and create a BAM data object, Is it possible in BAM?
Do the needful
Regards,
FrancisThe sample way is using AQ on database. You can create a database view to join the tables. And create AQ on the view, create a ems to listen on the queue.
-
Perofrmance issue on data fetch from db table
Dear Experts,
I have one requirement which explained below step wise.
Step - 1 : I have a parameter on selection screen from where i ll get my ebeln value (User Input field) and that ebeln i ll check in ekpo table for validations.
If valid i keep it in a variable gw_ebeln.
Step - 2 : Need to fetch lifnr fron ekko based on gw_ebeln value.
Step - 3 : Need to fetch adrnr from lfa1 based on lifnr (Previously fetched from ekko table in step 2)
Step - 4 : Need to fetch email field from adr6 table based on adrnr value (Previously fetched from lfa1 table in step 3)
Step - 5 : Now for these mail id , I need to send mail by given fm.
My question is : I can create structure for step 2 , step 3, step 4 and by using " for all entries " in select statement i ll fetch my mail id in step 4.
So instead of creating structure and then use for all entries , I can fetch by using "select single" statement for step 2 , step3 step 4.bcz i am fetching only one field from all 3 table.
So which one is better performance wise and why ?
I need more and clear clarifications on these difference.
Please provide me suggestions.
Thanks & Regards,
Ajit SarangiHi Ajit,
We are referring item table EKPO. Multiple entries are possible.
To append the values in final internal table, we are going to process the LOOP. Inside loop, we should not use the Select statement, that decreases the performance. Database Interaction process should not done inside Loop...Endloop.
That's why we are creating the Internal table for processing the values. Since we need limited number of fields in the particular table, we are creating our own structure in the program.
For this case, For all entries will give better performance with compare to Select Single.
Regards
Rajkumar Narsimman -
Display columns from two tables without making join
Hi,
I need to perform currency conversion in the report.
For eg:) Whatever the currency in ar_payment_schedules i want to
convert it to INR equivalent.
Following is the query to do this.
select ps.invoice_currency_code Currency_B,
decode(ps.invoice_currency_code, 'INR',ps.amount_due_original,
round(ps.amount_due_original*
ps.exchange_rate,
curr.precision)
from
ar_payment_schedules ps,
fnd_currencies curr
where ps.customer_id = '111'
and curr.currency_code = 'INR'
When i do this in the Administration tool, the answers modules erroring out saying
that no joins between ar_payment_schedules and fnd_currencies. But here join is
not needed becuase fnd_currencies is filtered with INR and will return only
one row. Without joining two tables how can i get the same results in Answers.
thanks,
PrasannaIf it would return only one row then what is the need for the join (is it just for returning the precision?). Cant you just hard code the precision value instead of getting it from the table? Also you are doing a cartesian join, though the filters would take care of the final output this would result in a bad performance as your data starts scaling out. You need to find a key to join these 2 tables. If you do not have one, then just create a view with the cartesian join alone and then use that in your report.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
XML generation from two tables
Hi,
I need to write an Oracle SP(Id as input) create an XML strucutre out of the records fetched from two tables. There is no Fk relation between the tables.
Table A ---> has one record per interface per id
Table B---> has multiple records per interface per id
Table A
1) Id
2)ErrorCount
3)SuccessCount
4)Total
5)InterfaceName
Table B
1)Id
2)InterfaceName
3)ErrorDetail
4)ErrorMessage
XML Strucutre
<Report>
<TableA>
<Id>
<InterfaceName>
<Success/>
<Total/>
</InterfaceName>
</Id>
</TableA>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail/>
<ErrorMesage/>
</InterfaceName>
</Id>
</TableB>
</Report>
Thanks,
Is
Edited by: Is916 on Sep 16, 2009 2:27 AMThere are several ways to general XML.
Here's just one...
with A as (select 1 as id, 2 as errorcount, 4 as successcount, 6 as total, 'Bob' as interfacename from dual union all
select 2, 1, 4, 5, 'Fred' from dual)
,B as (select 1 as id, 'Bob' as interfacename, 'Error 1' as errordetail, 'Ouch that hurt' as errormessage from dual union all
select 1 as id, 'Bob', 'Error 2', 'Why did this happen' from dual union all
select 2, 'Fred', 'Warning', 'Why worry about it' from dual)
select xmlelement("Report",
A.xml, B.xml
) as xml
from (select xmlelement("TableA",
xmlelement("Id",
xmlelement("Success", successcount),
xmlelement("Total", total)
) as xml
from A where A.id = 1) A
,(select xmlagg(xmlelement("TableB",
xmlelement("Id",
xmlelement("InterfaceName",
xmlelement("ErrorDetail", errordetail),
xmlelement("ErrorMessage", errormessage)
) as xml
from B where B.id = 1) B
<Report>
<TableA>
<Id>
<Success>4</Success>
<Total>6</Total>
</Id>
</TableA>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail>Error 1</ErrorDetail>
<ErrorMessage>Ouch that hurt</ErrorMessage>
</InterfaceName>
</Id>
</TableB>
<TableB>
<Id>
<InterfaceName>
<ErrorDetail>Error2</ErrorDetail>
<ErrorMessage>Why did this happen</ErrorMessage>
</InterfaceName>
</Id>
</TableB>
</Report> -
Data fetch from table without Refresh and without using tab key.
hi Friends,
I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
How Can I do this.
Thanks
ManojHi Manoj,
I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
Andy -
Fetch the data from two tables
hell all
i want to fetch the data from two tables, one is from internal table and another one is data base table. what syntax i have to use either FOR ALL ENTRIES or INNER JOIN?hi
Use FOR ALL ENTRIES.
see the sample code
select * into table tvbrk from vbrk
where fkart in ('F2', 'F3', 'RE',
'ZVEC' , 'ZVEM' , 'ZVED',
'S1')
and erdat in so_erdat
and kunag in s_kunag.
erdat in so_erdat
and fkart in ('F2', 'F3', 'RE',
'ZVEC' , 'ZVEM').
if not tvbrk is initial.
select * into table t_zregion from zregion
for all entries in tvbrk
where country = tvbrk-land1
and region = s_regio.
endif.
thanks
sitaram -
Populate ADF Rich Table taking data from two tables of database
Hi,
Can anyone please guide me as to how I can populate ADF Rich Table taking data from two tables A and B of a database.
The condition is
I want to fetch row 1 from table A and populate into ADF Rich Table at row 1
then
I want to fetch row 1 from table B and populate into ADF Rich Table at row 2
and so on....
Many thanks for your help..
Regards,
RohitThe better place where you will learn:
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm -
Retriving data from two tables at a time.
Please use this forum to provide feedback about OTN content/services. All other posts will be DELETED.
hi all,
Am using win98 and Oracle 7.
I have splitted a table into two tables having 10 and 9 fields respectively and records of 2000.Now in form builder I have put both tables in same block and on same canvas.
Now when I execute a query I retrieve records of 1st table and can navigate through records of 1st table only .To retrive records of 2nd table I have to put curser in 2nd table and query again for data retrival from 2nd table.This is bothering me to match coulmn of both tables.
Is there any way to execute the records of both tables at a time, so that matching coulmns of both tables would become easy to reach.
Thanks and Regardsheeeey mohammad
you have first to make master/detail block not one block only
then jion between them as pk and fk -
To Select the data from two table one is transp table and onther is cluster
Hi All,
I want to select the data from two tables
Here i am giving with an example.
Fileds: kunnr belnr from bseg. table bseg
fields: adrnr from kna1 table: kna1.
Know i want to put these into one internal table based on kunnr and belnr.
Thanks in advance.
RameshHi,
U cant use joins on cluster table and BSEG is a cluster table so use FOR ALL ENTRIES for taht
refer this code
*& Form sub_read_bsak
text
--> p1 text
<-- p2 text
FORM sub_read_bsak.
*--Select data from BSAK Table
SELECT lifnr
augdt
augbl
gjahr
belnr
xblnr
blart
dmbtr
mwskz
mwsts
sgtxt
FROM bsak
INTO CORRESPONDING FIELDS OF TABLE it_bsak
WHERE belnr IN s_belnr
AND augdt IN s_augdt.
IF sy-subrc EQ 0.
*--Sort table by accounting document and vendor number
SORT it_bsak BY belnr lifnr.
ENDIF.
ENDFORM. " sub_read_bsak
*& Form sub_read_bseg
text
--> p1 text
<-- p2 text
FORM sub_read_bseg.
IF NOT it_bsak[] IS INITIAL.
*--Select data from BSEG table
SELECT belnr
gjahr
shkzg
kostl
hkont
ebeln
ebelp
FROM bseg
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FOR ALL ENTRIES IN it_bsak
WHERE belnr EQ it_bsak-belnr
AND gjahr EQ it_bsak-gjahr
AND shkzg EQ 'S'.
IF sy-subrc EQ 0.
*--Sort table by accounting document
SORT it_bseg BY belnr.
ENDIF.
ENDIF.
ENDFORM. " sub_read_bseg -
Error in Abap code when combining data from two tables
Hi,
I got error in my code when i try to select data based on two tables
error message Unknown column name "(" field list. field list. field list. field list.
select ( WLK1~ARTNR )
into ZOXE1D0041-ZZPROMO
from WLK1 INNER JOIN T001W
ON WLK1FILIA = T001WKUNNR.
where WLK1-PFLKN NE 'P' AND
WLK1-QUELL NE '2'.
Table 1 WLK1
ARTNR FILIA PFLKN QUELL
001 C001 P 2
002 C001 A 1
Table 2 T001W
KUNNR WERKS
C001 P001
My requirement is to extract from article number from table WLK1 where the customer number (FILIA) matches with Customer number from (T001W) and plant (WERKS).
In conclusion I like to have this only this row
ARTNR FILIA PFLKN QUELL
002 C001 A 1Hi
You need to append every article number after each select is performed
is this an intermal table ZOXE1D0041 with header line ? if yes
then do this way
select WLK1~ARTNR
into ZZARTICLE
from WLK1 INNER JOIN T001W
ON WLK1FILIA = T001WKUNNR
where WLK1~PFLKN NE 'P' AND
WLK1~PFLKN NE 'S' AND
WLK1~QUELL NE '2'.
ZOXE1D0041-ZZLISTARTICLE = ZZARTICLE.
Append ZOXE1D0041. " <edited>
endselect.
then ZOXE1D0041 will have all article numbers.
Edited by: Sonal Patel on Sep 5, 2009 10:27 AM -
Problem reading data from two tables
Hi experts,
I'm developing a JDBC - IDOC scenario that needs to read data from two oracle tables. I have created a BPM that has a initial fork for the two channels and it works fine.
The problem is that I need to read data from the first, two or both tables depending if there is data to read. If there is data in the two tables it works, but if only there is data in one of the two tables, I have read problems. I have tryed to set the 'neccesary branches' to 1 but this is a problem when I have data in both tables.
Any idea?
Best Regards,
Alfredo Lagunar.Hi,
have your fork step inside a block and then right-click your block to insert a deadline branch to your BPM process and specify the time after which your BPM process should be cancelled.....so if in that time, you get data from both tables, your BPM will work okay otherwise if that time is over, then your BPM process will be cancelled.
Regards,
Rajeev Gupta -
Cartesian of data from two tables with no matching columns
Hello,
I was wondering – what’s the best way to create a Cartesian of data from two tables with no matching columns in such a way, so that there will be only a single SQL query generated?
I am thinking about something like:
for $COUNTRY in ns0: COUNTRY ()
for $PROD in ns1:PROD()
return <Results>
<COUNTRY> {fn:data($COUNTRY/COUNTRY_NAME)} </COUNTRY>
<PROD> {fn:data($PROD/PROD_NAME)} </PROD>
</Results>
And the expected result is combination of all COUNTRY_NAMEs with all PROD_NAMEs.
What I’ve noticed when checking query plan is that DSP will execute two queries to have the results – one for COUNTRY_NAME and another one for PROD_NAME. Which in general results in not the best performance ;-)
What I’ve noticed also is that when I add something like:
where COUNTRY_NAME != PROD_NAME
everything is ok and there is only one query created (it's red in the Query plan, but still it's ok from my pov). Still it looks to me more like a workaround, not a real best approach. I may be wrong though...
So the question is – what’s the suggested approach for such queries?
Thanks,
Leszek
Edited by xnts at 11/19/2007 10:54 AMWhich in general results in not the best performanceI disagree. Only for two tables with very few rows, would a single sql statement give better performance.
Suppose there are 10,000 rows in each table - the cross-product will result in 100 million rows. Sounds like a bad idea. For this reason, DSP will not push a cross-product to a database. It will get the rows from each table in separate sql statements (retrieving only 20,000 rows) and then produce the cross-product itself.
If you want to execute sql with cross-products, you can create a sql-statement based dataservice. I recommend against doing so.
Maybe you are looking for
-
CLOB Datatype (Assgin more than 32k fails)
Dear All Can anyone tell me why i am getting this error if i assign more than 32k character to clob variable in pl/sql but i can assign it from table to a variable Pl/sql 1(ORA-06502: PL/SQL: numeric or value error: character string buffer too small)
-
Problems with File I/O in java applications at KVM/CLDC Layer
I wrote couple of programs made use of Connector.open with "file" protocol to perform File I/O. Code snippet from java application for File Read InputConnection conn = (InputConnection) Connector.open("file:/input.txt", Connector.READ ); I got javax.
-
Using custom code in SSRS PDF rendering
Hi, I have a written some custom code ( a simple function to maintain a counter ) in SSRS Report properties. Everything works fine when I render the report in Report Viewer, but the custom code is not recognized when I render the report to PDF. What
-
Itunes karaoke cd's...do they work in...
a karaoke machine? I have a barbie karaoke machine for my daughter. Will the words pop up on the screen or will it just be instrumental? Thanks!
-
I have a G5 1.8 with the SONY U10A DVD/CD drive running Tiger 10.4.11. The drive will play a DVD but not a CD and just kicks it out. I When I try to burn a CD or DVD I get an error message - install a blank disc. I'm using Fuji discs and up till now