Crm_order_maintain for opportunity

Hi
Using fm crm_order_maintain in badi order_save to populate organisational data.
I am using bapi_transaction_commit and crm_order_save after crm_order_maintain but
it is called recursively resulting in short dump.
Can somebody share code for a similar situation so that i can check where m going wrong.
Thanks in advance
points will be rewarded:)
Vidushi

Hello Vidushi,
Order_Save BADI is triggered for all types of ORDER.
Please make sure that you have validation for order type before calling order_maintain.
If you are changing the document in order_save, then you should check if the task = 2 (Change) and not 1 (Create).
Regards,
Kapil Patil

Similar Messages

  • Data Migration program for opportunity

    Hi SAP Experts,
         Please can one help with the Data Migration program for opportunity.
    I want to know the approach.
    These are few mandatory filed
    1.  Opportunity Name
    2.  Account
    3.  Contact
    4.  Opportunity Owner
    5.  Total Estimate/Curr*  value_ currency
    6. Project start date   ---
    7. Stage 
    8. Probability 
    9. Status 
    10. Product with Item category ZSOL
    11. Service
    12.  Service Offering 
    Regards,
    Jaya

    Hi,
    As suggested by Kai you can use LSMW. This will be better option as it is very easy to use and you can also write routines while mapping the fields. You can also use IDOCs for importing data from Legacy system.
    If you want to write a report then you can use BAPI_BUSPROCESSND_CREATEMULTI. Please refer to the documentation of this BAPI. This BAPI internally calls CRM_ORDER_MAINTAIN. Do not forget to call BAPI_BUSPROCESSND_SAVE to commit your data.
    Regards,
    Sandeep

  • Table for Status for Opportunity or Credit Memo

    Hi,
    Which table stores the 'Status' field for Opportunity?
    Thanks,
    Chirantan

    Hi,
    The tables are TJ30, TJ30T.
    Hope this helps!
    Best regards,
    Roula

  • Partner inheritance stop from header to item only for opportunity

    Hi Team,
    Could anybody help me in the below requirement.
    In standard , in any business transaction, partners of Header inherited to Items.
    Table SMOFPARSFA. The parameter PARTNER_NO_INHERIT is intiial.
    I have a requirement, where we need to stop this partner inheritance from header to item for Opportunity only.
    What would be approach to do this. Is there any BADI available for this?
    Appreciate your quick response.
    Thanks
    Sudhansu

    Hi Marion,
    Thanks for the quick response.
    I tried with this BADI but the BADI didnt trigger.
    1. I clicked on Opportunity creation link..
    2. on the details page, the Employee responsible is assigned as my name both in header and item.
    3. Now i changed the Emp resp to another one.
    4.Now it got changed in Item level as well.
    As per my requirement this should not change in Item.
    Note till now i didnt save the Opp.
    Could you please help me in this case.
    Thanks
    Sudhansu

  • Action Condition by Sales Org / Dist Channel for Opportunity Management

    Hi,
    i need to set action condition by Sales Org / Dist Channel for Opportunity.
    i tried using object BUS2000111 but can't find any parameter referring to Sales Org/Dist Channel.
    any lead really appreciated.
    JD

    Hello Jushan Djuwardi,
    Can you please tell me how you solved this question.
    Thanks.

  • FM to create followup activity for opportunity

    hi forum,
    can anyone tell me the FM to create a followup document for opportunity.

    Hi Neelima,
    You can't use function modules for such purposes. You need to maintain copy control procedure in SPRO.
    Maitain the following settings in SPRO :
    1. Define Copying Control for Transaction Types
    2. Define Copying Control for Item Categories
    3. Define Item Category Determination when Copying
    You can implement the CRM_COPY_BADI to control the copying process.
    <b>Reward points if it helps.</b>

  • BADI for Opportunity Update

    Hi All,
    Can anyone please let me know if there is any BADI available for my requirement. Requirement is mentioned below:
    Requirement:
    When an Opportunity is created, if all the mandatory activities associated with it are completed, then i need to update the Sales Stage and also the Chances of occurance.
    Kindly let me know if you have any idea.
    Regards,
    Sneha Soni.

    You can use badi CRM_OPPORT_H_BADI for opportunity header maintainace. If you have fix corelation between sales stage and chance of success, you can define the percantage in customazing spro>crm>transactions>settings for opportunities>define sales cycles and sales stages>Assign Sales Stages to Sales Cycles. There you can define the linkage between sales stage and percentage.
    Regards.

  • Sales stage default for Opportunity

    Hi,
    i have configured few sales stages for opportunity. Here one of the sales stage is " Identification :".
    My requirement is to make this sales stage ( identification ) as default in opportunity.
    Curretly working on crm 7.0
    Please give me any inputs to solve this issue
    Thanks & Regards
    kishore kumar

    It's not possible with customazing but you can do it very simple with the implementation of badi CRM_OPPORT_H_BADI. in the badi just write the following code...
      IF is_opport_h_wrk-curr_phase IS INITIAL.
        CASE ev_process_type.
          WHEN 'ZOPQ'.
            cs_opport_h_badi-curr_phase = 'ZQ1'.
          WHEN 'ZOPT'.
            cs_opport_h_badi-curr_phase = 'ZT1'.
        ENDCASE.
      ENDIF.
    ZOPQ and ZOPT stands for opportunity type that you customized. And ZQ1 and ZT1 stands for sales phase to be set as initial, depending on transaction type.
    Regards.

  • Cannot extract user statuses for Opportunity items

    Hi,
    Standard SAP Extractor does not extract User statuses for the Opportunity Items, Data Source name 0CRM_OPPT_I for 0CRM_C04 icube.
    According the OSS note We have to prepare our own enhancement of the extract structure to include the mapping of the user status group.
    We extended the related structure. There is no problem with this. We need a code sample for mapping of added field to extract structure.
    There is a BAdI for this purpose : CRM_CSDR_BWA_MFLOW
    I need to insert some ABAP code in this implementation.
    Does anybody can give some code sample for this.
    thanks,
    Yigit

    You can also configure the user status for Opportunity Item also. If you want to enhance the dataSource, here is the sample for BAdI:
    method if_ex_crm_bwa_mflow~enhance_data_source .
      data: it_extract type table of CRMT_BW_OPPT_I,
            wa_extract like line of it_extract.
      case i_datasource.
        when '0CRM_OPPT_I'.
          it_extract = ct_data[].
          refresh ct_data.
          loop at it_extract into wa_extract.
    Implement your logic here*****
    All the statuses stores in CRM_JEST table*****
            modify it_extract from wa_extract.
          endloop.
         ct_data[] = it_extract.
        when others.
      endcase.
    endmethod.

  • Sales Org determination based on Employee responsible for Opportunity

    Hi,
    How can i do the sales org determination based on the Employee reponsible for opportunity.   Currently it is happend on employee responsible but when i change the employee responsible the organization data is not getting changed.
    Please help me in this regard.
    Thanks
    Naveen

    Hi,
    The sysytem wont accept ur procedure,
    The system determines the process as
    When u enter a prospect, the syetem determines the organisation based on attributes ,which in turn pick up the employee responsible from that particular organisation.
    Hope ur solution is solved if so reward me.

  • Incompletness procedure for Opportunity at the item level

    Hello All,
    Have you already worked on the Incompletness procedure for Opportunity at the item level ?
    I have the following request : product must be entered in the opportunity otherwise a message of error must appear
    I have used the following data in Incompletness procedure (which is assigned to the transaction)
    - Object name = ORDERADM_I
    - Field name = ORDERED_PROD
    - Relevance = Header and Item
    The result of this is : when I enter the product in the opportunity, the message of error saying that "Transaction is incomplete: Enter Product" doesn't disappear, whereas the product and quantity are in
    I have done another test, if I enter for Relevance = "Item" intstead of "Header and Item", the message of error doesn't appear at all in the transaction. So I can save the opportunity without getting a message...
    Any thoughts ?
    Thank you for your help

    Can you validate if the customizing setting for screen sequence control exists.
    Use transaction CRMV_SSC.
    you should have a corresponding entry that matches your incompletion log entry.

  • Saved search influences standard search for opportunity

    Hello,
    the search for opportunity (BT111S_OPPT/Search) i configured that the 7 most important search criteria are visible.
    Now we created a saved search for opportunity where only 3 fields are used. This saved search works fine. But if i open later in the day again the standard search also only this 3 fields and not the configured 7 important fields are visible.
    How could i change this strange behaviour?
    Thanks a lot.
    Kind regards
    Manfred

    Hi Manfred,
    looks like your implementation is not clean. The view will keep the configuration as long as it is instantiated.
    A simple check is in the view or window controller which Inbound Plug is called or if there is navigational data (the saved search data) supplied. The way to get the standard configuration from the config tool is shown in the DO_PREPARE_OUTPUT of CL_BSP_WD_ADVSEARCH_CONTROLLER.
    Maybe play around with the variable INIT_QS...
    cheers Carsten

  • Integration Event for Opportunity and Account

    I am building a WF (for Opportunity, when a new one is saved) that creates an IE with Opt.ID, Act.ID, OptName, OptNumber (custom field).
    I understand that I can create a WS that consumes this IE, reads the Opt.ID and updates the Opportunity with the OptNumber - externally generated.
    Now, this WS would need also to get the Account Name and pass it to another system.
    Question is how using the Opt. APIs read the Account Name ?
    Maybe I should create another custom field in Opt with a JOIN to get the Act.Name... and use this custom field in the IE and it would be ready availabe to it... No need for another call...
    Pls. I´d appreciate any help / comment.
    Txs.
    Antony

    Hi,
    Have you checked/configured fields at Integration event level which will enable the event to trigger?
    When you create the workflow action, you need to configure the Integration event where you need to check the fields which you want to be available in Integration event.
    let me know if this helps.
    Thanks,
    Mayank

  • CRM_ORDER_MAINTAIN for Appointment Item Level

    Hi All,
    I am currently trying to insert a date into DATE TYPE(APPT_TYPE) in Item Level. There are no errors in the code but the transaction is not updated.The dates are not shown in that particular document. Can somebody help me out ? Thanx a lot...
    MOVE: gw_service_item_guid_ubb TO gw_appointment-
    ref_guid,
    'B' TO gw_appointment ref_kind,
    'CONTDISMAN' TO gw_appointment-appt_type,
    '20060901220000' TO gw_appointment-timestamp_from,
    '20060901220000' TO gw_appointment-timestamp_to,
    'CET' TO gw_appointment-timezone_from,
    'CET' TO gw_appointment-timezone_to,
    'B' TO gw_appointment-mode.
    APPEND gw_appointment TO gt_appointment_ubb.
    gw_fname-fieldname = 'APPT_TYPE'.
    gw_fname-changeable = 'X'.
    insert gw_fname into table gt_fname.
    gw_fname-fieldname = 'TIMESTAMP_FROM'.
    gw_fname-changeable = 'X'.
    INSERT gw_fname INTO TABLE gt_fname.
    gw_fname-fieldname = 'TIMESTAMP_TO'.
    gw_fname-changeable = 'X'.
    INSERT gw_fname INTO TABLE gt_fname.
    gw_fname-fieldname = 'TIMEZONE_FROM'.
    gw_fname-changeable = 'X'.
    INSERT gw_fname INTO TABLE gt_fname.
    gw_fname-fieldname = 'TIMEZONE_TO'.
    gw_fname-changeable = 'X'.
    INSERT gw_fname INTO TABLE gt_fname.
    gw_input-ref_guid = gw_service_item_guid_ubb.
    gw_input-ref_kind = 'B'.
    gw_input-objectname = 'APPOINTMENT'.
    gw_input-logical_key = '0000'.
    gw_input-ref_handle = '0000000000'.
    gw_input-field_names = gt_fname.
    APPEND gw_input TO gt_input_fields.
    gw_item-guid = gw_service_item_guid_ubb.
    gw_item-header = '39CF8B702B8B334F90AF4B23CA991925'.
    gw_item-ITM_TYPE = gw_orderadm_i_ubb-itm_type.
    gw_item-mode = 'B'.
    APPEND gw_item TO gt_item.
    CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
    CALL FUNCTION 'CRM_ORDER_INITIALIZE'
    EXPORTING
    iv_initialize_whole_buffer = true
    EXCEPTIONS
    OTHERS = 2.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
    it_appointment = gt_appointment_ubb
    it_status = gt_status_maint
    CHANGING
    CT_ORDERADM_I = gt_item
    ct_input_fields = gt_input_fields
    EXCEPTIONS
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    OTHERS = 5.
    CALL FUNCTION 'DIALOG_SET_WITH_DIALOG'.
    CALL FUNCTION 'CRM_ORDER_SAVE'
    EXPORTING
    it_objects_to_save = gt_obj_guids
    IMPORTING
    et_saved_objects = gt_saved_objects
    et_objects_not_saved = gt_objects_not_saved
    EXCEPTIONS
    document_not_saved = 1
    OTHERS = 2.
    IF sy-subrc EQ 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.
    COMMIT WORK.
    Useful help will be awarded. : )

    Hi Michael,
    You can debug in a following way to check if all the values are passed.
    Sometimes, while using CRM_ORDER_MAINTAIN', we need to pass values in some other tables as well,
    Put a debugger in CRM_ORDER_MAINTAIN. create the custom opportunity in crmd_order transaction and enter the value in the required place in GUI. Now check for all the tables present in CRM_ORDER_MAINTAIN. in the debug mode, u can seee all the tables when u ll click on the locals tab in the parameter window. Map all the tables with your code and make changes.
    Hope this helps!!!
    Prerna

  • Create new survey data for opportunity using abap code

    Hello to all,
    I have one requirement.
    create survey data for given opportunity ID using abap code. or copy survey data from one opportunity to another opportunity using abap.
    any ideas..
    many thanks
    Babu

    Hello Babu,
    You can do this through the CRM_ORDER_MAINTAIN FM, this is the generic FM to edit any transaction in CRM.
    The FM contains an internal table IT_SURVEY that must be filled. Actually, this table will only contain a reference to the (completed) survey, it doesn't store the data of the survey itself.
    For some example coding, take a look at the SrvTSurvey.do controller. If you want to see what data is stored in the IT_SURVEY table, create a transaction and attach a completed survey to it (you can easily do it in the standard views of the webclient) and take a look at the survey structure in the CRM_ORDER_READ FM/Report.
    Let me know if you need more guidance,
    Reward points if useful,
    Regards,
    Joost

Maybe you are looking for