Validation of tabular form regarding the item master detail

Hi guys,.

I have installation master detail on my page with a layout table below.

The master record has a field called RCV_QTY.

The tabular presentation has a column called box_qty.

What I'm trying to do is to validate it against the user to add lines in the table form which when added, is more than the amount of heading RCV_QTY.

I tried the following function returns the validation text error but it's not enough work.

As the line in the custom of tabular form be seen by the following SELECT INTO statements on submit, I guess I need more of a process of dynamic action type?


DECLARE

v_hdr NUMBER;
v_line NUMBER;

BEGIN

SELECT hdr.rcv_qty
IN v_hdr
OF XXMEL_VMI_RCV_HDR_TMP hdr
WHERE the hdr. VMI_RCV_HEADER_ID =: P2_VMI_RCV_HEADER_ID;

SELECT SUM (line. BOX_QTY)
IN v_line
OF XXMEL_VMI_RCV_HDR_TMP hdr
Online XXMEL_VMI_RCV_LINE_TMP
WHERE the hdr. VMI_RCV_HEADER_ID = line. VMI_RCV_HEADER_ID
AND hdr. VMI_RCV_HEADER_ID =: P2_VMI_RCV_HEADER_ID;


IF (NVL(v_line,0) - NVL(v_hdr,0)) < 0
THEN
RETURN (' ERROR: the sum of the quantities of tag is greater than the quantity of the received header ');
ON THE OTHER
RETURNS A NULL VALUE.
END IF;

END;

Any help would be great.

I use Apex V4.0.

Hello

You must use the API APEX_APPLICATION total up to the Box_Qty of detail in Validation, and compare with the RCV_QTY. something like

DECLARE
  V_BOX_TOT NUMBER := 0;
BEGIN
  FOR I IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
     V_BOX_TOT := V_BOX_TOT + TO_NUMBER( NVL(APEX_APPLICATION.G_F01(I),'0'));
 END LOOP;
 IF V_BOX_TOT > :P1_RCV_QTY THEN
    RETURN FALSE;
 ELSE
   RETURN TRUE;
 END IF;
EXCEPTION
  .....
END;

Kind regards

Tags: Database

