Need help how to change LOV query

Hi All,
Can some one help me how to use the LOV Query based on responsibility (I am using form personalization)
When the user logs in with XX_Payables Super user with say (Responsibility id =500) then the LOV should be
Select BA.bank_account_name,
BA.bank_account_num,
BA.bank_Account_id,
BA.currency_code bank_currency_code,
from CE_BANK_ACCOUNTS ba
but if the user logs in with any other responsibilits then the lov should be
Select BA.bank_account_name,
BA.bank_account_num,
BA.bank_Account_id,
BA.currency_code bank_currency_code,
from CE_BANK_ACCOUNTS ba
where BA.multi_currency_allowed_flag = 'Y'
step 1
I have created a built in builtin type : Create Record group from query
Arugument : Select statement
Group name : XX_Group
step 2
Property
Object type : LOV
target object : PAY_ACTIVE_BANK_ACCOUNTS
property name : Group name
value XX_GROUP
Using this method i am able to select only one query
How can i control this based on responsibility.
Appreciate if some one can help me to resolve this issue.
Regards,
Rajini

Thanks for your reply, I tried to use this query but i am getting error as FRM-41076 Error populating group and FRM-41072 Cannot create group
but if i use any one of the query or either of the query it works fine. but i dont see any issues when i run only any one of the query in argument in form personalization. Union all is returing rows in database.
SELECT BA.bank_account_name,
BA.bank_account_num,
BA.bank_Account_id,
BA.currency_code bank_currency_code,
CBAU.bank_acct_use_id ,
BA.multi_currency_allowed_flag bank_multi_currency_flag,
BA.zero_amount_allowed bank_zero_amounts_allowed,
BA.account_owner_org_id legal_entity_id,
CBB.bank_name,
CBB.bank_branch_name
FROM
CE_BANK_ACCOUNTS BA,
CE_BANK_BRANCHES_V CBB,
CE_BANK_ACCT_USES_OU_V CBAU
WHERE ((BA.multi_currency_allowed_flag = 'Y' AND
(BA.currency_code = :pay_sum_folder.functional_currency_code or
BA.currency_code = :parameter.pay_in_full_currency_code )) or
BA.currency_code = nvl( :parameter.pay_in_full_currency_code, BA.currency_code))
AND CBAU.BANK_ACCOUNT_ID = BA.BANK_ACCOUNT_ID
AND sysdate between TRUNC(CBB.start_date) and nvl(TRUNC(CBB.end_date), sysdate + 1)
AND CBB.branch_party_id = BA.bank_branch_id
AND SYSDATE < NVL(BA.END_DATE,SYSDATE+1)
AND BA.ACCOUNT_CLASSIFICATION = 'INTERNAL'
AND CBAU.ap_use_enable_flag = 'Y'
AND CBAU.org_id = :pay_sum_folder.org_id
AND NVL(BA.netting_acct_flag, 'N') <> 'Y'
AND fnd_global.resp_name = 'XX PAYABLES SUPER USER'
AND CBB.bank_name_alt = 'Head office bank'
UNION ALL
SELECT BA.bank_account_name,
BA.bank_account_num,
BA.bank_Account_id,
BA.currency_code bank_currency_code,
CBAU.bank_acct_use_id ,
BA.multi_currency_allowed_flag bank_multi_currency_flag,
BA.zero_amount_allowed bank_zero_amounts_allowed,
BA.account_owner_org_id legal_entity_id,
CBB.bank_name,
CBB.bank_branch_name
FROM
CE_BANK_ACCOUNTS BA,
CE_BANK_BRANCHES_V CBB,
CE_BANK_ACCT_USES_OU_V CBAU
WHERE ((BA.multi_currency_allowed_flag = 'Y' AND
(BA.currency_code = :pay_sum_folder.functional_currency_code or
BA.currency_code = :parameter.pay_in_full_currency_code )) or
BA.currency_code = nvl( :parameter.pay_in_full_currency_code, BA.currency_code))
AND CBAU.BANK_ACCOUNT_ID = BA.BANK_ACCOUNT_ID
AND sysdate between TRUNC(CBB.start_date) and nvl(TRUNC(CBB.end_date), sysdate + 1)
AND CBB.branch_party_id = BA.bank_branch_id
AND SYSDATE < NVL(BA.END_DATE,SYSDATE+1)
AND BA.ACCOUNT_CLASSIFICATION = 'INTERNAL'
AND CBAU.ap_use_enable_flag = 'Y'
AND CBAU.org_id = :pay_sum_folder.org_id
AND NVL(BA.netting_acct_flag, 'N') <> 'Y'
AND fnd_global.resp_name != 'XX PAYABLES SUPER USER'

