Using collection fetch the employeeid
Dear all,
The below code can't fetch employee_id using collection. can you please tell me where i did wrong.
DECLARE
TYPE emp_table_type IS TABLE OF
employees.employee_id%type;
my_emp_table emp_table_type;
BEGIN
SELECT employee_id INTO my_emp_table FROM employees;
FOR i IN 1..my_emp_table.count
LOOP
DBMS_OUTPUT.PUT_LINE(my_emp_table(i).employee_id);
END LOOP;
end;
See the section 'Querying Data Into Collections of Records' in the PL/SQL doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#i36282
Querying Data Into Collections of Records
You can use the BULK COLLECT clause with a SELECT INTO or FETCH statement to retrieve a set of rows into a collection of records.
That doc section shows you how to use BULK COLLECT when querying MULTIPLE values.
You use INTO for single values. You use BULK COLLECT INTO for multiple values.
Similar Messages
-
Fetch the netprice from the validity period which always matches with the
Let me describe the same.
Suppose the PO creation date is 04.07.2007
The conditions for an item in a contract for the PO are as follows;
1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
We need to always fetch the netprice from the validity period which always matches with the PO creation date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
This data is then used to fetch the get the netpr data from EKPO.
what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date..
Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
p_c_k_bstyp TYPE ebstyp
p_p_bukrs TYPE bukrs
p_p_ekorg TYPE ekorg
p_p_ekgrp TYPE bkgrp
*Begin of Mod-004
fp_p_cernam type ty_r_ernam
p_p_cernam TYPE ernam
*End of Mod-004
p_s_werks LIKE s_werks[]
p_s_matnr LIKE s_matnr[]
p_s_lifnr LIKE s_lifnr[]
p_s_val_dt LIKE s_val_dt[].
*mod-002
data : l_amount type BAPICURR_D, " Net price
l_waers TYPE waers, " Currency Key
l_eff_amount type BAPICURR_D. " Effective value
data: l_v_netpr type bprei.
*mod-002
SELECT ebeln
bukrs
bstyp
aedat
ernam
lifnr
zterm
ekorg
ekgrp
waers
wkurs
kdatb
kdate
inco1
INTO TABLE i_ekko
FROM ekko
WHERE ebeln IN p_s_cebeln
AND bstyp EQ p_c_k_bstyp
AND bukrs EQ p_p_bukrs
AND ekorg EQ p_p_ekorg
AND ekgrp EQ p_p_ekgrp
*Begin of Mod-004
AND ernam EQ p_p_cernam
AND ernam IN fp_p_cernam
*End of Mod-004
AND lifnr IN p_s_lifnr
AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
IF sy-subrc EQ 0.
Populates internal table i_ekpo using EKPO table.
SELECT ebeln
ebelp
loekz
txz01
matnr
werks
ktmng
menge
meins
bprme
netpr
peinh
webaz
mwskz
uebto
untto
erekz
pstyp
knttp
repos
webre
konnr
ktpnr
ean11
effwr
xersy
aedat
prdat
INTO TABLE i_ekpo
FROM ekpo
FOR ALL ENTRIES IN i_ekko
WHERE ebeln = i_ekko-ebeln
and aedat = i_ekko-aedat
AND werks IN p_s_werks
AND matnr IN p_s_matnr.
LOOP AT i_ekpo INTO rec_ekpo.
MOVE rec_ekpo-ebeln TO rec_contr-ebeln.
MOVE rec_ekpo-ebelp TO rec_contr-ebelp.
MOVE rec_ekpo-loekz TO rec_contr-loekz.
MOVE rec_ekpo-txz01 TO rec_contr-txz01.
MOVE rec_ekpo-matnr TO rec_contr-matnr.
MOVE rec_ekpo-werks TO rec_contr-werks.
MOVE rec_ekpo-ktmng TO rec_contr-ktmng.
MOVE rec_ekpo-menge TO rec_contr-menge.
MOVE rec_ekpo-meins TO rec_contr-meins.
MOVE rec_ekpo-bprme TO rec_contr-bprme.
MOVE rec_ekpo-netpr TO rec_contr-netpr.
move l_v_netpr TO rec_contr-netpr.
mod-002
read table i_ekko into rec_ekko with key
ebeln = rec_ekpo-ebeln.
l_waers = rec_ekko-waers.
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-netpr
IMPORTING
AMOUNT_EXTERNAL = l_amount.
rec_contr-netpr = l_amount.
mod-002
MOVE rec_ekpo-peinh TO rec_contr-peinh.
MOVE rec_ekpo-webaz TO rec_contr-webaz.
MOVE rec_ekpo-mwskz TO rec_contr-mwskz.
MOVE rec_ekpo-uebto TO rec_contr-uebto.
MOVE rec_ekpo-untto TO rec_contr-untto.
MOVE rec_ekpo-erekz TO rec_contr-erekz.
MOVE rec_ekpo-pstyp TO rec_contr-pstyp.
MOVE rec_ekpo-knttp TO rec_contr-knttp.
MOVE rec_ekpo-repos TO rec_contr-repos.
MOVE rec_ekpo-webre TO rec_contr-webre.
MOVE rec_ekpo-konnr TO rec_contr-konnr.
MOVE rec_ekpo-ktpnr TO rec_contr-ktpnr.
MOVE rec_ekpo-ean11 TO rec_contr-ean11.
MOVE rec_ekpo-effwr TO rec_contr-effwr.
mod-002
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-effwr
IMPORTING
AMOUNT_EXTERNAL = l_eff_amount.
rec_contr-effwr = l_eff_amount.
*mod-002
MOVE rec_ekpo-xersy TO rec_contr-xersy.
APPEND rec_contr TO i_contr.
CLEAR: rec_ekpo,rec_contr.
mod-002
CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
mod-002
ENDLOOP.
Modifying i_contr using i_ekko.
SORT i_ekko BY ebeln.
LOOP AT i_contr INTO rec_contr.
READ TABLE i_ekko INTO rec_ekko WITH KEY
ebeln = rec_contr-ebeln
BINARY SEARCH.
MOVE rec_ekko-bukrs TO rec_contr-bukrs.
MOVE rec_ekko-bstyp TO rec_contr-bstyp.
MOVE rec_ekko-aedat TO rec_contr-aedat.
MOVE rec_ekko-ernam TO rec_contr-ernam.
MOVE rec_ekko-lifnr TO rec_contr-lifnr.
MOVE rec_ekko-zterm TO rec_contr-zterm.
MOVE rec_ekko-ekorg TO rec_contr-ekorg.
MOVE rec_ekko-ekgrp TO rec_contr-ekgrp.
MOVE rec_ekko-waers TO rec_contr-waers.
MOVE rec_ekko-wkurs TO rec_contr-wkurs.
MOVE rec_ekko-kdatb TO rec_contr-kdatb.
MOVE rec_ekko-kdate TO rec_contr-kdate.
MOVE rec_ekko-inco1 TO rec_contr-inco1.
MODIFY i_contr FROM rec_contr.
ENDLOOP.
ENDIF.
REFRESH: i_ekko,
i_ekpo.
CLEAR : rec_ekko,
rec_ekpo,
rec_contr.
ENDFORM. "select_contracts
Thanks.Hi,
Please get the valid condition ( based on date ) from A016 (MK & LPA). With the appropriate KNUMH read the Condition header. You can access the different condition items viz., PB00, RA00 etc., for the values from table KONP. Further if you have Value scales / Quantity scales, you can read the data from KONM, KONW.
An additional tips: in KONP, if you have a condition like RA00 - Rebate, the value will be multiplied by 10 and saven in database to accomodate the discount to the third decimal.
I could not completely understand your requirements like nature of development ( Is it a Report / SAP Script ??) you are working etc., so that I could help you precisely.
Hope this helps,
Best Regards, Murugesh AS
Message was edited by:
Murugesh Arcot -
How to fetch the correct netprice based on contract item conditions
Hi,
When you display a contract using ME33K and you click on a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.
and each period will have different netprice in it.
Let me describe the same.
Suppose the PO creation date is 04.07.2007
The conditions for an item in a contract for the PO are as follows;
1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
We need to always fetch the net price from the validity period which always matches with the PO creation date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
But the program is fetching the netprice 200.000 which belongs to the second validity period. That is because the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.The fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrieves the net price of current data in contract validity and not with respect to PO creation date.
This data is then used to fetch the get the netpr data from EKPO.
what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date..
Now I have the internal table which is having data retrieved from Ekko and EKPO table.
Now how do I retrive the correct price by using the condition tables KONV and KONP.
Can you pls give the code snippet..
Thanks in advance.Hi,
Please get the valid condition ( based on date ) from A016 (MK & LPA). With the appropriate KNUMH read the Condition header. You can access the different condition items viz., PB00, RA00 etc., for the values from table KONP. Further if you have Value scales / Quantity scales, you can read the data from KONM, KONW.
An additional tips: in KONP, if you have a condition like RA00 - Rebate, the value will be multiplied by 10 and saven in database to accomodate the discount to the third decimal.
I could not completely understand your requirements like nature of development ( Is it a Report / SAP Script ??) you are working etc., so that I could help you precisely.
Hope this helps,
Best Regards, Murugesh AS
Message was edited by:
Murugesh Arcot -
How to acheive this scnerio in PL/SQl using collections
Hi All,
In my apllication we are handling two types of procedures which runs based on the jobs.
Due to some problem few records where got missed in prouduction.
We have tried to run this jobs manaually one by one and it is taking time to execute..
I have got a suggetsion from my senior to do in a collection and run this packages at a time..
Here is my exact scenerio, can you please help me out to implemnet in collections..
Steps:
Populate the missing records namely ordered, event sequence, Start date, end date, region in to plsql table/collection. ( Hard-coded since this will run the code
for a date which will take less time and take less record).
looping the plsqltable/collection for missing records
Running the procedure p_Daily with startdate and end date parameter
-- if the above executed successfully we need to execute second procedure i.e p_Region procedure by checking records in f_daily_report exist/relevant table
(Id and sequence).
Running the procedure p_region with start date and region id ( checking whether id and sequece is exist f_daily_report table).
end loop
The above steps which i have explained needs to achievd thru collections, can anybody helps me out on this.
Note:
1. All the missing jobs wil fal under differnt date rane groups.
2. For second job i.e p_region i have mentioned that it will run based on start date and region id..This job will run on three differnt region id's..We can find the
region id based on by joining f_region and d_region table. It seems that these misisng records belongs to all three regions
Hope u all understand my scenrio. can you please help me out..
Thanks in advance,
Anoo..Anoo wrote:
Hi,
Hope you have not clear my question..The reason is i want to know how we can achieve my problem in collection
rather than select statement.. Even though if we can get in simple statement is not advisible in my case..That is the reason why i was looking collections...
Rather than providing data is it possible to how we can proceed in collections.That's like saying you want to write poor code that performs slowly rather than fast and performant code.
Without clear explanations and examples of data and output, there doesn't appear to be a valid reason for using collections. The reason you're not getting many responses on your thread is because you're not explaining clearly what is required with examples. Please read {message:id=9360002} for an idea of what people need from you in order to help you. -
Backend system used to fetch sources of supply in classic scenario?
Dear Experts,
In sourcing for shopping cart in classic scenaro, the proposing sources of supply fetches possibles sources like contract, info record from local system as well as backend systems. If there are number of backend systems, which system is used to fetch the probable contracts and info-record as source of supply?
Is it the source system for the product category used in the shopping cart? or is there any settings defined in the org structres of the user attributes?
Thanks and regards,
RanjanYou could try to set a Breakpoint at FM BBP_PDC_SRC_DETERMINE or inside META_sOS_determine.
as KGP said you will get inforecord and contract are valid source of supply
We call the backend system in the plugin function B46B_SOURCEDETER_GETSOS_MULTI at the line:
Get sources of supply from backend system for all items
CALL FUNCTION 'BBP_SOURCEDETER_GETSOS_MULTI'
DESTINATION lv_destination
EXPORTING
iv_find_contract = iv_find_contract
iv_find_inforecord = iv_find_inforecord
iv_read_price = iv_read_price
TABLES
it_search_criteria = lt_sos_find_be
et_found_contracts = lt_found_contracts
et_found_inforecords = lt_found_inforecords
et_return = ct_return
EXCEPTIONS
communication_failure = 1 MESSAGE lv_msg_text
system_failure = 2 MESSAGE lv_msg_text
OTHERS = 3.
Muthu -
SAP tables used to fetch role names into 'Lookup.SAP.UM.Roles'
SAP User Management Lookup Recon schedule task is used to populate all the Lookup's defined in 'Lookup.SAP.CUA.LookupMappings'. In case of the lookup 'Lookup.SAP.UM.Roles', the description of the SAP Role is populated in Decode value.
In our environment, the SAP role description is changed in the table 'USRSYSACTT' for both LANGU types 'E' and 'D'. However, when we run the schedule job, we are unable to see the updated value of description in the lookup 'Lookup.SAP.UM.Roles'. Please let us know which SAP table is actually being used to fetch the role information in OIM.Dear Satish,
Do you have any red alerts on top of your change request?
If yes, you cannot change the status of this change request.
Do a double click on the alert flag and clear/maintain any alerts first.
I had just the same problem.
Yours
Markus -
HI EXPERTS
i want to implement the below procedure using pl/sql collections can any one suggest for the followinG
create or replace procedure test_proc
is
cursor c1 is select * from temp;
cursor c1 is select * from MONITORING;
i temp%rowtype;
j MONITORING%type;
begin
open c1
loop
if (I.RES_CODE = '02' and i.CUST_ACCNO = j.CUST_ACCNO and i.CUST_MMID = j.CUST_MMID and i.CUST_MOBNO = j.CUST_MOBNO) then
Insert into APP
(CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'03'
FROM temp I
WHERE EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
AND I.RES_CODE = '02';
elsif (I.RES_CODE = '02' and (i.CUST_ACCNO != j.CUST_ACCNO or i.CUST_MMID != j.CUST_MMID or i.CUST_MOBNO != j.CUST_MOBNO)) then
Insert into APP
(CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'04'
FROM temp I
WHERE NOT EXISTS (SELECT NULL FROM MONITORING M WHERE M.CUST_ACCNO = I.CUST_ACCNO AND M.CUST_MOBNO = I.CUST_MOBNO AND M.CUST_MMID = I.CUST_MMID)
AND I.RES_CODE = '02';
elsif I.RES_CODE != '02' then
Insert into APP
(CUST_ACCNO,CUST_MOBNO,CUST_MMID,REMARKS,RES_CODE)
SELECT I.CUST_ACCNO,I.CUST_MOBNO,I.CUST_MMID,i.RES_CODE,'02'
FROM temp I
WHERE I.RES_CODE != '02';
exit whenc1
end loop;
close c1;
end;
/Didn't you have a discussion just yesterday about Re: Collections:?
As was discussed in your previous thread, if the goal is to improve efficiency, it would be more efficient to get rid of the cursors and to just issue SQL statements to insert all the rows at once. Using collections may be an improvement over slow row-by-row processing but set-based processing will be even more efficient.
In yesterdays thread, multiple people showed you how to use collections. Is there some specific problem/ question that you have? Presumably, the goal of you posting here is to learn how to use collections on your own, not to post all of your procedures one at a time and ask others to rewrite them using collections.
The code you posted can't possibly compile. For example, you have two different declarations of the c1 cursor that query two completely different tables. There is an "exit whenc1" call that doesn't appear to match to any loop. Your code is also rather hard to follow since it is not formatted. If you put the tag \ (6 characteers all lower case) immediately before and after a code snippet, the forum will maintain all the spacing. That makes the code much, much easier to read.
Justin -
Extractor class to fetch the data from PA0105
Hi All,
Can anyone suggest me the extractor class used to fetch the data from the table PA0105.
Any information regarding this will be highly helpful.If you give PA0105 all data will be extracted.
Or if you need any specific data you need to know the filed names first. check the table from SE16 for identifying the field names. and do it accordingly.
Please reward points
Regards
Venu -
Hi
i'm still quite the novice on APEX so bare with me.
my problem is as follows:
I have to develop a page for mass registration of sales, in APEX, and the client would like a tabular form with 20 empty rows in which the client can insert sales data.
i'm developing on apex version 3.0.0.00.20 on a 10g Enterprise Edition Release 10.1.0.5.0 database.
i've tried using collections for the job, but my problem is that i can't get the code to save any changes to the collection??
i've created a on load before header process
that creates a collection named SALGSBUFREG using apex_collection.create_collection_from_query where no rows are returned.
the table i query is the table that the sales data eventually is inserted into.
/** on-load before header process start */
declare
c_coll_name constant varchar2(100) := 'SALGSBUFREG';
c_number_of_rows constant number := 20;
begin
if apex_collection.collection_exists(p_collection_name=>c_coll_name) then
apex_collection.delete_collection(p_collection_name=>c_coll_name);
end if;
apex_collection.create_collection_from_query(
p_collection_name=>c_coll_name,
p_query=>'SELECT varenummer,
antal,
aip_omsaetning,
apotekskode ,
salgsdato,
salgsperiode,
dlibruger_id,
salgsbatch_id,
sygehuskode,
afvist,
indsat,
updateret,
registreringsdato
FROM salgsbuffere
WHERE 1 = 2');
/** create c_number_of_rows empty rows*/
for i in 1 .. c_number_of_rows
loop
apex_collection.add_member (p_collection_name => c_coll_name,
p_c001 => ' ',
p_c002 => ' ',
p_c003 => ' ',
p_c004 => ' ',
p_c005 => null,
p_c006 => ' ',
p_c007 => ' ',
p_c008 => ' ',
p_c009 => ' ',
p_c010 => ' ',
p_c011 => ' ',
p_c012 => ' ',
p_c013 => null
end loop;
end;
/** on-load before header process stop */
i've created a report region called salgs_buf based on the following query:
select c001, c002, c003, c004, c005, c006, c007, c008,c009,c010,c011, c012,c013
from apex_collections
where collection_name = 'SALGSBUFREG'
i've made the report attributes c001 - c005 editable.
finally i've made a on submit - after computations and validations process with the following content:
declare
c pls_integer := 0;
c_coll_name constant varchar2(100) := 'SALGSREGBUF';
begin
for c1 in (
select seq_id from apex_collections
where collection_name = c_coll_name
order by seq_id) loop
c := c+1;
apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
p_seq=> c1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f01(c));
apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f02(c));
apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f03(c));
apex_collection.update_member_attribute (p_collection_name=> c_coll_name,
p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f04(c));
end loop;
end;
For some reason the collection dosen't get updated????
any idears why, or am I using the wrong apporach.first off thanks for your help.
I seem to have cracked the nut so to speak, i'm just posting my solution
I've changed the process so that exisisting collections aren't deleted.
/** before header process start**/
DECLARE
c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
c_number_of_rows CONSTANT NUMBER := 20;
v_row_count_diff NUMBER;
v_row_count NUMBER;
BEGIN
IF NOT apex_collection.collection_exists (c_coll_name)
THEN
apex_collection.create_collection_from_query
(p_collection_name => c_coll_name,
p_query => 'SELECT varenummer,
antal,
aip_omsaetning,
apotekskode,
salgsdato,
salgsperiode,
dlibruger_id,
salgsbatch_id,
sygehuskode,
afvist,
indsat,
updateret,
registreringsdato
FROM salgsbuffere
WHERE 1 = 2'
-- create c_number_of_rows empty rows
FOR i IN 1 .. c_number_of_rows
LOOP
apex_collection.add_member (p_collection_name => c_coll_name,
p_c001 => ' ',
/** vare nr*/
p_c002 => ' ',
/** antal */
p_c003 => ' ',
/** aip_omsaetning*/
p_c004 => ' ',
/** apotekskode */
p_c005 => NULL,
/** salgsdato*/
p_c006 => ' ',
/** salgsperiode */
p_c007 => ' ',
/** dlibruger_id*/
p_c008 => ' ',
/** salgsbatch_id*/
p_c009 => ' ',
/** sygehuskode*/
p_c010 => ' ',
/** afvist*/
p_c011 => ' ',
/** indsat*/
p_c012 => ' ',
/** updateret*/
p_c013 => NULL
/** registrerings dato*/
END LOOP;
-- the empty collection is set to unchanged
apex_collection.reset_collection_changed (c_coll_name);
END IF;
END;
/** before header process stop**/
i've made a on submit and before computation process that populates the collection with the values that i input in the updatable rport region on my page, and it works just fine:
/** on submit and before computation start**/
/* Formatted on 2008/06/11 09:37 (Formatter Plus v4.8.8) */
DECLARE
c_coll_name CONSTANT VARCHAR2 (100) := 'SALGSBUFREG';
c_row_count CONSTANT NUMBER := 20;
v_member_count NUMBER;
BEGIN
IF apex_collection.collection_exists (c_coll_name)
THEN
FOR i IN 1 .. apex_collection.collection_member_count (c_coll_name)
LOOP
apex_collection.update_member_attribute
(p_collection_name => c_coll_name,
p_seq => i,
p_attr_number => 1,
p_attr_value => apex_application.g_f01
(i)
apex_collection.update_member_attribute
(p_collection_name => c_coll_name,
p_seq => i,
p_attr_number => 2,
p_attr_value => apex_application.g_f02
(i)
apex_collection.update_member_attribute
(p_collection_name => c_coll_name,
p_seq => i,
p_attr_number => 3,
p_attr_value => apex_application.g_f03
(i)
apex_collection.update_member_attribute
(p_collection_name => c_coll_name,
p_seq => i,
p_attr_number => 4,
p_attr_value => apex_application.g_f04
(i)
apex_collection.update_member_attribute
(p_collection_name => c_coll_name,
p_seq => i,
p_attr_number => 5,
p_attr_value => apex_application.g_f05
(i)
END LOOP;
END IF;
END;
/** on submit and before computation start**/ -
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
vijayHI
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 -
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 -
Hi, I m using an iPhone 4 and my yahoo push email was working just fine but for the last few days I am experiencing some problem that is the emails are not getting pushed , I have to manually fetch the mails. So what could be the reason for this.....I have set the email setting to "push" mode. Moreover I can't edit the mail server address ....current it's on Yahoo SMTP server
Will it get rectified and restored...if so after how long. What could be the reason for such outage kindly share, as I am facing real problem because of this...
-
Hello guys..does anybody know how to install and use adobe master collection with the new lion?
I need to use Flash and illustratore, but apparently those programmes are incompatible with the new operative sistem...
I am a new mac users and I'd like to know if there are other similar programmes I can use with lion!Lab79 wrote:
Are you on Apple's payroll?
well dude I can only let you know that as I work with those programme I don't have to pay for it is my company that pays the programme I whant to use( that's why I was asking if there where other programmes ..that I could use with lion insted that Illustrator and Flash!)..I know Adobe since 2005 and I can say that Adobs products are very good...I think that if it's an Adobe probleme or fault ..they will solve it very soon...but unfortunally I have the impression that after Jobs passed away Appel decided to change politics..and everything started to go very bad! (see FCP X)..
good luck with apple dude..
Where is the Apple problem? I have CS4 and CS5 running perfectly fine on my Macbook Pro. Installed 5 after Lion upgrade. Worth every cent. Adobe did have some catching up to do with Lion but with the CS5.5 update all runs fine. But not yours. So it is a problem with the Lion OS? You say you have been with Adobe since 2005. So you would be aware of all the other issues that Adobe had catching up with past Oss in Mac and Windows then. They get it right, but it is up to them. It is not up to Apple, nor Microsoft for that matter, to run around and check that every software developer in the world is running their business properly.
And what has politics got to do with anything. Some people just have to blame Software for their poor Hardware maintainence of failure of the same.
<The only think I can really do is to go back on my old windows...give back this orrible lap top and ask for my money back!>
Great suggestion. You should go with that one, but good luck getting a refund.
Bye -
CFolder : How to fetch the additional fields enhanced using XML ?
Hi Champions,
We have enhanced the cFolders document create screen with 2 additional fields. this we could achieve through adding new fields in the Generic object XML file. And placing the same in the Web Dav Folders.
Now we need to fetch the data which are getting updated for each document against this new field.
We are not able to trace in BSP page , whether this gets saved against any table , or structure or some other mechanism the data are fetched.
We need some pointers to fetch this data so that we can use it for upgating, classification data of DMS, and additional content to the notification sent via cFolders when the status is changed etc..
Thanks for your inputs in advance,,,
Best regards,
shashikumar bsHi all,
We have got the answer.
pl refer thesame question in SAP Solutions - cFolders segment for the answer.
best regards,
Shashi
Maybe you are looking for
-
I noticed that when I delete music or a movie from my macbook pro's itunes, the minute I connect the iphone or ipad, it automaticly removes the song from the devices. I am new to Mac so I am not sure how to prevent this from occuring. I know that whe
-
Equium A200 Vista to Windows 7 upgrade
Trying to find out if it's OK to upgrade Equium A200 with Vista to Windows 7 I ran the "Windows 7 Upgrade Advisor". It lists several Toshiba Apps and/or drivers with the comment "we don't have any compatibility information about this version of the p
-
Hi, Our Company still using Hyperion Business Rules 3.5 and for an acquisition process they need to separate the Essbase and HBR instances in separate servers. That is already done. The process to export and import all the Business Rules was using th
-
Displaying image in JPanel and scroll it through JScrollpanel
Can any one will help me, I need to draw a image in a JPanel and, this JPanel is attached with a Jscrollpanel. I need to scroll the this JPanel to view the image.
-
ITunes says file cannot be found on any music i try to play
itunes says file cannot be found on any music i try to play. Is there a fix for that?