BADI for CRM Order item

Hi There,
I have to execute some custom code whenever an order line item has been deleted. Is there any BADI for this?
BADI should give me all the line item details and update indicator.
Thanks in advance,
Rams.

Hi Rams,
Use the parameter IV_GUID in which you will get HEADER GUID.
Pass this header guid to the CRM_ORDER_READ to get the required data for item.
Refer the following piece of code:
  APPEND iv_guid TO lit_header_guid.
  INSERT gc_object_name-orderadm_h INTO TABLE lit_req_object.
  INSERT gc_object_name-orderadm_i INTO TABLE lit_req_object.
  CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
      it_header_guid       = lit_header_guid
      it_requested_objects = lit_req_object
    IMPORTING
      et_orderadm_h        = lit_orderadm_h
      et_orderadm_i        = lit_orderadm_i
    EXCEPTIONS
      document_not_found   = 1
      error_occurred       = 2
      document_locked      = 3
      no_change_authority  = 4
      no_display_authority = 5
      no_change_allowed    = 6
      OTHERS               = 7.
<b>Reward points if it helps.</b>

Similar Messages

  • BADI for purchase order item confirmation?

    Hi all,
    In Purchase Order change mode (ME22N), we want to calculate the delivery date based on the confirmation date that was entered in the PO item detail, confirmation tab (instead of based on the PO creation date).
    Please help by specifing Which BADI should we use for that purpose? And which method will be helpful? 
    Thanks,
    Vamshi.

    Hi
    You can use BADI ME_PROCESS_PO_CUST
    Ranga

  • BADI for Sales Order Item Process

    I am using BADI BADI_SD_SALES_ITEM to process and fill customer-material number for certain items of a sales order which are not automatically filled.
    I am inside the IF_EX_BADI_SD_SALES_ITEM~ITEM_PROCESS where I have access to all the item data in FVBAP. I need the ship-to party from the Sales order header. How do I access header data inside the Item_process method ?
    PS : BADI_SD_SALES_ITEM badi is meant for internal use by SAP. I changed it to be used externally.

    >
    Shareen Hegde wrote:
    > PS : BADI_SD_SALES_ITEM badi is meant for internal use by SAP. I changed it to be used externally.
    That will be interesting when hot packs go in.

  • Adding a new field extension on CRM Order Item tab in the web shop order

    Hi CRM E-Commerce Gurus,
    I want to add a extension field on any web site product such as "zz...." in order to use this data in order's item tab. What shoul I do on J2EE Stack-.jsp method and ABAP Stack at the BADI implementations.
    Could you please help me in order to add a new field extension on CRM Order Item tab in the web shop order ?
    Thanks,
    Kind Regards,
    Fahrettin

    Hi Arshi,
    We have could not find any java action class such as Maintainb2csaveorderaction in config.xml folder and also there is no available threads and clue on SDN, google etc. Therefore we are got stucked on this issue. In SAP_ISA_60 Development and Extension Guide of SAP E-Commerce there is no sample java action class code such as Maintainb2csaveorderaction but some ABAP codes are available for the extension structure.
    Do you suggest any java action class such as Maintainb2csaveorderaction codes like in your B2B scenarios etc.?
    ls_header is a local structure with header data
      ls_extension-ref_guid = ls_header-guid.   
      ls_extension-alt_handle = ls_header-handle.
    extension are name value pairs
      ls_extension-name = u2018Z_CUSTOMER1u2019          u2018 name
      ls_extension-value = ls_header-zcustomer1. u2018 value
      APPEND ls_extension to extension_header_out
    now adding extensions to the items
      LOOP AT lt_items INTO ls_item.
        ls_extension-ref_guid = ls_item-guid.
        ls_extension-alt_handle = ls_item-handle.
        ls_extension-name = u2018Z_CUSTOMER2u2019          u2018name
        ls_extension-value = ls_item-zcustomer2.   u2018value
        APPEND ls_extension to extension_item_out 
      ENDLOOP.
    ls_header is a local structure with header data
      LOOP AT extension_header_in INTO ls_extension.
    check the name to find the according field
          IF ls_extension-name = u2018Z_CUSTOMER1u2019.
            ls_header-zcustomer1 = ls_extension-value.
          ENDIF.
      ENDLOOP.
    sort the extension table by ref_guid and handle to obtain a better access
    with binary search.
      SORT extension_item_in BY ref_guid, alt_handle.
      LOOP AT lt_items INTO ls_item.
    find the starting point for a loop over extensions
    use guid and handle as one logical key to access the extension
        READ TABLE extension_item_in
          WITH KEY ref_guid = ls_item-guid
                   alt_handle = ls_item-handle
                   BINARY SEARCH.
        IF SY-SUBRC = 0.
          LOOP AT extension_item_in INTO ls_extension
            FROM SY-TABIX.
    check, if the entry is relevant
            IF NOT    ls_extension-ref_guid = ls_item-guid
               OR NOT ls_extension-alt_handle = ls_item-handle.
               BREAK.
            ENDIF.  
            IF ls_extension-key = u2018Z_CUSTOMER2u2019.
              ls_item-zcustomer2 = ls_extension-value.
            ENDIF.
          ENDLOOP.
        ENDIF.     
      ENDLOOP.
    Thanks
    Kind Regards,
    Fahrettin

  • BADI for Sales order

    Hi Gurus,
      I have to caculate the volume discount based on the goods ordered. So that i have to calculate the discount and update it into Net value in condition tab in va01. Please provide the what is the BADI for that suitable requirement so that it should be executed before saving the order. And also the discount should be displayed in the item level. Please provide me some suitable solution.
    <b>Its Very urgent.</b>
    Points will be awarded
    Regards
    Ravi

    Hi
    Use the Std Include MV45AFZZ for writing the user exits related Sales order
    which is a include in the std sales order program SAPMV45A
    Write the code in the appropriate FORM..ENDFORM.. and see
    see further the following Exits and BAdis for Sales order
    Enhancement
    V60F0001                                SD Billing plan (customer enhancement) diff. to billing pla
    V46H0001                                SD Customer functions for resource-related billing
    V45W0001                                SD Service Management: Forward Contract Data to Item
    V45S0004                                Effectivity type in sales order
    V45S0003                                MRP-relevance for incomplete configuration
    V45S0001                                Update sales document from configuration
    V45P0001                                SD customer function for cross-company code sales
    V45L0001                                SD component supplier processing (customer enhancements)
    V45E0002                                Data transfer in procurement elements (PRreq., assembly)
    V45E0001                                Update the purchase order from the sales order
    V45A0004                                Copy packing proposal
    V45A0003                                Collector for customer function modulpool MV45A
    V45A0002                                Predefine sold-to party in sales document
    V45A0001                                Determine alternative materials for product selection
    SDTRM001                                Reschedule schedule lines without a new ATP check
    SDAPO001                                Activating Sourcing Subitem Quantity Propagation
    Business Add-in
    BADI_SD_SCH_GETWAGFZ                    Scheduling Agreement: Read WAGFZ from S073
    BADI_SD_V46H0001                        SD Customer functions for resource-related billing
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Non-valuated Goods Receipt for Purch.Order Item with multiple acct assgnt

    Dears,
    i used multiple account assignment functionality based on percentage for purchase order item and the system forced the goods receipt as "Non-valuated Goods receipt".
    In this way i don't have FI-CO documents at Goods receipt; i got them only at Invoice verification. So i totally lose analysis on account "Invoice to Receive".
    Please, give me some suggestion if you know something in matter.
    Thanks in advance,
    Regards
    Enrico

    It means that i didn't set non-valuated goods receipt.
    The system automatically set the flag if more than one account assignment are used for one purchase order item.
    If happens that just one account asignment is used for one purchase order item then the goods receipt is still valuated.
    i didn't try so far with quantity instead of percentage but, anyway, i need to use percentage.

  • Function Module or BAPI to update Short text  for sales order item(vl02n)

    Hi All,
    I need to update the Short text for sales order item in vl02n transaction from an internal table with Delivery number and other relevant details .
    Does any body know any Function Module or BAPI which can accomplish this purpose .
    Or else writing BDC is the only option I have got ? .
    Please clarify .
    Thanking you in advance .
    With Regards,
    Suriya .

    Hi
    You can try using BAPI_SALESORDER_CHANGE if you want to change sales order
    Regards
    MD

  • CRM Order Item Category Usage

    Where in the CRMD_ORDER screen we can maintain the Item category usage for an order item? In the CRMD_ORDER screen in Item details tab I can find the Item Category, but not the item category usage.

    Hi Maggie,
    in case a new item is created via an action, you can maintain/define the item usage via the container element within the action definition. Field to be maintained: ITM_TYPE_USAGE enter needed value under tab "Intial Value".
    Best regards,
    Susanne

  • BOM Cost Estimate for sales order items

    Hi experts,
        Which data source could extract data created by CK51N (Order BOM Cost Estimate )? We need to get BOM Cost estimate (including input material and activity) for sales order items.
        The closest one is 0CO_PC_01, but it extracts itemizations for production order.
        It's urgent.Helpful answers would be awarded.Thanks.
    Regards,
    Aaron

    Hi Henry,
       They even do not have Sales Order segment. How could I get cost estimate data based on sales order?
    Regards,
    Aaron

  • Wrong short text for sales order item

    Hi guys,
    I have an issue for the short text for sales order item. It is werid that I get the different short text depends on how we enter the material. If we only enter the material #, we get the short text for sales order item from material master data. If we enter the material #, plant and storage location, we get the short text for sales order item from customer material infor record. However, the customer material infor record is only maintained for inter-compnay transaction. System should not pick it for third-party transaction.
    I found a code in FV45PFAP_VBAP_FUELLEN:
    Bei Primärbedarfen ist MAAPV-ARKTX nicht relevant
        if vbak-vbtyp ne vbtyp_pbed.
          vbap-arktx = maapv-arktx.
        endif.
    Kundenmatinfo hat höhere Priorität
        if knmt-postx ne space.
          vbap-arktx = knmt-postx.
        endif.
        if da_arktx ne space and
           svbap-tabix = 0 and
           vbapin-matnr = vbap-matnr.
          vbap-arktx = da_arktx.
        endif.
    But it is nothing customized. Who can tell me what is wrong here?
    Thanks,
    DL

    Hi,
    Text coming from source (MMR, CMIR etc.) is being "pulled" via the access sequence. Check the Text analysis in your sales order in Tab Texts, at item category level.

  • Exit/badi for ME22 line item change

    hi gurus,
    pls mention any exit/badi for ME22 line item changes......

    Hi,
    Check below thread
    BADI in ME21
    Regards,
    Atish

  • Transaction to maintina Billing Plan for Sales order item

    Hi All,
    Is there any transaction other than VA01/VA02 to maintian Billing plan for Sales order item.
    Thanks & Regards,
    Rajanidhi Rajasekeran.

    It is possible to maintain Billing Plan in Sales Document Type (VOV8), as well as Item Category level (VOV7). As you want it at Item level, maintain the same in Item Category Configuration at Item level & it will by default be captured in Sales Order at Item level.
    Step 1: Sales Document Type
    IMG > Sales and Distribution > Sales > Sales Documents >
    Sales Document Header:
    1. Sales Document Type:The sales document types represent the different business transactions, such as Inquiry, Quotation, Sales Order, etc. To create new sales order type, always copy as with reference to similar sales order. If possible use standard sales order.
    2. Define Number Ranges For Sales Documents: Maintain number range with discussion with core team.
    3. Assign Sales Area To Sales Document Types:
    A. Combine sales organizations / Combine distribution channels / Combine divisions: Ensure to maintain these, else Sales Order creation will give error.
    B. Assign sales order types permitted for sales areas: Assign only required Sales Order Types to required Sales Area. This will minimize selection of Sales Order Type as per sales area.
    Sales Document Item:
    1. Define Item Categories: If possible use Standard Item Category. Incase if required to create new, copy as from standard & maintain New.
    2. Assign Item Categories: If possible, use standard. Formula for deriving item category: Sales Document Type + Item Category Group + Usage + Higher Level Item Category = Item Category
    Regards,
    Rajesh Banka

  • User Exit and BADI for Sales Order

    Dear Experts,
                        please give me available user exits and BADI for sales order .i want to take the data from sales order at the time of sales order posting .

    Hi,
    In debugging you can find some Enhancement Spots where you can implement your code. This lets you ignore the need for access key, but its a time consuming process spotting out the exact enhancement point.
    Regards
    Karthik D

  • Surcharge rate for sales order item condition

    Hi,
    I have a two condition for sales order item.
    First  condition is ZP00-Price. It is using for automatically price with customer and material. It linked with account key in pricing procedure.
    Second condition is ZI00-Index rate. Calculation type is A-Percentage. This condition value is monthly. It will be used for surcharge with percantage . I have a formule this condition.
    It is not linked with account key in pricing procedure.
    Formula for ZI00 - Index rate:
    (Index Rate to delivery date - 1 / Index Rate to contract start date) x 100
    For example;
    Index rate conditions is entrying monthly;
    Index date          Index%
    01.08.2008         1,05
    01.09.2008         1,15
    01.10.2008         1,17
    Contract start date = 03.08.2008
    Delivery date = 02.10.2008
    ZP00 = 500
    ZI00 = Index rate for sales order item = ((1,17-1)/1,05 ) * 100 = 16,19
    Last condition value = 500 + (500 * 16,19)/100 = 500 + 80,95 = 580,95
    What can I do for this pricing?
    Best Regards
    Gulay Celik

    Hi
    I think that perhaps it is too late. The application supports cancellation and re-billing as separate transactions. Maybe this is not a 'development' problem.
    Cheers
    Dom

  • BADI for Production Order CO01

    is there any BADI for Production Order making CO01 Txn.
    abhishek

    HI,
    You can find the BADI your self, Check the class CL_EXITHANDLER.
    follow the below steps to find the suitable BADI for your case ..
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction
    if you follow this 7 steps, you will find a suitable BADI.
    and also refer the thread
    Re: MB_MIGO_ITEM_BADI
    Regards
    Sudheer

Maybe you are looking for