BADI  BBP_TARGET_OBJTYPE

Hello,
I'm working with SRM 5.O and due to some specific business requirements we needed to implement the BADI BBP_TARGET_OBJTYPE. But we still didn't cover all our requirements.
<u>Here is the required logic we need to pud into the BADI:</u>
1. If we're buying via "free text item" or via "Internal Goods/services" --> always PR
2. If we're buying items directly out of catalog (CCM catalog or punch out catalog), then we have 2 cases:
a) if account assignment different from ST --> always PO
b) if account assignement = ST --> if enough stock --> reservation else always PO
Point 1 is covered by our logic into the BADI. Point 2.a) also but we still have problems with 2.b). What would be nice is to put here the logic of the customizing table where you can define your follow-on documents. I think we need to change something in our first LOOP.
Below the logic of our BADI:
method IF_EX_BBP_TARGET_OBJTYPE~DETERMINE_TARGET_OBJECT_TYPES.
data: inti type i value 0.
data: ls_badi_item_data  like line of ct_item,
        ls_index type i.
data: t_accdata like line of IT_ACCOUNT.
field-symbols: <item> like line of ct_item,
                 <account> like line of IT_ACCOUNT.
loop at ct_item into ls_badi_item_data.
ls_index = sy-tabix.
*Catalog buying
    if ls_badi_item_data-catalogid ne space.
      <b>loop at IT_ACCOUNT into t_accdata where p_GUID eq ls_badi_item_data-guid.
        if t_accdata-ACC_CAT ne 'ST'.
          ls_badi_item_data-PACK_OBJTYPE = 'BUS2012'.                      "PO
         ls_badi_item_data-FIXED_VEND = '1'.
        endif.</b>      endloop.
    else.
     loop at IT_ACCOUNT into t_accdata where p_GUID eq ls_badi_item_data-guid.
        if t_accdata-ACC_CAT ne 'ST'.
          move space to ls_badi_item_data-CTR_HDR_NUMBER.
          move space to ls_badi_item_data-CTR_ITEM_NUMBER.
          ls_badi_item_data-PACK_OBJTYPE = 'BUS2105'. "PR
        endif.
      endloop.
    endif.
modify ct_item index ls_index from ls_badi_item_data transporting   PACK_OBJTYPE.
modify ct_item index ls_index from ls_badi_item_data transporting CTR_HDR_NUMBER.
modify ct_item index ls_index from ls_badi_item_data transporting CTR_ITEM_NUMBER.
clear ls_badi_item_data.
    clear ls_index.
  endloop.
endmethod.
Does anybody know how I can put the required logic into this BADI?
Thanks a lot,
regards,
Caroline

Hi Caroline,
To activate this scenario you have to use BADI: BBP_EXTLOCALPO_BADI. Menupath: SPRO-> SRM Server -> Business Addinns -> Control Extended classic scenario -> Activate extended classic scenario
Regards,
Jos

