When validate item for a particular item number

hi all
i am using forms 6i
In a master detail form
the block XXNP_JL_OO1 has 2 fields like
Manual--checkbox item
Field--text item (populated from Lov RECORD group names Field)
the query for the record group of FIELD is
select flex_value from fnd_flex_values where flex_value_set_id=1009757
flex value
abdaly
wafra
fintas
now if we do the query select flex_value, hierarchy_level from fnd_flex_values where flex_value_set_id=1009757
flex_value hierarchy_level
abdaly 315
wafra 200
fintas 100
In the detail part
there is a tabbed canvas one field is ACT_QTY
ITEM NUMBER                   ACTQTY
client requirement is whenever the item number is 1010103002 only and the manual checkbox item is ticked the act_qty should return values corresponding to the data in Field
manual and field belongs to datablock XXNP_JL_001
ITEM_NUMBER AND ACT_QTY belongs to data block xxnp_jl_est_002
kindly guide how to proceed with this
should i do a when validate item trigger in act_qty as follow
BEGIN
    IF :XXNP_JL_001.Manual IS NOT NULL  and XXNP_JL_EST_002.ITEM_NUMBER='1010103002' THEN
        SELECT hierarchy_level
        INTO :XXNP_JL_EST_002.ACT_QTY
        FROM fnd_flex_values
        WHERE flex_value_set_id = 1009757
        AND FLEX_VALUE=:XXNP_JL_001.FIELD ;
    ELSE
         :XXNP_JL_EST_002.ACT_QTY:=NULL;
    END IF;
ENDthanking in advance
Edited by: makdutakdu on May 8, 2012 11:15 AM
Edited by: makdutakdu on May 8, 2012 11:16 AM
Edited by: makdutakdu on May 8, 2012 11:23 AM
Edited by: makdutakdu on May 9, 2012 9:00 AM

hi
this is the code i wrote
when job is manual(check box ticked) and item number=''1010103002' the act_qty as per client requirement as follows
BEGIN
    IF :XXNP_JL_001.Manual IS NOT NULL  and XXNP_JL_EST_002.ITEM_NUMBER='1010103002' THEN
        SELECT hierarchy_level
        INTO :XXNP_JL_EST_002.ACT_QTY
        FROM fnd_flex_values
        WHERE flex_value_set_id = 1009757
        AND FLEX_VALUE=:XXNP_JL_001.FIELD ;
    ELSE
         :XXNP_JL_EST_002.ACT_QTY:=NULL;
    END IF;
END;the original code as to how act_qty is populated now
ORIGINAL CODE OF WHEN VALIDATE ITEM FOR ACT_QTY
Declare
     V_count   number(10) ; 
Begin
SELECT    count(1) into V_count   FROM MTL_SYSTEM_ITEMS
WHERE   SEGMENT1       = :XXNP_JL_EST_002.item_number
AND     ATTRIBUTE3     =  'Yes'  ;
If  V_count >=1    then
:XXNP_JL_EST_002.CALC_CEMENT_SK   :=      :XXNP_JL_EST_002.act_QTY   ;  
:XXNP_JL_EST_002.CALC_AMOUNT      :=          :XXNP_JL_EST_002.act_QTY * 94         ;  
Else
:XXNP_JL_EST_002.CALC_AMOUNT   :=             :XXNP_JL_EST_002.act_QTY  ;
end if ;
end ;      
-----------------------------------------------------------i want to include the above original code of act_qty in my code in the else clause
this is wht i tried
Declare
     V_count   number(10) ; 
Begin
IF :XXNP_JL_001.Manual IS NOT NULL  and :XXNP_JL_EST_002.ITEM_NUMBER='1010103002' THEN
        SELECT hierarchy_level
        INTO :XXNP_JL_EST_002.ACT_QTY
        FROM fnd_flex_values
        WHERE flex_value_set_id = 1009757
        AND FLEX_VALUE=:XXNP_JL_001.FIELD ;
        ELSE
        ----------original code of act_qty included below in the else clause-----------------------------
SELECT    count(1) into V_count   FROM MTL_SYSTEM_ITEMS
WHERE   SEGMENT1       = :XXNP_JL_EST_002.item_number
AND     ATTRIBUTE3     =  'Yes'  ;
If  V_count >=1    then
:XXNP_JL_EST_002.CALC_CEMENT_SK   :=      :XXNP_JL_EST_002.act_QTY   ;  
:XXNP_JL_EST_002.CALC_AMOUNT      :=          :XXNP_JL_EST_002.act_QTY * 94         ;  
Else
:XXNP_JL_EST_002.CALC_AMOUNT   :=             :XXNP_JL_EST_002.act_QTY  ;
end if ;
END IF;
end ;
END;i am getting error fnd_flex_values should be declared
kindly guide me
thanking in advance

