Master deletion whil detail exists

In BC4J how can I implement that user will not be able to delete master record if its detail records exist. I know this behaviour can be implemented by using Composition Association. But, as far as I learned, one child table cannot have more than one parent associated via composition association.
My question is that how can we implement this behaviour in normal association ????

But, as far as I learned, one child table cannot have more than one parent associated via composition association. Who told you that? I'm using one detail with multiple masters in a composition association and it works well.
Maybe you should also have a look at Re: customized download function no longer working after last db recovery to get the trick. Look at the last reply.
hope this helps
Frank

Similar Messages

  • Equipment master ie03 partner getting deleted while doing material return

    Hi
    We are facing some problem in serial no
    1.We are creating equipment master in IE08 and assigning same equipment no as serial no in ie02
    Update partner functions in IE02
    2.Then we are creating a repair type sales order
    3.Do goods receipt using VRRE by assinging serial no
    4.While doing goods receipts(653 movement type) in transaction VRRE,the parter function gets deleted in equipment master IE03 for that serial number
    5.But at the same time when iam doing post goods issue for the same material after repair and same serial no using vl02n,601 movement type,Partner gets updated.
    Is this the normal SAP behaviour.While doing goods return from customer will the partner function get deleted in equipment master and while doing vl02n,goods issue 601 will it update again
    Regards
    Swetha

    Dear all
    Can you please reply
    Regards
    Swetha

  • Delete master record without deleting corresponding details

    Hi all,
    If we have a master-detail relation and we delete the master record, the “Implement cascade delete” flag can be selected to delete the detail records also.
    Now, what if I don’t want to delete the detail records, but instead set the corresponding attribute (that points to the master) in this record to null.
    For ex when deleting a department record, I need to set the “dpartmentId” field of all the corresponding employee records to null instead of deleting these records.
    Is there a configuration that can be made to tell ADF automatically do this?
    Thank you.

    No, adf doesn't have such a mechanism. You can program it yourself by unsetting the cascade delete flag and before removing the master iterate over the child records and set the fk value to null.
    Our you do this in the db using a trigger.  In this case you have to refresh the child vo too.
    Timo

  • Master with many details

    Hello Marvel team and Others,
    Is it possible with thee html db wizard to create a page contaning a master with more than one details ?, I think no , please if No, can I do it manually ? Any ideas are welcome.
    This is my need :
    The same page mmust contain :
    udpatable items for the master
    updatabee report for each detail
    insert details for an existeing master
    delete details from an existing master
    insert a new master with his details
    deletee a master, of course with his details
    Jina.

    The Add Rows button submits the page and re-renders it with additional N rows in that region. Any changes made in that region will be saved.
    Perhaps what you need is some client-side DHTML/Javascript to dynamically add some rows in your tabular form.
    See
    Re: Copy Values From Tabular Form for a discussion about that and an example at http://htmldb.oracle.com/pls/otn/f?p=24317:227
    But all this is straying far outside the out of the box functionality and you have to write everything yourself. You should re-evaluate some of your business requirements before going down this path.
    In other words, having a master-detail-detail, all of them editable, one global SAVE button for all of them, client-side Add Rows functionality, and all on the same page...is a highly unusual UI.
    Good luck.

  • Delete Bank Details via FD02- Lockbox Program

    Good Morning SAP Gurus,
    Is there a procedure or 'best practices' in deleting bank details or MICR information from all Customer in one company code?
    My current client as a result of incorrect format has incorrect MICR information in Payment transactions so we decided it would be best to delete the existing MICR information under customer master.  We have corrected the format with the bank and now we would like to start new. 
    Your help is greatly appreciated.
    Regards,

    Hi Brenda,
    From my understanding, the bank account details are held at the general level and not the company code level, therefore even though your vendor is working in both company codes, the banking data for either company code are stored in the same place (LFA1).  Hopefully that makes sense.
    Now, when you are making a payment to a vendor using FB60 or MIRO, you have the option of selecting the bank account you want to pay.  To do this, first you must set up the vendor, ensuring you put something into the BnkT field, on the vendor master.  You can put a number in, or a country abbreviation or whatever makes sense to you.  You can also put some information in there in the Reference Details field, to help you identify which bank account is which.
    Now when you go to FB60 or MIRO, you should have a field called Part.Bank on the Payment tab.  You can select the bank account there that you wish to pay, as long as you have set up the vendor properly.  If you leave this blank, SAP will automatically allocate the payments to the default bank account, which I believe is either the first bank account or if you have left BnkT blank on the vendor master, it will default to that one.  You can test this to see which bank account it defaults to.
    Hope this helps,
    Laura

  • Master with multiple details

    (JHeadstart release 10.1.2.) I can make a master with multiple detail pages work (displayed on the same page or different pages), except under one condition. Assume the following situation:
    Master: View object A based on entity A
    Detail 1: View object B based on entity B with a modified WHERE clause
    Detail 2: View object C based on entity B (yes, same entity object as view object B) with a WHERE clause different than the one for view object B
    A one-to-many view link exists between view object A and view object B, and another exists between view object A and view object C. The query for each of the view objects is standard (i.e., no expert-mode queries). The master and the two detail view objects (via their respective view links) are assigned to an application module.
    I created a JHeadstart application structure file for the application module with Struts and UIX. I added view object A as the top group (table-form layout). I next added view object B as a detail group (form layout, same page) beneath view object A. I finally added view object C as a detail group (form layout, same page) beneath view object A (i.e., parallel to view object B). The module generated and built cleanly.
    I ran the application, entered a master record, and saved the data. When I pressed the button to create a new record for detail 1 (view object B), fields appeared for the pages for detail 1 and detail 2 (view object C), not just detail 1. Also, the value of the Descriptor Attribute from the master record that linked it to the two detail pages populated the corresponding field in both of the displayed pages for the detail records.
    This behavior does not occur if view object C (detail 2) is based on an entity different than view object B. Will JHeadstart allow a master to have multiple details where the details are based on the same entity object? Thanks.
    Ray

    Ray,
    Unfortunately I cannot reproduce the problem. I filled in the A, B and C using a scott/tiger schema as follows:
    A: Departments
    B: All employees having a salary < 1000
    C: All employees having a salary >= 1000
    Then I created an application module with one group having two subgroups everything same page, just like you specified. Everything seemed to work fine. Do you have any idea what's different in your situation.
    Aard-Jan van Kesteren
    JHeadstart Team
    Oracle Consulting

  • Creating a Master with Two Detail report style

    In a Group-Above report data model, how does one add a 2nd detail group appearing at the same hierarchial level as the 1st group?
    The report already exists with MASTER and detailA. I need to add detailB and tie it to MASTER just like detailA.
    |MASTER|
    |detailA||detailB|
    \-------/\-------/

    Amjad,
    Thanks for the reply. My question relates to your suggestion #1: How does one create detailB in the data model?
    The only thing I have been able to do is to create a 2nd query linked to the 1st query. This makes the data model look like it has two masters each with one detail. What I want is a single MASTER with two details.
    Are you suggesting that the only way to accomplish this is by having two queries, one linked to the other, as in the crude rendering shown below?
    |MASTER1||MASTER2|
    |DETAIL1||DETAIL2|
    The above would be displayed in the data model as follows:
    |__Q_1___||__Q_2___|
    |G_DETAIL1||G_DETAIL2|
    \----------------/\----------------/

  • JDBC Scenario: Delete all the existing records and Insert

    Dear All,
    Scenario: IDoc to JDBC
    PI need to delete all the existing records in the SQL table then need to insert the records.I have created a two statements in the target structure.
    Statement1
       -> TableName
           -> action : DELETE
           -> Table : TableName
    Statement2
       -> TableName
           -> action : INSERT
           -> Table : TableName
           ->Access
               -> Elements
    I am getting below error while try to delete the records in the table.
    JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for  table/stored proc. 'Tablename' (structure 'Statement1'): java.sql.SQLException: FATAL ERROR document format: structure 'Statement1', no key element found
    Note: we use above structure in the another interface without specifying any Key for Delete operation(Server is same but different database for this two interface) and it works fine. Although the Primary keys has been set in the SQL table i am getting the above error.
    let me know what are the setting need to make in PI and SQL DB to achieve this.
    Regards,
    Manikandan Shanmugam
    Edited by: Manikandan Shanmugam on Nov 8, 2011 6:19 AM

    The straucture what you have deined for Delete is not correct, you should have key field in statement structure then only you can perform Delete operation.
    refer below link
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/7b6e85fde93673e10000000a114a6b/content.htm
    Regards,
    Raj

  • How and where to keep deletion flag for existing BP-Prospect

    Hi CRM GURU'S
    Can anybody help me how and where to keep deletion flag for existing BP-Prospect
    how to check duplicate record while creating or maintaining a prospect
    Thanks in advance
    Chandra

    Hi Chandra,
    The Deletion flag for the BP is stored in tabl BUT000. The field is XDELE. In the table, this field has description 'Central Archiving Flag'. You cannot maintain deletion flag from the UI. THe UI only allows you to maintan the Archiving Flag. To maintain the deletion flag,you need to use transaction BUPA_PRE_DA. The selction screen in BUPA_PRE_DA is self explanatory,mark the appropriate flags and execute.
    Archiving flag and deletion flag have the same field on th e UI, but the flags have different INTERNAL STATUS.
    To Check for DUPLICATE records -
    Implement the BADI ADDRESS_SEARCH. You can refer to the SAP provided implementation SIC_ADDRESS_SEARCH also. This does the duplicate check while creating and changing BP's .
    Hope this helps!
    Cheers,
    Rishu.

  • BC4J: Master with multiple details

    Hi,
    I have a requirement to display a data form that consists of fields from 3 entities - one master and 2 details. I have view objects for each of the entities.
    I was wondering how best to model this:
    Should I have one Master VO pointing to 2 different view links (one to each detail VO)?
    Or can I have a single view link that models master-multiple-details (not sure how I can do this using the ViewLink wizard)?
    Any other approach I should consider?
    Thanks,
    Niranjan

    I don't believe you could create a Master with two details frame using wizard. you need to write/alter some code manually. I did this a lot in my application, but as i mentioned with some manually coding.
    here is the general idea:
    1- create the view links for master-detail1 and master-detail2 separately.
    2- Edit your application module using wizard.
    (right click on application module and select Edit Tab). if you did the first step successfully, You should see your master entity and details(as master's children) on left side of wizard frame. Then transfer them to the right side.
    3- Create a frame for master-detail1 using wizard.
    4- create another frame(dummy frame) for master-detail2 using wizard.
    5- copy all codes for detail2 from your dummy frame(step 4) to frame on step 3.
    6- Now you need to alter the code in frame on step 3, to locate the detail2 on that frame.
    7- Now the dummy frame on step 4 is useless, you can delete it.
    Hope this note be clear and help you.
    null

  • Master with multiple details page, is there an example out there?

    Many hints and suggestions can be found on this forum about building a page with a master with multiple details page. But is there a working example somewhere? It looks quite complicated to me.
    Also I would like to know if it is because of my Oracle Forms background that I miss the possibility of building this kind of forms in application express. Are there other ways to setup the pages so that you can do without them?
    thanks Rene

    Let me elaborate on my requirements a bit:
    The form I want to create should look like this:
    Master
    Atrtibute_1
    Attribute_2
    Attribute_3
    Attribute_4
    Details_1 Add Delete
    [] item1 (read-only)
    [] item2 (read only)
    Details_2 Add Delete
    [] item1 (read-only)
    [] item2 (read only)
    So basically it should be possible to maintain several lists of items that belong to the master record. Checkboxes allow the user to select records for deletion. The Add button shows a pop-up window that lets the user select an item to add.

  • Deleting challan details in PC00_M40_CMAP

    Hi SAP Gurus,
    when I am trying to delete challan details in the 3rd step of pc00_m40_cmap, it is showing the following message "first unmap all the personnel numbers mapped with the challan" and in the 4th step after selecting all the tax deduction details and all the challan details and clicking the left sided arrow in between it is not unmapping and the message is "challan mapped to tax deductions of ofcycle run".
    Can anyone find solution how to delete the challan details in 3rd step ?
    Thanks in advance.

    Dear,
    Regarding your query, the issue reported by you basically happens due to inconsistent mapping or unmapping of the employees to the Challan.
    We would suggest you to kindly delete of the negative entry from the table 'T7INTE'. You also need to delete the entries from the table PCL4 as well for the corresponding challan for which the negative entry has been created. Performing the above suggested steps will remove the reported inconsistencies. After deleting the entries completely, kindly perform the Challan mapping for the employees again. Please make sure that you are not deleting the entry from the table for which Form24Q
    has already been generated. The deletion process can be explained as such:
    1. Execute the transaction 'se16'. Go to the tables mentioned above. You can execute the table 'T7INTE' with the TAN number. On execution, a negative entry will be displayed for a particular challan. Select that entry and delete of the entry from the table.
    2. Go to table PCL4. Execute the table with relid as 'I1' to 'I2' and the TAN number in the field 'SRTFD' as 'TAN number'. On Execution, youwill find all the employees mapped to that particular TAN with the corresponding period dates. Delete of the entries for the period for which there existed a negative entry in the table 'T7INTE'.
    3. After deleting the entries successfully from both the above tables, kindly performing the mapping action again. Hopefully, following the above mentioned steps will resolve the reported inconsistency and you will be able to perform the mapping successfully.
    Best Regards,
    Deepak..

  • Hi Apple Team, I would like to change the iCloud account on my iPhone, however it says I must 'delete the account' before doing so? Does this mean that I delete the entire existing account, or just delete it from my phone specifically?

    Hi Apple Team, I would like to change the iCloud account on my iPhone, however it says I must 'delete the account' before doing so? Does this mean that I delete the entire existing account, or just delete it from my phone specifically?

    From the iPhone only.

  • ADF Master Table, Inline Detail Table - How to Scroll Range/Disclose Row

    JDev 10.1.3.2 ADF/BC
    I really need some help here. I've tried as many things as I could think of and I still cannot get this to work.
    Scenario: I have query/result page. User clicks a link in the result table to take him to another page. This page has a Master table, Inline detail table component (bound to a tree in the pageDef). Before the page renders, all I want to do is scroll the Master table to the current row (based on the previous query/result via invokeAction in pageDef) and disclose the inline detail. Simple, right? In addition, I'll need to scroll the inline detail to the current row as well.
    I would like to do this prior to the components rendering but would be interested in any coding to scroll and disclose.
    Thanks in advance,
    Tom

    I've come up with a solution to my problem. Unfortunately I'm not able to manipulate the table prior to rendering but this solution is probably the closest I'm going to get. Here is my code:
    I set up a af:poll component to fire once on my jspx.
        public void poll_PollListener(PollEvent pollEvent) {
            if (this.getFromProcess("unitRowKeyValue") != null) {
                int curIndx = this.getIteratorBinding("UnitsIterator").getRowSetIterator().getCurrentRowIndex();
                this.getUnitTree().setFirst(curIndx);
                if (this.getFromProcess("systemRowKeyValue") != null) {
                    this.getUnitTree().setRowIndex(curIndx);
                    DisclosureEvent de = new DisclosureEvent(this.getUnitTree(), true);
                    this.getUnitTree().queueEvent(de);
                this.storeOnProcess("renderPoll", false);
        }The setFirst method scrolls the table to the index specified. If the user, in my case, has selected a detail item (system), I want to disclose the detail. First I need to setRowIndex to the current index and then I fire a disclose event.
        public void unitTreeDisclosureListener(DisclosureEvent disclosureEvent) {
             if (disclosureEvent.isExpanded()) {
                 CoreTable coreTable = (CoreTable)disclosureEvent.getSource();
                 RowKeySet rks = new RowKeySet();
                 Object test = coreTable.getRowKey();
                 rks.getKeySet().add(coreTable.getRowKey());
                 coreTable.setDisclosureState(rks);
          }If I don't set the rowKey via the setRowIndex method above, the getRowKey does not return a valid rowKey. In my case, I only want one master row to be disclosed at a time.
    This all works great except for a bit of flicker to process the PPR request for the component.
    Next step is to see if I can scroll the Inline Detail table to the detail row selected in the Query/Result page.
    Tom

  • Delete bank details for a BP in CRM 5.0, it doesn't get deleted from R/3

    Hi,
    When I delete bank details for a business partner in CRM, it doesn't get deleted form R/3.
    Although I can see a green bdoc with confirmed status, with no errors. Any clue?
    Regards,
    Kaushal

    Yes, when I add a new bank detail, it gets properly reflected in R/3. The problem is only during deletion.
    I think I've reached the solution - notes 1016909 and 941660.
    Regards,
    Kaushal

Maybe you are looking for