How to delete 'crm_order_maintain' FM raised messages in WebUI

Hi Experts,
   I want to delete messages based on conditions in 'do_prepare_output' method. How to delete 'crm_order_maintain' FM raised messages in WebUI
Thanks & Regards,
Nitish

Hi Dharmakasi,
   Thanks a lot for your reply. I have implemented logic in Badi also. After deleting message in badi even thou  again i am getting error message, transaction in display mode. That's the reason i am deleting error message in bap component. Please find the below badi logic.
Thanks & Regards,
Nitish
* Get Log Handle(s)
     CALL FUNCTION 'CRM_MESSAGES_GET_LOG_HANDLES'
       IMPORTING
         et_log_handle = lt_log_handle.
     LOOP AT lt_log_handle INTO ls_log_handle.
       CALL FUNCTION 'CRM_MESSAGES_SEARCH'
         EXPORTING
           iv_log_handle  = ls_log_handle
         IMPORTING
           et_msg_handle  = lt_msg_handle
         EXCEPTIONS
           appl_log_error = 1
           error_occurred = 2
           OTHERS         = 3.
       IF sy-subrc EQ 0.
         LOOP AT lt_msg_handle INTO ls_msg_handle.
           CLEAR: ls_message.
           CLEAR: ls_msg_info.
           CLEAR: ls_msg.
           CLEAR: lv_ref_object_text.
           CALL FUNCTION 'CRM_MESSAGES_GET_MSG_INFO'
             EXPORTING
               is_msg_handle           = ls_msg_handle
*             IV_GET_CALLER_NAME      =  TRUE
             IMPORTING
               es_info                 = ls_msg_info
               es_msg                  = ls_msg
               ev_ref_object           = lv_ref_object_text
             EXCEPTIONS
               not_found               = 1
               wrong_context_structure = 2
               data_error              = 3
               OTHERS                  = 4.
           IF sy-subrc EQ 0.
             MOVE-CORRESPONDING ls_msg_info TO ls_message.
             MOVE-CORRESPONDING ls_msg      TO ls_message.
             INSERT ls_message INTO TABLE et_message.
           ENDIF.
         ENDLOOP.
       ENDIF.
     ENDLOOP.
     CLEAR: ls_message.
     LOOP AT et_message INTO ls_message WHERE object_name = 'SERVICE_OS'
                                          AND ref_kind    = 'B'
                                          AND msgty       = 'E'
                                          AND msgid       = 'CRM_SERVICE_OS'
                                          AND msgno       = '121'.
       MOVE: ls_message-log_handle TO es_msg_handle-log_handle,
             ls_message-msgnumber  TO es_msg_handle-msgnumber,
             ls_message-ref_object TO lv_guid_ref.
       APPEND es_msg_handle TO et_msg_handle.
     ENDLOOP.