Similar Messages

  • Need Help -- How to Change the icon of a selected Tree Node

    Hi java gurus,
    i am working on Jtree application, and i am adding image icons to the Nodes.
    my dought is when i select a node, i want to display that selected node as opened and all other icons should remain closed.
    Example:
    -- root
    |
    ----child
    ----child1
    ----child2
    |
    ----SubChild
    ----SubChild1
    ----subchild2
    Here if i am selecting Child2 means, only the image icon of that child2 should open the nodes and display the icon , all other icons from root to subchild should remain same as closed.
    please some one suggest how i can do it,
    Thanks in advance,
    Cheers,
    Murali

    Stop crossposting!
    http://forum.java.sun.com/thread.jspa?threadID=787916&messageID=4476842#4476842

  • Need help On Triggers/Change pointers in SAP

    Hi Experts,
    I Need help On Triggers/Change pointers in SAP.
    I have a requirement  as soon as an entry is created in one of the  Standard SAP  table it should check against my Ztable and update and create the corresponding entry in another Ztable.
    Can some one help me out on this with the syntax and how to do it

    Hi,
    Check whether you have any enhancement option (BADI, user exit, Customer enhancement etc) in the program which is used to save the data in the SAP standard table. If so, then try to write your code in that appropriate enhancement.

  • How to change the query ?

    Gurus,
    Please clarify this
    Select ils.item,(nvl(sum(decode(tdh.loc_type,'S',decode(tdh.tran_code, 1,tdh.units,0),
    'W',decode(tdh.tran_code,30,0,31,0,32, tdh.units,33, tdh.units,37,0,38, tdh.units,20,0,1,0))),0))"result"
    from tran_data_history tdh, item_loc_soh ils
    where tdh.item = ils.item
    and ils.item in('100002513','100002484')
    and trunc(tdh.TRAN_DATE)
    between (*select first_date from (select item,min(trunc(first_received)) first_date From Item_loc_soh*
    where item in('100002513','100002484') and first_received is not null
    group by item ))
    and trunc(sysdate)
    group by ils.item
    Problem with this query is, the block mentioned in BOLD is returning two rows, and I am writing between and clause .. since the query in bold is returning more than one row, it is throwing error stating that single query returns more than one row .. Requirement is, whatever date which is returned with value 100002513 should be compared with sysdate, and other value 100002484 should be compared with sysdate .. Irrespective of number of items (whether 1 or more than 1) should simultaneously be compared with sysdate
    How to change my query
    Regards

    Inner query
    Select First_Date From (Select Item, Min(Trunc(First_Received)) First_Date
                                        From Item_Loc_Soh *
                                        Where Item In ('100002513', '100002484')
                                        And First_Received Is Not Null
                                        Group By Item)
    this will return 2 rows for each of the item id 2513 and 2484 because you write query for this 2 rows
    and select min date
    which means
    item id 2513  min date
    item id 2482  min date
    if you want to compare just a date to sysdate then do it directly,
    Select Ils.Item,
           (Nvl(Sum(Decode(Tdh.Loc_Type,
                           'S',
                           Decode(Tdh.Tran_Code, 1, Tdh.Units, 0),
                           'W',
                           Decode(Tdh.Tran_Code,
                                  30,
                                  0,
                                  31,
                                  0,
                                  32,
                                  Tdh.Units,
                                  33,
                                  Tdh.Units,
                                  37,
                                  0,
                                  38,
                                  Tdh.Units,
                                  20,
                                  0,
                                  1,
                                  0))),
                0)) "result"
      From Tran_Data_History Tdh, Item_Loc_Soh Ils
    Where Tdh.Item = Ils.Item
       And Ils.Item In ('100002513', '100002484')
       And Trunc(First_Received)  = Sysdate;
    however i dont understand importance of Tdh.Tran_Date and which date you exactly want to compare
    hope this helps,
    if not plz clarify more on the questionsEdited by: Nicloei W on Sep 24, 2008 11:51 PM

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Thanks

    Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Here's the example:
    WING
    GAMES
    MAJORITY
    Thanks

    If the third link you posted (the link containing the word "majority") does not look like the following then you inadvertently installed adware.
    That particular page should resemble the following:
    The word "majority" in the third paragraph should not be a link and should not have the green icon associated with it.
    To learn how this may have occurred, and how to prevent it from occurring in the future, read How to install adware
    Most so-called "news" websites are nothing more than entertainment outlets that cater to prurient interests, and contain advertisements that leave the user about three clicks away from installing junk. If you decide to frequent those websites, Safari's "Reader" feature helps minimize that exposure.
    Try it:

  • Mail server not responding. Need help how to verify my account

    Mail server not responding. Need help how to verify my account

    There are instructions on this page for how to create a new account without giving credit card details (the instructions won't work with existing accounts) : http://support.apple.com/kb/HT2534
    Unless an account is created via those instructions then credit card details will need to be entered on it before the account can be used.

  • How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    Try asking at ifixit.com. The iPhone is not considered user servicable. You're not going to get much help on an Apple sponsored forum.

  • My calender is in unknown language pls help how to change back to normal language?

    my calender is in unknown language pls help how to change back to normal language?

    I do not know this tool can you be specific, just curious.
    T the Op the easiest way of reseting your preferences is the hold the command option shift keys down as Illustrator launches you have to click on the Illustrator icon and quickly hold these keys down.
    Oh yes on the PCit is control alt shift.

  • I Need help. I Change My Number and now imessage don t work.

    I Need help. I Change My Number and now imessage don t work.

    Hi Ivonka88,
    Here are some steps to try troubleshooting your issue with, depending on your specific symptoms:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Cheers!
    - Ari

  • Need help how to use itunes card to download music

    Need help how to use itunes card to download music

    If you want to add the iTunes card to your account, then in the iTunes app on the iPad you should be able to scroll to the bottom of the Music tab and there should be a Redeem button - there is more info here : http://support.apple.com/kb/HT1574

  • I have I pad one use iOS 5.1.1 i want update to iOS 8 itry a lot time but no possible  i need  help how ican doit

    I have I pad one use iOS 5.1.1 i want update to iOS 8 itry a lot time but no possible  i need  help how ican doit.

    The iPad 1 can not be upgraded beyond 5.1.1.

  • I need help, How could I add Aliases to Local Administrator account via terminal commands???

    I need help, How could I add Aliases to Local Administrator account via terminal commands???
    I want to use commands to add alias for existing administrator account remotly by using ARD.
    Thanks.

    Hi,
    a Windows Domain Controller does not have any local user or groups. So you might add the user to the admin group at Domain level.
    B RGDS,
    Gregor
    Edited by: Gregor Gasper on Jan 9, 2009 1:44 PM

  • HOW TO CHANGE SQL QUERY TO GET SPECIFIC RESULT

    I HAVE FOLLOWING QUERY AND ITS FUNCTIONING BUT I WANT ALL THOSE RECORD SHOULD BE DISPLADE WICH HAVE NO TRANSACTION IN SALES ANS SALES RETURN WHILE RETREVING DATA FROM DATABASE.
    I TRIED TO USE + OPERATOR BUT I DON'T KNOW HOW TO CHANGE THE QUERY TO GET THE RESULT
    MAIN TABLE IS BEING USED TO FETCH RECORD
    SALES_HEADER,SALES_DETAIL
    SALES_HEADERR,SALES_DETAILR
    STOCK_REG
    AND THE QUERY IS
    select s.item_code,S.DESCR,s.GRAND_TOTAL,
    sum(decode(d.dayno,01,NVL(S.QTY,0),0)) DAY1,
    sum(decode(d.dayno,02,NVL(S.QTY,0),0)) DAY2,
    sum(decode(d.dayno,03,NVL(S.QTY,0),0)) DAY3,
    sum(decode(d.dayno,04,NVL(S.QTY,0),0)) DAY4,
    sum(decode(d.dayno,05,NVL(S.QTY,0),0)) DAY5,
    sum(decode(d.dayno,06,NVL(S.QTY,0),0)) DAY6,
    sum(decode(d.dayno,07,NVL(S.QTY,0),0)) DAY7,
    sum(decode(d.dayno,08,NVL(S.QTY,0),0)) DAY8,
    sum(decode(d.dayno,09,NVL(S.QTY,0),0)) DAY9,
    sum(decode(d.dayno,10,NVL(S.QTY,0),0)) DAY10,
    sum(decode(d.dayno,11,NVL(S.QTY,0),0)) DAY11,
    sum(decode(d.dayno,12,NVL(S.QTY,0),0)) DAY12,
    sum(decode(d.dayno,13,NVL(S.QTY,0),0)) DAY13,
    sum(decode(d.dayno,14,NVL(S.QTY,0),0)) DAY14,
    sum(decode(d.dayno,15,NVL(S.QTY,0),0)) DAY15,
    sum(decode(d.dayno,16,NVL(S.QTY,0),0)) DAY16,
    sum(decode(d.dayno,17,NVL(S.QTY,0),0)) DAY17,
    sum(decode(d.dayno,18,NVL(S.QTY,0),0)) DAY18,
    sum(decode(d.dayno,19,NVL(S.QTY,0),0)) DAY19,
    sum(decode(d.dayno,20,NVL(S.QTY,0),0)) DAY20,
    sum(decode(d.dayno,21,NVL(S.QTY,0),0)) DAY21,
    sum(decode(d.dayno,22,NVL(S.QTY,0),0)) DAY22,
    sum(decode(d.dayno,23,NVL(S.QTY,0),0)) DAY23,
    sum(decode(d.dayno,24,NVL(S.QTY,0),0)) DAY24,
    sum(decode(d.dayno,25,NVL(S.QTY,0),0)) DAY25,
    sum(decode(d.dayno,26,NVL(S.QTY,0),0)) DAY26,
    sum(decode(d.dayno,27,NVL(S.QTY,0),0)) DAY27,
    sum(decode(d.dayno,28,NVL(S.QTY,0),0)) DAY28,
    sum(decode(d.dayno,29,NVL(S.QTY,0),0)) DAY29,
    sum(decode(d.dayno,30,NVL(S.QTY,0),0)) DAY30,
    sum(decode(d.dayno,31,NVL(S.QTY,0),0)) DAY31,
    sum(S.qty) TU
    FROM
    (select nvl(sales_detail.qty+sales_detail.bonus,0) as qty,
    sales_detail.item_code AS ITEM_CODE,
    stock_reg.descr AS descr,
    s_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
    SALES_DETAIL,SALES_HEADER,STOCK_REG
    WHERE SALES_DETAIL.S_ID = SALES_HEADER.S_ID AND
    SALES_DETAIL.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
    STOCK_REG.COMCODE='C1'
    UNION all
    select -1*nvl(sales_detailR.qty+sales_detailR.bonus,0) as qty,
    sales_detailR.item_code AS ITEM_CODE,
    stock_reg.descr AS descr,
    RETURN_date as sale_date,stock_reg.GRAND_TOTAL AS GRAND_TOTAL FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.ITEM_CODE = STOCK_REG.ITEM_CODE(+) AND
    STOCK_REG.COMCODE='C1') S,
    (select level as dayno
    from dual
    connect by level <= 31) d
    where d.dayno = to_char(s.sALE_date, 'DD') AND TO_DATE(S.SALE_DATE) BETWEEN '&FROMDATE' AND '&TODATE'
    GROUP BY S.ITEM_CODE,S.DESCR,S.GRAND_TOTAL

    well my query running successfully just the quesion was that i wanted to bring some changes in the query to retrieve the complete record which has no transaction in sales
    for exmple
    if i write the quey
    select dept.deptno,sum(sal) from emp,dept
    where dept.deptno = emp.deptno
    group by dept.deptno
    the recult comes as
    DEPTNO SUM(SAL)
    10 8750
    20 10875
    30 9400
    though there is another deptno which is deptno no 40
    have no sal
    and when i use this query
    select dept.deptno,sum(sal) from emp,dept
    where dept.deptno = emp.deptno(+)
    group by dept.deptno
    it shows the dept no 40 also
    DEPTNO SUM(SAL)
    10 8750
    20 10875
    30 9400
    40
    so to get this i posted query which was to long to understand easily.
    i accept that i sholud post short query to make other understand
    so check out this
    select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
    FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE = STOCK_REG.STOCKCODE
    AND RETURN_DATE = '01-APR-08'
    GROUP BY STOCK_rEG.item_code
    ORDER BY TO_NUMBER(ITEM_CODE) ASC
    when i execute this query i get the following result
    ITEM_CODE QTY
    84 2
    102 3
    108 3
    116 6
    166 3
    170 3
    thoug there is other items are aalso available in stock which transaction
    yet not been done or not been sold out/
    so when i use the outer join i get the same result
    select STOCK_rEG.item_code AS ITEM_CODE,SUM(qty) as qty
    FROM
    SALES_DETAILR,SALES_HEADERR,STOCK_REG
    WHERE SALES_DETAILR.SR_ID = SALES_HEADERR.SR_ID AND
    SALES_DETAILR.STOCKCODE(+) = STOCK_REG.STOCKCODE
    AND RETURN_DATE = '01-APR-08'
    GROUP BY STOCK_rEG.item_code
    ORDER BY TO_NUMBER(ITEM_CODE) ASC
    ITEM_CODE QTY
    84 2
    102 3
    108 3
    116 6
    166 3
    170 3
    hope i tried to make u understand on better way

  • Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    The Mac OS X and iOS versions are separate products

Maybe you are looking for