BAdI BBP_DETERMINE_ACCT

Hi there.
SRM 4.0, server 5.0, backend ECC 6.0, standalone ITS.
I have the need to be able to map company code to the GL Account determination. In the standard SRM systemit is only possible to determine 1 GL Account per 1 material group, so if I also want to take the company code into consideration, I would need to use the BAdI BBP_DETERMINE_ACCT. Can anybody give me a sample code for this? Something like "when BUK = 1000 then GL Account = 1111".
Thanks.

Hi
Either using BBP_DETERMINE_ACCT BADI this can be done
Or use BBP_DOC_CHANGE_BADI.
Also if this BADI doesnt work then you can put a check in the BADI "BBP_DOC_CHECK_BADI" if any one changes the G/L a/c value because when you are using the BADi "BBP_DETERMINE_ACCT",the correct values will be populated in SC.
<b>Related links -></b>
Re: G/L account query !
Re: How to determine GL Account...
Re: GL Account details at the header are not flowing to the item level in SC
<b>Sample code-></b>
method IF_EX_BBP_DETERMINE_ACCT~DETERMINE_ACCOUNT.
  data: w_item_data type BBP_DET_ACC_ITEM.
  data: w_acct_data type BBP_OCI_ENRACCT.
  w_item_data = item_data.
**** access account assignment details to default correct g/l account
    loop at acct_data into  w_acct_data where line = item_data-line and bukrs = item_data-bukrs.
      select single g_l_acct
      into w_acct_data-g_l_acct
      from bbp_det_account
      where category_id = w_item_data-category_id
      and   acc_cat = w_acct_data-acc_cat.
      modify acct_data from w_acct_data.
      clear: w_acct_data.
    endloop.
endmethod.
Hope this will help. Do let me know.
Regards
- Atul