* Reading Item details
     IF lv_guid_ref IS NOT INITIAL.
       CALL FUNCTION 'CRM_ORDERADM_I_READ_OW'
         EXPORTING
           iv_guid        = lv_guid_ref
         IMPORTING
           ev_header_guid = lv_header_guid
         EXCEPTIONS
           item_not_found = 1
           OTHERS         = 2.
       IF sy-subrc EQ 0.
         CALL FUNCTION 'CRM_ORDERADM_I_READ_OB'
           EXPORTING
             iv_header           = lv_header_guid
           IMPORTING
             et_orderadm_i_wrk   = lt_orderadm_i
           EXCEPTIONS
             item_does_not_exist = 1
             error_occurred      = 2
             OTHERS              = 3.
         IF sy-subrc EQ 0.
           CLEAR: ls_orderadm_i.
           LOOP AT lt_orderadm_i INTO ls_orderadm_i.
             REFRESH: lt_osset_n,
                     lt_refobj_n.
             CLEAR: ls_osset_n,
                    ls_refobj_n,
                    ls_service_os.
             CALL FUNCTION 'CRM_SERVICE_OS_READ_OB'
               EXPORTING
                 iv_ref_guid          = ls_orderadm_i-guid
                 iv_ref_kind          = 'B'
               IMPORTING
                 es_srv_osset_wrk     = ls_service_os
               EXCEPTIONS
                 entry_does_not_exist = 1
                 error_occured        = 2
                 parameter_error      = 3
                 OTHERS               = 4.
             IF sy-subrc EQ 0.
               MOVE: ls_service_os-osset[] TO lt_osset_n[],
                     ls_service_os-ref_guid TO ls_serial-ref_guid.
               READ TABLE lt_osset_n INTO ls_osset_n INDEX 1.
               IF sy-subrc = 0.
                 lt_refobj_n[] = ls_osset_n-refobject[].
                 READ TABLE lt_refobj_n INTO ls_refobj_n INDEX 1.
                 IF sy-subrc = 0.
                   MOVE ls_refobj_n-serial_number TO ls_serial-serial_no.
                   MOVE ls_refobj_n-serial_number TO lv_sernum_n.
                   APPEND ls_serial TO lt_serial.
                 ELSE.
                   READ TABLE lt_refobj INTO ls_refobj INDEX 1.
                   IF sy-subrc = 0.
                     MOVE ls_refobj-serial_number TO ls_serial-serial_no.
                     MOVE ls_refobj-serial_number TO lv_sernum_n.
                     APPEND ls_serial TO lt_serial.
                   ENDIF.
                 ENDIF.
               ENDIF.
             ENDIF.
           ENDLOOP.
           SORT lt_serial BY serial_no.
           IF lt_serial[] IS NOT INITIAL.
             LOOP AT lt_serial INTO ls_serial WHERE serial_no EQ lv_sernum_n.
               CALL FUNCTION 'CRM_STATUS_READ_OW'
                 EXPORTING
                   iv_guid       = ls_serial-ref_guid
                 IMPORTING
                   et_status_wrk = lt_status
                 EXCEPTIONS
                   not_found     = 1
                   OTHERS        = 2.
               IF sy-subrc EQ 0.
                 READ TABLE lt_status INTO ls_status WITH KEY object_type = 'BUS2000160' " Complaint Item
                                                              kind = 'B'
                                                              user_stat_proc = 'CRMCOM_I'.
                 IF sy-subrc EQ 0.
                   IF ls_status-status EQ 'E0004'.
                     lv_comp = lv_comp + 1.
                   ELSE.
                     lv_ncomp = lv_ncomp + 1.
                   ENDIF.
                 ENDIF.
               ENDIF.
             ENDLOOP.
             IF lv_comp GE 1
            AND lv_ncomp LE 1.
               IF et_msg_handle[] IS NOT INITIAL.
                 LOOP AT et_msg_handle INTO es_msg_handle.
                   CALL FUNCTION 'BAL_LOG_MSG_DELETE'
                     EXPORTING
                       i_s_msg_handle = es_msg_handle
                     EXCEPTIONS
                       msg_not_found  = 1
                       log_not_found  = 2
                       OTHERS         = 3.
                   IF sy-subrc EQ 0.
* Implement suitable error handling here
                   ENDIF.
                 ENDLOOP.
               ENDIF.
             ENDIF.
             CLEAR: lv_comp, lv_ncomp.
           ENDIF.
         ENDIF.
       ENDIF.
     ENDIF.

