Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding function module

Former Member
0 Likes
335

Hi,

pls help me,

When i execute the transaction 'IL03' - display functional location,

if i pass a values for function location 'EA0004.000----' like that,

In that menu,

STRUCTURE

STRUCTURE LIST

I can find the subnodes for this

NOW , i want to find the function module which will return this sub node values when we pass the function location value.

pls help me,

thanks & regards,

vsnl.

1 REPLY 1
Read only

Former Member
0 Likes
276

Here is the code for displaying hierarchy of Functional locations -

* Get the List of Func Locs.
  SELECT TPLNR
  FROM   IFLOT
  INTO   TABLE T_FLOC
  WHERE  TPLNR IN S_TPLNR.

  IF SY-SUBRC NE 0.
    MESSAGE S515(IL).
    LEAVE LIST-PROCESSING.
  ENDIF.

*   Get the Functional Location Hierarchy List.
  CALL FUNCTION 'FUNC_LOCATION_HIERARCHY'
       EXPORTING
            INCLUDING_ROOT         = TRUE
       TABLES
            ROOT_TAB               = T_FLOC    "Starting Point 
            IFLO_TAB               = T_IFLOT      " returned Hierarchy tab.
       EXCEPTIONS
            ROOT_NOT_FOUND         = 1
            READ_ERROR             = 2
            STRUCTURE_NOT_POSSIBLE = 3
            OTHERS                 = 4.

  IF SY-SUBRC EQ 0.
    SORT T_IFLOT BY TPLNR.
  ENDIF.

Hope it helps.

Cheers

SKC.