The functional location is an organizational unit within logistics that structures the maintenance objects of a company according to functional, process-related or spatial criteria. A functional location represents the place at which a maintenance task is to be performed.
Functional location in PM
A functional location represents system area at which an object can be installed. The objects that can be installed at functional locations are called pieces of equipment in the R/3 System. Functional locations can be structured based on the following criteria:
Example: pumping station, drive unit
Example: polymerization, condensing
Example: hall, location
Technical Aspect (ABAP)
Important Tables from the functional location point of view
IFLOT Functional Location (Table).
IFLOTX Functional location: short texts.
IRLOTX Reference functional location: short texts.
TAPL Allocation of task lists to functional locations.
IFLOS Important Table used in case of alternative labeling.
Bulk creation of functional location
The data relevant to the functional location is majorly stored in the IFLOT table and IFLOTX table contains the text part of it. Therefore, for displaying the functional locations we can fetch the data from IFLOT into an internal table and loop it through. But here we are discussing the creation of functional location. Although the functional location can be created by the transaction IL01.But here we can only create them one by one. But if we have to create n no. of functional location, creating them one by one is very time consuming. So here is the process to create them in one go, be it any no.
Create a new program in SE38.
First of all create an internal table of IFLOT type.
DATA: ITAB TYPE STANDARD TABLE OF IFLOT.
Then we can select all the data from the IFLOT table using * or just a single row based on some criteria. Then download this data from internal table to the Excel using 'GUI_DOWNLOAD' function.
CALL FUNCTION 'GUI_DOWNLOAD'
FILENAME = 'C:\IFLOT'(THE LOCATION WHERE WE WANT TO SAVE THE FILE)
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = '|'
DATA_TAB = ITAB
OTHERS = 1.
Actually we are creating this file so that we get the format where we can just make the entries and the functional location is created. If we download all the data from IFLOT table it will give us a clear picture what all data is already there in the IFLOT table so that we may not enter the data which conflicts with its primary key. It will also help us as we usually copy functional location from already existing locations so we can just copy any row in the file and make changes wherever necessary to create new functional location. After making new entries we should delete old entries which were downloaded from the IFLOT table initially. Please remember to open the file in textpad for the convenience of use.
Now make another program to upload this file to IFLOT table.
Again create an internal table of IFLOT type and we will upload all the data from the file to the internal table using 'GUI_UPLOAD' function.
CALL FUNCTION 'GUI_UPLOAD'
FILENAME = 'C:\IFLOT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '|'
DATA_TAB = ITAB
OTHERS = 1 .
Now update IFLOT table with the internal table.
UPDATE - Will update the table, errors out if the data is not found.
MODIFY - Will update the table, if the data already exists, if NOT inserts new rows.
UPDATE IFLOT FROM TABLE ITAB.
IF SY-SUBRC <> 0.
MODIFY IFLOT FROM TABLE ITAB.
Once we run the program the location will be created and we can see it in the transaction code IL03(display functional location).