BADI used when saving a prospect - CRM

Hello Experts,
I have recently started ABAP development in CRM and I am stuck at one place.
I am looking for a BADI that is used when saving a prospect. I need to add a check and retrieve some info from some parameter tables and assign them to the prospect.
For this, i need to identify the BADI i have to use.  Could you please show me where to start to find the BADI? Or do you have a transaction code from which i can search for the BADI.
Thanks for the help
Regards,
Thyaga

Hi,
as I wrote you previously I think that the problem is the BADI you've implemented.
I did what you require with badi CRM_BP_UIU_SAVE with a code similar to this
if gv_access_header->alive( ) eq abap_true.
Place your coding here which shall be executed during the save event.
    data:
    lr_relation             type ref to             cl_crm_bol_entity,
    lv_bo                   type ref to             if_bol_bo_property_access,
    zaccount_group          type                    string,
    zbp_category            type                    string,
    lr_relation_header_obj  type ref to             cl_crm_bol_entity,
    zbp_group               type                    string,
    zbp_groupc(30)          type                    c,
    zbp_guid                type                    string,
    zbp_number              type                    string,
    zbp_numberc             type                    bapibus1006_head-bpartner.
lr_relation_header_obj ?= gv_access_header.
    if lr_relation_header_obj is bound .
      lv_bo ?= lr_relation_header_obj.
      zbp_group = lv_bo->get_property_as_string( 'BP_GROUP' ).
      zbp_category = lv_bo->get_property_as_string( 'BP_CATEGORY' ).
      zbp_guid = lv_bo->get_property_as_string( 'BP_GUID' ).
      zbp_number = lv_bo->get_property_as_string( 'BP_NUMBER' ).
    endif.
if zbp_category = '1' .
   elseif zbp_category = '2' .
data: lt_sales_areas  type crmt_bus_sales_area_t,
            lv_sales_areas  type line of crmt_bus_sales_area_t,
            lv_partner_guid type bu_partner_guid,
            zagente         type string.
      data: dest            type string,
            zvalore         type zvaldef,
            zvkorg          type vkorg,
            zzbukrs         type  bukrs,
            zsales_org      type crmt_sales_org,
            zzsalesorg      type crmt_r3_sales_org ,
            zzwerks         type werks_d,
            ztdatiorg       type crmt_bus_set0140,
            zaccgroup       type string,
            zaugrp          type string,
            zzaugrp         type bu_augrp.
      data: l_data          type crmt_bus_set0140,
            l_datax         type crmt_bus_set0140x .
      data: zir_mess_cont type ref to cl_crm_genil_global_mess_cont.
      data lr_core type ref to cl_crm_bol_core.
      call function 'Z_RFCDEST'
        importing
          zdest = dest.
      lv_partner_guid = zbp_guid.
call function 'CRM_BUPA_FRG0010_GET_VALIDLIST'
        exporting
          iv_partner_guid = lv_partner_guid
        importing
          et_sales_areas  = lt_sales_areas.
      loop at lt_sales_areas into lv_sales_areas.
        zsales_org = lv_sales_areas-sales_org.
      endloop.
      if  lv_sales_areas is initial.
gestisco messaggio di errore
        create object zir_mess_cont.
        zir_mess_cont->reset( ).
        lr_core = cl_crm_bol_core=>get_instance( ).
        lr_core->start_up( 'ALL' ).
        zir_mess_cont = lr_core->get_global_message_cont( ).
        call method zir_mess_cont->add_message
          exporting
            iv_msg_type       = 'E'
            iv_msg_id         = 'Z_BP'
            iv_msg_number     = '002'
            iv_show_only_once = abap_true.
        exit.
in case of error, system is not saving.