Similar Messages

  • Badi - BBP_TARGET_OBJTYPE - Code approach

    My Scenario is Extended Classic scenario -for completed shopping carts it creates PO and for catalog item it creates PO. For incomplete carts it creates PR
    But our requirement for a particular vendor from the catalog it should create a PR but not PO.
    Please SRM guru's send me some sample code or approach to write it in the badi
    If I am not suppose to user the above badi please also send which badi to be used.
    Thanks
    NSSRM

    Hi,
    the BBP_TARGET_OBJTYPE is the rigtht BAdI.
    Here inside you need to call the BBP_PD_SC_GETDETAIL, and check the partner tab for a fixed vendor.
    Depending on this partner you need to change the type of the follow-on document.
    Regards,
    Peter

  • BBP_TARGET_OBJTYPE - Code Approach

    My Scenario is Extended Classic scenario -for completed shopping carts it creates PO and for catalog item it creates PO. For incomplete carts it creates PR
    But our requirement for a particular vendor from the catalog it should create a PR but not PO.
    Please SRM guru's send me some sample code or approach to write it in the badi BBP_TARGET_OBJTYPE.
    If I am not suppose to user the above badi please also send which badi to be used.
    Thanks
    NSSRM

    Hi,
    Following enhancements (BADIs) will have to be coded based on rules defined for PO / PRs. These rules can vary from organization and hence I am not providing any sample code for the same.
    Badi BBP_TARGET_OBJTYPE : Use method DETERMINE_TARGET_OBJECT_TYPES to determine follow-on document type for PO. Here reservations object type is replaced by PO object type.
    Badi BBP_BS_GROUP_BE : Use method GROUP_PO_BACKEND to split line items for PO . Method GET_NUMBER_OR_RANGE can be used to get a new PR/PO number as defined in configuration. 
    Badi BBP_CREATE_BE_PO_NEW : This Badi is called before PO/PR is created in the backend.
    Hope this helps (*only for the approch and may differ from your requirement*).....
    Best Regards,
    NMK

  • Back End PO not gettting created

    Hello All,
    Whenever SC is approved, BADI BBP_TARGET_OBJTYPE is getting called in which I have to write the custom logic.
    If acc assignment category is Assets then I need to create PR in backend which is happening with BADI : BBP_CREATE_BE_RQ_NEW without writing any custom logic in BBP_CREATE_BE_RQ_NEW.
    I can see this badi getting triggered in Debugging.
    But if acc assignment category is expenses I need to create PO in Backend with badi : BBP_CREATE_BE_PO_NEW.
    I did implemented this badi but didnt write any custom logic in it.
    I dont see this Badi getting triggered and no PO is also getting created in Backend.
    The configuration for define follow on documents is :
    Category ID : *            Extn Procurement: Always create PR
    category ID : XXXX     Extn Procurement: PO if item data is complete.
    Please suggest.
    Thanks
    Edited by: santosh.p on Nov 11, 2011 10:05 PM

    Hi Matt,
    We have a similar issue. We've implemented SRM 7 in classic scenario with ECC 6.
    A limit shopping cart is created in SRM and assigned contract limits. The shopping is approved and creates a purchase order in the backend.
    1) The contract number is not available in the limits tab on the purchase order. The expectation was that the contract number from the shopping cart shows up here. BAPI_PO_CREATE1 does show that the information is being passed from SRM.
    2) The F4 search for contract in SRM does not retrieve contracts from the backend. The search seems to only look for local contracts.
    I would appreciate your insight on this issue and if you could share any information that SAP provided.
    Thanks,
    Hemanth

  • SRM SC in item in transfer I1111 status...no PO created

    Hi SRM gurus,
                                                                                                                                                                                                                                              SRM SC in item in transfer I1111 status...no PO created. This SC has 2 line items and first line item created PO, 2nd line item is in item in transfer I1111 status
    Please help on how to create PO for it.
    Regards,
    Babu

    Hi,
    We have observed that, report BBP_SC_AUTO_RETRANSFER won't carry out checks before triggering the SC transfer. For example, if you are using BAdI BBP_TARGET_OBJTYPE, it will not be triggered.
    PLEASE CHECK ITS BEHAVIOR IN A NON-PRODUCTIVE SERVER THOROUGHLY, BEFORE SCHEDULING IT IN A PRODUCTIVE SERVER.
    Regards,
    Ganapathi

  • Extended Classic Scenario - Can Purchase Requsition be created in R/3?

    Hi SRM Gurus,
    In Extended Classic Scenario, Is it possible to have Purchase Req to be created in the backend?
    Technically whether it is possible or not? Functionally, there is no such need, I agree.
    Thanks & Regards,
    Ramkumar

    Hi
    Please confirm what sceanrio in SRM are you planning for ?
    I have not tried this. In Extended Classic Scenario, using BADI " BBP_TARGET_OBJTYPE"    -> I guess, it's possible, but not sure. Try it out. 
    Purchase Order (PO) will be created in the R/3 system using the BADI -  BBP_TARGET_OBJTYPE. Please read the standard documentation of this BADI, before implementing the same.
    Regards
    - Atul

  • Error "BBP_BD 002: An Exception occured" when changing doc type

    Hi All,
    We are using the BADI BBP_TARGET_OBJTYPE to determine a PR or PO and change the doc type if PR is determined.
    PR/PO is determined correctly but when we tried to assign new doc type for PR getting error "BBP_BD 002: An Exception occured" .
    Below is the code.
    IF wa_item-be_doc_type='ECPO'
          IF wa_item-catalogid IS INITIAL OR wa_item-catalogid CO space
            wa_item-pack_objtype = 'BUS2105'. "PR
            wa_item-be_doc_type = 'ECPR'
          ELSE.
            wa_item-pack_objtype = 'BUS2012'. "PO
          ENDIF.
          MODIFY ct_item FROM wa_item TRANSPORTING pack_objtype.
    END IF
    Can any one tell is this correct or do we need to modify anything?
    Thanks in advance,
    Jagadish
    Edited by: Jagdish Reddy on Aug 17, 2008 3:47 PM

    Hi Dave,
    Thanks for the prompt response!
    We are able to create PR but we want to tie the PR to doc type 'ECPR'. That is why added wa_item-be_doc_type='ECPR'
    If we take out this code it works fine and system creates a PR with doc type 'ECPO'. We do not want this. We want doc type 'ECPR'
    Where is obj_to_gen in the BADI? I do not see that. Is this ina any structure?
    Thanks again.
    Jagadish

  • Reverting to classic scenario in SRM7.1, from PPS and extended classic

    Hello  Experts,
    Recently we have moved  from SRM7 to SRM 7.01, in which we can have PPS without Extended classic scenario.
    As business wants classic scenario, How can we make the system as classic , in which PPS and extended classic is activated.
    any badi is available for this? Please help.
    Regards,
    Raju

    Raju,
    Basically you have few points to keep in mind. (yes you need to activate the SPRO config for extended classic, apart from this).
    1. switch between extended classic and classic is actually defined by the backend logical system of the document. if thats SRM itself then it follows the path of extended classic or if it is ECC then it follows classic.
    because its basically creating a follow on document and that explains the scenario.
    2. it also depends on what object are you expecting to be created. from a SC many documents can be created.
    a. PO in SRM
    b. PO in ECC
    c. PR in ECC
    d. Reservation in ECC
    - so, if you can define at any point that where is your document to be created and what is to be created you can control the flow.
    Now to do this. if you have few options.
    Option1:
    1. set the object types(2) for product categories (config, backend document type).
    2. implement BBP_EXTLOCALPO_BADI  to switch off extended classic
    Options 2:
    1. in doc change badi, change the backend destination to ECC
    2. in Badi BBP_TARGET_OBJTYPE pass the object type you want your follow on document to be.
    hope this explains

  • Regarding direct material procurement in Classic scenario.

    Hello SRM Gurus ,
    We are implementing SRM5.0 classic scenario, (SSP with CCM).
    As per standard , Shopping cart for a direct material (Requisition for
    stock) will create a follow-on document in SRM only (controlled extended
    classic scenario).
    Client's requirement is that it should create a back-end PR in R/3 system.
    Reason being, the client needs to have only one indenting system and one
    procurement system.
    which BAPI in R/3 for PR/PO has to be used to create PRs or Pos from SRM. Similarly, RFC  which FMs have to be used to update status in SRM.
    How to bypass the standard replication mechanism.
    Please help me..
    Thanks and regards,
    Mani
    mail id : [email protected]

    Hi
    <b>Why not go for the BADI -> BBP_TARGET_OBJTYPE</b>
    Or
    <u>Alternatively using SPRO settings, you can change the standard behaviour of the system based on various attrbutes e.g., for a Particular Product, Item category, etc.</u>
    <b>Here is the Path ->
    IMG -> Supplier Relationship Mnagement -> SRM Server -> Cross-Application Basic settings -> Define Objects in Backend System (Purch. Reqs, Reservations, Purch. Orders)</b>
    <b>Define Objects in Backend System (Purch. Reqs, Reservations,</b>
    You perform this step only if you create your Materials Management documents in a backend system.
    You specify the documents that are to be created in the backend system for a requirement coverage request.
    The following documents can be created:
    Purchase requisition
    Purchase order
    Reservation
    You enter a product category (such as office supplies, or hardware) and/or an organizational unit. The organizational unit contains the purchasing group that is responsible for procuring products in this category.
    You can enter the product category generically, such as Office*.
    Note
    The backend system is determined  using the product category in the requirement coverage request item. The item also contains the organizatinal unit.
    You can use the Business Add-In BBP_TARGET_OBJTYPE if you wish to implement a different logic for creating documents in the backend system.
    Example
    If purchasing group 01 wants to procure materials from the category Raw Materials, a reservation is to be created every time.
    If materials in the category PC are to be procured, a purchase requisition is to be created every time.
    Activities
    1. Enter the organizational unit and/or the category.
    2. Enter a source system.
    3. Choose the procurement type.
    Reservation if stock is available, otherwise external procurement
    The system creates a reservation if the material is subject to inventory management and sufficient stock quantity is available in the warehouse on the requested date.
    Always reservation for materials subject to inventory management
    The system creates a reservation if the material is subject to inventory management, irrespective of whether stock is available.
    Always external procurement
    The system does not create a reservation, but always procures the item externally. In this case, you specify the type of external procurement.
    The following options are significant if the system cannot create a reservation (for example, if there is no stock available or for a non-stock item) or the system must not create a reservation (choose Always external procurement).
    Purchase order if item data complete, otherwise purchase requisition
    The system always tries to create a purchase order. If the item data is incomplete (for example, the vendor or price is not known), the system creates a purchase requisition from the item.
    Always purchase requisition
    The system always creates a purchase requisition.
    Always local purchase order
    The system always creates a local purchase order.
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Influence PO document type in ECC from Sourcing Cockpit in Classic Scenario

    Hello experts: we are running SRM 7.0 with ECC 6 EhP 4 in a classic scenario.
    Our business requirements are: all SC item created with reference to a catalogue item must result in a PO not subject to release strategy in ECC6 MM. For this purpose, document type ZEC has been entered under parameter BSA in tcode PPOMA_BBP.
    Due to Sourcing customizing, some Shopping carts items without source of supply are sent to Sourcing Cockpit.
    In sourcing cockpit application, buyer completes the open items by including the vendor, price, etc and create draft POs that are finally converted into backend purchase orders in ECC6. These Purchase orders, created without reference to a catalogue item should be subject to release strategy and approved by the corresponding approval body in ECC6.
    Due to that, we must change the document type in backend and enter another one which is subject to release strategy. We tried it thru badi BBP_TARGET_OBJTYPE but we could not get it. we change BE_DOC_TYPE to NB when the catalog id is blank in the SC item and follow-doc is PO. However, system always creates PO with document type ZEC
    We would like to know how to influence the PO document type when we are trying to create POs from SOCO.
    Any clue about it?
    Many thanks in advance
    Best Regards
    Valentí

    Solved

  • Regarding Intercomp Purchasing and STO

    Hello Gurus,
    Did any one have any idea if intercomp. and STO purchasing can be done in SRM.
    Is it possible in any specific implementation scenario.
    Any info will be appriciated.
    Thanks
    IS

    Hi,
      IN SRM Standard does not support STO process. How ever we can achieve this in Classic scenario by implimenting few of BADI's.
    1 :  We can use the Badi "BBP_EXTLOCALPO_BADI" to control classic / extended classic
    2 : Use the BADI "BBP_TARGET_OBJTYPE" to define what type of backend end document need to be created. In this case it should be PO.
    ltem_data_wa-PACK_OBJTYPE = 'BUS2012'. 
    3 : BBP_CREATE_BE_PO_NEW  : Use this badi to change the Item type to "U" which is required for STO PO in ECC. Also populate the supplying plant for here.
    You can have your own logic to determine the Supplying plant.
    4 :  BBP_BS_GROUP_BE : You can use this badi to group the shopping items per supplying cart to create one STO PO.
    I hope these information will help you to implement the STO process in SRM.
    Regards,
    Kalandi

  • Extended Classic Sceanario or Classic Scenario

    dear all,
    i'm a bw person and right now trying to figure out why my confirmation extractor in SRM isnt delivery the data i want. I did a search in service market place and found this 1101861.
    anyway, my question is, is there a function or table or anyway i can determine if the srm system i'm extracting from is using extended classing or just the classing scenario?
    thank you!

    Hi
    Please confirm what sceanrio in SRM are you planning for ?
    I have not tried this. In Extended Classic Scenario, using BADI " BBP_TARGET_OBJTYPE"    -> I guess, it's possible, but not sure. Try it out. 
    Purchase Order (PO) will be created in the R/3 system using the BADI -  BBP_TARGET_OBJTYPE. Please read the standard documentation of this BADI, before implementing the same.
    Regards
    - Atul

  • Minimum order value in vendor master - error message in SRM

    Hello!
    I am using minimum order value in ERP for some vendors and I am wondering if is it possible to get the same error message in SRM.
    While creating a shopping cart in SRM if the minimum order value is not reached, the following document created is a purchasing requisition.
    I would like to get the error message that the minimum order value is not reached instead of the automatic creation of a purchase requisition.
    Is it possible?
    Thanks in advance!
    Best regards,
    Karin

    Hi Karin, if you need to show an error message during Shopping Cart creation you willl need to implement badi BBP_DOC_CHECK_BADI, and maybe create an RFC Function Module to check in ECC ir the minimum order value was reached or not and show the error message.
    In order to control the following document you will need to implement badi BBP_TARGET_OBJTYPE.
    Find bellow a sample BBP_TARGET_OBJTYPE - Code Approach.
    Hope This Help.
    Celeste

  • Create PR as follow on document in SOCO

    We're on SRM 5 WAS 7.00. and following support packages.
    SRM_PLUS     550     0015     SAPKIBK015
    SRM_SERVER     550     0015     SAPKIBKT15
    Overview
    We've a special requirement, to create PR's in the back end system instead of PO, from the SOCO based on some special conditions. A BAdI has been identified for this purpose "BBP_TARGET_OBJTYPE". Using code from the standars implementation the conditions have been fit in.
    Question.
    When creating PO from the worklist in the SOCO, the BAdI is triggered and "TARGET_OBJTYPE" is set to PR. Once the program has executed the new screen shown is title says "Bid Invitation" and an error message " You have either failed to select an item, or you cannot create a follow-on document due to an error that has occurred". I tried looking for it on sap notes but no luck.
    Activated debugging, and in there I found that the PR no. is generated and there is no messages in the transfer process either
    -> CL_BBP_SC_TRANSFER_SOURCING.
    Any hint to what the problem can be ?

    Please check the documentation for the BAdI. It clearly fulfills my requirement. I have identified, that the standard screens 4001 of program BBP_SOCO_UI_ITS has some drawbacks, like it does not cater for the change of labels, etc...
    Moreover, the screen is in a modified/active status instead of active status.
    Using Business Add-In BBP_TARGET_OBJTYPE you can define your own criteria for determining the target objects in the backend system.
    As standard, the target objects are created according to the settings in Customizing, see Define Objects in Backend System (Purch. Reqs, Reservations, Purch. Orders).
    The type of the target object is then placed in the field CT_ITEM-PACK_OBJTYPE.
    The following object types exist:
    Object type Meaning
    BUS2093 Reservation
    BUS2105 Purchase requisition
    BUS2012 Purchase order
    Then the BAdI BBP_TARGET_OBJTYPE is called up.
    Using method
    DETERMINE_TARGET_OBJECT_TYPES
    you can determine the target object depending on other item data (or any combination thereof) and overwrite the field CT_ITEM-PACK_OBJTYPE.
    Ensure that you choose logical combinations. For example, you cannot create a reservation without a product number.
    Example
    The system has determined via Customizing that a purchase order is to be created. However, you prefer to have certain users restricted to creating purchase requisitions. Then you overwrite field CT_ITEM-PACK_OBJTYPE with BUS2105.

  • BADI for Reservation Creation in Extended Classic

    Dear SRM Gurus,
    System: SRM Server 5.5
    Technical Scenario: Extended Classic.
    We have requirement to create RESERVATION if stock exist for that particular item, and not based on product category , in R/3.
    I need help as to which BADI is to be used ?
    What should be the logic ?
    Thanking you in advance,
    Best Regards,
    Anil Rajpal.

    Hi Anil,
    I you want to create reservation, you have first to switch from ECS to classic scenario through BBP_EXTLOCALPO_BADI then you have to implement BBP_TARGET_OBJTYPE badi to determine the criteria to create a reservation in your backend.
    Kind regards,
    Yann

Maybe you are looking for

  • Error during import PDF files in MDM

    HI, when I try to import a PDF file in our MDM repository I got the following error: "Importing [English [US]] 'test pdf.pdf'...failed. Unable to open Adobe Acrobat. See your administrator about installing Adobe Acrobat." We are using MDM 7.1 SP3 ins

  • Can you record audio in mainstage?

    Can you record audio in mainstage?

  • Bridge crashes when pressing Esc in slideshow

    I have recently installed CS4 64bit on a new machine (i7-860, 2.8GHz, 8GB DDR3 memory, Sapphire HD5570 1GB DDR3 GPU). All drivers are up to date and I updated CS4 on installation. A couple of times in the last few days a strange thing has happened wh

  • Which patches need to be installed

    I recently install 8.1.7.0.0 database sever. When I search for patches on Oracle Web, there are patches for 8.1.7.0, 8.1.7.1, 8.1.7.2, 8.1.7.3. Under each release, there are 4-5 patches. Should I install all the patches one by one or should I only in

  • Sales By Month Query

    Hello - Any way to adjust the below query to also include Credit Memo / Returned Items? Also, does it include freight amt? SELECT T0.State1 AS 'Bill-to State', (SELECT SUM(T1.DocTotal) FROM OINV T1 with (NOLOCK) INNER JOIN OCRD T2 ON T2.CardCode=T1.C