SAP CLFC_OBJECTS_FROM_CLASS Function Module for Object to Class Caution: If tcla-multobj = X Only MARA is Returned









CLFC_OBJECTS_FROM_CLASS is a standard clfc objects from class SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Object to Class Caution: If tcla-multobj = X Only MARA is Returned processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for clfc objects from class FM, simply by entering the name CLFC_OBJECTS_FROM_CLASS into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLFC1
Program Name: SAPLCLFC1
Main Program: SAPLCLFC1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CLFC_OBJECTS_FROM_CLASS pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CLFC_OBJECTS_FROM_CLASS'"Object to Class Caution: If tcla-multobj = X Only MARA is Returned
EXPORTING
* DATE = SY-DATUM "
CLASS = "
* INCLUDING_CLASSES = 'X' "
* INCLUDING_OBJECTS = 'X' "
* TOP_DOWN = ' ' "
CLASSTYPE = "
* MARC_MARA_TRANSLATE = ' ' "

TABLES
OBJECTS = "

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for CLFC_OBJECTS_FROM_CLASS

DATE -

Data type: SY-DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLASS -

Data type: KLAH-CLASS
Optional: No
Call by Reference: No ( called with pass by value option)

INCLUDING_CLASSES -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

INCLUDING_OBJECTS -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TOP_DOWN -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLASSTYPE -

Data type: KLAH-KLART
Optional: No
Call by Reference: No ( called with pass by value option)

MARC_MARA_TRANSLATE -

Data type: CSDATA-XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CLFC_OBJECTS_FROM_CLASS

OBJECTS -

Data type: CKSSK
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CLFC_OBJECTS_FROM_CLASS Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_date  TYPE SY-DATUM, "   SY-DATUM
lt_objects  TYPE STANDARD TABLE OF CKSSK, "   
lv_not_found  TYPE CKSSK, "   
lv_class  TYPE KLAH-CLASS, "   
lv_including_classes  TYPE KLAH, "   'X'
lv_including_objects  TYPE KLAH, "   'X'
lv_top_down  TYPE KLAH, "   SPACE
lv_classtype  TYPE KLAH-KLART, "   
lv_marc_mara_translate  TYPE CSDATA-XFELD. "   SPACE

  CALL FUNCTION 'CLFC_OBJECTS_FROM_CLASS'  "Object to Class Caution: If tcla-multobj = X Only MARA is Returned
    EXPORTING
         DATE = lv_date
         CLASS = lv_class
         INCLUDING_CLASSES = lv_including_classes
         INCLUDING_OBJECTS = lv_including_objects
         TOP_DOWN = lv_top_down
         CLASSTYPE = lv_classtype
         MARC_MARA_TRANSLATE = lv_marc_mara_translate
    TABLES
         OBJECTS = lt_objects
    EXCEPTIONS
        NOT_FOUND = 1
. " CLFC_OBJECTS_FROM_CLASS




ABAP code using 7.40 inline data declarations to call FM CLFC_OBJECTS_FROM_CLASS

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single DATUM FROM SY INTO @DATA(ld_date).
DATA(ld_date) = SY-DATUM.
 
 
 
"SELECT single CLASS FROM KLAH INTO @DATA(ld_class).
 
DATA(ld_including_classes) = 'X'.
 
DATA(ld_including_objects) = 'X'.
 
DATA(ld_top_down) = ' '.
 
"SELECT single KLART FROM KLAH INTO @DATA(ld_classtype).
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_marc_mara_translate).
DATA(ld_marc_mara_translate) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!