Similar Messages

  • How can i show a raise message?

    Hi...
    I am use JDev 11.1.2.0.0
    How can i show a raise message for the user for validations issues
    and after his message the user can't do any thing.
    thanks...

    HI ,
    You can use your entity level validations for this .For this go to your entity object then select the required attribute ,now at the bottom of the page validation rules for that attribute is given just click on that ,now you can select the validation that you want and give error handling msg also.
    If you want that user cannot move further without filling that field then you can mark that fields as compulsory by selecting true value at its required field in property inspector.

  • How to delete all my personal messages from my iphone..... even after deleting from inbox it is available in the search iphone option that is siri

    how to delete all my personal msg from my iphone..... even after deleting it fom inbox it is available in the siri option

    As stated in your first post, restore your phone as new.

  • How to delet a "no contents" message

    I have received three emails with "no content" but cannot delete them as they do not activate the delete symbol, can anyone tell me what to do?  Thanks

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app via the iPad’s taskbar : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar at the bottom of the screen, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Also do a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How to delete email messages

    How to delete all old email messages that I neglected to delete after reading.  Is there a easier way than editing and then selecting the delete button for each email message?

    There is no easy way. Perhaps you could use your computer or use web mail of your account supports this - these methods would be faster (for IMAP accounts).

  • Delete only one text message at a time w/o deleting entire conversation?

    Does anyone know how to delete only one text message at a time without having to delete the entire conversation? The only two options I get are "clear conversation" or "cancel."
    HP   Windows XP  

    That's the same option I get too. It seems to me I recall seeing somewhere that you could delete individual messages in a thread but I don't remember where.
    It seems silly to limit deletions to only the entire conversation since with most phones you can delete individual messages.

  • How to delete large amounts of mail

    I NEED more memory on my iPad, and have too many e-mails, and need to know how to get rid of them at once

    Try this and see if it works for you.
    http://www.conferencesthatwork.com/index.php/technology/2014/01/how-to-delete-al l-mail-messages-from-iphoneipad-in-one-step/

  • How to delete all iPad emails.

    I would like to select all emails and delete at one time

    How to Delete Email on the iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Delete-Email-On-The-Ipad.htm
    How to Mass Delete Emails from iPhone and iPad Inbox (with video)
    http://suiteminute.com/how-to-mass-delete-emails-from-iphone-and-ipad-inbox/
    How to delete ALL mail messages from iPhone/iPad in one step
    http://www.conferencesthatwork.com/index.php/technology/2014/01/how-to-delete-al l-mail-messages-from-iphoneipad-in-one-step/
     Cheers, Tom

  • How to delete the messages in the purges folder?

    if the mailbox is enabled the single item recovery, then the messages would move from deletion folder to the purges folder After running the following script,
    Search-Mailbox dave -searchdumpsteronly
    -deletecontent
    so my question is how to delete the messages in the purges folder with some script or retention policy?
    Please click the Mark as Answer button if a post solves your problem!

    Thank you all,
    As the mailbox is enabled single item recovery.
    I just want to make the items neither in deletion folder, nor in purges folder.
    So I think there are two ways to achieve this.
    Method 1,disabled the single item recovery. then delete the items in deletion folder ,so it wouldn't enter to the purges folder, it just deleted permanently. then enable the single item recovery
    Method 2,delete the items in deletion folder,then the messages move to the purges folder, then delete the messages in purges folder.
    the Method 1 is not so good ,as it need to disable the single item recovery firstly, then enable  single item recovery .
    So I want to use the Method 2
    Please click the Mark as Answer button if a post solves your problem!

  • I accidently deleted a voice mail message.  Is there any way to retrieve it?  I was told I had to talk with technical support to reset the password to my voice mail. Can someone tell me how to do this?  When I call, I can't understand the other person

    I accidently deleted a voice mail message.  Is there any way to retrieve it?  I was told I had to reset my password since I entered the wrong one three times.

    Depends on your carrier.  You'll have to contact your carrier for how to do this.  (This is for AT&T: http://www.att.com/esupport/article.jsp?sid=52649#fbid=WLddP4KyTAu.)

  • How to delete multiple messages in mail

    How to select a bunch of messages in mail to delete.

    I Wonder if your sitting there laughing at us as if there is some big conspiracy about selecti all and deleting all from our iPhones and iPads.
    The conspiracy.
    Why can we not just not select all in the mail inbox and then delete all, if we do not want to delete every single one of them then deselect the few that we do not want to delete instead of having to select the thousands we do want delete individually. 
    And if you do make a mistake and delete the wrong emails by selecting all, then go to your trash and reinstate the ones you did not want to delete 
    I think 99% of us know how to DELETE emails individually, as you put it.
    That's just sarcasm and if not then then your not fully understanding the question asked.
    I would also say that probably 99% of us want to be able to select all and delete all if that's what we desire.
    I would just like a honest answer of why we cannot select all delete all rather than giving me a load of rubbish about encase we delete something we didn't want to delete.

  • How to delete / cancel messages in PI adapter engine

    Hello expert,
    we have a scenario File (EOIO) --> PI --> ABAP. Today the file we received is big (>100mb), apparently PI can't handle it, and we got error
    Transmitting the message to endpoint http://host:port/sap/xi/engine?type=entry using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Error transmitting the message over HTTP. Reason: java.io.IOException: Error writing to server.
    seems like PI adapter engine got problem while delivering the huge message to ABAP integration engine. In RWB message monitoring, the message is set to Error. Unfortunately the file has been picked up many times, thus the huge message is stuck in adpater engine. In RWB message monitoring, I can see the message listed many times and status is HOLDING because the previous message can not be delivered to Intergration engine. I want to delete/cancel all the messages, I tried in RWB message monitoring to cancell the messages, however after cancelling one message, it crashed the PI system and cause a reboot.
    My question is; Is there some place in NWA (net weaver admin) to force all the messages to be deleted? (Because deleting/cancel in RWB message monitoring does not work because it causes system crash).
    Thanks
    Jayson

    Hi Team,
    I couldn't able to delete old message's from one of Q system, Persistence layer is 584 % filled, after triggering delete job(RSXMB_DELETE_MESSAGES) and Persistence layer has come to 384% and further I couldn't able to delete old messages.I executed program "
                                                                                                          RSXMB_CHECK_MSG_QUEUE" and manage  to delete few entries.Could you please suggest how to reduce fill level to below 100%
    Switch Procedure (for Persistence Tables) Deactivated
    Number of Table Entries                                                           
    3.185.992
    Maximum Number of Table Entries                                                   
    830.000
    Current Fill Level in %                                                           
    384
    Threshold value for fill level for executing a switch run in %                    
    60
    Number of Logically Deleted Table Entries                                         
    0
    Decline of Fill Level in % Following Deletion                                     
    384
    Delete or archive processed XML messages
    Job log overview for job:    SAP_BC_XMB_DELETE_001 / 06302000
    Date       Time     Message text                                                                               Message class Message no. Message
    13.03.2013 06:39:55 Job started                                                                                     00           516          S
    13.03.2013 06:39:55 Step 001 started (program RSXMB_DELETE_MESSAGES, variant &0000000000034, user ID SAPBATCH)      00           550          S
    13.03.2013 06:39:55 Value for parameters DELETION-RELATED_OBJECTS-ASYNC: 1                                        XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-RELATED_OBJECTS-ROWS: 100                                       XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-RELATED_OBJECTS-IDX5_DELAYED: 0                                 XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-ROWS_PER_LOOP-DELETE: 100                                       XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION-ASYNC: 007                                     XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION-SYNC: 007                                      XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION_ERROR-SYNC: 007                                XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION-IDX5: 007                                      XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION_UNIT-ASYNC: D                                  XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION_UNIT-SYNC: D                                   XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION_ERROR_UNIT-SYNC: D                             XMS_ADM        375          S
    13.03.2013 06:39:55 Value for parameters DELETION-PERSIST_DURATION_UNIT-IDX5: D                                   XMS_ADM        375          S
    13.03.2013 07:27:58 0 XML messages deleted                                                                        XMS_ADM        351          I
    13.03.2013 07:27:59 Step 002 started (program RSXMB_TABLE_SWITCH, variant &0000000000034, user ID SAPBATCH)         00           550          S
    13.03.2013 07:28:00 Job finished                                                                                    00           517          S

  • How to delete all messages in my inbox?

    How to delete all messages in my inbox?

    For messages, go to the conversation list (if viewing a conversation, tap Messages at the top left), tap the Edit button on the top left, tap the minus sign to the left of any of the conversations you want to delete, tap Done at the top.

  • How to delete the messages from SXMB_MONI which are already cancelled .

    Hi All,
    The messages were earlier in System error(Red flag) state so i cancelled it manually.
    I want to know how to delete the messages from sxmb_moni which are already cancelled manually using ctrl+f8.
    if not possible , then i want to see them in earlier state i.e.., in System error(Red flag).
    can any tell me the procedure of doing it.
    thanks
    Sai.

    Hi AmitSri,
    Thanks for u r reply,
    What is retention period, where can i find this option.
    And i don't have authorizations to sxmb_adm --> configure delete procedure
                                                                             --> Define interfaces for archiving and retention period.
    and to RSXMB_DELETE_MESSAGES in se38 , i don't have authorizations to run
    Is there any way to delete the messages or make them to System error( Red flag) which are manually cancelled.
    Thanks
    Sai.
    Edited by: sai_SHA on Aug 17, 2011 12:29 AM

  • How to delete the messages from sxmb_moni with status cancelled

    Hi ,
    how to delete the messages from sxmb_moni with status cancelled
    Is there any report for this
    Regards
    Suman

    I think just for deleting the jobs you can do this only
    Scheduling Delete Jobs
    To schedule delete jobs, proceed as follows:
           1.      In the Integration Engine -
    > Administration menu, choose Schedule Delete Jobs.
           2.      Select the job(s) to be scheduled.
           3.      Specify the start time and date.
           4.      Specify the period you want to use and choose Schedule.
    For an overview of all jobs, choose Jobs.

