Create account/customer hierarchy thru ABAP codes

Hi,
Anyone can help me on how to create a account/customer hierarchy in CRM.
How can I create node, assign BP to a account/customer hierarchy.
Can anybody share some abap codes that can do this? Or give some FMs or documentation on how to do this.
Thanks!
james

James,
You can find the FM, Class Lib and APIs under the package BUPA_HIERARCHY.

Similar Messages

  • Create CRM customer/account hierarchy node thru abap code

    Hi,
    Any one can help me on how to Create CRM customer/account hierarchy node thru abap code?
    Is there any Class/methods, FMs that I can use to create node in customer/account hierarchy?
    Sample codes will greatly help me.
    I hope someone can help me on this since this is my urgent requirements on my project.
    Thanks,
    james

    James,
    You can find the FM, Class Lib and APIs under the package BUPA_HIERARCHY.

  • How to create a custom Hierarchy in IDT 4.0

    Hi All.
    I am trying to create a custom hierarchy objects in the Information Design tool, But I am not able to find it here as same sort like the universe designer in 3.1 or 4.0 . I have found the navigational path but I am not sure how I can use it as a hierarchical objects in my reports, Can anyone please suggest how to create a custom hierarchical dimension in IDT 4.0.
    Thanks,
    Navin

    Custom Hierarchy are called navigation path in IDT. I will suggest to go through the navigation path tutorials below
    http://scn.sap.com/docs/DOC-22087
    Hierarchical objects are no different than any regular objects but they enable the drilling in drill mode in the report and you can create a cascading prompt on top of them..
    If after going through this you still have any specific questions just let us know...

  • How to read a mail from sap inbox thru abap code?

    how to read a mail from sap INBOX thru abap code? can anyone tell me the technical approach? I NEED TO READ A MAIL and then need to pass the parameters to a bapi.
    Message was edited by:
            shahid mohammed syed

    Hi SSM,
    Did you manage to have your program working? I also have same requirement. I tried standard FM and BAPI but I always encounter authorization error when I tried accessing other user's mail. Thanks.
    Regards,
    Ryan

  • Creating an xml file from abap code

    Hello All,
    Please let me know which FM do I need to execute in order to create an XML file from my ABAP code ?
    Thanks in advance,
    Paul.

    This has been discussed before
    XML files from ABAP programs

  • Creating a long text using ABAP code.. fm SAVE_TEXT

    When you create an order via IW31 one of the options is to click on the text button and create a long text. I am basically trying to mimic this action from within my ABAP code.
    The text id details are as follows:
    Text Name       500000015000046  which is (5000000 + order number)
    Language        EN
    Text ID            KOPF         Order header text
    Text Object      AUFK       Order text
    If i manually create the text within the transaction i am then able to view and update it via function modules READ_TEXT and SAVE_TEXT. But if the text has not already been created READ_TEXT obviously returns nothing as it does not exist and SAVE_TEXT does not seem to created it!
    Anyone know how i would go about creating this text using ABAP code?
    Hope this make a bit of sense
    Thanks in advance
    Mart

    I have implemented the code as i think it should be. See below, can any see what is wrong. If i add init_text it makes no difference and adding the commit_text just makes it hang
    DATA: IT_TEXTS type standard table of TLINE,
           wa_texts like line of it_texts,
           wa_txtheader type THEAD.
    wa_txtheader-TDID     = 'KOPF'.
    wa_txtheader-TDSPRAS  = 'EN'.
    wa_txtheader-TDNAME   = '500000015000056'.
    wa_txtheader-TDOBJECT = 'AUFK'.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
      wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
      wa_texts-tdformat = '*'.
    wa_texts-tdline = 'hello'.
    append wa_texts to it_texts.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        CLIENT                = SY-MANDT
        HEADER                = wa_txtheader
        INSERT                = 'X'
       SAVEMODE_DIRECT       = ' '
       OWNER_SPECIFIED       = 'X'
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      TABLES
        LINES                 = IT_TEXTS
    EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 4
       OTHERS                = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • SAP Query Custom Field with ABAP Code

    Hi All,
    I have a custom field in my SAP query which has some ABAP code under it. The code finally writes some value to a variable. My question is do i need to explicitly link the variable in the ABAP code to the custom field OR it's done automatically. For some reason i don't see any value for this custom field. Thanks.

    Thanks Sandra

  • Text Variable With Customer Exit Logic/ABAP Code

    Hi Experts,
    Could you please help me with the Logic/Code that i need to use in Calculacting The TEXT Variable Using CUSTOMER EXIT
    I had a rolling report in which there are 14 Calculacted Keyfigures  (Not Restricted KF),Which are
    M-1,M-2,M-3,M-4,M-5........M-14
    In MAY2009
    M-1 represents (Current Month -1)  APR2009
    M-2 represents (Current Month -2)  MAR2009
    M-3 represents (Current Month -3)  FEB2009
    M-4 represents (Current Month -4)  JAN2009
    M-5 represents (Current Month -5)  DEC2008
    M-6 represents (Current Month -6)  NOV2008
    M-7 represents (Current Month -7)  OCT2008
    M-13 represents (Current Month -13)  APR2008
    M-14 represents (Current Month -14)  MAR2008
    In JUNE2009
    M-1 represents (Current Month -1)  MAY2009
    M-2 represents (Current Month -2)  APR2009
    M-3 represents (Current Month -3)  MAR2009
    M-4 represents (Current Month -4)  FEB2009
    M-5 represents (Current Month -5)  JAN2009
    M-6 represents (Current Month -6)  DEC2008
    M-7 represents (Current Month -7)  NOV2008
    M-13 represents (Current Month -13)  MAY2008
    M-14 represents (Current Month -14)  APR2008
    Currently the Description of CKF is named as M-1,M-2..M-14.My requirment is to develop Text Variables that displays the description as MMMYYYY

    Sample code, NO syntax check...!!
    CASE i_vnam.  " Variablenname
      WHEN 'M-1'. "For Variable <M-1>
       Data: l_peri type E_BUPER, "Declare variable for Period
                l_year type E_GJAHR "Declare variable for year
        IF i_step = 2.
          DATA l_s_range LIKE LINE OF e_t_range.
          CLEAR l_s_range.
          CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' " By providing Date this FM gives period and year
           EXPORTING
             I_DATE           = SY-DATUM "System Date
             I_PERIV         = V3 "Fiscal Variant
          IMPORTING
             E_BUPER       = l_peri "for period is date is today period = 005
             E_GJAHR       = l_year. "for Year = 2009
          l_peri = l_peri - 1. "To reduce 1 from period (005 - 1 = 004)
          IF l_peri = '004'       "Check value of period.
          Concatenate 'APR' l_year into l_s_range-low. "concatenate 'APR' & Year into Low.
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
        ENDIF.
    For M-2 subtract 2 and repeate same.

  • Step by Tutorial for Creation of Customer Hierarchy in CRM System

    Dear Experts,
    I want to create a Customer Hierarchy in the CRM System. Need step wise tutorial to do the same with the help of an example. I already have the help.sap.com URL.
    Please help.
    Thanks & Regards,
    Tapan

    Customer hierarchies can be created by using transaction code BPH.
    Regards.

  • Authorized Partners for Release Orders with customer hierarchy

    Hello everyone,
          I have created a value contract with order type WK1, in the order type WK1 configuration, choose rule B  for check partner auth. field, namely we want to use
    customer hierarchy to detemine the sold-to-party for the follow-up release order. Also I have created the customer hierarchy with hierarchy type A. There are
    four levels under this hierarchy, it contains four customer nodes and four customers. Every customer is belong to a customer node. The partner determination
    for the customer hierarchy have alredy done, I can see the customer hierarchy "1D" at the partner tab of header in the contract, but when I release the sales
    order against  the contract, input a low-level customer number, still got the message "partner X is not authorized to release from contracts.".
         I want to know if I missed some settings in order type configuration or the copy control from WK1 to OR. If this scenario need integrate with  CRM system?  I
    have found some related information, just list below:
        Partners in the hierarchy (Rule B)
    If the partner who wants to release against the contract is the sold-to party of the contract or at a lower level in customer hierarchy to the sold-to party in the contract, the system accepts the partner as the sold-to party for the release order.
    If rule B is defined for the contract type, you can search for authorized partners for a release order using the contract number. Equally, you can search for the relevant contract for a release order using the partner number. In this case, the partner authorization rule is irrelevant.
    Prerequisites
    If you wish to use group hierarchies other than pricing hierarchies to determine authorized partners, you must have created a hierarchy category and a hierarchy:
    To create the hierarchy category, go to Customizing for CRM under Master Data --> Business Partner-->  Business Partner Group Hierarchy. 
    To create the group hierarchy, go to the SAP Easy Access Menu and choose Master Data --> Business Partners --> Maintain Group Hierarchy.
    Note that you can only create group hierarchies in the SAP GUI and not in the People-Centric user interface.
    You must have activated the necessary settings for the sales contract and the release order in the IMG for CRM. For more information, see Transactions ---> Settings for Contracts -->Define Settings for Authorized Partners.
      Thanks!

    Hi,
    In transcation VTAA at item level have your own cory requirment code which will calcullate net value of the doc, hope this works out
    regards
    sriky

  • Customer Hierarchy and product Hierarchy

    Hi friends what is customer Hierarchy and what is product hierarchy?
    please explain step by step with examples.
    mail id: [email protected]
    Thanx.

    Hi Sirivas,
    CUSTOMER HIERARCHY:
    Customer hierarchies are available in Sales and Distribution, so that you can create flexible hierarchies to reflect the structure of customer organizations. If your customer base includes multi-level buying groups, cooperatives, or chains of retail outlets, for example, you can create hierarchies to reflect the structure of these groups. Use customer hierarchies during sales order processing and billing for determining pricing and running statistics.
    &#61550; A customer hierarchy consists of nodes.
    &#61550; To create a customer hierarchy:
    1. Create master records for each node.
    2. Assign the nodes to each other.
    3. Assign the customer master records to the relevant nodes.
    &#61550; Hierarchy nodes are only valid for a certain period of time. They may also be moved. If a node is moved, the system automatically reassigns all related nodes and customer master records.
    With customer&#61550; hierarchies, you can assign price or rebate agreements to a higher level node. The agreements are then valid for customer’s at all subordinate levels to this node. You can create pricing condition records for each node indicated as relevant for pricing. If one or more nodes in the hierarchy path of a sales order contain pricing information, the system takes them into account automatically during pricing.
    'How to check'
    All the customizing is in SD/Master Data/Business Partner/Customers/Customers hierarchy
    All the customizing is in SD/Master Data/Business Partner/Customers/Customers hierarchy
    1) Define hierarchy type: just put and ID and a name to the new hierarchy.
    2) Set partner determination: if you want to user the hierarchy in price determination, then, in the orders, at the header level, you have to have a Partner Procedure with a partner function for each level. In the partner procedure, in each partner function you must indicate the source partner function. With this information, in the order, you obtain the business partner for each partner function.
    3) Assign account groups: you indicate which accounts groups are allowed for being part or your hierarchy.
    4) Assign sales areas: simple you indicate which sales areas are allowed in your hierarchy. (Here you can customize common sales areas, just for not having to build de hierarchy in all the different sales areas).
    5) Assigning hierarchy type for pricing: you indicate which classes of documents uses hierarchy in pricing determination.
    It is possible to maintain so called customer hierarchies. This might be useful when for example you create a condition discount for a customer that is part of such a hierarchy structure. All subnodes in the hierarchy below that customer, will thus receive the same discount.
    Customer hierarchy setup, firstly decide the hierarchy type to be used.
    The standard is type A.
    You can also assign a partner function to the customer so that the higher level customer in the hierarchy is copied into a sales order as a partner function - but you don't need that right?
    Next assign your customer account group to the hierarchy type. And enter the combinations that will be allowed for creating the hierarchy.
    You want to assign a ship-to to a payer. So enter the ship to account group and enter the payer account group as the higher level.
    You must also make an entry for permitted sales area assignments. So if you want to a hierarchy for customers in the same sales area then enter the sales area and enter the same one as the higher level sales area.
    All these settings can be found in the IMG. Under SD - master data - business partners - customers - customer hierarchy
    You use for example customer hierarchy when you have an company like Unilever and you agree both on a discount. Unilever does have different locations / businesses and you have to maintain the discount for all customers. If you use a customer hierarchy you can maintain the discount for the partner in the top of the hierarchy and in this way it will be valid for all customers in the hierarchy.
    Product Hierarchy:
    The product hierarchy on the Basic Data screen is used to depict the competitive materials of competitor 1 in relation to those of competitor 2. Here, your own company and its materials are also regarded as a competitor and as competitive materials respectively. You can use this representation as a basis for market analyses.
    Normally we enter competitive materials using material type WETT. When entering your own materials as competitive materials, you can, however, display the product hierarchy on the Basic Data screen for other material types too.
    Requirement type determination is based on the "Origin of requirement type in requirement type determination"
    In this field you can select an alternative search strategy (source):
    Source 0 = Material master strategy, then item category and MRP type
    Source 1 = Item type and MRP type strategy
    Source 2 = Item type and MRP type strategy (as for source 1) with additional check of the allowed requirements type
    e.g. If you set value "0" system will first strategy group in material master based on that it will determine requirement type and no value found then it will determine requirement type based on item category and MRP type.
    Above settings can be found at SD --> Basic Functions --> Availability Check and transfer of requirement --> Transfer of Requirement --> Determination of Requirement type using Transaction
    For make to order std strategy group 20 is used to which req type KE is assigned.
    Check
    Check in Tcode OVZH, what requirement class is assigned to your requirement type
    Check in Tcode OVZG, what value is assigned to field "Consumption" in requirement class because that determines consumption posting.
    The product hierarchy is used to group materials by combining different features. It is used for analyses and pricing. A product hierarchy can consist of up to Eighteen characters. Its features can be combined in various ways.
    Example: A dishwasher can be described by product hierarchy 000010000200000002. This series of characters states that dishwashers belong to the category electrical appliances (series of characters 00001, position 1-5), and also to wet appliances (series of characters 00002, position 6-10) and, finally, to dishwashers (series of characters 00000002, position 11-18).
    One can maintain the product hierarchy via transaction "OVSV" and "V/76.
    Path = IMG-Logistics General-Material master-Setting for Key fields-Data relevant to SD-Define Product hierarchy.
    The product hierarchy is maintained in the Basic Data view of the material master record, and is used for evaluation as well as price determination in materials management.
    The standard SAP allows only 3 levels, but you can go up to 6 levels, for additional 3 levels u will have to take abapper help and add 3 more fields and corresponding data element into structure. So that in material master drop down you will see 6 levels.
    The transaction which will be useful to change product hierarchies for material master will be V/76.
    Yes, You can print the levels of the product hierarchy through a report.
    Use the view SE16 - V_T179 (Table Name) to display Product hierarchy with level numbers.
    Field Name is PRODH
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • BW Transaction Code to View Variable ABAP Code

    Hello All,
      Is there a BW Transaction to view Variable ABAP Code?
    Thanks!

    hi Tina,
    If you are looking for Customer Exit Variable ABAP Code,
    1) Tcode: SE80 (Here select Class and Interface and give the technical name and display, you will get all customer exit variables created)
    2) Tcode: CMOD. Give Project name and then goto "components" --> Function Exit and in the code, goto "ZXRSRU01".
    3) Tcode: SE19 (Now, generally CMOD is not used, BADI is used. Initially SPOT enhancement implementation is created which can have many BADI Implementations and for each BADI implementation, class and filter is created where you write code for variable given in Filter.)
    Hope it helps
    Regards
    Lavanya

  • What's use for Customer Hierarchy

    Dear Guru
    What's use for Customer Hierarchy? give me a step to config?
    regards
    Mohammed Renu.I

    Hi Mohammed Renu,
    CUSTOMER HIERARCHY:
    Customer hierarchies are available in Sales and Distribution, so that you can create flexible hierarchies to reflect the structure of customer organizations. If your customer base includes multi-level buying groups, cooperatives, or chains of retail outlets, for example, you can create hierarchies to reflect the structure of these groups. Use customer hierarchies during sales order processing and billing for determining pricing and running statistics.
    &#61550; A customer hierarchy consists of nodes.
    &#61550; To create a customer hierarchy:
    1. Create master records for each node.
    2. Assign the nodes to each other.
    3. Assign the customer master records to the relevant nodes.
    &#61550; Hierarchy nodes are only valid for a certain period of time. They may also be moved. If a node is moved, the system automatically reassigns all related nodes and customer master records.
    With customer&#61550; hierarchies, you can assign price or rebate agreements to a higher level node. The agreements are then valid for customer’s at all subordinate levels to this node. You can create pricing condition records for each node indicated as relevant for pricing. If one or more nodes in the hierarchy path of a sales order contain pricing information, the system takes them into account automatically during pricing.
    'How to check'
    All the customizing is in SD/Master Data/Business Partner/Customers/Customers hierarchy
    All the customizing is in SD/Master Data/Business Partner/Customers/Customers hierarchy
    1) Define hierarchy type: just put and ID and a name to the new hierarchy.
    2) Set partner determination: if you want to user the hierarchy in price determination, then, in the orders, at the header level, you have to have a Partner Procedure with a partner function for each level. In the partner procedure, in each partner function you must indicate the source partner function. With this information, in the order, you obtain the business partner for each partner function.
    3) Assign account groups: you indicate which accounts groups are allowed for being part or your hierarchy.
    4) Assign sales areas: simple you indicate which sales areas are allowed in your hierarchy. (Here you can customize common sales areas, just for not having to build de hierarchy in all the different sales areas).
    5) Assigning hierarchy type for pricing: you indicate which classes of documents uses hierarchy in pricing determination.
    It is possible to maintain so called customer hierarchies. This might be useful when for example you create a condition discount for a customer that is part of such a hierarchy structure. All subnodes in the hierarchy below that customer, will thus receive the same discount.
    Customer hierarchy setup, firstly decide the hierarchy type to be used.
    The standard is type A.
    You can also assign a partner function to the customer so that the higher level customer in the hierarchy is copied into a sales order as a partner function - but you don't need that right?
    Next assign your customer account group to the hierarchy type. And enter the combinations that will be allowed for creating the hierarchy.
    You want to assign a ship-to to a payer. So enter the ship to account group and enter the payer account group as the higher level.
    You must also make an entry for permitted sales area assignments. So if you want to a hierarchy for customers in the same sales area then enter the sales area and enter the same one as the higher level sales area.
    All these settings can be found in the IMG. Under SD - master data - business partners - customers - customer hierarchy
    You use for example customer hierarchy when you have an company like Unilever and you agree both on a discount. Unilever does have different locations / businesses and you have to maintain the discount for all customers. If you use a customer hierarchy you can maintain the discount for the partner in the top of the hierarchy and in this way it will be valid for all customers in the hierarchy.
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • Customer Hierarchy creation

    Hi all,
      I encounter a problem when trying to create a Customer Hierarchy in CRM, in the tcode BPH , I enter the hierarchy category as pricing , but i got the error
    You cannot create hierarchy trees of this category
    If the delta download for the ERP customer hierarchy is active, you cannot create a hierarchy tree of the category "Pricing" in CRM.
    For this reason, you should establish that pricing based on the customer hierarchy and BP group hierarchy gives the same results in the ERP System and in CRM".
      But I did not understand what does it mean, could anybody throw me a light?
    cheers,
    hy

    Hi Ginnie ,
    Have u pulled all the Pricing related Tables from ERP to CRM.
    It has a dependency because pricing works on Customer Pricing Procedure and Document Pricing Procedure .
    Regds,
    Sunil Nair

  • Customer hierarchy re-determination

    Gurus,
    i created a customer hierarchy to which i assigned a customer. i then created some sales orders and subsequently invoices. After this I realised the hierarchy was wrong and so I went back and changed the hierarchy. how can i now update the sales orders and invoices partner functions with the newly changed/corrected hierarchy?
    Regards,
    ottley

    Hi
    Once you have done sales order/invoice partner cannot be changed.
    It will reflect in the new sale order. you can cancel invoice and reverse the goods and delete sales order.
    And redo it again.

Maybe you are looking for