I need to delete header record automaticaly when deleting detail

Hi all
I have to master-detail tables
The relation between the header and details is one-to-one.
on my form i want to do the following:
When user delete the detail record the header record must be automatically deleted.
on the trigger key_delrecord on the form level i write this code
BEGIN
IF :SYSTEM.CURSOR_BLOCK = 'DETAILS' THEN
Delete_record;
FORMS_DDL('COMMIT');
Go_block('Data');
Delete_record;
FORMS_DDL('COMMIT');
ELSE
Delete_record;
END IF;
END;
but this does not work
an error message appear on the runtime " can not delete header while dependent detail exists"
Please how can I archive this
Thanks in advance
Edited by: [email protected] on Oct 4, 2009 11:01 AM

Hi!
May set the Delete Record Behavior Relation Property to Cascading.
And change your trigger to:
BEGIN
IF :SYSTEM.CURSOR_BLOCK = 'DETAILS' THEN
Go_block('Data');
END IF;
Delete_record;
END; But, may do not use the forms_dll build-in for a commit.
Use the commit_form build-in so forms recognize that you commit the form.
Regards

Similar Messages

  • IDOC Header Record

    Our scenario is  File(s) ---> XI -
    > IDOC
    We are receiving 3 Different Files, with Employee information from 3 different Countries and using XI , the records will be posted into R/3. Each record from the file will be treated as an IDoc.
    The File is going to contain the Header Record, followed by the Detail records.
    The header record will determine from whom this file was sent and we need to map the header info with the Control record.
    How can I achieve the above task of separating the Header Record and the other detail records in the Message Mapping.
    I would Greatly appreciate the Help.

    hi Karen,
    if you target XML fill contain
    one header and many details (which have to be transformed into many idocs) then you can do it in
    1:N mapping
    1 file N idocs
    just map the header so that it occures many times
    (as many as the details section)
    if I understand your issue correctly
    Regards,
    michal

  • Associating a header record to its detail record in SQL Loader

    I've a SQL loader script that loads data into 2 separate tables, one table containing header and one having details. Once the load is done there is no way to find out which item is associated to its header.
    Is there a way to associate a header record to its corresponding detail level?
    Edited by: 934858 on May 16, 2012 4:49 PM

    The load script is loading into 2 separate tables as below.
    load data
    append
    into table post1.thead
    when (1:5) = 'thead'
    TRAILING NULLCOLS
    (file_type POSITION(1:5) CHAR,
    file_line POSITION(6:15) INTEGER EXTERNAL,
    business_date POSITION(16:23) DATE "YYYYMMDD",
    load data
    append
    into table post1.tdetl
    trailing nullcols
    The data in the input file is as shown below...
    THEAD0000000002201109142011091400000000000002091 1 0 -1
    TTAIL0000000003000000
    THEAD0000000012201109142011091400000000000002091 1 0 -1 20110914-1
    TDETL0000000013CMPSPL1004 0 000000010000P0000000000000019990000000000000000200000
    TTAIL0000000014000001
    THEAD0000000021201109142011091400000000000002091 1 0 -1
    TDETL0000000022EMPDSC1005 0 000
    TDETL0000000023SCOUP 1006 0 973452 000

  • I use imovie to create videos. When I burn the video to DVD and play it back there is digital breakup in the playback from the DVD It does not shoe in p[layback on the computer. I understand there isd some file I need to delete and reboot the imovie to co

    I use imovie to create videos. When I burn the video to DVD and play it back there is digital breakup in the playback from the DVD. The digital breakup does not show in playback on the computer. I understand there is a file I need to delete and reboot the computer and imovie will rebuild the file in the program. Help!

    My method is to use the DAW in standard recording mode, and set up the camcorder entirely separately.  After recording, I automate the audio mix with fader moves and effects, then export ("bounce to disk") a full-fidelity AIFF, 16-bit 48 kHz stereo file (most videos use 48, not 44.1).  I use iMovie '11 to import the video from the camera, then import the stereo audio file and match it up to the camera audio by dragging it into the iMovie Project.  Make the waveforms visible, it's not too hard to align.
    Then, use iMovie's "Export as Quicktime" feature.  Here, by going through the menus and options, you can control the audio compression (for example, 256k instead of 128, although 128 seems to be enough for YouTube).
    AppleMan1958 posted a YouTube video about controlling iMovie's export options that may help:
    http://www.youtube.com/watch?feature=player_embedded&v=vJg-909lx2s#!

  • Mozilla quits when I login to Yahoo Mail. I read on a forum that I need to delete npYstate.dll from Yahoo/Shared directory. This .dll is not available in that folder on my system. Strange???

    I read in one of the forums that I need to delete the npYstate.dll file from the Yahoo/Shared directory but this file is not available in this directory on my system. Mozilla still continues to quit when I log in to Yahoo mail.......
    == URL of affected sites ==
    http://www.mail.yahoo.com

    Yup, it just copies all the information on that page to your Windows clipboard, for you to paste anywhere (email, text file, etc.).
    http://en.wikipedia.org/wiki/Clipboard_%28software%29

  • My Ipad is saying it needs to connect to itunes but when i go onto itunes it says it can only be restored but it will delete all my memory. HELP!!

    My Ipad is saying it needs to connect to itunes but when i go onto itunes it says it can only be restored but it will delete all my memory. HELP!!

    No other choice, you have to restore to use your iPad.

  • I need to delete my Apple ID on my iPhone 4.  I forgot my psw for my account.  When I answer the security question, the system responds incorrect answer.  I created a new Apple iTunes account but I still unable to delete the old iTunes account.

    I need to delete my Apple ID on my iPhone 4.  I forgot my psw for my account.  When I answer the security question, the system responds incorrect answer.  I created a new Apple iTunes account but I still unable to delete the old iTunes account.

    AppleFAN7591 wrote:
    I need to delete my Apple ID on my iPhone 4.  I forgot my psw for my account.  When I answer the security question, the system responds incorrect answer.  I created a new Apple iTunes account but I still unable to delete the old iTunes account.
    How to reset your Apple ID password.
    Go to iforgot.apple.com and type in your Apple ID, then click 'Next'.
    Verify your date of birth, then click 'Next'.
    You'll be able to choose one of two methods to reset your password, either E-Mail Authentication or Answer Security Questions.
    If neither method works, then go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Lost or forgotten Apple ID password'.
    Click the blue 'Continue' button.
    Select the contact option that suits your needs best.
    How to reset your Apple ID security questions.
    Go to appleid.apple.com, click on the blue button that says 'Manage Your Apple ID'.
    Log in with your Apple ID and password. (If you have forgotten your Apple ID password, go to iforgot.apple.com first to reset your password with a password recovery email)
    Go to the Password & Security section on the left side, and click on the link underneath the security questions that says 'Forgot your answers? Send reset security info email to [email]'.  This will generate an automated e-mail that will allow you to reset your security questions.
    If that doesn't work, or  there is no rescue email link available, then click on 'Temporary Support PIN' that is in the bottom left side, and generate a 4-digit PIN for the Apple Account Security Advisor you will be contacting later.
    Next, go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.
    Click the blue 'Continue' button.
    Select the contact option that suits your needs best.

  • I need to delete the entire browsing history so when i type in a webpage it soes not bring up previuosly visited sites.  deleting the history does not do this.  any one know how to do this

    I need to delete the entire browsing history so when i type in a webpage it soes not bring up previuosly visited sites.  deleting the history does not do this.  any one know how to do this

    Judy-
    If Private Browsing doesn't do it, try Settings-Safari-Advanced-Website Data-Remove All Websitre Data.
    Or changing Settings-Safari-Autofill to OFF.
    You might also try Settings-Safari and Clear History and Clear Cookies and Data.
    As you can see, there are several controls for Safari.  Which one works depends on what your problem is.
    Fred

  • I just updated my iTunes, and I need to delete photos from my iPod 4, and there is a Photo Library that synced to my iPod when i plugged it into my computer, and now it doesnt have the option to delete them off my iPod. How do I get rid of these photos?

    I just updated my iTunes, and I need to delete photos from my iPod 4, and there is a Photo Library that synced to my iPod when i plugged it into my computer, and now it doesnt have the option to delete them off my iPod. How do I get rid of these photos? I have read other questions that say to plug the iPod into the computer and like un-sync it, but I downloaded the new iTunes and it doesnt have a photos tab. Does anyone know how to solve my problem? Please and Thank You, Megan!

    Just what did you do to the computer?
    It sounds like the iPodf is seening the iTunes libary as a new libary.

  • Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  Only one Sparse Bundle, same name.

    Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  There is only one sparse bundle but when I enter time machine I don't see my historic backups.  I use a synology DS212 for my time machine.  Started a new backup which is 218gb but it says 618 gb is occupied  therefore it looks like 2 or 3 backups are still on the disk. Before my NAS issues the last backup was in 2014.  As you can see there is a second sparse bundle from 2012.  Not sure what that is.

    This is an old message now, but what happened to me similarly was:
    I had a major computer crash and through complicated pathways ended up reinstalling (Mavericks) as a new user (long story).
    At least I had good Time Machine backups on an NAS drive (Synology DS212j), or so I thought - when I started Time Machine up again, the old backup file was gone, replaced by a new one using my "new computer" name. The old file was gone both by directly mounting the NAS drive and by clicking "Enter Time Machine".
    It's like I had {OldShareName}.sparsebundle and then it was replaced by {NewShareName}.sparsebundle, all of the old info vanished.
    (I have spent a week finding old files elsewhere and have completed a satisfactory self-restore. It pays to "archive" [my own variation of] as well as "back-up".)
    My belief is that if this were a wired-netword-drive, e.g. plugged right into my iMac with a USB cable, then the old file would have remained.
    But this is an NAS drive, connected directly to my Airport wireless router, and I don't know the significance of the fact that it stores its Time Machine backups as "sparsebundle" files rather than simply as plain(er) files.
    As usual when things get complicated with computers (not just Apple computers) there was never a warning message. Something like "YOU'RE ABOUT TO DELETE A TIME MACHINE BACK-UP FILE!!!" would have made my life a lot simpler.
    BTW, I did try a "restore from Time Machine" option the first thing I had my "new computer" (old hardware, 2009 iMac) up and running, using Migration Assistant, and it ran for many hours and then failed in the wee hours - what that has to do with anything I'm not sure.
    I'm not sure that I have a question about this other than "why do these things happen to me?", but it's a warning. Apart from that I've been very happy with the stability and reliability (but not the cost or set-up complexity) of NAS vs. directly-cabled external drives.
    Charles

  • Adobe reader download problem on mac.  when i try to download reader it says i need adobe air.  when i try to download adobe air it says it's no longer available or supported.  i deleted the old air because i got a message saying i needed to delete it.

    adobe reader download problem on mac.  when i try to download reader it says i need adobe air.  when i try to download adobe air it says it's no longer available or supported.  i deleted the old air because i got a message saying i needed to delete it. what should i do?  my operating system is Mac 10.7.5

    You don't need Adobe AIR to download or install Adobe Reader.
    Try downloading the offline installer from http://get.adobe.com/reader/enterprise/

  • HT4847 When trying to use icloud storage message says i need to delete messages. But the indicator says. There is gb's enough! What to do?

    When trying to use icloud storage. On my Imac!
    A message says i need to delete emailmessages. But the indicator says. There is gb's enough! What to do?
    I have tried to delete as much messages from my various email accounts. But still I can't store anything more than is in storage now. (wich is very little KB's)
    My storage account is 25 GB's
    But I can't use it for my Ipad en Iphone?
    Do I have to buy seperate GB in the Icloud foor my 3 devices?
    please help
    Marc Pleijsier
    Holland

    Click here.
    (73432)

  • Header Record not repeated when detail records span to more than a page

    In RTF template,
    1. I have a for-each with code of
    <?for-each@section:G_HEADER?>
    2. Under 'for-each', I have the header record is defined in a 1 table row.
    The row property for this table is set to 'Repeat as header row at the top of each page'
    3. Under this I have another table with fields for LINES data with its own 'for-each' code <?for-each:G_LINES?>
    4. Followed by end for the above two 'for-each'
    However, when I generate the PDF output from Preview, when the lines data spans to more than one page, the header record is not repeating on the subsequent pages. Anyone has any ideas how to fix this
    My XML Publisher version is 10.1.3.4.1 Build 130. I have a sample data and the template, but not sure if I can upload here.

    user6098416 ,
    I am also facing the same Problem as yours.
    My Template layout is as follows:
    <?for-each:G_HEADER?>
    Header table
    <?for-each:G_DTL1?>
    detail table  -->  (<?for-each:G_DTL2?> Detail Fields <?end for-each?> )
    <?end for-each?>   --> End for each for G_DTL1
    <?end for-each?>   --> End for each for G_HEADERMy problem is Header Table is not repeating on each page when detail Table data goes beyound one page.
    I tried the following but its not working:
    <?template:header?>
    Header table
    <?end template?>
    <?for-each:G_HEADER?>
    <?call@inlines:header?>
    <?for-each:G_DTL1?>
    detail table  -->  (<?for-each:G_DTL2?> Detail Fields <?end for-each?> )
    <?end for-each?>   --> End for each for G_DTL1
    <?end for-each?>   --> End for each for G_HEADERI am not sure whats wrong here.
    Thanks
    Sandeep

  • I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add info), it overwrites part of the record following it. I am using labview 6.0

    I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after

    It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • In ALV  I need to color the records when ever material number changes

    Hi ,
    I need to color the records in alv when ever the material changes.
    for ex : I have 10 records .
    1 to 3 records same material number so yellow color
    4 to 8 records same material numberso blue color
    9 to 10 recrods same material number  so yellow color.
    Please do the favour..
    thank you.
    karthik.

    Hi,
    Have one more column in the final table as
             ROWCOLOR(4),              "reqd only if row is color
    Do the coding like this.
    Keep canging the Row number to get different colors. Like C410 etc.
      LOOP AT T_FINAL.
        IF T_FINAL-NUMBER = 'XXX'. " <b>Do your comparison operation here</b>.
          T_FINAL-ROWCOLOR = 'C510'.
          MODIFY T_FINAL TRANSPORTING ROWCOLOR.
        ENDIF.
      ENDLOOP.
    Also modify the layout giving the field as
    DATA : W_LAYOUT TYPE SLIS_LAYOUT_ALV.
      W_LAYOUT-INFO_FIELDNAME = 'ROWCOLOR'.
    Hope this helps you.
    Regards,
    Subbu.

Maybe you are looking for