Populate Line and Master details

hi All,
I have created 3 form 1.Quotation 2.Autocreate 3.Purchase Order.
Autocreate form is having Only one field Quotation Number(LOV) and one button 'Autocreate'
I want whenever i select Quotation number and press 'Autocreate' button purchase order form should open and populate all details of master and line in Purcahse order form Quotation.
I have written folloing query but only header details are populating not line ....pl help
:GLOBAL.REQ_NO1 := 'Requsition.REQ_NO';
:GLOBAL.QUOT_NO1 := 'Quotation.QUOT_NO';
IF
:GLOBAL.REQ_NO1 = 'Requsition.REQ_NO' THEN
GO_BLOCK('PO_HEADERS');
:PO_HEADERS.REQ_NO := :FND_FORM.REQ_NO;
ELSIF
:GLOBAL.QUOT_NO1 = 'Quotation.QUOT_NO' THEN
GO_BLOCK('PO_HEADERS');
:PO_HEADERS.QUOT_NO :=:FND_FORM.QUOT_NO;
END IF;
Please help
Ar

Hello
I have created this code .
DECLARE
TYPE REQ_LINE_REC IS RECORD
P_LINE_NUM NUMBER,
P_ITEM_CODE VARCHAR2(10),
P_DESCRIPTION VARCHAR2(240),
P_UOM VARCHAR2(10),
P_PRICE NUMBER,
P_CATEGORY VARCHAR2(30),
P_QUANTITY NUMBER)--,
P_NEEDBYDATE DATE );
P_LINE REQ_LINE_REC;
CURSOR ITEM_CUR is
SELECT LINE_NUM,ITEM_CODE,DESCRIPTION,UOM,PRICE,CATEGORY,QUANTITY,NEED_BY_DATE
FROM PO_REQUISITION_LINE;
-- WHERE REQ_NO =:FND_FORM.REQ_NO;
BEGIN
     :PO_HEADERS.REQ_NO := :FND_FORM.REQ_NO;
     GO_BLOCK('PO_LINES');
     --OPEN ITEM_CUR;
     FOR rec IN ITEM_CUR LOOP
     --IF :SYSTEM.RECORD_STATUS!='NEW' THEN
--CREATE_RECORD;
--END IF;
FETCH ITEM_CUR INTO P_LINE;
EXIT WHEN ITEM_CUR%NOTFOUND;
:PO_LINES.LINE_NUM := P_LINE.P_LINE_NUM ;
:PO_LINES.ITEM := P_LINE.P_ITEM_CODE;
:PO_LINES.DESCRIPTION := P_LINE.P_DESCRIPTION;
:PO_LINES.UOM := P_LINE.P_UOM ;
:PO_LINES.PRICE := P_LINE.P_PRICE ;
:PO_LINES.CATEGORY := P_LINE.P_CATEGORY ;
:PO_LINES.QUANTITY := P_LINE.P_QUANTITY;
:PO_LINES.NEED_BY_DATE := P_LINE.NEEDBYDATE;
END LOOP;
END ITEM_CUR;
but loop is noot working here. it give only single value in po_line table...
Plz Help...
Archana

