Populating the error message (BAdI implementation)

Hi there,
I have a BAdI to implement <b>CRM_ORDERADM_H_BADI</b> where it will check certain header data. If there is a certain condition that is met, we must not allow the transaction to continue by adding error message on the top (the red button). How can we populate this error log within the BAdI implementation (putting it in codes in the <i>method </i>of the BAdI implementation).
Many thanks in advance,
Regards,
MuJi
Message was edited by: Muji.net

Hello,
Use CRM_MESSAGE_COLLECT to add your message, CRM_MESSAGE_DELETE to delete the old message from the log.
example :
DATA:
lv_objnr               TYPE  crm_jest-objnr,
ls_msgidno             TYPE  bal_s_idno,
lt_msgidno             TYPE  bal_r_idno,
lv_dummy_message       TYPE  c.
**Delete message(s)
ls_msgidno-sign       = 'I'.
ls_msgidno-option     = 'EQ'.
ls_msgidno-low-msgid  = Z01'.
ls_msgidno-low-msgno  = '014'.
APPEND ls_msgidno TO lt_msgidno.
lv_objnr = iv_item_guid.
CALL FUNCTION 'CRM_MESSAGES_DELETE'
    EXPORTING
      it_r_msgidno   = lt_msgidno
      iv_ref_object  = lv_objnr
      iv_caller_name = gc_object_name-customer_i.
    IF SY_SUBRC NE 0.
*In the error case, collect the message:
      MESSAGE e014(Z01) INTO lv_dummy_message.
      CALL FUNCTION 'CRM_MESSAGE_COLLECT'
        EXPORTING
          iv_caller_name = gc_object_name-customer_i
          iv_ref_object  = lv_objnr.
    ENDIF.
Regards,
Frédéric

