Do u want to save the changes ?

Hi
Sorry am confused regarding this thread, hope someone could help me pls.
Would you like to save changes.. no changes to save
From the thread i concluded that..
.It is important to use the following in the POST-QUERY TRIGGER as follows
SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS);
BEGIN
SELECT dept_name
INTO    :dept_name
FROM  departments
where dept_id = :emp.dept_id;
EXCEPTION
WHEN OTHERS THEN MESSAGE(ERRMSG);
END;am i right ?
i need explanation pls.
Regards,
Abdetu..

From the thread i concluded that..
.It is important to use the following in the POST-QUERY TRIGGER as follows
SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS);
BEGIN
SELECT dept_name
INTO :dept_name
FROM departments
where dept_id = :emp.dept_id;
EXCEPTION
WHEN OTHERS THEN MESSAGE(ERRMSG);
END;From the code you show, not really. The exception-part is even bad, leave it out, forms will show an error anyway when it occurs.
This part
SET_RECORD_PROPERTY(:SYSTEM.TRIGGER_RECORD, :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS); CAN be useful, but is not u MUST. In any case, it should be after any lookup-code, so in your example it should be just before the exception handler.
The SET_RECORD_PROPERTY makes sure that any outstanding validation on any item of the current record will be considered as "finished". This is helpful when you have a lookup-code as in your example AND if there is a validation-trigger on that lookup-item (in your case a WHEN-VALIDATE-ITEM-trigger on :DEPTNAME), which checks the value in the item and tries to read the according fk-id-value for the given textvalue and store it back to the fk-id-column.