Similar Messages

  • Move Order lines and Delivery Detail lines - Relationship

    Hi All,
    Is there a one - to - one realtionship between Move Order Line and Delivery Detail Line?
    i.e., Each Move Order line will correspond to only one Delivery Details line Record?
    Thanks in advance.
    Regards,
    Gowri

    Hello,
    There is a one - to - many relationship between Move Order Line and Delivery Detail Line when you split lines in delivery.
    select * from mtl_material_transactions t you have source_id.
    select * from WSH_DELIVERABLES_v t you have move_order_id.
    Regards,
    Luko

  • Populate row of master detail form with selection from LOV?

    Hi Guys,
    Total noobe, Hope you can help me out with a project I am working on in Oracle Apex 4.1 with 11g XE
    I am sure this is a simple enough issue but I just can’t see the solution.
    I have a table called ‘STOCK’ this contains all new parts and delivery details.
    ‘STOCK_ID’ NUMBER PK
    ‘DELIVERY DATE ‘ DATE
    ‘PART’ VARCHAR2
    ‘PART_SN’ VARCHAR2
    ‘PART_AN’ VARCHAR2
    ‘INSTALLED’ CHECKBOX
    I have a table that list all the current physical locations of hardware for example
    ID, Till number, store location etc…
    I have an table to list the devices and modification to the hardware in these store locations.
    Move Date, Device, Device Serial number, Device Asset Number, Comments
    I have a report & form that displays all the current physical locations of hardware and a master detail form linked to this to add devices and modifications to each store location.
    I have a LOV setup on the Devices column that is based on a simple select query
    SELECT PART from STOCK
    ORDER BY 1
    This provides me the list of parts in the stock table.
    What I need to figure out is how do I get the data from the ‘STOCK’ table when I select a part in the LOV to auto populate ‘DEVICE_SN’ ‘DEVICE_AN’ in my master detail tubular form. this information is contained in the 'PART_SN' & 'PART_AN' columns of the STOCK table.
    I also need to figure out how to identify the part because by default the LOV only displays one column and I have no idea which part I am selecting other than by name. i could use a popup LOV and scan a barcode into the search box and get the retuen value to display the part name in the field.
    I also would like to reduce the number of records displayed in the LOV by using the ‘INSTALLED’ checkbox i.e. if checked this part has been used and will not be available for selection. The ‘PART_SN’ field can be duplicated as we often get the same part back again as a replacement after repair but this should be valaditated against i.e if the parts is ticked as installed and not available for selection in the list it can be added again this could possibly be validated based on the ‘DELIVERY DATE‘?
    I hope this make some sense to you guys if you need any further details let me know.
    Cheers
    Darren

    Hi,
    I am from the Oracle Forms background too and I have been using Oracle Apex for a while. Oracle Forms is just like client-server application although it uses the Forms servlet to render its Web front-end. I think...if you're really trying to develop true-Web application, you should try to forget such features as "master with many details" in Oracle Forms. Loading all the details in a single page will cause overheads anyway. When you discover more about ajax and such third-party javascript libraries as jquery and mootools, you'll have a different mind of Web development.
    Thanks.
    Andy

  • Spry Tabbed Panels and Master/ Detail Page Set interraction

    Hi,
    I have created a feedback form and am using a Spry Tabbed Panel to allow users to review all responses to one question and then all responses to the next question in different tabs, there are 6 tabs in all. In each tab I have created a Master/ Detail Page set - well actually just the Master appears in the tab. This is working fine. I allow up to 20 responses to be shown on each tab, after which the user selects First/Previous/Next/Last. When they do this the screen refreshes and the tabbed panel display goes back to the default tab, clicking on the tab previously used correctly displays whichever of First/Previous/Next/Last the user selected. I'd like the display to remain on the user's current tab when they select First/Previous/Next/Last.
    The page in question is here http://www.hollisterairshow.com/feedback-results2.php, then scroll about half way down the page and select one of the tabs.
    Thanks.
    Tony

    Hi Tony,
    Look at the following, blue coded is comment only, red coded is what has to be added to your existing code and orange coded is added by the SpryDataSet creator if done properly. Where the orange part starts, thats where you place your cursor when creating the dataset.
        <p> </p>
       <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">All feedback</li>
            <li class="TabbedPanelsTab" tabindex="0">Suggestions for improvement</li>
            <li class="TabbedPanelsTab" tabindex="0">What did you like the most</li>
            <li class="TabbedPanelsTab" tabindex="0">What did you like the least</li>
            <li class="TabbedPanelsTab" tabindex="0">What else would you like to see</li>
            <li class="TabbedPanelsTab" tabindex="0">Any other comments</li>
          </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">
              <table border="1" align="center" id="allFeedback"> .... start feedback table tag (line 763)
                <tr>
                  <td width="80"><strong>Feedback Number</strong></td>
                  <td><strong>Days attended</strong></td>
                  <td><strong>Arrived by</strong></td>
                  <td><strong>Arrival arrangements</strong></td>
                  <td><strong>Expectations met</strong></td>
                  <td><strong>Ticket price</strong></td>
                  <td><strong>Zip code</strong></td>
                </tr>
    .................... rest of table probably your PHP repeat area
                  </tr>
              </table> .... end feedback table tag    
              <div spry:region="dsAllFeedback">
                <table>        
                   <tr>
                    <th spry:sort="Feedback_Number">Feedback Number</th>
                    <th spry:sort="Days_attended">Days attended</th>
                    <th spry:sort="Arrived_by">Arrived by</th>
                    <th spry:sort="Arrival_arrangements">Arrival arrangements</th>
                    <th spry:sort="Expectations_met">Expectations met</th>
                    <th spry:sort="Ticket_price">Ticket price</th>
                    <th spry:sort="Zip_code">Zip code</th>
                  </tr>
                  <tr spry:repeat="dsAllFeedback" spry:setrow="dsAllFeedback" spry:odd="row_odd" spry:even="row_even" spry:hover="row_hover" spry:select="row_select">
                    <td>{Feedback_Number}</td>
                    <td>{Days_attended}</td>
                    <td>{Arrived_by}</td>
                    <td>{Arrival_arrangements}</td>
                    <td>{Expectations_met}</td>
                    <td>{Ticket_price}</td>
                    <td>{Zip_code}</td>
                  </tr>
                </table>
              </div>
              <br />
              <table border="0">
    I hope this helps.
    Ben

  • Refresh problem by combination of programmatic view and master-detail page

    I am using the latest versions of both ADF (10.1.3.2.0.4066) and JHeadstart (10.1.3.1.26) and I have an application with 1 page in which I have as root page a programmatic view (table-form) which I fill with request parameters.
    Under that programmatic view I have a master (table) with 3 detail pages (table).
    The programmatic view is populated with always 1 row, which goes always correct.
    The problem is occuring when iterating through the first entity based master table which contains lots of rows. Then the problem is that when you navigate through the master table the detail pages are refreshed correctly, but when you navigate back to the first row that row won't get updated.
    The next thing I tried is create a new jheadstart application with only the master-detail pages (entity based), so without the programmatic view, and then the iterating through the master table and the refresh of the child tables is working correct.
    What can be the problem here.

    Have you tested this in the ADF Business Components Browser? That's the tester that you can find by right-clicking your ADF BC Application Module and choosing Test. If you go to the View Object instance for the programmatic view, and using the ViewLinks to its children, do you get the same behavior as in the JHeadstart application?
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Problem w/ Nested Datasets and Master/Detail regions

    Hi, I'm being using spry for a couple of applications and
    really love it. This is the first time I've tried to utilize a
    nested dataset and I'm having some difficulty loading the nested
    data. I'm getting a js 'Object does not support this property or
    method' error in IE and a 'Failed to retrieve data set (dsCreds)
    for spry:repeat' in FF.
    I've tried to map examples to my application but of course
    it's slightly different. I have a master/detail region dynamically
    generated from a .php file and part of the detail region has the
    nested dataset. Maybe (hopefully) it's something obvious. I've
    broken out a test case that demonstrates what's happing - If anyone
    could take a look I would be extremely grateful!
    The .htm file is on:
    htm
    file
    The .PHP file that generates the dynamic XML is on:
    PHP
    file
    A sample .XML (generated from the .PHP file is
    Sample XML
    file
    Even without the Nested set getting generated the
    Master/Detail section works fine.
    Thanks so much for any help!
    Edit - Apologies for all the inline css - still developing
    :)

    Hi,
    The dataset name in the NestedDataSet constructor does not go
    in quotes.
    Try var dsCreds = new Spry.Data.NestedXMLDataSet(dsAgents,
    "credentials/cred");
    and see if that helps.
    Don

  • Image mapping and Master Detail Regions in CS3

    Excellent advice to leave a url. I think I am having a similar problem with conceptualizing datasets for utilization with image mapping. I obviously cannot use the Get Schema via the Attach New Data set icon because I have rendered my own Master region. I am working with CS3. I will launch the site and ask for help from the url.
    Here is:
    http://www.atmfoods.net16.net/
    I need help with this. With the phasing out of tabulated layouts for div based layouts I run into quite a few snags attempting to work around deprecation of tags issues. What am I trying to do here:
    1. Get my spry menu to drop down in the child table and not the parent table aligned top left.
    2. Use image mapping of the thumbnail images in integration with datasets and spry Master/Detail regions, even if hand coded to achieve, for a larger image and data on each thumbnail on an accordion spry widget. I am thinking grid systems for the future of my works and hope to achieve some relative command of grid systems. Without gridlock.

    Hi,
    The dataset name in the NestedDataSet constructor does not go
    in quotes.
    Try var dsCreds = new Spry.Data.NestedXMLDataSet(dsAgents,
    "credentials/cred");
    and see if that helps.
    Don

  • Database Views and Master-Detail using ADF

    How would I create a master-detail form using a database view for the search-able master table and a database view as the detail table?
    The detail-view will need to be update-able (adf-table) using an instead-of trigger to perform the updates to the database table.
    Thanks in advance...

    There are several sections in the ADF Developer's Guide about using views (http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html):
    - 26.4 Basing an Entity Object on a PL/SQL Package API
    - 6.2.4 Creating an Entity Object for a Synonym or View
    You can also try Steve Muench's web log: http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    There are at least two (old) items there that involve view with instead-off triggers:
    -      Composite Entity Using Stored Procedure API to Create/Modify/Remove Master and Children
    - Entity Object Based on View With Instead Of Triggers Avoiding Returning Into Clause
    Jan Kettenis

  • Spry Tabbed Panel and Master/Detail Page Set interraction

    Hi,
    I have created a feedback form and am using a Spry Tabbed Panel to allow users to review all responses to one question and then all responses to the next question in different tabs, there are 6 tabs in all. In each tab I have created a Master/ Detail Page set - well actually just the Master appears in the tab. This is working fine. I allow up to 20 responses to be shown on each page, after which the user selects First/Previous/Next/Last. When they do this the screen refreshes and the tabbed panel display goes back to the default tab, clicking on the tab previously used correctly displays whichever of First/Previous/Next/Last the user selected. I'd like the display to remain on the user's current tab when they select First/Previous/Next/Last.
    The page in question is here http://www.hollisterairshow.com/feedback-results2.php, then scroll about half way down the page.
    Thanks.
    Tony 

    Hi Tony,
    Have a look here http://labs.adobe.com/technologies/spry/samples/data_region/PagingSample.html and here http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedViewSample.html
    If you need further assistance, go to the Spry Forum http://forums.adobe.com/community/labs/spry
    I hope this helps.
    Ben

  • Accordion and master/detail datasets

    Does anyone know of a working Accordion example that uses
    master and detail datasets, with master records as tabs and
    multiple detail records in the contents? Would like to be able to
    see XML data files, too.
    I keep getting an error message and in other examples the
    accordion loses it's animation.

    I think the issue is the Spry data object does not appear to
    handle multi-level (master/child) datasets. If the Spry dataset
    could handle them then the accordion could load all the data
    (master in tabs and children in content) and it would not have to
    reload child data on every tab click.
    Anyway, here is the code:
    <script type="text/javascript">
    <cfoutput>
    var dsMaster = new
    Spry.Data.XMLDataSet("#myurl#","Corp/Department");
    var dsDetails = new
    Spry.Data.XMLDataSet("#myurl#&orgid={dsMaster::INTORGID}","Departments/Unit");
    </cfoutput>
    var regObserver = new Object;
    regObserver.onPostUpdate = function(notifier, data) {
    var acc = new Spry.Widget.Accordion("allocations",
    {defaultPanel: dsMaster.getCurrentRowNumber()});
    Spry.Data.Region.addObserver("allocations", regObserver);
    </script>
    Example of what I mean with multi-level:
    <Department>
    <STRDEPARTMENT>ADMINISTRATION
    DEPARTMENT</STRDEPARTMENT>
    <Units>
    <STRUNIT>Technology</STRUNIT>
    <STRUNIT>Personnel</STRUNIT>
    </Units>
    </Department>

  • Setrow with Paged Dataset and Master / Detail containers

    Hi,
    I am building a photo album.
    I am using paged views on the photos as the collection is currently 132 and growing.  So I have a paged view of 15 photos at a time, which are in a master container.  I want to be able to click a photo thmubnail and for it to update the large photo in the detail region.  However with paged views it doesn't seem to update the current row in the detail region.  If I used the Spry dataset the pagedview is built on the setrow functionality works fine.
    The page is here www.thehmc.co.uk/photo4.html
    What are my options to get this working?
    Cheers
    Phil

    Hi Phil,
    This is completely out of context and I am probbaly risking a flame, Still I want to share the following piece of code with you.
    <p> &copy; 2008
    <script language="JavaScript" type="text/javascript">
                var d=new Date();
                yr=d.getFullYear();
                if (yr!=2008)
                  document.write("- "+yr);
              </script>
    Created / Maintained by Phil Whitehurst</p>
    This will automatically update the year.
    Ben

  • Hierarchies and Master Detail Linking

    I have a hierarchy field that I would like to use as my "Master" source to drive my report detail. I'm having trouble and am wondering if this is even possible given that in the table/graph prompt I can only set it up to listen for one channel.
    Very new to OBIEE, so I appreciate your help!!
    Katy

    I'm facing the same issue.Has anyone worked on it?

  • Header, line and adress details

    hi experts,
    actually i am working on outbound iunterface.
    in the target structure it is given as ,
    1.header,
    2, line items,
    3, adress.
    using my select statements i have retrived the data and in the target structure the data should be displayed as
    1.header,
    2, line items,
    3, adress.
    plz suggest me how to do.
    regards,
    siri.

    Hi rajesh,
    Header is a workarea of the table which acts as an interface for the table. Header can have only one record at a time.
    WORKAREA is a structure that can hold only one record at a time. It is a collection of fields. We use workarea as we cannot directly read from a table. In order to interact with a table we need workarea. When a Select Statement is executed on a table then the first record is read and put into the header of the table and from there put into the header or the workarea(of the same structure as that of the table)of the internal table and then transferred top the body of the internal table or directly displayed from the workarea.
    Each row in a table is a record and each column is a field.
    example,
    internal table.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    workarea.
    data: begin of itab,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    also,
    workarea:
    types: begin of type_mat,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of type_mat.
    internal table
    data: t_mat type standard table of type_mat.
    data: begin of itab occurs 10,
    ab type c,
    cd type i,
    end of itab. " this table will have the header line.
    data: wa_itab like itab. " explicit work area for itab
    data: itab1 like itab occurs 10. " table is without header line.
    The header line is a field string with the same structure as a row of the body, but it can only hold a single row.
    It is a buffer used to hold each record before it is added or each record as it is retrieved from the internal table. It is the default work area for the internal table.

  • I need to call specific header,line and footer based on condition

    Hi All,
    i am working on PO report and it has 3 PO_types. In my rtf i created 3 Header,3 Lines, 3 detials. And at a time only one Header, One line and one detail should call based on PO_TYPE.
    Can any body guide me, to achieve this. Or is there any other way for it?
    Thanks in advance !
    Regards,
    Ad

    Maybe you can try the <?start:body?> and <?end body?>

  • Master Detail Forms with 2 composite primary keys - Is there a workaround?

    Hello All,
    I have been searching for a workaround to the maximum 2 part primary key restriction on the multi-row updates, and master-detail forms, and am hoping that someone can help me. I am using HTMLDB v2.0.0.00.49 with IE 6 against a 9.2 DB.
    I successfully implemented the workaround of Fred Stoopendaal's (see Updata PK on HTML DB ) and it works fine for single page multi-record updateable forms, but alas I haven't been able to extend it to master detail forms (I think it is something to do with Oracle not allowing the "returning" clause on views).
    Here is what I tried:
    two tables, one with a 2 part composite primary key, which is the master table, and a detail table with 3 part composite primary key -
    --------- BEGIN SQL ---------
    create table master_table
    ( master_col1 number
    , master_col2 number
    , master_col3 varchar2(30)
    , constraint master_pk primary key (master_col1,master_col2));
    create table detail_table
    (detail_col1 number
    ,detail_col2 number
    ,detail_col3 number
    ,detail_col4 varchar2(30)
    , constraint detail_pk primary key(detail_col1,detail_col2,detail_col3)
    , constraint master_detail_fk foreign key (detail_col1,detail_col2) references master_table(master_col1,master_col2));
    create or replace view v_master_table as
    select rowid mata_rowid,mata.*
    from master_table mata;
    create or replace view v_detail_table as
    select rowid deta_rowid,
    (select rowid from master_table mata where mata.master_col1 = deta.detail_col1 and mata.master_col2 = deta.detail_col2) deta_mata_rowid
    , deta.*
    from detail_table deta;
    create or replace trigger mata_ins_upd_trg
    instead of insert or update on v_master_table
    referencing new as new old as old
    for each row
    begin
    if inserting then
    insert into master_table (master_col1, master_col2, master_col3)
    values (:new.master_col1, :new.master_col2, :new.master_col3);
    end if;
    if updating then
    update master_table
    set master_col1 = :new.master_col1,
    master_col2 = :new.master_col2,
    master_col3 = :new.master_col3
    where rowid = :old.mata_rowid;
    end if;
    end;
    create or replace trigger deta_ins_upd_trg
    instead of insert or update on v_detail_table
    referencing new as new old as old
    for each row
    begin
    if inserting then
    insert into detail_table ( detail_col1, detail_col2, detail_col3, detail_col4)
    values (:new.detail_col1, :new.detail_col2, :new.detail_col3, :new.detail_col4);
    end if;
    if updating then
    update detail_table
    set detail_col1 = :new.detail_col1,
    detail_col2 = :new.detail_col2,
    detail_col3 = :new.detail_col3,
    detail_col4 = :new.detail_col4
    where rowid = :old.deta_rowid;
    end if;
    end;
    --------- END SQL ---------
    Then I created a master-detail form in Apex on the two views, using the mata_rowid and deta_rowid as primary keys, and mata_rowid=deta_mata_rowid as the link. I realise that using a function to fetch the master rowid within the detail view query is costly, but it was my intention to modify the record fetch queries to use the real FK columns once things were up and running.
    It seems to generate the pages ok, and I can insert/update master table records, but as soon as I modify records in the detail table things go a bit haywire. I can't find any documentation on how the inbuilt MRU/MRD logic works, so can't figure out the issue.
    Can anyone out there tell me what the problem is with the logic above, or if they have come up with a neat solution to this annoying limitation. I know that many will say that I should modify the data model to use surrogate primary keys, but many of the uses for HTMLDB are new interfaces for old schemas, so a workaround that doesn't involve wholesale data model changes would be preferable.
    Thanks in advance,
    Mike Cretan

    Hi, this is likely not the most elegant way...but perhaps the simplest -- and I didn't have much time to play.
    I used Wizard to create two separate Master Detail forms, each with a separate detail table. Thus I ended up with four pages:
    Page "A" - "Selector" page for Master (Report), with Edit link driving to Detail-1
    Page "B" - Editable Master/Detail-1 page (HTML / Report)
    Page "C" - "Selector" page for Master (Report), with Edit link driving to Detail-2
    Page "D" - Editable Master/Detail-2 page (HTML / Report)
    Then I selected the primary key column TWICE on the Report on Page A. Modified the second instance of this column to navigate to Page D (passing primary key) exactly the way the original instance of this column navigates to Page B. Then I deleted Page C.
    Since you can have only one Tabular Entry form per page, this seemed the best way to drive two separate detail tables from a common interface.

Maybe you are looking for