Maybe you are looking for

  • Is there a way to create a pop-out forum or blog without redirecting pages?

    I already have a website developed with a lot of content on the mainpage. Now I want to create a forum or blog for it for people to ask questions and what not, but I do not want it to redirect them to another page. I don't have a lot of room to work

  • Qosmio F30 PQF32E- WI-FI card issue

    Dera all, A long time i am using wi-fi connection for connecting internet. Yesterday i tried to connect wi-fi, i got error. When I am activating wi-fi in notebook, it is getting frozen or working very very slow and even wi-fi card disabled. i am enab

  • Safari loading slow with yosemite

    Even after this latest update, Safari is loading incredibly slow since the OS X Yosemite upgrade.  Any suggestions as to how to get pages to load faster?  Sometimes they won't even load completely. 

  • 3D Rendering vs 2D (why I can't see my 3D)

    Ok, admitedly, I'm new at this and I am working with a template that someone else built.  The project has several comps that hold video clips - they are 3D.  The main comp has many layers that are all 3D (psd files, and other comps).  I wanted more v

  • APPLET ALERT with IE7 and latest JRE

    Hi all, I am having the problem that if i go to www.map24.de I get bombarded with applet alerts (e.g. The applet is attempting to invoke the java/lang/System.gc() operation), but WHY? Similar configuration on another PC (Win XP, IE7, Java 6u2), the p