Similar Messages

  • Badi for cost center accounts

    Hi SAPERS,
    Please provide me information about, if more than one cost centers are there in Organization and we need to maintain a different G/L account for separate cost center. In this case we need to implement a BADI, what is the BADI and How we can implement. Please provide me the step by step process.
    Thanks in advance,
    Prasad

    Create a Z Table with Cost center, Product Category and G/L Accoount mapping
    Use BADI: BBP_DETERMINE_ACCT
    In that BADI call FM: BBP_PD_SC_GETDETAIL and get the Cost Center of the Shopping Cart. And read the ZTable and update the Shopping cart.

  • Populating the G/L account field based on Material in the SC

    HI aLL,
       We are runnin on SRM 4.0 (classic).I have a reqt wherein the G/L account which comes in the "Cost assignment details" should be populated at run time (when items are added to SC) based on the material no/Product ID....
      I found out a BADI...BBP_DETERMINE_ACCT which is used to determine the G/L account but not sure at whci point this  BADI is triggered...i  inserted a poup message in a sample implementatiuon of this BADI..but it doesnt show me the popup message when i click on the "ADD TO SHOPPING CART" button on teh SC creatio screen wheerin i can test that this is the BADI which i s called at teh time items are added to teh SC and will populate the G/L account field with teh  proper value form teh backend.
      Also for the G/L account value for the Material,is there any std table which stores the link between  product/valuation class and G/l account in SRM itself  so that my RFC call to teh backend is saved in this BADI implementation??
    regards,
    Disha.

    Hi Disha
    Not sure if I understood you right. I've implemented this BAdI BBP_DETERMINE_ACCT and it works fine so far. I can add an item to the SC and then go to the item details to see the accounting data. There the G/L account corresponds to the one that was determined at run time by the BAdI implementation.
    The standard table in R/3 backend is T030. For described requirements (no known material id) you have to specify a product category. Valuation classes can be assigned to product categories in table T023 (in R/3 backend as well).
    Unfortunately the SRM standards do not take into account the standard account determination as it is known and working in R/3 systems. For this you'll have to implement the BAdI BBP_DETERMINE_ACCT.
    Maybe this thread is of interest for you?
    How to have backend account determination working SRM
    HTH
    Renaud

  • G/L code error in new Procurement Catalog

    Dear All,
    We are currently using SRM 4.0 version.
    Recently we had created a new catalog for a particular plant. The catalog was created sucessfully, also the new product categories were successfully pulled in SRM from R/3. We have also maintained the Call Structure for the catalog. However while shopping for the materials in the new plant, we get an error saying  "No G/L account was entered. Enter a G/L account ". On debugging, we found that in the BADI "BBP_DETERMINE_ACCT" , the field item_data-ordered_prod is NOT showing the material number with the leading zeros, due to which a BLANK G/L account is obtained. The necessary valuation class and the G/L code is maintained in the backend system and is the same for all the materials.
    This error is happening ONLY for the newly created plant and only in the PRODUCTION client.
    Please guide us as to whether there is a customization which we are missing out on or any other suggestions.
    Thanks ,
    Bhakti.

    This seems issue of ECC config only.
    You can compare the config of new & old plant
    & Dev & PROD enviornment
    BR
    Dinesh

  • How to have backend account determination working SRM

    Hello everybody
    Just came across thread
    EBP G/L Account Assignment doesn't  follow R/3 Account Determination
    while I was searching for a solution to this same problem I'm having here as well. I already thought about using BAdI BBP_DETERMINE_ACCT. But I'm stuck to find the right backend function module (R/3 4.7) in order to ask for the G/L account coming from the backend account determination.
    Did somebody already solve this and if yes is willing to share knowledge?
    Any useful help will of course be rewarded with points!
    Best regards,
    Renaud

    <b>The function module in R/3 backend systems looks like that:</b>
    FUNCTION <your function module name here>.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_MATNR) TYPE  MARA-MATNR
    *"     VALUE(I_BUKRS) LIKE  T001-BUKRS
    *"  EXPORTING
    *"     VALUE(E_KONTO) LIKE  T030-KONTH
    *"     VALUE(E_BSCHH) LIKE  T030B-BSCHH
    *"  EXCEPTIONS
    *"      NOT_FOUND
      DATA: w_subrc LIKE sy-subrc.
      DATA: i_ktopl LIKE t001-ktopl.
      DATA: i_bklas LIKE mbew-bklas.
      CLEAR: w_subrc, i_ktopl, i_bklas, e_bschh, e_konto.
    * Determine chart of accounts
      SELECT SINGLE ktopl FROM t001 INTO i_ktopl
        WHERE bukrs = i_bukrs.
      w_subrc = w_subrc + sy-subrc.
    * Determine bklas from material
      SELECT SINGLE bklas FROM mbew INTO i_bklas
        WHERE matnr = i_matnr
        AND   bwkey = '1000'
        AND   bwtar = space.
      w_subrc = w_subrc + sy-subrc.
    * Determine G/L account
      CALL FUNCTION 'MR_ACCOUNT_ASSIGNMENT'
        EXPORTING
          bewertungsklasse       = i_bklas
          bewertung_modif        = '1000'
          kontenplan             = i_ktopl
          konto_modif            = 'VBR'
          soll_haben_kennzeichen = 'S'
          vorgangsschluessel     = 'GBB'
        IMPORTING
          buchungsschluessel     = e_bschh
          konto                  = e_konto
        EXCEPTIONS
          NOT_FOUND_T030         = 1
          NOT_FOUND_T030B        = 2
          NOT_FOUND_T030R        = 3
          NOT_FOUND_T030S        = 4
      w_subrc = w_subrc + sy-subrc.
      IF w_subrc <> 0.
        MESSAGE i100(zpcg_mm) WITH i_matnr RAISING not_found.
      ENDIF.
    ENDFUNCTION.
    <b>The BAdI code in SRM looks like that:</b>
    method IF_EX_BBP_DETERMINE_ACCT~DETERMINE_ACCOUNT.
      data: e_konto(10) TYPE C,
            e_bschh(2)  TYPE C,
            wa_acct_data TYPE BBP_OCI_ENRACCT.
      IF NOT item_data-ordered_prod IS INITIAL.
        CALL FUNCTION '<your function module name here>'
          DESTINATION item_data-product_src_sys
          EXPORTING
            i_matnr = item_data-ordered_prod
            i_bukrs = item_data-co_code
          IMPORTING
            e_konto = e_konto
            e_bschh = e_bschh
          EXCEPTIONS
            NOT_FOUND = 1
        IF sy-subrc = 0.
          LOOP AT acct_data INTO wa_acct_data
            WHERE line = item_data-line.
            wa_acct_data-g_l_acct = e_konto.
            MODIFY acct_data FROM wa_acct_data.
          ENDLOOP.
        ENDIF.
      ENDIF.
    endmethod.
    <b></b>

  • GL Account details at the header are not flowing to the item level in SC

    Hi All,
    While creating a Shopping Cart, first I am specifying the cost assignment details (i.e., Cost Center, GL Account) in the header and then creating the line items for the shopping Cart.
    While creating these line items, the cost center which is specified in the header is populated at the line item, but GL Account is blank.
    I need to populate the same GL Account at each line item.
    I checked the badi: <b>BBP_DETERMINE_ACCT</b> to populate the GL account for line items. But I am unable to determine this header GL Account in this badi.
    Can anybody help me in this regard, <b>thanks in advance</b>.
    Regards
    Loknath

    Hi
    <b>The purpose of the BADI - BBP_DETERMINE_ACCT is to deal with Shopping cart - Item level data, there it contains only two tables
    ITEM_DATA
    This contains the most important item data for the shopping cart.
    ACCT_DATA
    This contains the account assignment data for the shopping cart item.</b>
    <u>Here is the documentation.</u>
    <b>BBP_DETERMINE_ACCT</b>
    You can use the Business Add-In BBP_DETERMINE_ACCT to specify your own criteria for determining the G/L account.
    In the standard system, the G/L account is determined using the product category and the account assignment type, refer to Define G/L Account for Product Category and Account Assignment Category.
    The G/L account is then placed in field ACCT_DATA-G_L_ACCT. Then, the system calls the Business Add-In BBP_DTERMINE_ACCT.
    In method DETERMINE_ACCOUNT, two table parameters are available:
    ITEM_DATA
    This contains the most important item data for the shopping cart.
    ACCT_DATA
    This contains the account assignment data for the shopping cart item.
    This means that you can now determine the G/L account irrespective of other item data (or any combination of item data) and overwrite field ACCT_DATA-G_L_ACCT.
    Example
    For the product category OFFICE SUPPLIES in conjunction with account assignment type CC (cost center), the system determines G/L account 400000. However, you also want to take into account the company code (field ITEM_DATA-CO_CODE) when determining the G/L account. The system is to make postings to G/L account 410000 for company code 0002. So you overwrite field ACCT_DATA-G_L_ACCT with 410000.
    <u>I recommend, In future, Please read the relevant documetation of any of the BADIs in SE18 Transaction, before implemnting the same, to get the details.</u>
    Hope this will help.
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • G/L account determination in SRM by company code

    Hi,
    We have a requirement to default G/L account not only by product category but also by company code. I can see the field company on the BBP_DET_ACCOUNT table but in configuration this field is not there. I know the field company is not directly the company code field in ECC but is the BP in the org plan that has the company code flag on the function tab.
    We also know that we can use the BADI BBP_DETERMINE_ACCT to accomplish what we want but I am trying to find a way of doing it without any development.
    We are in SRM 5.5 connected to ECC 6.0.
    Thanks and regards, Jose Oyon.

    Dear Olyn,
    if it is showing in Account Determination analysis that "G/L account has been determined", but still in the incompletion log it shows "G/L account was not determined", then the most possible chance is that after creating the Sales Order the G/L account was determined for Customer or Material.
    You can be able to save the order even it is incomplete.
    Solution: you can delete the line item from the sales order & again add it
    Please let me know if this solution helps you or not.
    Thanks
    Bidhu

  • FI Validation in Shopping cart / PO

    Hi,
    We are using SRM 4.0 (Server 5.0). Extended Classic scenario.
    We enabled the FI validation in back end system in SRM configurtion. While creating the shopping cart or PO (in ext classic) it is working fine.
    But the problem is, it is validating only whether the cost elements and G/L accounts are available in SAP. It is not validating whether the GL account can be used for that cost element (cost center or WBS).
    For example: G/L account x can be used only against cost center. If we are using that G/L account against WBS element it is not giving any error message before ordering the SC or PO (i.e. thru Check button) instead it gives an error after ordering the SC or PO which has to viewed in Application monitor.
    User ordering the SC or PO may not know about the status if there is any error unless SRM admin monitors it which leads to delay in PO gets processed.
    Is there a way by which we can achieve the above validation before ordering the SC or PO?
    Plz note: Config "Define G/L Account for Product Category and Account Assignment Category" may not be helpful for us bcz I assume we can set only one GL account for one product category.
    Please help me.
    Thanks.

    Hi Arun,
    did you resolve this issue? Is the only way to realize that validation really only by implementing badi bbp_determine_Acct?
    If yes, would it be possible for you to send me the code of how you implemented  badi bbp_determine_Acct=
    Thanks for your answer.
    Best regards,
    Henning

  • Assign Account assignment category to multiple cost centers in SRM

    Hi All,
    We are Implementing SRM 5.5, Extended Classic Scenario for Goods and Services (Stock and Consumables).
    I have 400 cost centers. How to assign G/L Accounts to multiple cost centers, in Define G/L Accounts for Account assignment category and Product category?.
    I guess, By using BADI - BBP_DETERMINE_ACCT. If this is correct, Do we have to develop any ZTABLE for this. Or only BADI enough?.
    Please anyone explain details.
    Thanks in Advance.
    Thanks & Regards,
    John.
    Edited by: johnmiller465 on Aug 21, 2009 8:32 AM

    Hi,
    Cost Center is related with user. Setting is attributes in PPOMA_BBP.
    G/L account is related with Product category and Account Assignment Category. Setting is in standard customizing table.
    If standard customizing is not enough, you can use BBP_DETERMINE_ACCT BADI.
    Regards,
    Masa

  • Assign GL accounts to the product categories

    Hi Experts,
    We are on 4.0, and classic scenario.
    We are facing a problem regarding finding the relevant G/L account on behalf of a product category in SRM.
    Example:
    For product category 10101500, the user should have the possibility for assigning G/L account:
    29000000
    29000001
    29000002
    In our system a user creates a shopping cart. The user choose a product category, 10101500, on behalf of this product category, the user should have the possibility for choosing the different G/L accounts, 29000000, 29000001 or 29000002. When the user has the different G/L accounts on screen, the user can choose the relevant one into the shopping cart. Are there any experts who have worked with this kind of issue?
    Best regards Kim

    Hello Kim,
    Process you are describing is not standard.
    If you look at following path in SPRO:
    SAP Implementation Guide -> Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Account Assignment -> Define G/L Account for Product Categoriey and Account Assignment Category
    you will see that G/L Account number is assigned to one product category ID with one system source (for product category) and one account assignment category.
    So, the only way to be able to select different G/L account number for same product category is to give for each G/L account a different account assignment category.
    Nevertheless, this has to be checked to know:
    1- if it can work technically in SRM,
    2- but especially if Controlling functional team agrees.
    An alternative solution would be to use BAdI BBP_DETERMINE_ACCT: instead of giving choice to user to select himself G/L account, determine directly G/L value according to functional rule(s) given by Controlling team.
    Regards.
    Laurent.

  • G/L account query !

    Hi experts,
    I am working in SRM 5.0 EBP 4.0 configuration.
    We find that in a particular case, a purchase order failed to be posted to the backend system as the error was obtained.
    ( Error Message BBP_PD : Message number 047  I ::000 )
    In RZ 20, I have got an alert stating the G/L account ' X ' cannot be used.
    But I find that the G/L account has been maintained in the table ZBBP_DET_ACCOUNT for the particular product category.
    Also I find that the G/L account is created for the company code in the respective backend system.
    I get an error when I tried to debug ' in the function module
    ' META_ACCSERV_CHECKACCASSIGNMT ' which gives an error that the G/L account is not maintained .
    Can any one clarify why this error comes and where does the system check in the backend for the G/L account value for a particular cost assignment.
    Awaiting your expert comments!!!
    With Regards,
    Rajesh

    Hi
    <b>There can be couple of reasons which need to be checked thoroughly.</b>
    Please ensure the following ->
    <b>1) If you create a PR or PO directement in R/3 (= without SRM), do you get the same error ?
    Account assignment type "P" for project has to be maintained in transaction OME9. If you do use standard configuration , both on SRM AND R/3 sides, you should not have this issue. However, if you work with EBP 3.5, i guess it means that the system was working well before.
    2)
    Check the field status group assigned to the GL Account in Tx FS00.
    And look at the field 'Field Status Group' of 'Create/bank/interest' tab.
    Double click on the field status group field, and check for the 'Additional account assignments' - Check here whether the WBS/Cost center/profit center are suppresed. If suppresed you cant use this GL to post against the cost objects.
    3) Try to use the same GL account and the same WBS element you used in SRM while creating the PO in R3 (to check for the error). I suspect, you will come up with the same error as what you got in SRM.
    Generally this error will pop up if there are any mismatch between the field status groups assigned to the GL account and the cost object P (projects/WBS). Check for the field 'Network' in both of the field status groups.</b>
    Also, There are 2 ways to determine GL in SRM.
    1. Maintain GL codes for product categories & Account assignment in SPRO. With this relevant GL code will be picked in SRM for the selected product category.
    SRM server-->Cross appln basic setting-->Acct assignment--->Define GL acct for product category
    2. Maintain logic to determine GL code in BADI BBP_DETERMINE_ACCT. In this BADI use ITEM_DATA and ACCT_DATA tables in method DETERMINE_ACCOUNT.
    If you need to overwrite these,you will need to implement the BADI "BBP_DETERMINE_ACCT" and method "DETERMINE_ACCOUNT".
    In this method ,use the FM "MR_ACCOUNT_ASSIGNMENT" for the retreiving the G/L account from R/3.
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Error when create shopping carts in cproject

    Hi,
    We are on SRM4.0 ,Cproject 4.0 and we have an error message "Cannot determine CO account assignment object"  in creating shopping carts in the Cprojet.
    Could anyone can tell me what IMG missing?
    what i have to do,please suggest me.
    BR,
    Jing

    Hi
    Have you check OKB9 transaction in R3 - FI . ?
    Here we maintain the Cost center - cost element ?
    I guess, This is because the the particular material profit center which is link cost center in OkB9 in R3 FI requires a cost object. The cost object enttry is not maintained can u pls chk this with your local FI person and ask him to maintain the cost object for the cost center. See Material is linked to profit center and which is linked to cost center which in turn is linked to cost object. Then this error is material specific. Ask your SAP FI consultant to maintian the cost object for cost center which is linked ot the profit cente in material masters
    To change the deafult G/L account,you need to use the BADI BBP_DETERMINE_ACCT.
    Do let me know with more details in next reply.
    Regards
    - Atul

  • Material group-G/L account

    Hi
    we have a specific scenario.Different plants are using different G/L account for the same product category.Can we maintain 2 G/L accounts for the same product group.
    Is it that when the user chooses the material group he has to choose the G/L account accordingly.

    Hello,
        I don't think you can achieve through configuration, you can do following:
    1. Don't setup any G/L for that perticular product category - so user will have option to choose different G/Ls as per their requirement.
    or
    2. You can implement BADI BBP_DETERMINE_ACCT  - Here you can put your own logic to determine G/L.
    Hope this helps.
    Regards,
    Shiv

  • Product Category and GL account mapping

    Hi
    We are using SRM 4.0 with ECS scenario.
    Would like to know, whether the Product Category and GL account mapping we do in SPRO is restricts the user to use the same GL account mapped against the product category or it is just a defalut and can it be changed while making PO or SC.
    Thanks

    Hi
    <u><b>This is standard SAP functionality.</b></u>
    <u>The same GL account mapped against the product category, is just a default and it can be changed while making PO or SC. This is not hardcode as such. We emphasize here that we should follow the same GL account and Material Group combination as determined in R/3, the same combination GL and Product caategory needs to be made in SRM as well. (Since finally the PO will get created in r/3, where all the same validation will take place, at the creation of PO from SRM).</u>
    <b><u> The table which holds the data for
    "Define G/L Account for Prod Cat and A/C Assignment Cat" is BBP_DET_ACCOUNT and it holds data in similar manner.</u></b>
    1. Either using the SPRO path
    SPRO-> Account Assignment -> Define G/L Account for Prod Cat and A/C Assignment Categories
    2. Or using SM30 transaction for the table - BBP_DET_ACCOUNT table
    3. Use BADI - BP_DETERMINE_ACCT -> To change GL accordingly as per your logic.
    The SRM G/L account is working on a linkage between product category and account category (cost center, project, asset...) that give you the default G/L account. If this very simple equation does not fit your requirement, you can use badi BBP_DETERMINE_ACCT to implement your own equation.
    <b>Hope this will definitely help. Do let me know.</b>
    Regards
    - Atul

  • Detailed Design Architecture of SRM 5.5 with all components with interfaces

    Hi All,
    I am implementing SRM 5.5. Extended Classic Scenario with all Business Scenario's. We are using components are
    1)      SRM, Bidding Engine and LAC in one server.
    2)      SUS, Supplier Registration, cFolders  in one server.
    3)     SRM-MDM Server.
    My Question is. I would like to know detailed Architecture of all the components and how it is integrating each other servers.
    Is there any Interface between supplier registration and suppliers?, If yes, what is that and what for it.
    If anyone has detailed Architecture design please share with me. 
    Highly appreciate for your help......
    Awaiting for quick response.........
    Thanks & Regards,
    John.
    Edited by: johnmiller465 on Aug 20, 2009 2:33 AM

    Hi Masa,
    Thanks for your response and awarded points. and I have another question.
    We are Implementing SRM 5.5, Extended Classic Scenario for Goods and Services (Stock and Consumables).
    I have 400 cost centers. How to assign G/L Accounts to multiple cost centers, in Define G/L Accounts for Account assignment category and Product category?.
    I guess, By using BADI - BBP_DETERMINE_ACCT. If this is correct, Do we have to develop any ZTABLE for this. Or only BADI enough?.
    Please anyone explain details.
    Thanks in Advance.
    Thanks & Regards,
    John.