Similar Messages

  • Total number of records when we do search for a particular item in Istore.

    Hi
    I need the total count of the records when we search for a particular item.
    I wrote a sql query using like condition which is match short and long description but in some cases it is failing.
    Can you guide,how to solve this issue.
    Thanks,
    Sabitha

    Sabitha,
    the mismatch could be due to the Fuzzy search profile option.
    Please check if fuzzy search has been enabled.
    Thanks
    Pradeep
    www.oracleappstips.com

  • Individual serial number for a particular Item

    Hi,
    At reciept level when we are manually assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Manual process For 10 Quantity its ok, but is taking time for 1000 Quantity.
    Pls let us know if there any process to reduce manual activity to assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Thanx,

    You can receive by range.
    Enter the starting serial number, enter the qty and then Oracle will generate 1000 serial numbers automatically.
    See http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/po/connum.htm
    Hope this answers your question,
    Sandeep Gandhi

  • How to create a sequence for an particular item in my apex form

    Hi friends,
    I created an database application, of a form with a report, and it is working fine...
    But in my form, i have a requirement....The below are the existing fields in my form
    issue no
    created by
    start date
    status
    priority
    due date
    Among these fields in my form i need to create a 'Sequence' for my field "issue no",
    So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
    For that i created a sequence
    CREATE SEQUENCE "ORDERS_SEQ"
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    INCREMENT BY 1
    START WITH 1000
    NOCACHE
    NOCYCLE;
    But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
    please tell where i need to write in step wise manner..please help me friends...
    As the below is my validated sequence query for item 'issue no'
    'select seq.issue_id.nextval into issue_no'
    This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
    And also i need where to apply this validation query in steps..
    Thanks in advance
    Regards,
    Harry...

    Harry,
    Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
    DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
    CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
       BEFORE INSERT
       ON las_log_tbl
       FOR EACH ROW
    BEGIN
       -- Description: Insert log_seq, creation_dt, creation_id,
       --              lst_updt_dt and lst_updt_id.
       -- Maintenance:
       -- Date        Actor          Action
       -- ====        =====          ======
       -- 07-Sep-2010 J. Wells       Create.
       :new.creation_id := nvl( v( 'app_user' ), user );
       :new.creation_dt := SYSDATE;
       :new.lst_updt_dt := :new.creation_dt;
       :new.lst_updt_id := :new.creation_id;
        SELECT las_log_seq.NEXTVAL
          INTO :new.las_log_seq
          FROM DUAL;
    END bins1_las_log_tbl;
    /Heff

  • Re:Query for Stock Statement for a particular item..!!!!

    Dear SAP Experts,
    I need a stock statement query  for a particular item which contains:
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    1.Warehouse code
    2.Item Name
    3.Posting Date
    Plz give me a good solution for this issue.
    With Regards,
    Revathy

    Check this
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bala

  • How to implement tooltip for the list items for the particular column in sharepoint 2013

    Hi,
    I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
    Any help will be appreciated

    We can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
    http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
    http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
    http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/

  • While Entering a Service Line Item for a Shippable Item under Order Lines.

    Hi all
    I have raised a Sales Order with Shippable Item and Non Shippable Item i.e Service Item for that Shippable Item under Sales Order Lines.
    When i click on Services Tab and enter the relevant details under Service Ref Order Number the system is defaulting the current Sales Order No. correctly but while selecting the Service Ref Line Number it errors out saying
    FRM-40212: Invalid value for field SERVICE_REF_LUNE_NUMBER.
    Please do help me on this.
    Regards
    Nakul.V

    Hi,
    You can easily list out sales order that have been assigned reason for rejection..simple extract of table VBAP-ABGRU = not blank.
    This report should list out the sales order number along with some more details, as required.
    Now the report should allow to choose the documents i.e. like giving checkboxes in the left most side and once the user chooses the sales documents he wants to get processed--> the program should call change Sales Order FM or BAPI. Execute this in background.
    Regards,
    Raghu.

  • Need list of Idocs for a particular Order Number

    Hello all,
    I am processing Outbound Purchase order Idocs.
    I need to know all the IDOC Numbers that got triggered for a particular Purchase Order.
    Example : for Purchase Order number 4500000001 there were 10 IDOCS that got created over the last 5 days.
    How do i get a list of all those IDOC numbers for that particular PO Number.
    Regards,
    Arun

    Hi,
    you have to check the objects relationship tables IDOCREL and SRRELROLES.
    Hereafter a simple abap, just an example on how the relationship works.
    REPORT  ZSDN_IDOCREL.
    data: lsrrelroles type srrelroles,
          lroleid     type srrelroles-roleid,
          lrole_b     type idocrel-role_b.
    parameters: pebeln TYPE ekko-ebeln OBLIGATORY default '4500015519'.
    * 1 SRRELROLES: From the Business Object Key (Purchase Order) gets the corresponding link
    SELECT roleid FROM  srrelroles into lroleid up TO 1 rows
           WHERE  objkey    = pebeln
           AND    objtype   = 'BUS2012'
           AND    roletype  = 'OUTBELEG'.
    ENDSELECT.
    check sy-subrc = 0.
    * 2 IDOCREL; From the Purchase Order link get the Idoc Link
    SELECT role_b  FROM  idocrel into lrole_b UP TO 1 ROWS
           WHERE  role_a  = lroleid.
    ENDSELECT.
    check sy-subrc = 0.
    * 3 SRRELROLES: From the Idoc Link gets the corresponding object key (Idoc Number)
    SELECT  * FROM  srrelroles into lsrrelroles UP TO 1 ROWS
           WHERE  roleid  = lrole_b.
    ENDSELECT.
    check sy-subrc = 0.
    write:/ 'Purchase Order:', pebeln.
    write:/ 'Outbound Idoc :', lsrrelroles-objkey.
    Regards,
    Andrea

  • F4 help in the PO date and PO Item for the corresponding PO Number

    I have a selection screen 1. PO Number(p_ebeln)(parameter) 2. PO Date(s_budat)(Select-options) 3.PO Item(s_ebelp)(Select-options).What I want is when I am providing a PO(eg.6000001) and then click on the F4 for PO date it will show me ONLY the BUDAT for the corresponding PO I have provided in the PO parameter(eg.6000001) and when I press F4 in the PO Item it will show me those PO ITEM which ONLY exist for the corresponding PO I have provided in the PO parameter(eg.6000001).

    Hi,
    If my understand your question correctly, You want to use the PO entered by user to select the date and item numbers in subsequent select-options.
    Here is what you can do to achieve this:
    1. You have to make use of AT SELECTION-SCREEN ON VALUE REQUEST for date and item numbers.
    2. Read the PO number provided by user by using FM DYNP_VALUES_READ
    3. From the PO number select date and item numbers from EKKO&EKPO.
    4.Use the FM F4IF_INT_TABLE_VALUE_REQUEST to set the values coming when user press F4
    You can refer following article also for code samples:
    Link: http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a07a330f-126c-2910-c684-d2a45f0f37dd
    let me know if this helps.
    Thanks,
    Ramesh

  • WHEN-MOUSE-CLICK for a display item does not fire on the web

    Resending as there were no responses............
    Regards,Bala.
    Bala (guest) wrote:
    : Hi guys,: 1. Does WHEN-MOUSE-CLICK fire on Display Item or on
    a Button in
    : Web Forms (not in a client/Server environment) ? We had it
    : working in Forms 5.0, but right now in 6.0 it doesnt ? In 6.0,
    : it works fine in Client/Server environment, but definitely not
    : in Web environment.
    : 2. Again, in our app. we have set no bevel for the display
    : items, but when we run it on the web, it comes with a bevel
    : (this does not happen in Client/Server). Is this common or is
    it
    : a known bug in 6.0 ?
    : 3. How to change Fonts for Web Deployment. Currently I guess
    it
    : takes Dialog as the default with the point size of 900 (in
    Java
    : terms). I tried modifying the registry.dat to the following:
    : default.fontMap.defaultFontname=SansSerif:
    default.fontMap.defaultSize=900: OR
    : default.fontMap.defaultFontname=Ms Sans Serif:
    default.fontMap.defaultSize=900
    : and found no changes at runtime on the Web.
    : Any help on these issues, will really be appreciated.
    : Thanks,
    : Bala
    null

    Dear friend
    i have the same problem when ever u can solve this probelm pls
    inform me as well mean while i am trying to reslove it as well if
    there is any sucess i ll inform u.
    mobeen
    Bala (guest) wrote:
    : Resending as there were no responses............
    : Regards,Bala.
    : Bala (guest) wrote:
    : : Hi guys,: 1. Does WHEN-MOUSE-CLICK fire on Display Item or on
    : a Button in
    : : Web Forms (not in a client/Server environment) ? We had it
    : : working in Forms 5.0, but right now in 6.0 it doesnt ? In
    6.0,
    : : it works fine in Client/Server environment, but definitely
    not
    : : in Web environment.
    : : 2. Again, in our app. we have set no bevel for the display
    : : items, but when we run it on the web, it comes with a bevel
    : : (this does not happen in Client/Server). Is this common or is
    : it
    : : a known bug in 6.0 ?
    : : 3. How to change Fonts for Web Deployment. Currently I guess
    : it
    : : takes Dialog as the default with the point size of 900 (in
    : Java
    : : terms). I tried modifying the registry.dat to the following:
    : : default.fontMap.defaultFontname=SansSerif:
    : default.fontMap.defaultSize=900: OR
    : : default.fontMap.defaultFontname=Ms Sans Serif:
    : default.fontMap.defaultSize=900
    : : and found no changes at runtime on the Web.
    : : Any help on these issues, will really be appreciated.
    : : Thanks,
    : : Bala
    null

  • How to calculate QCI when shipment confirmation for all Line Item?

    Dear All,
    I am facing problem as below.
         I created shipment having 4 compartment planning with capacity 5KL each. So I allocate and fill 5KL for each compartment. When I go to loading confirmation(O4G1) I have 4 line items for each compartment. When I calculate QCI for that shipment, I able to calculate only for 1st compartment (1st line Item). I want to calculate QCI for all (Compartments) line items or total quantity of the compartment.
    I waiting for your valuable reply.
    Regards,
    Rahul Hande

    SDN is not your code factory, please research yourself before posting, maybe ask whoever handed you this requirement?
    Thread locked.
    Thomas

  • Single line item for multiple line item payment.

    Hi
    I have booked the 3 vendor invoices (in FB60) for a single vendor. Now today i paid (with F-53) all the three invoices together. One payment document number was generated.
    However when i saw the vendor line item, i saw that three debit line items was generated for the clearing the open invoices (i..e 3 credit line items). so when i say vendor line item report, there were total 6 cleared line items (3 for credit i.e invoice and 3 for debit i.e. payments)
    But is it possible to get  single debit line item for all the three invoices cleared. If yes, please let me know how i can get it.
    If i will have one single line item for payment, vendor report would be simpler. Please help

    Hi,
    1. If you do payment through F-53, then each invoice have separate payment line item. This is not avoidable. If you do payment through F110, then you can group the line items for payment, so there only one payment line item for many number of invoices.
    2. While clearing through F-44, system is generating automatic line items because, there are exchange rate fluctuations. You can't avoid these line items, as these automatic line items only match Debit and Credit amounts in order to post the document.
    Rgds
    Murali. N

  • Single line item for multiple open items in app

    we have three open items   to vendor x  100001000010000
    But we are paying to vendor only 10000100005000
    At the time of entry system showing
    Vendor account 25000
                 To    Bank account       20000
                 To    Bank account         5000(here we paying partial amount of 3rd open item)
    But my Clint requirement is system should post only single line item for bank account 25000 for reconcilation purpose
    Would you please suggest where we need to do customization?

    Hi Anantha,
    How are you making the payment which transaction you are using ? Both Manual & Automatic payment
    the suggested solution is go for split payment terms. configure using OBB8 and OBB9
    Hope this helps
    pbb

  • Does IDoc get triggered when GR occured for a particular po

    Hi Friends,
    Say a GR occured for a particular PO,so i want to track this GR in Action Code that GR has occuredand no other details is needed except that.
    so,my question is "Does IDoc get triggered when GR has occured for a particular Purchase Order".
    If so can u explain me the process, how to track?
    Thanks in Advance,
    Meghna.

    Hi,
    If u want to know that IDOC has been triggered then u have to do ALE setting then u can know that idoc has triggered in WE02 transaction.
    Other than that if u want to know that PO has been there in GR then for Create CO01,CO02,CO03 for GR details.
    the IDOC for GR is MBGMCR.MBGMCR02.
    Regards,
    Phani
    Reward pOints if Helpful

  • Transaction for data particular plant  number from BW to APO is not loaded

    Hi gurus,
    Transaction for data for particular plant  number from BW to APO is not loaded . I checked the transfer rules and update rules there is no restrictions for this plant number. pls help guys.
    Regards
    shekar reddy

    Hi Shekhar,
    What is the mechanism you are using to export data (APD, Open Hub or any other)?
    Check if the data is getting extracted in the proper source in BI system itself.
    Regards,
    Durgesh.

Maybe you are looking for

  • Reporting Point Backflush Error

    Hi Friends, I have a specific question. I am using a material in which Batch Mangement is active. Now when I use MF42N as collective backflush, I enter following data Scene 1: Input Data in MF42N Screen Plant Posting Data & Document Date (Current Dat

  • How do i turn off the on-board graphics?

    I'm trying to install a saphire hd 7850 2gb OC edition but when i turn on my computer the fans spin once and the computer doesnt turn on ive been told i have to turn off the on-board graphics but dont know how, any help would be appreciated thanks.

  • My computer fails to install newest version of itunes.

    says "problem with installer package aprogram required cannot be run" yes i have tried re-setting and re downloading, still not working .

  • Setting up accounts on Sunbird

    I've just set up a Leopard server and am in the process of getting iCal Server to work. I'm now able to add accounts on client machines' ical - there, everything except for inviting people works. However, I don't seem to be able to set up personal (n

  • Bloquiei meu Iphone e gostaria de saber como desbloquia

    por favor preciso muito desbloquia