Skip to Content
avatar image
Former Member

Regarding functional location hierarchy (IL03)

I have a specific requirement to explore a root functional location up to N level of all the branches of child functional locations. Need to have the complete hierarchy of any particular functional location. (The same way SAP displays the tree structures through the Tcode IL03)

Did not find any standard function module which will return back the complete hierarchy up to end level. Tried to debug the program of the Tcode IL03, but did not find anything fruitful. Is there any standard functional module which can serve my purpose or did anybody try to use that standard program behind the Tcode IL03 through submit option ?

Can you please help ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 14, 2016 at 09:14 AM

    Hi Ayan,

    You can try function module PM_HIERARCHY_CALL with the following main criterias:

    SELMOD = D
    TPLNR = <your functional location root>
    WITH_IFLO_HIER = X
    LEVDO = 99

    Kind regards,
    Garcia

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 14, 2016 at 12:02 PM

    You could try some

    DATA: " from include LIHIETOP
      BEGIN OF hier OCCURS 500,            "Hierarchietabelle
        object(31)         TYPE c,         "Objektkey
        predecessor(31)    TYPE c,         "Objektkey Vorgänger
        data(2000)         TYPE c,         "Datenteil
        level              TYPE i,         "Ebene des Objekts
        successors         TYPE c,         "Objekt hat Nachfolger: YES/NO/U
        display            TYPE c,         "Objekt wird angezeigt: YES/NO
        selected           TYPE c,         "Objekt wurde selektiert YES/NO
        index_predec       LIKE sy-tabix,  "Index Vorgänger
        strno              TYPE ilom_strno,"Kennz.Techn.Platz
      END OF hier.
    PARAMETERS: p_tplnr TYPE iflo-tplnr.
    
    START-OF-SELECTION.
      CALL FUNCTION 'PM_HIERARCHY_CALL'
        EXPORTING
          levdo                = '01'
          levup                = '99'
          select_iflo          = 'X'
          selmod               = 'D' " dunkel (dark)
          tplnr                = p_tplnr
          with_iflo_hier       = 'X'
        EXCEPTIONS
          OTHERS               = 1.
      IMPORT hier FROM MEMORY ID 'RIIFLO10'.

    Regards,

    Raymond


    Add comment
    10|10000 characters needed characters exceeded