Similar Messages

  • Bad hyperlinks when saving Pages doc as PDF

    I produce a little monthly newsletter for a local Mac club.  We do the layout in pages.  I write the article another member lays them out in Pages.  A couple others proof.
    We've been having a problem that is driving me crazy in Pages 09.  We use Print, then save as PDF, so we can get a format that everyone can read.  Almost always when we do this, links that worked fine in the Pages document convert to an address that no longer works (usually something on the creator's computer that he has placed in the document).  I'm saying almost all links (but not quite all) in the entire document end up with this same bad address in the final Adobe PDF version. 
    The only way we have found to fix this is by abandoning the entire hyperlinks system and typing out http://www.blah.blah in our text, which feels extremely early Internet and not the type of polished production we're aiming for. 
    Does anyone know what might be causing this problem or how to fix it?  I've gone in one of our documents, completely removed the link, and then replaced it.  It still has the same address to something on my colleague's computer.  It's just crazy.  This is a nasty, nasty bug.
    Thanks in advance for any clues.

    I assume that this post is related to Gene Madill's a couple of hours ago. Is that so? I'm thinking that someone in the chain of custody has a machine that has an OS corruption. Possibly a system not properly updated to the latest version of Snow Leopard.
    There have been a couple of bugs in incremental Snow Leopard updates. One at 10.6.2 and another at 10.6.7.
    Are you up to speed on these issues? Are all of you up to date and clean?
    Jerry

  • In an AppleScript, can compression level high be used when saving an image as a JPEG?

    When using AppleScript to save a copy of an image file as a JPEG on OS X 10.6 Snow Leopard, can "compression level high" be used in the code, or can only "compression" be used?
    The part of the AppleScript dictionary for Image Events indicates that "compression level high", "compression level low", and "compression level medium" can be used, but when I type any of those three in the code and try to save the AppleScript file, the below error is displayed, and the word "level" is highlighted in the AppleScript Editor:
    Syntax Error
    Expected end of line, etc. but found identifier.
    -John

    you need to open the image in image events before you can save it as a different format.  you have to make a distinction between the image file (a file system object) and the image itself (the data that is the digital representation of the visual image).  what you want to do is open the image file in image events to extract the image data, then resave the image data in the new format.  looks something like this (changing just the last bit of your script):
    set theImage to choose file with prompt "Please select an image file:" of type "public.image"
    -- other stuff...
    tell application "Image Events"
              set theImageData to open theImage
      save theImageData in newPathToSave as JPEG with compression level high with icon
    end tell

  • Quality setting you use when saving JPG's

    What is the best setting to save an edited image?
    The obvius answer will probably be to use 12 (the highest setting), but if I use that setting I end up with a file size much bigger than the original. How can that be?
    I'd appreciate if someone helps me understand this better.
    Thanks

    If you have edited the picture, sometimes the changes consume file space. I save mine as 12's.

  • Chinese characters copying incorrectly when saving pdfs with Preview

    So this is a very strange problem. When I save a .pdf that I have annotated in Preview, it saves fine and everything continues to display correctly. However, if I then try to copy Chinese characters from the pdf, it pastes gibberish. F'rex:
    灿烂辉煌 becomes "3456"
    and
    遇到的问题 becomes " !"
    Does anyone know what is going on and how to deal with it?

    The strange part is that initially the Chinese characters copy fine. It's only after I save the .pdf that copying goes all wonky.
    I think there is a bug related to annotation.
    Is there any way to control what encoding Preview uses when saving?
    No. PDF is the worst possible format to use for any kind of editing.
    Have you tried Adobe Reader? Or Skim?
    http://skim-app.sourceforge.net/
    Preview is not always the best option.

  • User Exit OR Badi for MK01 transaction (used for saving vendor amster data)

    Hi All,
    I have a requirement where I have to call my workflow, when we create the Vendor using my custom transaction (ZMK01, which is a copy of standard transaction MK01).
    For Workflow triggering I am using FM 'SAP_WAPI_CREATE_EVENT' in the user exit  'EXIT_SAPMF02K_001' but this is only for checking the data on saving Vendor Master.
    So I want to use FM 'SAP_WAPI_CREATE_EVENT' at right place. For that , I need User-Exit or BADI which is used for saving vendor master data.
    Could anyone please help me to find out the user exit or BADI for save event of vendor master data using transaction MK01.
    Looking forward to your advise and thanks in advance.
    Best Regards,
    Mamta

    Hi ,
    I forgot to activiate the project linked with User exit 'EXIT_SAPMF02K_001' .
    so problem is solved now
    Thanks,
    Mamta

  • Automatic saving of actual end-time when saving an activity in SAP CRM

    Dear SAP Experts,
    is it possible by standard when saving an activity that the end-time of the activity is the moment when document is saved the first time?
    Within the Date Profile '000000000001' it is possible to define the duration 'A_PLANTOTAL' 3 minutes but I want to have the exact time when saving the document for the first time.
    Is that possible by Standard? I am seeing the problem that when document is changed and reopened again that endtime will change again.
    Best Regards
    Oliver

    Hi,
    Try to use BADI ORDER_SAVE to do this. Call FM CRM_ORDER_SAVE to update.
    Best regards,
    Caíque Escaler

  • User Exit or BADI  when saving Internal Orders

    Hello, I need a user exit or BADI when saving a Internal Orders to shoot a workflow
    REGARDS
    Dayana

    Hi
    Why do you need a user exit or BADI.
    Create a Custom Business Object(SWO1) and Create a New Event(SW01) and link it to the B.O. Or you could also create a CO Validation and use it for triggering a Validation and as a last resort you go for User Exit or Abap code.
    Check if you have some workflow expertise in your tech team and you should be fine.
    Thanks,
    Praveen

  • How can i stop firefox from asking "Choose A Network Connection" when i'm offline and using my saved pages

    How can i stop Firefox from asking "Choose A Network Connection" when i'm offline and using my saved pages
    i use Firefox 22.0 on windows 7
    it's about one week that it ask for "Network Connections" when i'm offline and disconnected from the internet even when i don't open a save page and just opening Firefox with a blank page
    Image of the Error:
    http://home.sums.ac.ir/~rowshansh/firefox.png
    http://www.sums.ac.ir/~rowshansh/firefox.png

    Did you check the network setting?
    Sounds that you have set to connect automatically when a connection is not available.
    *http://kb.mozillazine.org/Autoconnect
    *http://kb.mozillazine.org/Browser_attempts_to_connect_when_already_connected

  • While using a drop-down menu i.e. File, edit, image, or even when saving as and choosing the file type; the list appears and I am able to highlight what i want but cannot click on anything.

    While using a drop-down menu i.e. File, edit, image, or even when saving as and choosing the file type; the list appears and I am able to highlight what i want but cannot click on anything. This is becoming incredibly frustrating. It happens at random time and a restart of the computer is all that helps, then with out any notice it starts to do this again.  Mac Book Pro i7 2.2 16 GB 1333 Ram, (2) 450GB SSD both internal to machine. At this point I am losing file because I am unable to save in the file type I need. Does anyone out there know how to solve this issue?
    Thanks
    phil

    I haven't been unify photoshop much in the past month, but I did try your suggestion and it seemed to work for a while. Today when i went to save a document the same thing happened: click on file>save at this point I can not click on save even though it is highlighted. Tryed to use command s that brings up the save dialogue box, but when I try to change file type I again cannot select it from the drop down menu.

  • Powerpoint 2013 throwing 'File in Use' errors when saving to a network drive, file is NOT in use

    One of our sites is having a strange issue when saving to a network location in Powerpoint.  I'm not sure it's a Powerpoint problem, but it's a place to start...
    When saving a ppt to a mapped network drive (the client is running Windows 8 / Office 2013, the network drive is a DFS share, pointed to a Server 2012 machine if that matters), users will almost always get the following error:
    "Someone else is working in (filepath\name) right now. Please try again later." 
    This happens regardless of where the file is being saved on the network drive, in fact it happens even when there is no pre-existing file with that name in the location.  So, even if I'm saving a brand new copy of test.pptx to F:\Share\PPT where there
    is not currently a test.pptx, I get the error.
    Word, Excel, and all other tested apps save properly.  Powerpoint can save correctly to the local computer, but not to the network drive or to My Documents (which redirects to the same network drive).
    When the error pops up, if I look in Open Files in Computer Management on the Fileserver, I see the file I'm trying to save listed as being open, but it shows 'Disconnected' rather than a username.
    Any suggestions would be appreciated - again, not sure that this is a Powerpoint problem - could be Windows 8 or some mysterious DFS thing...
    Thanks.

    Hello,
    Been having a very similar issue in our environment and just came across this thread while Googling and looking for answers.
    In our case, we have Windows 7 clients and 3 main files servers - 2 are Server 2008 R2, and one is Server 2012.  We use PeerLink File Collaboration to sync the files between
    the servers (similar concept to DFS).  For us, it seems to happen specifically with Excel 2013, and only when saving to the Server 2012 file server.  I can reproduce the message pretty much every time.  After seeing your post,
    I tried it in Powerpoint just out of curiosity, but it saved properly - Word saves properly as well.  
    Been doing a bunch of testing to try and narrow it down, and this is what I've found:  
    Excel 2013 -> Server 2012 = error message.  
    Excel 2013 -> Server 2008 R2 = no error message.  
    Excel 2010 -> Server 2008 AND Server 2012 = no error message.
    <o:p>We've been leaning towards the PeerLink replication as the culprit up to this point, but last night I did some testing with the PeerLink Collaboration turned off, and
    still received the error message.. so now I'm even more confused! 
    I see that it's been a few months since your post..  have you made any progress here?</o:p>

  • User Exit or BADI for Tcode IW31 when saving the Service Order

    Dear ABAPers,
            I would like to add one more line in Service order item when saving the Service order in (IW31).Is there User Exit or BAdI.It is very Urgent Please help me.
    Thanks & Regards,
    Ashok.

    Dear ABAPers,
    These Exits does not meet my requirement.
    These Exits are not called at the time of saving Service Order.
    Thank you for your valuable reply.
    My Requirement is when saving the service Order  i want to add the Line itm at runtime.
    It is very urgent requirement.Please help me.
    Thanks & Regards,
    ashok.

  • User Exit or BADI for IW31 when Saving the Service Order

    Dear ABAPers,
            I would like to add one more line in Service order item when saving the Service order in (IW31) at runtime.Is there User Exit or BAdI.It is very Urgent Please help me.
    Thanks & Regards,
    Ashok.

    Hi
    U can go through the tansaction.
      System/ Status
      Double click on program name.
    For badis:
    Search for the Phrase:
      cl_exithandler=>get_instance.
    U will the badi definitions.
    For User exits:
      search for the phrase: CALL CUSTOMER-FUNCTION
      u will get the user exits.
    If it is helpful rewards points.
    Regards
    Pratap.M

  • Using Fields from PDF when saving

    Im looking on how to use fields in a pdf form when saving the form.
    ex. Incident Report
    Staff open up the form. Put in the information. Want it so when they save it puts the clients name and date in the save as. So they open Incident_Report.pdf when they save it would be Incident_Report_ClientsName_Date.pdf Yes the staff could type that in that way but want to make it as easy for everyone involved.

    So let's say you have the following fields in your file:
    Incident_Report
    ClientsName
    Date
    You can then add this code to the file's WillSave action (under Tools - JavaScript - Set Document Actions):
    var newFileName = this.getField("Incident_Report").valueAsString + "_" + this.getField("ClientsName").valueAsString + "_" + this.getField("Date").valueAsString + ".pdf";
    app.response("Please copy the text below and use it as the new file-name:","", newFileName)
    Of course, you can adjust the message to the user, and even the format of the file-name, although I've used the format you specified.

  • I built an ad using layers saved it and then converted it to a jpeg. Now when I go into elements 11 to do anything else it will not allow to copy and paste to create a new layer. What am I missing?

    I built an ad using layers saved it and then converted it to a jpeg. Now when I go into elements 11 to do anything else it will not allow to copy and paste to create a new layer. What am I missing?

    You know that you lost the layers when you saved it as a jpeg, right? But you're saying you can't add layers to the jpeg now when it's open in the editor? Go to Image>mode and be sure it's RGB, for starters. Are all the commands in the Layer menu grayed out?