Similar Messages

  • What does the error message "Bad parameter - bad /Widths" mean?

    In trying to add Bates numbers to a multi-page file, the numbering always proceeds up to the same page, then stops with the error message  "Bad parameter -- the font 'OPSUFont0' contains bad/Widths." What does that mean, and how do I correct it? The page itself will not accept a Bates number.
    Message was edited by: AllanHaley

    Got a document with this same problem (Acrobat X):  "The font 'OPSUFont0' contains bad /widths."
    Printing and rescanning the offending page has been the past solution.
    Took a closer look using Preflight > Analyze > Overview > Fonts --- the difference from other fonts in the document is "Font defines differences from base encoding"
    When that is clicked upon, it goes to the page and there is a little place delineated with blue lines.
    Problem isolated -- How to fix it?

  • Populating the error message log (while executing BAdI implementation)

    Hi there,
    I have a BAdI to implement CRM_ORDERADM_H_BADI where it will check certain header data. If there is a certain condition that is met, we must not allow the transaction to continue by adding error message on the top (the red button). How can we populate this error log within the BAdI implementation (putting it in codes in the method of the BAdI implementation).
    Many thanks in advance,
    Regards,
    MuJi

    put like this
    data:   w_msg type standard table of shp_badi_error_log initial size 0,
            msg like line of w_msg.
    if sy-subrc ne 0.
          msg-msgty  = 'E'.
          msg-msgid  = 'YW2'.
          msg-msgno  = '041'.
          msg-msgv1  =
           'PGI not allowed ,Pls Enter Truck No in Bill of lad.Field'.
          append msg to ct_log.
    endif.
    <b>In BADI u cannt raise Error Messages but u can Post the Messages to Application Logs, So u have to Update ur messages to CT_LOG.</b>Regards
    Prabhu
    Message was edited by: Prabhu Peram

  • EEWB error message BADI implementation

    Hi,
    I am getting the following error message when I run the wizard in EEWB to create new fields:
    Task CRM_BTX_ADD_NEW_FIELDS
    creating of BADI Implementation "ZCRM_RF_0701" failed
    I am trying to add new fields in Activities.
    This system is a copy of production client. There is no EEWB project or extension created in this system. We are using this system as a sandbox. We wanted to create some new fields here in this system by crating a new project and extension but when I run the wizard to create the new fields it is giving me the above error message at the time of Generation
    Anyone has any idea how to resolve this ?
    Thanks
    Sub
    Edited by: Kolla Subrahmanyam on Jan 9, 2012 3:51 PM

    Resolved the issue myself. Its the problem  with the workbench request i was using.
    Thanks
    Sub

  • How to find the error message populating for infotype 2001 iN pa30

    Hi ,
    I got a requirement that one of our end user a a error message is populating when he tries to enter the data in 2001 absences infotype.
    I check the documents ...it is written as a there is long back they modified the original T-code of 2001(report or userexit not sure) to allow only HR Department people , no one can enter the details apart from HR ,no-one else should be able to do that!!
    Now i need to find where the error message is getting .............i dont know what is the best approach,
    i debugged it(before savgin) but its too long to find......I put the break points for the user-exits available for the infotype(Total i found 16 Package PTIM) ......no user-exit is triggerring..i searching from morning....
    The main problem is  it is working fine for me.I am not getting error message...so unable to catch
    Please help me how to search...or need to search with 'AUTH ' field? if so in how many programs?
    or need to search using the 'MESSAGE' i just have the screen shot of the message..with the content how could i found that ??
    waiting for your valuable inputs....
    regards
    sas

    Hi Gautam,
    Thanks for reverting back, but my problem is i am not getting error message!!
    enduser is getting that!!
    Rgars
    sas

  • For the last 2 days whenever I try to upload photos from my iPhoto page to facebook I get an error message: Bad Image There was a problem with the image file.  I haven't knowingly changed any settings on iPhoto or facebook. Can anyone help, please ?

    I need help with uploading photos from iPhoto to facebook. I could do it till 2 days ago. Now any new photo I try to upload gives me an error message:
    Bad Image
    There was a problem with the image file. 
    Please help.

    Can you drag it to the Desktop?

  • When creating iTunes account, my mom provided her credit card information and the system does not accept pre populated province and gives the error message ("please enter at most 3 letters or numbers for province") how does she get past this?

    Why is my mom getting the error message for province when trying to create iTunes account when providing her credit card information?

    Hi Nahal,
    I'm just wondering, is it possible that your Mom (originally) got her credit card in a different province?
    I don't know much, but of this I am certain:  Apple would absolutely, positively, love to help you create an iTunes account!
    Otherwise, you can start here > http://support.apple.com/kb/HE57
    Best Regards,
    mm~

  • I have been using itunes on my windows based pc for years but since installing the latest itunes update I have been getting the error message A required itunes component is not installed. Please reinstall itunes. (-42404)

    I have been using itunes on my windows 64 bit laptop for years but since downloading the latest itunes 10.7 update whenever I opened itunes the error message 'A required itunes component is not installed. Please reinstall itunes (-42404)'
    Itunes would still load and play music in my library and I could still sync my ipod but when loading a CD itunes would not recognise the album/tracks and I would need to type them manualing after uploading.
    I have just bought the new iphone5 and went to sync the phone with itunes. itunes recognises the iphone when plugged in via the usb port or when wi fi is turned on but itunes will not allow the phone to sync.
    I spent over an hour the other morning speaking to apple customer support and have ensured I have administer right and that UAC is turned off.
    I was taken through msconfigure and adjusted the startup tab but still no joy.
    In the end I was e-mailed instructions on how to uninstall and then reinstall itunes and component parts.
    Now that I've uninstalled itunes when I try reinstalling I get the following messages during the download.
    The 1st message is;
    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application  Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    When I click ok the next message that appears sometime later during the install is;
    Service 'Apple Mobile Device' (Apple Mobile Device) Failed to start Verify that you have sufficient privileges to start system services.
    The options I have are to abort, retry or ignore. If I retry the same message comes back and if I  abort or ignore the download continues and I then get the following message:
    'Apple Application Support was not found. Apple Application Support is required to run itunes Helper. Please uninstall itunes, then reinstall itunes again. Error 2'
    After attempting to reinstall itunes only some components were installed however itunes would not open.
    It would appear many people have experienced problems with this latest download!

    'The installer has insufficient privileges to modify this file C:\Program Files (x86)\Common Files\Apple\Apple Application Support\Web kit.resources\inspector\Images\Spinner Inactive Selected.gif.'
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • How to add the error message into Delivery Error Log (VL10A,VL10X)

    Hi,
    I have a to add my custom message into Delivery creation error log (VBFS, VBSS)
    This message should be shown in the Collective process log (VL10X, VL10A).
    Please give me the soln to solve this problem.
    I have searched in SDN, i didnt get the proper solution
    Thanks
    Shankar

    HI,
    Make use of the BADi "LE_SHP_DELIVERY_PROC"
    Use the method DELIVERY_FINAL_CHECK.
    Pass the error messages in table CT_FINCHDEL.
    Regards,
    Ankur Parab

  • Receiving the error message while executing the Real Time DTP

    Hi,
    I am receiving the error message while executing the Real time DTP for Billing data.
    Error Message - Record filtered in advance as error records with the same key exist     RSM2     722
    When I check the logs below is the message I am able to see. Can someone suggest as how to proceed further.
    Diagnosis
    The existing DTP requires a serialized update because fields are updated
    non-commutatively during the processing run (for example, MOVE).
    Therefore all new data records that have the same semantic key as
    incorrect records that have not yet been corrected in earlier requests
    or earlier data packages of the same request, are filtered out after the
    extraction in a special step. In this way the system ensures that
    incorrect data records are not repeated for your changes, which may not
    contain errors themselves.
    System Response
    The data record is not updated but is written to an error stack.
    Procedure
    Procedure
    Correct all incorrect data records and update them using an error DTP.
    Procedure for System Administration
    I checked the error stack and corrected the entries and let me know as how to proceed further. I am unable to execute the Error DTP as its not allowing me to edit and has only display options.
    Regards,
    Ram

    Hi Arvindh,
    Its  write optimized DSO.. there is no option to generate SIDs.
    Hi Kiran,
    I checked the link u sent me. Here the main issue is..The function module is standard  and its not allowing me  to do enhancement  point..
    Any idea in using Badi's??
    Thanks all...

  • Itunes will not install. I get the error message "Error writing to file: C:\Program Files\Common Files\Apple\Mobile Device Support\com.apple.IE.client_main.dll     Verify that you have access to that directory."

    Itunes will not install. I get the error message "Error writing to file: C:\Program Files\Common Files\Apple\Mobile Device Support\com.apple.IE.client_main.dll     Verify that you have access to that directory."

    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?

  • I have installed safari but it is not working and showing the error message

    i have downloaded a latest version of safari and as i install it it is saying something like this
    "Your copy of safari is missing important software resources. Please reinstall safari"
    and even if i install it it says the same on opening safari after reinstalling i hate slow speed and i want it please help me ie8 is very bad to use
    http://img251.imageshack.us/img251/2295/screensnaperimagee.png

    That sounds like your Apple Application Support might be damaged. (Safari needs a properly functioning Apple Application Support in place in order to work correctly.)
    Perhaps try uninstalling both Safari and Apple Application Support, and then reinstalling Safari (which should also reinstall Apple Application Support). Does safari now launch without the error message?

  • Unable to findout the error message in debug

    Hi Gurus,
    When i am trying to execute the T.code FMCI_COPY_NEXT_YEAR  i am getting the
    ERROR MESSAGE: SET SCREEN NOT ALLOWED IN SUB SCREEN (SCREEN NO SAPLSBAL_DISPLAY0101) in new implementation.
    i am unable to find out  where the exact error is comming ... i requested you to please guide me for the same...
    Thanks in Advance !!!
    regards,
    Sanjay

    HI,
    double click on message and notice the number and type.
    Debug the program/function and set a breakpoint as statement "message".
    The system will hold on each message and with the information of number and type, you will find the right costing.
    Regards
    Nicole

  • How do i pass the error message at header level in CRMD_order

    Hi all,
    i got one requirement like when i create/change the sevice order (CRMD_ORDER)
    if net_value is more than 1000 i have to set the message 'E' like 'order is blocked'
    else 'approved' at header level before going to save the order.
    please help me out it is high priority and as i am new to CRM.
    thanks in advance.
    Thank you,
    Madhu.

    Anil
         You have to look for a BADI to add the Error Message.
          Also use the FM CRM_MESSAGES_DISPLAY to display the message !
    Thanks
    <b>Allot points if this helps!</b>

  • Populating an error message

    Hi,
      I need to populate an error message in crmd_order when the status is 'open' or 'dispatched' for uninstall order. how to get only these two status into a table??????
    Regards,
    Lakshmi

    Hi,
    CRM_MESSAGE_COLLECT can be used to collect the error message . It is not required to do anything specifically to show the same message in CRM UI aswell.
    Here is an example code :
    CONSTANTS:
       lc_message_class   TYPE symsgid  VALUE 'ZCF_CUST_MSG'.
    CALL FUNCTION 'CRM_MESSAGE_COLLECT'
              EXPORTING
                iv_caller_name = flt_val
                iv_ref_object  = <fs_data>-ref_guid
                iv_ref_kind    = <fs_data>-ref_kind
                iv_msgno       = '002'
                iv_msgid       = lc_message_class
                iv_msgty       = 'E'.
    flt_val should be the crm object name..
    You may use Badi : CRM_GEN_EXT_BADI by setting the FILTER with CRM object name (ex . STATUS ) .
    You can write the validation in the Check / Merge method.
    Best Regards,
    Karthik V

Maybe you are looking for

  • Mac pro will not boot

    Periodically I push the start button and nothing happens...Try on and off for a couple of hours and then, it boots up!????

  • Search/replace in huge files without line breaks

    i need to search and replace in huge XML files not containing line breaks. i cannot load them to memory as a whole because of size and cannot write a simple GrepReader because the $%��*" legacy system exporting the files does not do line breaking plz

  • Another weird battery issue.

    I downloaded a battery power management tool that said that my mac was 20 months old and that the max for the battery was 4400 and my max was 4100. Anyway, the battery is fine, but when charging it goes fast to get to 85% or so, then the remaining 15

  • Touchup text tool causing formatting issue

    We upgraded from Acrobat 8 Pro to 9 Pro and now when we try to use the touchup text tool the formatting gets messed up when you save.  It usually puts in extra spaces and pushes letters on top of each other.  Same document works fine if using the tou

  • ABAP Topics

    Hi, Can you please let me know the Topics in ABAP , which we need to know , as a BW Consultant. Regards, Anita