Similar Questions

  • creating more then a tabular form in the apex of the magician

    Hi all
    I am unable to create more then one table in a page form... don't we have another way to do... ?
    a solution may be greatly apprecieted.
    Concerning
    Vishal Roy

    Hi Vishal,

    You can have only one tabular form on a page. However, there are several threads associated with this topic, which you may find useful to consider. Some users have posted to their workarounds, so it would be interesting to search the forum for such offers. To start:

    How to have several forms of table on one page
    Multiple tabular forms with updates on the same page
    Re: why not 2 tabular forms on the same page?
    Multiple tabular forms
    2 tables form MRU/MRDing in the same table

    Kind regards
    Hilary

  • Tabular form and the value of the element

    Hello people:

    I certainly hope that your holidays are festive.

    I have a question for you.

    I have a tabular form which is filled, based on a list of selection (with the type of delivery).  I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form.  What is the best way to go about this?  Calculation?  I'm not sure how to do this...

    Thanks for your help!

    Aqua

    AquaNX4 wrote:

    I have a tabular form which is filled, based on a list of selection (with the type of delivery).  I placed a form on the same page (based on a table), and I would for a question to be filled as well following the list of selection even completing the tabular form.  What is the best way to go about this?  Calculation?  I'm not sure how to do this...

    If the selection list submits the page then you can set the value of the element using a calculation after the presents. Make sure that it will not be reset by any statement of process or branch of State later clear session.

  • tabular form - update the non-visible fields

    Hi gurus!
    I built a tabular form over a table composed of 6 fields and I use the MRU to allow the user to edit the record; Two field in that table are not visible and editable by the user; I want to use the two fields to track which change the record (both fields are Modify_USER, Modify_date).
    I want to insert in the two fields the values the user variable and the sysdate.
    Is it possible, is there a way to do this with MRU or do I have to manually write the PL/SQL for this?
    I'm on APEX 3.2
    Any suggestion will be appreciated.
    Thanks in advance,
    DDF

    Instead of doing it this way, why not watch a trigger in the database, which will fill these columns when you perform an update on the table? The user will be & user_id. and the sysdate you already...

    CREATE OR REPLACE TRIGGER Update_Table_X
    BEFORE UPDATE
    of Table_X
    ON R_RECORDS
    FOR EACH ROW
    BEGIN
    
    :new.Modify_date := sysdate;
    :new.Modify_USER := app_user;
    END;
    

    Thank you

    Tony Miller
    Webster, TX

    A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
    ' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

  • Read only the terms - master detail

    I have a page with a master detail

    I created a read only condition and the master passed to read-only, but the detail does not...

    Why? Is not possible to put the retail component 'read only '?

    Hello

    If I understand, you want to the form is editable when the user is an admin user

    and read only when the user is a normal user.

    You can solve this problem by the use of dynamic actions

    to enable and disable some elements of this region (s)

    make this condition (standard user = admin = enable and disable)

    Another solution

    When do the master / detail with the wizard choose change details on a different page

    On the link change, you can set a condition (visible only when the user is ADMIN)

    Kind regards

    Frank

  • How to disable dynamically interactive report filed in the page master detail

    I use APEX 4.0 & very new to APEX. I am not able to disable a class in area of detail (which is an interactive report) of a master detail Page.
    I want to turn off the field in a row based on the value of another field of recording, like set_item_instance_property of the oracle forms. Please help me.

    See {message identifier: = 10743324}

  • How to implement the concept master details in table advanced

    Hello

    I implement information master details in advanced table.

    I guess all the data are coming in the secondary table, but below that certain spaces more are coming and showing an image and next to this, there is a text like ""pull down to load ". "

    Can someone help me figure out why this extra space is coming this table below?

    Thank you

    Vijaya

    Is that you can set the value of the below profiles false and try?

    FND_ENABLE_RICH_TABLE_INTERACTIONS

    FND_TOUCH_GESTURES_ENABLED

    Beware that this will affect the gesture of support for touch devices

    Thank you

  • link form to the page master page field

    I have a word document that is converted to an Acrobat form. I started editing in Live Cycle and want a field in the form page to bind to a field in the master page. I created the field to work on the page of the form. However, as soon as I cut and paste the field (calculated) in the master, I get "Script failed (language is form Calc..)" and "accessor TextField1.rawValue is unknown" errors. Is there a reason and the fix for this problem?

    Thanks for your help Srini. I found that the two fields of naming the same and using the global option of the working field

  • Validation in tabular form

    Hello

    I have a form with 2 columns. both are necessary. I did a page validation to check the table of apex_application.g_f03/f04 to see whether or not the two columns are empty. But when I add a line and submit to the new entry is not in the table of apex_application.g_f03/f04? So, I get an ORA-1400 because the fields are "not null" in the database. I read on the apexlib but I would like to know if there is another way to validate fields in my table form. Any suggestions?

    Simon.

    Yes, I put a page element (e.g. ': p2_error') to a value (for example, 'Y') in my validation routine and then use that to conditionally run the SRM process. Don't forget to reset: P2_error on a null at the beginning of the validation routine so that it clears all the old values.

    Shunt

  • How to create a dependent list of values based on the relationship master detail

    Hello

    I'm on jdev 11.1.2.4.

    1. I have a table main 'Reception' with the columns receipt_id and student_id (ReceiptVO)

    2. as well as an array of details 'Receipt_Detail' with the columns receipt_id, course_id (ReceiptDetailVO)

    (There are some othere columns in the two tables, but I've only mentioned those which is relevant to this example.)

    3. the two tables are related with receipt_id.

    I want to create a dependent class LOV that filter courses related to the student selected in the main table. (There is a student_course table that holds student_id, relationship of course_id, StudentCourseVO)

    to do this, I have

    1 created VO based on the student_course table

    2 Add a view that filters based on the id of the student

    3 assigned this VO to receipt_detail tables course_id

    It comes

    in the accessor receipt_details VO view, I do not show the ability to select the student_id of the main table (IE ReceiptVO). It only shows the columns in the ReceiptDetailVO.

    Please can you help me?

    Thank you

    What you need in your ReceiptDetailVO is the StudentId of master ReceiptVO attribute.

    To do this, you can:

    1. for your ViewLink (between ReceiptVO and ReceiptDetailVO), you must generate the Source accessor:

    In this way, in the VoRowImpl Java to ReceiptDetailVO class, you will get a way to access master ReceiptVO line (you can find a new method with the name that you gave the name of the accessor in the top of the dialog box)

    2. then, in the ReceiptDetailVO, create Transient attribute, say, MasterStudentId. Access Java's VORowImpl class, within the get for this new attribute accessor method, use the previous step name accessor method to get the line main and finally master StudentId.

    3. the rest is easy - use this new attribute transitional to filter LOV about the student teacher ID...

  • Forms of multi level master-detail

    Hello

    I have 3 block in my forms, namely A, B, C.

    B is the detail of A block and C is the detail of B block.

    Headers, lines contains elements, Serials contains article serail numbers.

    When I ask with number of specific header I have 2 lines and each line has 3 series. If I click on line 1, everything works fine.

    But if I click on line # 2 and block C is endangered (didn't anydata). for this problem, I added go_block (lines) in

    entqry-key trigger of the header block.

    Now, almost the same problem repeats. Line 1 has 3 series. If I click on any series then immediately if I click on the #2 line

    Blocks B and C are endangered. If I click on line 1, it works very well.

    Please help me.

    Thanks, Rezé

    Srikanth, Amatu Allah thanks for your time.

    I found the problem. Basically - the problem is because the names of the table on which was based the block was long and the name of the relationship that make up the generator creates is truncated and two relationships ended up having the same name. So, I just changed the names of ship of my relationship. It worked

    Thanks, Rezé

  • Problem with vertical scroll bar of the block master detail

    Have a TC of canvas by tabs with 3 tabs - tab A, B and C

    Tab C contains a block of master child multi. Each block can display 5 records.

    C tab

    -> Master Block can display 5 records

    -> Child block can show 5 records. Child block has nearly 20 columns to display. It is therefore a big canvas

    question

    It comes with vertical toolbars on Master Block and child block.

    The horizontal toolbar works very well.

    But if there are more than 5 records, we are not able to scroll the vertical toolbar.

    Remember reading somewhere that for a block of single bar scrolling can be active. Please specify if this is correct and indicate what are the appropriate actions that we can take.

    Thank you

    951614 wrote:

    But if there are more than 5 records, we are not able to scroll the vertical toolbar.

    You have a separate master and detail block, right scroll bar?

    If so, then which bar scroll creating problem for you, master? detail? or both?

    Make sure you have the block with the appropriate scroll bar card, it can possible you have set the bar of scrolling detail with master block and main scroll bar with detail block.

    951614 wrote:

    Remember reading somewhere that for a block of single bar scrolling can be active. Please specify if this is correct and indicate what are the appropriate actions that we can take.

    It is not correct.

    You used the scroll bar with individual block. There is no restriction.

  • How to open the item in detail see the ADF link click

    Hello

    Can someone tell me how to open the tab to show technicality when link is clicked?


    Thank you

    Nitesh

    Hello

    Frank said...
    1. Select the component showdetailitem
    2. go in property disclosure
    3. fix a variable managed bean (return true/false)
    4. in the commandLink method defined the true/false variable according to the requirements

    or

    1. Select the component showdetailitem
    2 bind in the managed bean
    3. in the commandLink method defined showdetailitembinding.setDisclosed(true/false);
    4. Add the PPR

    reference http://jobinesh.blogspot.in/2010/12/programmatically-disclosing.html

    ~ Abhijit

    Published by: Abhijit Dutta on March 12, 2013 17:20

  • Regarding the change address details account Page

    Hello

    In the detail account Page, I'm not able to change the billing address IE documents created by other users. In the account object related information "Addresses", read/change then if the problem is resolved. But don't nt related Information Section dealing with the tabs under the details of the accounts or ideas page him perform the billing address in detail Page also?

    Kindly, help with the same

    Thank you.

    Billing and shipping information you enter @ top doing the account address list cmdlet (your would have observed) so, technically, I guess he's using the same for storage / extraction I think that yes the access restriction also applied to two places

    -John CRMIT

  • APEX: Can we add additional items in tabular form existing

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found 

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Hi JAS-Oracle,

    JAS-Oracle wrote:

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found
    

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Here an other elements means another column in the form of tables... Right?

    This column to another is the same table on which you build your tabular presentation.

    If this is the case, then you must add the extra column in your select query and a few changes in the properties of this column, no need to do anything with the process of the MRU.

    for that go to report attributes-> change the newly added column-> slot of the attributes of tabular form

    The Table - name of the schema reference owner

    The Table name - name of the reference table

    Column name of the column in reference

    If this isn't the case then of additional information on the same.

    If the column is in the other table, to check out this blog: manipulate several tables in a tabular form

    or create the sample on the apex.oracle.com, allowing the user to resolve your issue quickly.

    ,

    Hope this helps you

    Kind regards

    Jitendra

Maybe you are looking for