How to commit ONE block only...

Hi Guys,
I have 2 database blocks in my form. In one block user can select and enter fields from a LOV. And in other record he can enter new records and save. This is the most common senerio of my form.
But in some case he can enter new record in the first block and can enter new records in the second block.
The problem i am facing is that if user select an existing record from a LOV and then on the basis of these values he enter an other record in the second block.. COMMIT_FORM also tries to save the record in the first block and as the record already exists it gives error "unbale to insert record" i want to commit only the second block but in some cases i have to commit both blocks.
Kindly suggest me what to do please.
Imran Baig

If u want to commit one block only for a particular condition then
create an on-insert trigger at the block :
If your condition is met then
INSERT_RECORD;
ELSE
NULL;
END IF;
similary you can code on-update,on-delete triggers as per your requirement

Similar Messages

  • How to hide one block of data based on Filter selections

    Hi,
    I have a requirement where I should show only one block based of filter selections provided at the Query Level.
    How can I achieve that?
    Regards
    Shirley

    Lets say you have a optional filter and you want to show block 1 if value are inserted and block 2 if no value selected.
    For this You can create a variable status =IsPromptAnswered("") it will return 1 if prompt is answered.
    In block property go to the hide if below formula is correct and for block 1 give   status =1 and block 2 give status=0
    I hope this will help.

  • How to update one song only?

    i have about 140 songs in my ipod shuffle, and i usually have new song to add. How to delete one song in ipod memory? i just can clear it (right-click),and the memory doesn't change anything???
    and if i want to add just one or two songs? how can I?i tried and my ipod didn't update ...everytime i want to add new song, i have to restore my ipod,i think it's harmful but i have no idea.
    anyone help me please? i don't want my ipod will die soon...
    window   Windows XP   ipod shuffle 512M

    Hi,
    Check this link http://docs.info.apple.com/article.html?path=iTunesWin/6.0/en/799.html
    If you have any more questions post back.
    Santo

  • Newbie can't figure out how to play one song only.

    So I just got up and running with my new iPod 80GB Video. I ripped 3 CDS of tunes to mp3's with iTunes and loaded them into the iPod and it plays but I can't figure out how to just play a single song, it always continues to the next song alphabetically. I've looked in the online manuals and couldn't find where you set "single" instead of "play all". I'm in Songs menu, not Artists or Albums. Please help.

    The iPod isn't designed to work like this, and I think the only workaround is to create a playlist with one song in it.

  • How to post one site only

    I have created 3 different sites in iWeb. Two of them I publish to a folder and then via FTP I place them in the appropriate folders at my server. The third is one that I want to publish to my mobile me website. All pretty easy except it won't let me post just one site. Everytime I ask to publish to the ME account I get all three sites. How do I post just one of the sites I've created...

    patti-jane:
    Welcome to the Apple Discussions. I use iWebSites to manage multiple sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process.
    This lets me edit several sites and only republish the one I want.
    OT

  • How to 'build' one row only in a 2d array

    Hi
    I'd like to have a 2D array with eg 4 rows, and each time the loop iterates, it should append new data at the end of a specified row (row 0 in example) while the data in the other rows remain unchanged.
    I tried all combinations of build array, replace array subset etc but for some reason I cannot get the rows to extend in length..
    I want the output array in the example to be like:
    2 2 2 2 2 2 2 2 2
    x x x x x x x x x
    x x x x x x x x x
    x x x x x x x x x
    Thus append the data array [2 2 2] 3 times to the first row, and leave the rest unchanged, but all I get is an empty array..
    I've been struggling with this for a few hours now, but I can't find it.. Although I think it's very simple!
    Or should I go fo
    r an entirely different technique like clusters or so?
    Can someone help me out?
    Attachments:
    build_1_row_in_2D_array.vi ‏24 KB

    Khalid,
    thanks for your diagram; it didn't help me because it doesn't really do what I want, but I think the transpose 2D function is pretty interesting anyway!
    I found the solution myself, but I don't know if it's clean programming considering memory etc; I first initialize an array that is big enough to conatain all data and an array containing #row elements for storing the total amount of new data written in a row.
    Then I can build a specified row and by shifting the size of the data already written in that row everything gets in place..
    The loop takes quite a lot of blocks and wires, comments on how to get it smaller are welcome!!
    Attachments:
    build_1_row_in_2D_array_working.vi ‏37 KB
    1_row_in_2d_array.jpg ‏179 KB

  • How to 'hide' one stroked-only object behind another?

    I'm struggling with something that shouldn't be this difficult!
    I'm laying-out a white-only T-Shirt logo (to go on a dark-green T-shirt)
    For the sake of simplicity, let's say I have two ovals with no fill, just a white stroke.  A small oval overlapping (on-top-of) part of the edge of a larger (underneath) oval.    I
    Any advice on how to 'hide' the line that's 'behind' the top object?
    Thusly: http://i.imgur.com/ZghWTMa.jpg  

    Actually, I'm not completely sure yet.
    Steve's answer assumes screen printing with a single opaque white ink. It won't work if printing to non-opaque composite transfers, or cutting from aplique vinyl, or if you're going to import the two-ellipse artwork for combination with other artwork.
    Since you don't know:
    1. Draw the two circles with a stroke color and a fill color (ex: black Stroke, white fill) on both.
    2. Apply the desired stroke weight.
    3. Object>Path>Outline Stroke.
    4. Pathfinder palette: Merge.
    5. White pointer: Select the two inside regions and delete.
    6. You now have a single Compound Path; no overlapping objects, and actual "holes" where you want the substrate to show through. Apply whatever fill color (white, etc.) you need.
    But bear in mind what has already been stated: White, unless defined as a Spot Color, does not "print." Think in terms of inks, not in terms of "color". In a program like Illustrator, "white" normally means "no ink." And you always have to know what printing method you are designing for.
    JET

  • TS3999 How to repeat one event only on weekdays with iPad calendar?

    I want to use iPad 1 calendar to repeat one event on weekdays, that is to say, repeat five days in a 7-day week. However, I find that is impossible due to the matter of fact that I can only make repeating everyday possible. Anyone helps me? Thanks a lot.

    There is an app that will do this for you. You add the reoccurring events into the app and the events are saved to your native calendar app or any connected calendar account.
    https://itunes.apple.com/us/app/recurring-events/id470157358?mt=8

  • ?? how to play one song only without auto advance

    Is there any way to get itunes to play single song without automatically advancingf to the next song in the play list.
    hp media center   Windows XP  

    Yes just uncheck them,
    If you have an iPod tho, you will want to make sure "Only Update Checked Songs" is UNCHECKED in the preferences

  • How to keep one-time-only audio files out of iTunes?

    If someone sends me an audio file that I want to play just once ... or if I record a voice memo on my iPhone ... these audio files wind up copied into my iTunes folder and listed in iTunes. I'd rather they weren't.
    Is there some way I can just play an audio file, or record a voice memo, and not have it copied into the iTunes folder and displayed in iTunes? If so, it would save me all the manual deleting every time one of these things shows up.

    Thanks, that works, but it's not exactly what I'm looking for. Rather than have to search for the file in Finder and then hit the space-bar, I'd like to be able to simply double-click on an audio file, let it play in iTunes, but not be copied to the iTunes folder and remain in the iTunes browser until I delete it.
    Also, I need to find a way to keep voice memos from residing in iTunes. I use them a lot, and they just clutter it up.
    Thanks much.

  • How to make one column only in table control automatically filled in ?

    Hi ,all.
    I meet an issue while doing my screen programming. I have a table control on screen which has a few of column. And I want to display date in my first column each row automatically when user open that table/table control. All other column must be in empty in order to let user key in.
    Hope anyone can help me in this issue.
    Thanks in advance.

    Hi
    Flow Logic:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_2209.
    MODULE GET_DATA.             "enters required no of dates in ur itab
    loop at itab with control TBL1.
         module POPULATE_TBL.     "fills date col alone in tbl ctrl
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_2209.
    loop at itab.
       module UPDATE.
    endloop.
    Code:
    *& Report  YFEB2_SCREEN_TBL                                            *
    REPORT  YFEB2_SCREEN_TBL                                            .
    TABLES: YSTUDENT.
    CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2209.
    DATA: OK_CODE LIKE SY-UCOMM,
          itab TYPE TABLE OF YSTUDENT WITH HEADER LINE,  "ystudent is the db tbl i use
          WA LIKE LINE OF ITAB,
          v_date like sy-datum.
    v_date = " initialise to start date.
    CALL SCREEN 2209.
    *&      Module  GET_DATA  OUTPUT
    *       text
    MODULE GET_DATA OUTPUT.
      do 10 times.
         itab-date = v_date.
         append itab.
         v_date = v_date + 1.
      enddo.
    ENDMODULE.                 " GET_DATA  OUTPUT
    *&      Module  POPULATE_TBL  OUTPUT
    *       text
    MODULE POPULATE_TBL OUTPUT.
        MOVE ITAB TO YSTUDENT.
    ENDMODULE.                 " POPULATE_TBL  OUTPUT
    *&      Module  UPDATE  INPUT
    *       text
    MODULE UPDATE INPUT.
    WA-DATE = YSTUDENT-DATE.
    WA-ID = YSTUDENT-ID.
    WA-NAME = YSTUDENT-NAME.
    INSERT YSTUDENT FROM WA.
    ENDMODULE.                 " UPDATE  INPUT
    *&      Module  STATUS_2209  OUTPUT
    *       text
    MODULE STATUS_2209 OUTPUT.
    SET PF-STATUS 'BACK'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_2209  OUTPUT
    *&      Module  USER_COMMAND_2209  INPUT
    *       text
    MODULE USER_COMMAND_2209 INPUT.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
      WHEN 'BACK'.
        LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_2209  INPUT
    If you have a specific date upto which you want you can declare a var for that and while filling the itab you can use it in condition.
    Hope this helps
    Regards,
    Jayanthi.K

  • Customer should be blocked only one document type ?

    Dear
    how to block some customers only for some sales document types
    ex: customers 1000,10005,1006,1007
    now i have sales document types .. ZSOR ,ZSOZ, ,ZSOOZ
    Now 1006 customer should not be allowed to create ZSOOZ Order but he can create all document types
    Any possibility is there in sap

    It can be done with standard system itself--Here i don't want disagree with other members.
    Have you tried with option called--Define & assign blocking reasons to sales document types.
    IMG→SD→Sales→Sales Documents→Define & assign blocking reasons.
    1.Create one Blocking reason(X) ,
    2.Assign this-X, to all your sales document types(OR)
    3.Now you assign this Blocking reason to the customer(A),whom you want to block.
    4.When you try with A with OR--system will blocks.
    5.For other customers(B,C,D....) will be allowed with OR.
    Hope this helps.
    Phanikumar

  • How do I deactivate your censor of URLs - I have no children & it's a pain every time & have to override your block - only started this latest version.

    How do I deactivate your censor of URLs - I have no children & it's a pain every time & have to override your block - only started this latest version. edit
    Details

    Firefox doesn't censor or control.
    Try the Firefox SafeMode. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    # You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    # Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • I just purchased a new computer and downloaded I tunes but when I go to sync my iphone and ipad touch my library from my old computer doesn't show up on the new one. Only the purchased itumr dongs come up. How do I get my original itunes library?

    I just purchased a new computer and downloaded I tunes but when I go to sync my iphone and ipad touch my library from my old computer doesn't show up on the new one. Only the purchased itune songs come up. How do I get my original itunes library?

    Have you copied your content over from your old computer and onto the new on ? If not, and you still have your old computer, then there a number of methods described on this page which you can use to copy your library over : http://support.apple.com/kb/HT4527 . If you no longer have your old computer then have you got a backup of your content that you can copy onto the new computer and add into iTunes ?

  • How do I make one (and only one) device use my Apple ID and iCloud account?

    How do I make one (and only one) device use my Apple ID and iCloud account? I currently have an iPad mini, iPhone 5, and MacBook pro attached to my apple accounts, but I want only my iPhone 5 to be assosiated with either one. Whenever I use any of the three devices, I get a notification on the other two telling me that these devices are now using these accounts from these services, etc. and I want these notifications to stop, along with the devices using to them. How do I do this? I completely reset the iPad mini so I don't know how I'm still getting notifications from it, and I deleted and signed of of all of my accounts everywhere I could find on my Mac. So, to restate exactly what I want to do, I want ONLY my iPhone 5 to use ANY of my Apple/iCloud accounts and ONLY it can receive emails, iMessages, and FaceTime calls. Thanks!

    If you want to disconect your Mac from iCloud, go to System Preferences>iCloud and click Sign Out.  If you only want to stop using iCloud email, just uncheck Mail.  To stop iMessage, open the Messages app, go to Messages>Preferences, click the Accounts tab, click your iCoud ID on the left-hand side, then to the right click Sign Out.  To stop FaceTime, open the FaceTime app, then click "Apple ID" then click Sign Out.
    On your iPad, go to Settings>iCloud and tap Delete Account (or if you only want to stop using iCloud email, turn Mail off).  For FaceTime, go to Settings>FaceTime, tap the ID and sign out.  For iMessage, go to Settings>Messages>Send & Receive, tap the ID and sign out.

Maybe you are looking for

  • How do I install Tiger on an external HD?

    Can I install Tiger on an external HD connected via FW from the laptop to which it's connected? It seems like the installation disk wants to restart the laptop and only install it there. How do I do a fresh install of OSX on this external HD?

  • Handle forward & backward TAB

    In the focusLost() event of a component, I need to find if focus has to be set to the next component or to the previous component. Basically identify if TAB or SHIFT+TAB was pressed. How can this be done within the focusLost() event of the component.

  • How to send a warning message before closing soft via X of the title bar

    With labview 8.2: I would like to send a warning message before closing my soft when the user press the "X" of the title bar. Is it possible to do that without a Windows dll? Thanks a lot, Daniel.

  • VLC fullscreen sometimes makes screen stay black after video ends

    like the subject says, sometimes the screen just stays black when a video ends while VLC is in fullscreen mode. I'm using VLC 2.0.8.a-1. I got the laptop in April, just in time for Revision 2013, had the problem more or less from the start, so that's

  • Play dvd files via apple tv

    after backing up my dvds to a hard disk, can I play them via apple tv?