Maybe you are looking for

  • Is it possible to add the exit command to a button in ALV OO toolbar

    Hi ABAP folks, is there are a way to add the exit command to a button of an ALV toolbar (like in the GUI status)? I want to prevent the field validations of a dynpro field at PAI. Thanks and regards, Martin

  • Migration Complete - SQL Server 2000 - But I Have a Question - Please Help

    I just ran the Oracle Migration workbench and converted a SQL Server 2000 database to Oracle 8i. I did get a few errors and warnings, all from the stored procedures. Which I will correct manually. However, when I log into DBA Studio, I can see the ne

  • Join numbers to one album

    All, Hi, my name is hoss and I am a newby for itunes and would like to organise my Itunes. In Itunes I have two the same albums of which number 1 to 6 is on one album and 7 to 13 is on the second. I would like to join them so I have only one album wi

  • When will developers be able to upload specify localizations in Danish, etc

    The list of supported languages has been expanded to include Danish, Norwegian and Polish (among others); VoiceOver also includes these (we develop for the blind community). When we went to upload our versions that are localized to the new languages;

  • Long simulation errors

    Hi, I have some long simulations to run and to get realistic resuilts I need to keep the timestep small. I am getting simulation failures with 'internal simulation error'. If I remove some variables it can go longer. After the failure if I open the g