Maybe you are looking for

  • JBO-25019: Entity row of key oracle.jbo.Key[1068] not found in SysUser

    Hello, I got the above error after creating a new row in the table. The user id is populated with the following statements: SequenceImpl userSeq = new SequenceImpl("sys_users_s", getDBTransaction()); setUserId(userSeq.getSequenceNumber()); Does this

  • Cover flow Size

    Hi I am using cover flow in the finder and I expanded it by using the three lines below the cover flow scroll bar but every time I open a window the size of cover flow gets smaller. Is there a way I can set cover flow to a default size in the finder

  • I get a "connection error" when trying to update/install Flash Player

    I have a previous version of Flash player so I was trying to update it. The installation doesn't make it past 5% before saying "connection error". I have tried all the troubleshooting steps and even tried to uninstall it. When I try to download the u

  • My 30" display only offers 1280x800 resolution

    In my display system preferences, this is as high as it goes. My previous monitors all allowed between 1280x1024 and i had another crt that offered up to 1600. Shouldn't it be 2560x1600? Thanks

  • Good (cheap) second monitor for 20"CD

    I am looking for a second (LCD) monitor for my 20" Core Duo. It doesn't need to be top of the line for video or photo editing or anything like that: I just want more real estate and want to take advantage of the Core Duo's ability to use extended des