Tables or fm to fetch the data for idoc type WMMBID01
hi
i have to create function module in whish i have to fill segments of idoc type
WMMBID01.
is there any fm which can fetch the data for the required fields of segment based on the document no.
or which tables i can use to fetch the required data for goods issued ie transaction migo.
regards
vijay
HI
GOOD
TRY WITH THESE FM
DYNP_VALUES_READ Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example).
HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
RPY_DYNPRO_READ Read dynpro, including screen flow
RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
THANKS
MRUTYUN
Similar Messages
-
Issue loading Meta Data for IDoc Type WPUKSR01 in XI Integration Repository
Hi,
I want to load the Meta Data for IDoc Type WPUKSR01 in XI Integration Repository out of BI. Unfortunately, this IDoc is not available in the IDoc List. I checked in BI and the IDoc Type is available in WE60 and WE30. Also, I can load the Meta Data for the Idoc in XI ABAP (IDX2).
Can someone tell me why the IDoc doesn't show up in XI Integration Repository Import Object List?
Thanks in advance.
Best Regards.
AlexHi Aamir,
The Idoc is released since Release 30A. I also tried to load the IDoc Meta Data from ERP with the same result: it does not show up in the list.
Thanks anyway.
Alex -
Which tables are being used to extract the data for the materi Extractors
Hi
please advise which tables are used to extract the data for the extarctors
0MAT_SALES_ATTR,
0MATERIAL_ATTR,
0MAT_PLANT_ATTR
0PLANT_ATTR
,Many thanks.Hi,
Activate a database trace using ST01. Then perform the MM03 operation and goto the SD Texts tab. Now stop the trace and see if you can locate either a table or program which you can utilize in the log.
http://help.sap.com/saphelp_47x200/helpdata/en/dd/55f993545a11d1a7020000e829fd11/frameset.htm
Hope this helps..
Rgs,
Ravikanth. -
How to fetch the data from pl/sql table dynamically
Hi All, I have the requirement of comparing two db views data in pl/sql. So, I have bulk collect the view into pl/sql table. But, the issue is, It is expecting to provide the column name for comparison. But, in my case, column name is dynamic. So, i cannot provide the column name directly for comparison.
For eg: In my view t1_VW, i have 4 columns. stid, c1,c2,c3,c4 and similar structure for t2_vw
my code
TYPE v1_type IS TABLE OF t1_vw%ROWTYPE;
l_data v1_type;
TYPE v1_type1 IS TABLE OF t2_vw%ROWTYPE;
l_data1 v1_type1;
test varchar2(1000);
test1 varchar2(1000);
temp1 number;
begin
SELECT * Bulk collect into l_data
FROM T1_VW;
SELECT * Bulk collect into l_data1
FROM T2_VW;
select l_data(1).stid into temp1 from dual; -- It is working fine and gives me the value properly
-- But, in my case, we are reading the column names from array, i am constructing the query dynamically and execute it.
test :='select l_data(1).stid into temp1 from dual';
execute immediate test into temp1;
-- I am getting error as follows:
Error report:
ORA-00904: "L_DATA": invalid identifier
ORA-06512: at "SYSTEM.BULKCOMPARISON", line 93
ORA-06512: at line 2
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action
end;
- Please help me to get rid of this issue. Is it possible to construct the query dynamically and fetch the data?. If not, is there any other better approach to compare the data between two views?.Output should display what are all columns changed and its old value and new value.
For eg., output should be
COLUMNNAME OLD_VALUE NEW_VALUE STID
C1 20 10 1
C2 50 40 2
C3 60 70 2
C2 80 90 3Why no do this only via a simple sql ?
create table a (STID number, C1 number, C2 number, C3 number);
insert into a values (1, 20, 30, 40)
insert into a values (2, 40, 50, 60);
insert into a values (3, 90, 80, 100);
create table b as select *
from a where 1 = 0;
insert into b values (1, 10, 30, 40)
insert into b values (2, 40, 40, 70);
insert into b values (3, 90, 90, 100);
commit;And now you can issue such a kind of select
SELECT stid , c1, c2, c3
FROM
( SELECT a.*,
1 src1,
to_number(null) src2
FROM a
UNION ALL
SELECT b.*,
to_number(null) src1,
2 src2
FROM b
GROUP BY stid , c1, c2, c3
HAVING count(src1) <> count(src2)
order by stid;I would then create a new table a_b_difference having the same structure as a or b and insert into it like this
create table a_b_diff as select * from a where 1 = 0;
insert into a_b_diff
SELECT stid , c1, c2, c3
FROM
( SELECT a.*,
1 src1,
to_number(null) src2
FROM a
UNION ALL
SELECT b.*,
to_number(null) src1,
2 src2
FROM b
GROUP BY stid , c1, c2, c3
HAVING count(src1) <> count(src2)
order by stid
;Then each time there is a difference between a column in a and its equivalente one in b (per unique stid ) a record will be inserted in this table.
You can do more by adding the name of the table in front of each record in this table to see exactly where the data comes from
Best Regards
Mohamed Houri -
How to fetch the data from databse table and get the required output
Hi,
I have made a project that connects CEP to database table but i m getting some problem in fetching the data from database.
From the following code :
If the where condition is removed then the application runs fine but i am still not able to fetch the data from the table because it is not showing any output.
Can anyone please suggest me that how to write WHERE statement correctly and how i will be able to see the output.
Following is the config.xml for processor:
======================================
<?xml version="1.0" encoding="UTF-8"?>
<wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application"
xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc">
<processor>
<name>JDBC_Processor</name>
<rules>
<query id="q1"><![CDATA[
SELECT STOCK.SYMBOL as symbol, STOCK.EXCHANGE as exchange
FROM ExchangeStream [Now] as datastream, STOCK
WHERE datastream.SYMBOL = datastream.SYMBOL ]]></query>
</rules>
</processor>
<jms-adapter>
<name>JMS_IN_Adapter</name>
<jndi-provider-url>t3://CHDSEZ135400D:7001</jndi-provider-url>
<destination-jndi-name>jms.TestKanikaQueue</destination-jndi-name>
<user>weblogic</user>
<password>welcome1</password>
</jms-adapter>
</wlevs:config>
Following is the assembly file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:wlevs="http://www.bea.com/ns/wlevs/spring" xmlns:jdbc="http://www.oracle.com/ns/ocep/jdbc"
xmlns:spatial="http://www.oracle.com/ns/ocep/spatial"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.bea.com/ns/wlevs/spring
http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd
http://www.oracle.com/ns/ocep/jdbc
http://www.oracle.com/ns/ocep/jdbc/ocep-jdbc.xsd
http://www.oracle.com/ns/ocep/spatial
http://www.oracle.com/ns/ocep/spatial/ocep-spatial.xsd">
<wlevs:event-type-repository>
<wlevs:event-type type-name="StockEvent">
<wlevs:properties>
<wlevs:property name="SYMBOL" type="byte[]" length="16" />
<wlevs:property name="EXCHANGE" type="byte[]" length="16" />
</wlevs:properties>
</wlevs:event-type>
<wlevs:event-type type-name="ExchangeEvent">
<wlevs:class>com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent</wlevs:class>
</wlevs:event-type>
<wlevs:event-type type-name="StockExchangeEvent">
<wlevs:properties>
<wlevs:property name="symbol" type="byte[]" length="16" />
<wlevs:property name="price" type="byte[]" length="16" />
<wlevs:property name="exchange" type="byte[]" length="16" />
</wlevs:properties>
</wlevs:event-type>
</wlevs:event-type-repository>
<bean id="readConverter" class="com.bea.wlevs.adapter.example.JDBC_CEP.Adapter_JDBC" />
<bean id="outputJDBCBean" class="com.bea.wlevs.bean.example.JDBC_CEP.OutputBean_JDBC">
</bean>
<wlevs:adapter id="JMS_IN_Adapter" provider="jms-inbound">
<wlevs:listener ref="ExchangeStream" />
<wlevs:instance-property name="converterBean"
ref="readConverter" />
</wlevs:adapter>
<wlevs:processor id="JDBC_Processor" advertise="true">
<wlevs:listener ref="OutputChannel" />
<wlevs:table-source ref="STOCK" />
</wlevs:processor>
<wlevs:channel id="ExchangeStream" event-type="ExchangeEvent" advertise="true">
<wlevs:listener ref="JDBC_Processor" />
</wlevs:channel>
<wlevs:channel id="OutputChannel" event-type="StockExchangeEvent"
advertise="true">
<wlevs:listener ref="outputJDBCBean" />
</wlevs:channel>
<wlevs:table id="STOCK" event-type="StockEvent"
data-source="StockDs" table-name="STOCK" />
<wlevs:table id="STOCK_EXCHANGE" event-type="StockExchangeEvent"
data-source="StockDs" table-name="STOCK_EXCHANGE" />
</beans>
ExchangeEvent.java:
package com.bea.wlevs.event.example.JDBC_CEP;
public class ExchangeEvent {
public String SYMBOL;
public String symbol;
public String exchange;
public ExchangeEvent() {
public String getSYMBOL() {
return SYMBOL;
public void setSYMBOL(String sYMBOL) {
SYMBOL = sYMBOL;
public String getSymbol() {
return symbol;
public void setSymbol(String symbol) {
this.symbol = symbol;
public String getExchange() {
return exchange;
public void setExchange(String price) {
this.exchange = price;
Adapter Class:
package com.bea.wlevs.adapter.example.JDBC_CEP;
import com.bea.wlevs.adapter.example.JDBC_CEP.MyLogger;
import com.bea.wlevs.adapters.jms.api.InboundMessageConverter;
import java.text.DateFormat;
import java.util.Date;
import com.bea.wlevs.adapters.jms.api.MessageConverterException;
import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.TextMessage;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class Adapter_JDBC implements InboundMessageConverter{
@SuppressWarnings("unchecked")
public List convert(Message message) throws MessageConverterException, JMSException {
Random rand = new Random();
int unique_id = rand.nextInt();
DateFormat dateFormat;
dateFormat = DateFormat.getTimeInstance();
dateFormat.format(new Date());
MyLogger.info(unique_id + " CEP Start Time is: " + dateFormat.format(new Date()));
System.out.println("Message from the Queue is :"+ message);
TextMessage textMessage = (TextMessage) message;
String stringMessage = textMessage.getText().toString();
System.out.println("Message after getting converted into String is :"+ stringMessage);
String[] results = stringMessage.split(",\\s*"); // split on commas
ExchangeEvent event1 = new ExchangeEvent();
event1.setSYMBOL(results[0]);
List events = new ArrayList(2);
events.add(event1);
return events;
Output Bean Class :
package com.bea.wlevs.bean.example.JDBC_CEP;
import com.bea.wlevs.ede.api.StreamSink;
import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
import com.bea.core.datasource.DataSourceService;
public class OutputBean_JDBC implements StreamSink{
public void onInsertEvent(Object event) {
if (event instanceof ExchangeEvent) {
ExchangeEvent cacheEvent = (ExchangeEvent) event;
System.out.println("Symbol is: " + cacheEvent.getSymbol());
System.out.println("Exchange is: " + cacheEvent.getExchange());
System.out.println(DataSourceService.class.getClass());
Kindly let me know if you need further info.Do you have StockDs configured in your server config.xml?
I think the query should look more like this:
SELECT stocks.SYMBOL, stocks.EXCHANGE
FROM STOCK as stocks, ExchangeStream [Now] as datastream WHERE stocks.SYMBOL = datastream.SYMBOL
Thanks
andy -
How to fetch the data from a pl/sql table and varray, with some example
I want to fetch the data using a cursor from Pl/sql table and varry and I want to update the data.
Please provide me some example.PL/SQL Table - please note that, right term is Associative Array.
Presumably you are referring to the 'often heated' back-and-forth that sometimes goes on in the forums when people refer to ANY PL/SQL type using a term with the word 'table' in it?
Curious that you then show an example of a nested table!
type emp_tab is table of employees%rowtype;
The 'right term' for that is 'nested table'. The following would be an 'associative array' or 'index-by table'
type emp_tab is table of employees%rowtype INDEX BY PLS_INTEGER;
Those used to be called 'PL/SQL tables' or 'index-by tables' but 'associative array' is the current term used.
Associative Arrays
An associative array (formerly called PL/SQL table or index-by table) is a set of key-value pairs. Each key is a unique index, used to locate the associated value with the syntax variable_name(index).
The data type of index can be either a string type or PLS_INTEGER.
Since the Oracle docs often use 'PL/SQL table' or 'index-by table' it isn't unusual for someone asking a question to use those terms also. Technically the types may not be 'tables' but it's clear what they mean when they use the term.
In PL/SQL the term 'nested table' is still used even though the PL/SQL collection is not really a table. SQL does have nested tables where the data is actually stored in a table. The PL/SQL 'nested table' type can be used as the source/destination of the SQL data from a nested table so that may be why Oracle uses that term for the PL/SQL type.
The doc that SKP referenced refers to this use:
Nested Tables
In the database, a nested table is a column type that stores an unspecified number of rows in no particular order. When you retrieve a nested table value from the database into a PL/SQL nested table variable, PL/SQL gives the rows consecutive indexes, starting at 1. -
Getting an error while fetching the data and bind it in the Tree table
Hi All,
I am getting an error "A navigation paths parameter object has to be defined - " while fetching the data and bind it in the Tree table.
Please find the code and screenshot below
var oModel = new sap.ui.model.odata.ODataModel("../../../XXXX.xsodata/", true);
var oTable = sap.ui.getCore().byId("table");
oTable.setModel(oModel);
oTable.bindRows({
path: "/Parent",
parameters: {expand: "Children"}
Can anyone please give me a suggestion to rectify this?
Thanks in Advance,
AravindhHi All,
Please see the below code. It works fine for me.
var oController = sap.ui.controller("member_assignment");
var oModel = new sap.ui.model.odata.ODataModel("../../../services/XXXX.xsodata/", true);
var Context = "/PARENT?$expand=ASSIGNEDCHILD&$select=NAME,ID,ASSIGNEDCHILD/NAME,ASSIGNEDCHILD/ID,ASSIGNEDCHILD/PARENT_ID";
var oTable = sap.ui.getCore().byId("tblProviders");
oModel.read(Context, null, null, true, onSuccess, onError);
function onSuccess(oEventdata){
var outputJson = {};
var p = 0;
var r = {};
try {
if (oEventdata.results){
r = oEventdata.results;
} catch(e){
//alert('oEventdata.results failed');
$.each(r, function(i, j) {
outputJson[p] = {};
outputJson[p]["NAME"] = j.NAME;
outputJson[p]["ID"] = j.ID;
outputJson[p]["PARENT_ID"] = j.ID;
outputJson[p]["DELETE"] = 0;
var m = 0;
if (j.ASSIGNEDCHILD.results.length > 0) {
$.each(j.ASSIGNEDCHILD.results, function(a,b) {
outputJson[p][m] = { NAME: b.NAME,
ID : b.ID,
PARENT_ID: b.PARENT_ID,
DELETE: 1};
m++;
p++;
var oPM = new sap.ui.model.json.JSONModel();
oPM.setData(outputJson);
oTable.setModel(oPM);
function onError(oEvent){
console.log("Error on Provider Members");
oTable.bindRows({
path:"/"
Regards
Aravindh -
How can i join the header and item table to fetch the data
hi experts,
i have a doubt in using inner join or for all entries, for fetching the data from the item table mseg, by taking the doc.no from mkpf. Plz sort out the difference, what happens, if i use the both statements for fetching dataHi,
Both has same functionality.
but if u are using FAE, u ahev to check for the
~intial condition of the source table,
~ duplicate entries, if any
Inner join will fetch the data from all the join tables at once. FAE will fetch the date from a table first then use that data to fetch data from subsequent table.
say in ur case, if u r using FAE,
1.select from mkpf.
2.select from mseg fae in I_MKPF.
first try using JOIN. if it is taking lots of time, then try FAE.
regards,
madhu -
Fetch the data from the tables in the SQL 2005 server to sap R/3.
Hi Experts,
We need to fetch the data from the tables in the SQL 2005 server to sap R/3.
Please explain which will be the best approach to fetch the same and how to do it. Sample program can greatly help.
<< Please do not offer points >>
Regards,
Shobana K
Edited by: Rob Burbank on Sep 21, 2010 2:36 PMHi,
Try NATIVE SQL statements in your abap code otherwise you can try to establish jdbc connection from ABAP program.
search in SDN for samples!
Suresh -
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 -
Proper approach for fetching the data
Hello all,
I am currently using some logic to fetch the following data from the SD tables.
VBELN Delivery LIPS
LSTEL Loading Point LIKP
LFIMG Actual quantity delivered (in sales units) LIPS
KTGRM Account assignment group for this material VBRP
EXDAT J_1IEXCHDR.
I have to join all the tables LIKP, LIPS, VBRP and J_1IEXCHDR. Is there an alternate way of fetching the data?
A Sample Query is written below.
SELECT B~VBELN A~LSTEL B~LFIMG
C~KTGRM E~EXDAT AS WADAT_IST
INTO CORRESPONDING FIELDS OF TABLE LIT_TY_LIPS_S
FROM LIKP AS A
INNER JOIN LIPS AS B ON A~VBELN = B~VBELN
INNER JOIN VBRP AS C ON C~VGBEL = A~VBELN
INNER JOIN J_1IEXCHDR AS E ON E~RDOC = C~VBELN
WHERE B~WERKS = SO_PLANT
AND E~EXDAT BETWEEN V_START_F AND SO_DATE
AND C~AUTYP IN s_AUTYP
AND E~STATUS = 'C'.
Thanks in advance.
Regards,
Harshad.
Edited by: Harshad Mishrikotkar on Sep 12, 2011 12:08 PMHarshad, if your target good performance? if yes then generally I don't prefer to join more than 3 tables at a time..
and join only logical tables in 1 query and then use for all entries clause and move to another query..
In your case, I would suggest join LIKP and LIPS and try to put as many where conditions as possible..
then join VBRP, not sure about the table J_1*.. based on for all entries in query 1.
I hope this helps.
Regards
Raghu. -
In which tables are the data for the aplication KSB1?
I'm getting data from Qlik View with a BI tool called Qlik View.
I need help to find in which tables are the data for KSB1 aplication.
I've found something in COBK and COEP but there's more table involved since I didn't find all data.
Somente can help me please?
Regards.
RobsonI ran a trace and found some tables that may help you.
COVP(View)
CSKT
CSLT
CSKS
CSKU
AUFK
Thanks
Rathish -
How to fetch the data to the internal table with out using mandt
Hi all,
Iam giving my code please observer... and give me the reasonable solution.
t_mar LIKE STANDARD TABLE OF z_mar.
SELECT mandt
werks " Plant
lifnr " Vendor
FROM z_mar
INTO TABLE t_mar
where sal = 2000.
By removing MANDT from select query, it is going to dump.
ex:
SELECT
werks " Plant
lifnr " Vendor
FROM z_mar
INTO TABLE t_mar
where sal = 2000.
> Now it is going to dump ( here i removed the mandt field ).
Please give me a solution to fetch the data by removing mandt in select statement, with out chaning the internal table structure.
Thanks,
Ravihi Ravi,
i also had to avoid move-corresponding and the following is what i did...its extra work and goes around but it will
do the needed work..............
t_mar LIKE STANDARD TABLE OF z_mar.
SELECT *
FROM z_mar
INTO TABLE t_mar
where sal = 2000.
the above gets you all the fields ...but if you still want to narrow it down to just two fields
*****Declaring structure with 2 fields
data:begin of fs_data.
data:werks type z_mar-werks,
lifnr type z_mar-lifnr ,
data:end of fs_data.
*******internal table of above
data:int_data like fs_data occurs 0 with headerline.
*****moving the only 2 required fields
loop at t_mar.
t_mar-werks = int_data-werks.
t_mar-lifnr = int_data-lifnr.
append int_data.
endloop.
Hope you found it useful...
Regards
Bx -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Reg: fetch the data by using item_id which is retuned by In line View Query
Hi all,
create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
insert into xxc_transactions values(null,null,null,null);
create table xxc_items1(item_id number,org_id number,item_no varchar2(10));
insert into xxc_items1 values(123,12,'book');
create table xxc_headers(header_id number,order_id number);
insert into xxc_headers values(null,null);
create table xxc_lines(header_id number,item_id number,line_id number);
insert into xxc_lines values(null,null,null);
create table xxc_types_tl(transaction_id number,NAME varchar2(10));
insert into xxc_types_tl values(106,'abc');
create table xxc_quantity(item_id number);
insert into xxc_quantity values (123);
create table xxc_quantity_1(item_id number);
insert into xxc_quantity_1 values (123);
SELECT union_id.item_id,
b.org_id,
e.name,
fun1(union_id.item_id) item_no
FROM xxc_transactions a,
xxc_items1 b,
xxc_headers c,
xxc_lines d,
xxc_types_tl e,
(SELECT item_id
FROM xxc_quantity
WHERE item_id = 123
UNION
SELECT item_id
FROM xxc_quantity_1
WHERE item_id = 123
UNION
SELECT item_id
FROM xxc_transactions
WHERE item_id = 123) union_id
WHERE a.type_id = 6
AND a.item_id = b.item_id
AND union_id.item_id = b.item_id
AND a.org_id = b.org_id
AND c.header_id = d.header_id
AND d.line_id = a.trx_line_id
AND d.item_id = b.item_id
AND c.order_id = e.transaction_id
AND b.org_id = 12
GROUP BY union_id.item_id,
b.org_id,
e.name
ORDER BY union_id.item_id;
create or replace function fun1(v_item in number)
return varchar2
is
v_item_no
Begin
select item_no from xxc_items1
where item_id=v_item;
return v_item_no ;
Exception
When Others Then
v_item_no := null;
return v_item_no;
END fun1;
I need fetch the data by using item_id which is retuned by In line View Query(UNION)
item_id org_id name item_no
123 12 abc book
Version: 11.1.0.7.0 and 11.2.0.1.0
Message was edited by: Rajesh123 Added test cases script
Message was edited by: Rajesh123 changed Question as fetch the data by using item_id which is retuned by In line View Query(UNION)Hi Master , sorry for the late reply and can you please help on this?
create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
insert into xxc_transactions values(null,null,null,null);
create table xxc_items(item_id number,org_id number,item_no varchar2(10));
insert into xxc_items values(123,12,'book');
create table xxc_headers(header_id number,order_id number);
insert into xxc_headers values(null,null);
create table xxc_lines(header_id number,item_id number,line_id number);
insert into xxc_lines values(null,null,null);
create table xxc_types_tl(transaction_id number,NAME varchar2(10));
insert into xxc_types_tl values(106,'abc');
create table xxc_uinon_table(item_id number);
insert into xxc_types_tl values(123);
SELECT union_id.item_id,
b.org_id ,
e.name ,
fun1(union_id.item_id) item_no --> to get item_no
FORM xxc_transactions a,
xxc_items b,
xxc_headers c,
xxc_lines d,
xxc_types_tl e,
( SELECT item_id
FROM xxc_uinon_table ) union_id
WHERE a.type_id= 6
AND a.item_id = b.item_id
AND union_id.item_id = b.item_id
AND a.org_id = b.org_id
AND c.header_id = d.header_id
AND d.line_id= a.trx_line_id
AND d.item_id= b.item_id
AND c.order_id= e.transaction_id ---106
AND b.org_id = 12
GROUP BY union_id.item_id,
b.org_id ,
e.name
ORDER BY union_id.item_id;
Note: xxc_uinon_table is a combination of UNION's
select 1 from dual
union
select 1 from dual
union
select no rows returned from dual;
I will get 1 from the above Query
Thank you in advanced
Maybe you are looking for
-
To begin with, in file-explorer (.\system32\explorer.exe) normally, the new ribbon user interface in Win 8.1 does indeed display appropriate buttons depending on the currently displayed folder within the explorer.exe window. But when one re-parents
-
Connect iPod to TV and play music
Hi all, I bought the new iPod classic 120Gb about two weeks ago and got started with iTunes to create a library (using a Windows PC). I am very satisfied with how things are going until now. Now I want to connect the iPod to my Samsung LCD and home c
-
Why am i getting this message?
trying to get to a website that I've used for several years, I'm getting this: Access Denied by security policy The security policy for your network prevents your request from being allowed at this time. Please contact your administrator Thanks for
-
ADF FACES: af:table not rendering all columns
I'm using ADF EA 17 with myFaces 1.0.9 on JBoss 4.0.1/JVM 1.4.2_07-b05. The af:table is embedded within an af:panelgroup (being body of af:panelbox). The af:table is not rendering all columns (only last 2 out of 8 cols total). The model behind the af
-
hi i have a problem in executing a query in jdbc. i.e it executes all the query but the effect of last query is not reflected in database(Ms Access). if i use one query it will work properly.this problem occurs when i use more than one query. could t