Similar Messages

  • How to suppress 'Do u want to save the changes?'  When there are no changes

    Hi All,
    I have developed one form,which contains 3 blocks in that 2 are database blocks and one is control block.It's working fine.When I close the form without doing any change also it is showing an alert as 'Do you want to save the changes you have made?'. How can I suppress that alert when I haven't made any change to the form.
    I am displaying one filed in the database block as 'null' until check box is checked.For that I have written code in when-new-block-instance trigger of that block.
    There I wrote SET_RECORD_PROPERTY (GET_BLOCK_PROPERTY (:SYSTEM.TRIGGER_BLOCK, CURRENT_RECORD), :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS); also to change the block status as query.
    But it is not working, still I am getting the alert,How can I solve this could anyone please give me a suggestion..
    Thanks in advance.

    So, this functionality can be done through CHECK BOX itself. Why you are making null by WHEN-NEW-BLOCK-INSTANCE. You can just set the update and insert property for that fields and rest things you can control from chexbox. And WHEN-BLOCK-INSTANCE-TRIGGER will fire once when you will access that block. If you want to set the same functionality for each record. Then you must use WHEN-NEW-RECORD-INSTANCE. for ex.
    Trigger = WHEN-NEW-RECORD-INSTANCE (BLOCK-LEVEL)
    Here i will assume that if check box is checked then he can update that fields.
    IF :CHECKBOX='Y' THEN
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
    ELSE
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
    END IF;In the above code no need for set value to NULL.
    And on CHECK BOX you can write like this...
    Trigger WHEN-CHECKBOX-CHANGED (ITEM-LEVEL)
    IF :CHECKBOX='Y' THEN
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
    ELSE
      :FIELD_NAME:=NULL;  -- here if check box is unchecked then it will set value to NULL
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
      SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
    END IF;-Ammad

  • How to avoid the message "Do you want to save the changes you have made?"

    i have 3 forms
    master block
    detail1 block of master
    detail2 block of detail1
    when i go out of detail1 and detail2 blocks after doing some modifications it asks me "Do you want to save the changes you have made"?
    i want to avoid this message as well as my changes should be posted in the database. what is the solution for this big pblm?

    hi
    may be you are trying to modify the database item or reassigning the database item value which is not actually needed.
    try to comment the reassigning database values
    and give clear_form(do_commit);
    most probably u will not get the message again
    Regards
    Rajdeep .A

  • Dialog Box as "Do you want to save the changes?" in Forms.

    Hi,
    I have 4 datablocks in my forms that corresponds View.
    In the form design, I have a canvas(multiple inserting design) with two buttons that calls the other two blocks.
    Am inserting the records in the following way,
    In first record,
    am entering the value in one block, then a button-press event and so it opens another canvas where I enter some values then return to my main canvas. This is one row.
    But while I try to insert in the second row, there arises the dialog box as "Do you want to save the changes"?
    I should not get that dialog box.
    Please suggest me with the solution.
    Regards,
    Mini

    Thanks for the response,
    Let me clearly explain.
    I have 3 blocks created from view not table.
    I have a canvas in the multiple display layout i.e Number of items displayed is 10.
    In that canvas, I have set the two buttons. the button event is calling another canvas.
    Am inserting a record in the first row in the following sequence.
    Inserting the values for some fields in the main canvas, then entering the button, it opens another canvas that responds to another block, there am entering some values and closing the button event canvas, then returning to my main canvas, then entering the remaining fields with the values, thus my first row ends.
    Now I want to enter the values in the second row, while I navigate from the first Row to the Second row, there arises the dialog box as to save the changes or not?
    I should not get the dialog box.
    Am inserting the values in the database using Insert statements in all the blocks.
    Hope U understand the issue.
    Suggest me with the solution.
    Regards,
    Mini.

  • Forms6i question - Do you want to save the changes you have made !!

    Hi,
    I'm developing a custom master-detail form for 11i e-Business Suite. The requirement is to programmatically default values for some of the base table items when entering the master record.. Both the master and the detail blocks are base table blocks and defined the relation between these 2 as well..
    So i have coded my defaulting logic in the "when-new-record-instance " trigger only when the "(:system.record_status IN ('NEW','INSERT' ) AND :system.mode <> 'ENTER-QUERY')"..
    This is working but the problem is even when i do not change any values in the master block and i try to exit out of the form, getting a message "Do you want to save the changes you have made ".. I want to get that message only when some thing else is changed/entered in the master block or when any new detail records has been entered for that master block.
    Thanks in advance
    Shree

    Shree,
    It sounds like you have a Post-Query (PQ) trigger that is populating items in your Form. This is the typical reason why you would see this message when you close your form and no User changes have been made. The best solution would be to move your non-base table items from your data blocks to a control block so the PQ trigger won't mark the block or record as "Changed".
    Hope this helps.
    Craig...

  • Gettins "Do you want to save the changes you have made" promt without any

    Hi all,
    Problem : I have a master detail relation between two blocks which are on different window ( say block 1 on window 1 is master and block 2 on window 2 is detail) ,
    when i open my window 2 and close it without any changes, then when i try to do any change in window 1 i get this popup message "Do you want to save the changes you have made".
    I have various non database items as well which are used to hold intemediate values like sum of a column and all.
    for the close button on window 2 logic :
         go_block('BLOCK1');
         hide_window('WINNDOW1');
    I dont want to change the message level. as if there are really changes made then we need this message.
    In another thread i saw this might be due to copy "value from property" created by master detail relation on the joined columns.
    Please suggest any solutions.
    Thanks in advance.

    HI I found the solution to this Problem:
    when we queried the data block then few items values were assigned . this changes the block_status to CHANGED as well as the form_status variable to CHANGED.
    so in EXIT logic of that window i cleared each block explicitly . this discards all the changes made to those blocks ( This logic was implemented for CANCEL button on my screen as so we need not save the data) while the SAVE logic already has the COMMIT so will not set the popup for that.
    Not a beautiful logic...... but works ...... :)

  • Suppress the message do you want to save the changes you have made

    hi all
    i have written a rollback
    it clears my record
    but gives me the message
    do you want to save the changes you have made
    i have written
    :system.message_level :=25;
    rollback;
    :system.message_level=0;
    but still it is giveing me the message
    can you please tell me how to suppress this message
    please help me
    thanks
    mandar

    try in reverse

  • Show the alert 'Do you want to save the changes? after entering each record

    Hi,
    Is there a way to show the alert 'Do you want to save the changes you have made?', after entering each record.
    i.e. as soon as a record is entered, user should be prompted to 'Do you want to save the changes?' the record when they move to the next record.
    I used the below code in Post-Record rigger. Prompt was diplaying fine as per the requirement,but record was not being saved.
    DECLARE
    n_button_selection INTEGER;
    BEGIN
    if :System.Record_Status='INSERT' then
    fnd_message.set_string('Do you want to save the changes?');
    n_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
    IF n_button_selection = 1 THEN
    forms_ddl('commit_FORM');
    ELSIF n_button_selection = 2 THEN
    RAISE form_trigger_failure;
    ELSE
    NULL;
    END IF;
    end if;
    END;
    I used forms_ddl('commit_FORM') to commit the record. Because we can't us Do-key('commit_form') in post-record trigger. But forms_ddl('commit_FORM') is not working. So can anybody please give some idea regarding this.
    --

    Forms_ddl issues dynamic sql - you cannot call another builtin (like commit_form) within forms_ddl. Check form_status after the call and you will see that it failed.
    Moreover, forms is not able to execute the post and commit process if you issue "forms_ddl('commit');", so this will not be a solution either.
    You could use the When-New-Record-Instance - Trigger, which allows restricted built-ins to be executed, and issue do_key('commit_form');". However, you would have to check the :system.block_status or :system.form_status, because :system.record_status will already hold the new record number.
    Regards,
    Gerd

  • Unnecessary question "Do you want to save the changes..."

    Hello again,
    I have a multi-record block on which only update is allowed and two buttons: accept and reject. There are three possible ways of changing records:
    1. change values in some fields and commit - which works fine;
    2. change values in some fields and press accept button;
    3. change values in some fields and press reject button.
    Buttons have implemented delete, update, insert in some tables using a pl/sql stored package. At the end of the processing, for both buttons, record "accepted" or "rejected" dissapears from the block - using execute_query. Problem is that if some values have been changed before pressing the button, warning window appears: "Do you want to save the changes you have made?" which in this case is unnecessary and annoying. How can i get rid of this message?
    Thank you in advance.

    If you don't want commit changes on base table items you can use clear_block(NO_VALIDATE) built-in before execute_query

  • HOW to call at anytime the form6 "do you want to save the changes you have made"????

    HOW to call at anytime in form6 "do you want to change the save you have made"????
    It executes only if you use exit_forms
    and I don t want to save with a commit_forms
    without do appears this forms of form6
    Thanks a lots for any answering
    null

    you have to write a trigger on key-clrfrm and key-next-record.
    on that triggers you can call alert with 2 or 3 buttons.
    I hope it will help.
    Mustafa

  • Form is asking for do you want to save the changes made in the query mode

    hi all,
    according to my previous thread {thread:updating the nondatabase column}
    i have set the lockrecord to yes for the non_db_field but when i query the form with help of f8 and try to close it with out any changes then too its asking for the commit.
    how can i solve this issue.
    Thanks..
    Edited by: user13329002 on Dec 30, 2010 12:41 AM

    Hello
    Yes, i do agree with Ahmed
    pls check the POST-QUERY TRIGGER < ---- This is the KEY-Problem
    Trace which item causes the problem almost it's a db item was formaly returned from LOV and it is re-assigned in the POST-QUERY Trigger .
    SO , changes in the db occured changes the status of the form.
    most propaply it's a retrieved fk in ur post Query,also avoid using reserved words in ur display items as
    TYPE ,NAME ,etc.
    ITEM_ID ,ITEM_NAME -- reserved word for java and related staff ...pls check list of oracle reserved words
    hope this helps solving ur problem...
    Regards,
    Abdetu...

  • Do you want save the changes

    Hi,
    I have an item in a block with when_new_item_instance trigger, which is to clear the entire form.
    but when i make changes in other block and coming back to this item it forces to save the changes.
    but i dont want to save the changes , so how could i avoid this message, tried with message_level
    and some other options did'nt work out, could you pleae suggest the way to avoid this message. Thanks.

    Simply,
    you could write this statement in required trigger
    Clear_Form( No_Validate, No_Commit );
    I hop this would resolve your problem,

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • Disable the prompt "Do you want to save the chnages you have made?"

    Hi,
    I have a forms application with some text fields on it.
    After the data is displyed on the text fields from the
    database, one of the text fields gets highlighted
    automatically, even though I have not selected it
    manually.
    When I close the forms window, I get the
    message prompt "Do you want to save the changes
    you just made?",though nothing was changed in the
    text fields.
    Can anyone help me get rid of these implicit forms messages?.
    Thanks
    sharath

    Hi
    After the data is displyed on the text fields from the database
    Are you displaying data through querying the base table through execute_query (or similar built-ins) or are you populating the block programatically?
    In case you are querying the record, then form should not display save confirmation dialog box.
    If you are populating the data block programatically and if the block is a database block then try including this as the last statement of your populating logic: -
    set_record_property(:system.cursor_record,<block_name>,status,query_status);
    Regds
    Sumit

  • Messagen asking for save the changes when open a workbook in BW

    Hi
    I create a lot of workbooks in BW system.
    If I run those workbooks it run's without any error.
    If I ask my collegues to run, ii apperars imediatly when the Excel is open, if they want to save the changes.
    If they say no the excel closes.
    Can you help me?
    Thanks
    Dora

    Yes. This prompt is from Excel and not from BEx. It just prompts you to save the workbook locally in your system.
    I think this can be suppressed using Excel options. If you save, then you are saving as an Excel (.xls) spreadsheet - it's not going to change the actual BEx query or workbook. Other related threads : http://goo.gl/bwNsV

Maybe you are looking for

  • CFL on Sales Order Matrix

    Hi Experts, Can you please let me know how to add choose from list in Sales Order Matrix for User defined field. I have tried lot but not able to find proper answer. I have also tried by adding new user defined column to matrix but unfortuanately it

  • SQL 2012 Management Studio Remote Servers Service Status Slow/Stops Working

    This is a huge annoyance.  I manage about 50 SQL instances of SQL Server versions 2005-2012 and I noticed that it takes 1-2 seconds to load the service status (green arrow) on each individual server.  If you then connect to a server, you have to wait

  • Changing area of pixelation on screen - why?

    OK, pixelation may not be the right term. But anyway, there are changing places on the screen where there's a chunk that is like an extremely low resolution, etc.  I'm attaching a partial screenshot so you can see what I mean. When I scroll or move,

  • Pages for iPad removes MS Equations. Please help!

    I have a Macbook and an iPad and am trying to work between the two. I need a frictionless read & write collaboration between the MS Word for Mac and Pages on iPad. This breaks down badly as Pages app, even after the installation of MathType, reports

  • `How do I delete former location in Maps?

    I have too many locations which I would like to delete. How do I do it? This is an example