ABAP-Code Editing classification hierarchy of item

Hello!
I try to edit the classification hierarchy of an item with ABAP-coding. unfortunately I haven't found any Function to do so.
I tried it by using the class CL_RPM_PROJECT and the method assign_to_bucket_hierarchy, but I think the coding of the method is wrong, because it calls the method get_all_relates, which doesn't have any coding and loops over the result-table, which of course is always empty.
I tried as well the function 'RPM_CREATE_RELATION', but without any success.
Does any one know how to edit the classification hierarchy with a function?
Thanks a lot for your help!
NiNa

Hello Nina;
Did you solved this issue?
I have the same problem, how can I change and assign Item Portfolio to classification hierarchy?
Best regards,
Mariano

Similar Messages

  • Managing  Hierarchy ( Leaves & Nodes ) by ABAP Code

    Has someone documentation about the functions included into these function pool?
    RSSHIER
    RSSHMT
    I need to change (or create new) leaves's position from node N to node M..... all by ABAP Code.
    Ciao,
    claudio
    Message was edited by: Claudio Caforio

    Hi Claudio,
    its worth to look into function pool RSHI: It has a lot of functions to insert and delete nodes.
    You have to find out the hierarchy id and nodeid of the leave you want to move. Find also the nodeids of the parents (node N and M). read the attributes of your leave. Then first delete leave under node n, then insert a new node under m and use the attributes of the deleted node. There are function modules for it. As far as I remember you have to call some hierarchy_init fms to work correctly.
    Regards,
    Juergen

  • How to insert a new line item in VA01/VA02 by using ABAP code?

    Hi Gurus
    i have a very tough requirement. the customer wants to insert a free goods after an item has been populated in VA01/VA02 automatically according to some certain rules. the input material may be a main material of a sales BOM.
    for example. let's suppose there is a material A who has two sub-material B and C which is maintained in a sales BOM via CS01/CS02. when the material A has been input in the line item in VA01/VA02, its quantity input and after the ENTER key has been clicked, another material D may be displayed in a new line as a gift if the condition met.  the condition relates to customer/material/quanity and these information are stored in a Z-table.
    on the other hand, if the material A is only a single material(not a BOM), the gift(material D) will also be filled automatically if the condition met.
    i have already enhance the FM cs_bom_explosion to filfill the requirment for BOM materials. whereas it is very hard to find the enhanment point for the single material.
    so my question is where is the correct place for me to insert the ABAP code, which decides whether the gift should be given or not and furthermore inserts the new line item into XVBAP. i tried to use MV45AFZZ, whereas the data is always inconsistant if a new line has been inserted. it is very strange that there is no temperary internal table storing line item data input in the table controal of VA01/VA02. system reads the line item data , line by line, via a system kernal function call.
    any hints are welcome. thanks

    HI Stephen,
    I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
    Can you help me with some details?
    Thx!
    Mihaela

  • Hierarchy Time Dependent ABAP code

    Dear Experts,
    I want to ask a custom BADI ABAP code to get the hierarchy of a dimension member where Time Dependent Hieararchy is implemented in that dimension.
    Currently we are using Interface method IF_UJA_DIM_DATA->get_hier_of_mbr to get the hierarchy reference.
    Sample Code:
    DATA: o_test     TYPE REF TO if_uja_dim_data.
    CALL METHOD o_test->get_hier_of_mbr
         EXPORTING
           i_member = lv_member
    *      i_dateto = lv_datum
         RECEIVING
           ro_hier  = lo_hierarchy.
    However after we implement the time dependent on the dimension, this method returns nothing unless we specified the i_dateto parameter to the method (which is optional).
    While my requirement is to get the hierarchy of the member with the date when this logic is executed, putting SY-DATUM to this parameter does not give me the result that I need. I need to put the i_dateto as '99991231' so the hierarchy returned by this method is the latest hierarchy, but not the current date where this logic is executed.
    Is there any way to make that the time hierarchy obtained is the one when the logic is executed? Or is there any other method that is feasible to meet with my requirements?
    Thanks
    Regards,
    Siswono

    Hi Siswono,
    Ok, I see what you mean.
    Then I would suggest that you determine the hierarchy end date first.
    read the hierarchy table by determine its technical name, then find the hierarchy with your date that's between the start date and end date, then you can use the end date for the next step.
    use get_hier_of_mbr with the determined end date.
    Andy

  • Need ABAP code to make unique hierarchy values - Request prompt help

    hi
    <removed>
    I am new to SAP. Please help me in the following
    I require an ABAP code for the following scenario
    I have a simple hieraarchy. The hierarchy is
    SEG -> fam -> clas -> comm
    The values of the seg , fam, cla, com......all will be charecter values
    But in some cases the values will be NOT_KNOWN
    If the values are NOT_KNOWN i need to change them as NOT_KNOWN_1, NOT_KNOWN_2...like that unique charecter values
    should be replaced for NOT_KNOWN
    Example
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN
    Construction -> equipments -> machinery->NOT_KNOWN
    Computers -> Laptops -> Imported -> NOT_KNOWN
                     -> desktops ->flat monitors -> Indian
                           -> imported                     -> NOT_KNOWN->
    NOT_KNOWN -> baggages
    This should be changed to
    SEG->FAM->CLA ->COM
    Clothing -> Mens wear -> Designer garments -> NOT_KNOWN_1
    Construction -> equipments -> machinery->NOT_KNOWN_2
    Computers -> Laptops -> Imported -> NOT_KNOWN_3
              -> desktops ->flat monitors -> Indian
                              -> imported                         
           -> NOT_KNOWN_4 ->
    NOT_KNOWN_5 -> baggages
    This is to make them unique nodes to upload them in hiereachy
    Data is coming from database tables and i was not supposed to do anything in database and the incomin
    data needs to finetuned like this to update them in cube
    So I like to have some coding which will enable this to work in the start routine
    If start routine is not the right option, where else we can do coding
    <removed>
    Regards
    KC

    data : w_suff_n(8) type n,
             w_suff_c(8).
    loop at data_package.
    if data_package-<fieldval> = 'NOT_KNOWN'.
      w_suff_n = w_suff_n + 1. w_suff_c = w_suff_n.
      shift w_suff_c left deleting leading '0'.
      concatenate data_package-<fieldval> w_suff_c into data_package-<fieldval>.
      modify data_package.
    endif.
    endloop.
    *Change <fieldval> in the above to the actual field name.

  • 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.

  • How to write abap code to create manual hierarchy

    Hi,
    This is urgent got to write abap code to create manual hierarchy.
    Thanks

    Hi Adam
    Thanks for replying.
    In my scenario i have one custom zinfoobject which have lots of attributes.
    So, i have to create hierarchy for this zinfoobject with three nodes. one node/charateristic is present in this zinfoobject as attribute. which will be the first node of hierarchy.
    Then second custom infoobject is external not present in attribute list. which will be the second node of hierarchy.
    Third node will be for which i am creating hierarchy.
    So basically need solution for this first.
    some one will load hierarchy info in some table and then will create view on top of that then i have to create datasource on top of that and write a program to load the data from that view in this hierarchy.
    Need solution for this abap program also.
    Thanks
    SAPBW

  • 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.

  • ABAP code for Hierarchy Loading from Flat File

    Hi,
    Can anyone give me some idea / ABAP code for generating parent - child relationships (NODEIDS) from a flat file and load into BW.
    Best regards
    Any insight into this development is highly appreciated

    Hi,
    also have a look at this how to to get informations about the file structure:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    /manfred

  • How to find currently editing transaction code details using ABAP code

    Hi,
      if some user is using VA02 tcode.i want to know for which sales order(i.e Sales order number)he is making changes.
    i want ABAP code sample for this scenario.
    Cheers,
    Jag

    Hi,
                  For this you need to create Lock Object from se11 .It will automatically crate Two Function modules for enque and deque.
    In you case If you want to see the Details for Va02 use.
        CALL FUNCTION 'ENQUEUE_EVVBAKE'
             EXPORTING
                  VBELN          = VBELN
             EXCEPTIONS
                  FOREIGN_LOCK   = 1
                  SYSTEM_FAILURE = 2.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE E042(V1) WITH vbeln RAISING ERROR_IN_COPY.
        ENDCASE.
    Regds,

  • ABAP Code for summation of key figure

    Hi Guys,
    I am new to ABAP and my requirement is as follows-
    I have an infocube containing data like
    Location Item      Amount Month
    India       TV        10        Jan
    India       DVD     10        Jan
    India       XBOX   10       Jan
    US          TV        10       Jan
    US          XBOX   15       Jan
    US          DVD     20        Jan
    UK          XBOX   30       Jan
    UK          TV        20       Jan
    UK          DVD     15       Jan
    India       TV      20         Feb
    US          DVD   20         Feb
    UK          XBOX 10        Feb
    India       TV      20        Mar
    Now by using open hub, I want to extract a file which would display report as -
    Output file
    15-Oct-2010
    Location  Item   Amount
    India        TV     50
    India        DVD   10
    India        XBOX 10
    US           TV      10
    US           DVD   40
    US           XBOX 15
    UK          TV       20
    UK          DVD    15
    UK         XBOX  40
    which means it should sum based on combination of location and item and create one single row.
    I need some ABAP code which could be written in expert routine so as to to calculate single rows of amount for all data packets of infocube.
    Kindly suggest on how to proceed on it.
    Thanks in advance
    Moderator Message: Even if you are new-to-ABAP, it does not imply that you can expect others to do your work. If you are a BI consultant, take the help of an ABAP consultant or self-learn the basic concepts of ABAP. If you are an ABAPer, go back to the training center.
    Edited by: kishan P on Oct 15, 2010 10:34 AM

    Follow this white paper .... called, "How to .... Calculate with Attributes":
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    Brian

  • Need ABAP Code in BI routine

    Hi,
    I want to write a transfer routine, Can any one give me the ABAP Code...
    Here is what I want to do:
    1. Read by document Number at the Header level (identified by item = "#")
    2. Read the Status of the Header
    3. If the Status = deleted
    4. Read all the line items related to the Header
    5. Assign the Status of the line item = Status of the Header
    Thanks
    Edited by: tanu d on Aug 20, 2010 11:32 AM

    Hi,
    See the simple code.
    IF SOURCE_FIELDS-N_WBSEOM = ' '.
          RESULT = 'N'
        ELSE.
          RESULT = SOURCE_FIELDS-N_WBSEOM.
        ENDIF.
    OR
    IF SOURCE_FIELDS-N_WBSEOM IS INITIAL.
          RESULT = 'N'
        ELSE.
          RESULT = SOURCE_FIELDS-N_WBSEOM.
        ENDIF.
    Thanks
    Reddy
    Edited by: Surendra Reddy on Nov 25, 2009 5:38 AM

  • Template and ABAP code

    Hi ppl,
    I am a bit confused.If i have to make some field to only 'display'(so that the user has no choice to edit),how can i do it?
    -Who provides these templates??These templates that we publish are written in ABAP,right?
    -Can we create our own templates and publish??
    **When they say,change the template or change the ABAP code..what does it mean?Because to check the templates we goto SE80 and to change the code/add a field/edit a field--we go to SE11.Please let me know the link between SE11 and SE80 or the difference.
    Many Thanks
    Sam

    Sam,
    Before changing a template please go through following,it may resolve your issue -
    In this BAdI you can change the screen variant that controls the display of the item overviews and search results. As default, the following screen variants are called up:
    · Item data overview in the invoice without purchase order reference: Screen variant BBP_IV_NON_PO
    Method GET_SCREENVARIANT_INV
    · Item data overview in the invoice with purchase order reference: Screen variant BBP_IV
    Method GET_SCREENVARIANT_INV
    · Item data overview in the confirmation: Screen variant BBP_CF
    Method GET_SCREENVARIANT_CONF
    · Item data overview in the confirmation for time recording: Screen variant BBP_CF_TIMEREC
    Method GET_SCREENVARIANT_CONF
    · Item data overview in the purchase order: Screen variant BBP_PO
    Method GET_SCREENVARIANT_PO
    · Item overview for contracts: Screen variant BBP_CTR_ITEMLIST
    Method GET_SCREENVARIANT_CTR
    · Item overview for contract selection: Screen variant BBP_CTR_ITEM_SELLIST
    Method GET_SCREENVARIANT_CTR
    · Search results for creating an invoice and/or confirmation: Screen variant BBP_SEARCH_PO
    Method GET_SCREENVARIANT_SEARCH
    · Search results for creating a purchase order: Screen variant BBP_SEARCH_SC
    Method GET_SCREENVARIANT_SEARCH
    · Search results for displaying/changing an invoice: Screen variant BBP_CHANGE_IV
    Method GET_SCREENVARIANT_SEARCH
    · Search results for displaying/changing a confirmation: Screen variant BBP_CHANGE_CF
    Method GET_SCREENVARIANT_SEARCH
    · Item overview for creating/displaying/processing/status of a shopping cart: Screen variant BBP_SC
    Method GET_SCREENVARIANT_SC
    · Worklist for Sourcing: Screen variant BBP_SOCO_WL
    Method GET_SCREENVARIANT_SOCO
    · Work area in Sourcing: Screen variant BBP_SOCO_GA
    Method GET_SCREENVARIANT_SOCO
    Activities
    If you wish to hide or show fields, proceed as follows: 
    1. Determine the screen variant, for example, BBP_IV, using the list above.
    2. Copy this screen variant, for example, in ZZ_BBP_IV_1, in Transaction SHD0.
    3. Change the new screen variant as required. Note that you can only change the display properties for fields of table controls. You can switch the display on and off (column Invisible in Transaction SHD0). You can recognize the fields of a table control because they have a 1 on the right side of the first column. In addition, the heading for this area contains (Table CTRL.
    4. Implement the appropriate method (see the list above). Fill the export parameter EV_SCVARIANT with the new screen variant.
    You can create multiple screen variants for a screen and then select these in the BAdI depending on the user or on other criteria.
    Thanks and Warm Regards.
    Pras

  • Needs sample ABAP code for field routine

    Dear Expert,
    There is a field "Pay Scale Group" in my DSO which stores the data in the format
    AA1/B1/CCC2/DD2/EEE1, A1/BB2/CC2/DDD3/EE2 etc. These data has to be transferred to
    InfoCube where "pay Scale Group" in the InfoCube will store the data like EEE1,EE2 etc.
    I need to write a field routine on the transformation between DSO and Cube.
    Can any one please help me with the sample ABAP code for this scenario.
    Some more examples for better understanding of the requirement:-
    Data in DSO(Source)            Data in Cube(Target)
    ===================            ===================
    AA1/B1/CCC2/DD2/EEE1            EEE1
    AAA1/BB2/CC1/DDD3/EE2           EE2
    A2/BBB2/CC2/DDD3/EEE5           EEE5
    AA2/BB1/C1/DDD3/EE3             EE3
    A3/B1/CC2/DDD1/EE4              EE4
    Many thanks in advance.
    Regards,
    Prakash
    Please do not dump your code requirements in SDN
    Edited by: Pravender on May 18, 2011 11:37 AM

    Hi,
    You can use the following code :
    Suppose the technical name of the field coming from DSO is ZPAY_SGRP.
    And also for example let me take one record, that is ZPAY_SGRP = AA1/B1/CCC2/DD2/EEE1 .
    My assumption is that there will always be 4 '/'.
    In the field routine write the below code
    data: V1(5) type c,
              V2(5) type c,
             V3(5) type c,
              V4(5) type c,
             V5(5) type c.
    data : VAR1 TYPE /BIC/OIZPAY_SGRP.
    split VAR 1  at '/' into V1 V2 V3 V4 V5.
    result = V5.
    V5 will be having the characters after the last '/' .That is V5 = EEE1.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on May 17, 2011 3:53 PM
    Edited by: Ashutosh Singh on May 17, 2011 4:17 PM

  • How can I connect with SAP NetWeaver 7.01 SR1 SP3 ABAP Developer Edition

    Hello together,
    I downloaded and installed the SAP NetWeaver 7.01 SR1 SP3 ABAP Developer Edition on a virtual client.
    I toke a long period to finish the installation.
    Now some questions to use this system in the right way:
    1.) How can I get a "developer license" which do not expire? Because the link http://www.sap.com/minisap seems to be not ok.
    2.) How can I connect via network with the sap system? the application server is running on a vm client with a static ip i.e. 192.168.1.5. And my laptop gets a ip in the same range. I have installed the gui on my laptop and tried to connect with the system. But it does not work! I used as application server the ip of the virtual machine. I use the gui witch is installed on the same host like the application it works (with localhost as application server adress)
    3.) Where can I download the newest version of the SAP Gui? I do not have a service marktplace account? Is it possible?
    4.) I read in the documentation that it should be possible to reach the sap system also with web dynpro: http://localhost:8000/sap/bc/gui/sap/its/webgui?sap-client=000
    But it does not work. I got an error message: Service cannot be reached
    Note
    The termination occurred in system NSP with error code 403 and for the reason Forbidden.
    The selected virtual host was 0 .
    Regards
    Christian

    I fixed in the meantime the second problem. It was a problem with my local firewall. But the other three points are still open.
    Thank in advance for your help

Maybe you are looking for