<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Function Modules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095698#M102083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT (sy-repid) MESSAGE-ID zmm.


************************************************************************
*                                                                      *
*    Data Declarations                                                 *
*                                                                      *
************************************************************************

DATA: BEGIN OF matnr_tab OCCURS 0,
         matnr TYPE mara-matnr,
      END OF matnr_tab.

DATA: BEGIN OF class_tab OCCURS 0,
         matnr TYPE mara-matnr,
         semicolon(1) TYPE C,
         class TYPE klah-class,
      END OF class_tab.

DATA: class_count TYPE i VALUE 0.

*DATA: matnr_tab TYPE TABLE OF mara-matnr WITH HEADER LINE.
*DATA: class_tab TYPE TABLE OF klah-class WITH HEADER LINE.
*****************************************************************
*     Parameter selection screen
*****************************************************************
PARAMETERS : p_infile LIKE rlgrap-filename OBLIGATORY,

             p_outfil  LIKE rlgrap-filename OBLIGATORY.

* For Input File Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
  PERFORM request_filename USING p_infile.

* For Output File Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_outfil.
  PERFORM request_filename USING p_outfil.


START-OF-SELECTION.
* Read input file
  PERFORM upload_file  USING p_infile.
* Get all associated class 300's for materials
  PERFORM get_classes_for_materials.
* If classes found, write to output file.
  IF class_count &amp;gt; 0.
*   PERFORM download_file USING p_outfil.
    loop at class_tab.
       write: / class_tab-matnr, class_tab-class.
    endloop.
    MESSAGE i000 WITH 'Classes written to output file: '
                 class_count.
  ELSE.
    MESSAGE i000 WITH 'No classes found for materials'.
  ENDIF.


*---------------------------------------------------------------------*
*       FORM get_classes_for_materials                                *
*---------------------------------------------------------------------*
*       Read all class type 300's for materials in list               *
*---------------------------------------------------------------------*
FORM
get_classes_for_materials.
  DATA: object    TYPE TABLE OF api_ob_key WITH HEADER LINE,
        alloc     TYPE TABLE OF api_alloc  WITH HEADER LINE,
        v_matnr   TYPE mara-matnr,
        v_date    TYPE clbasd-val_from.

  CLEAR class_tab.
  WRITE sy-datum TO v_date.

  LOOP AT matnr_tab. " WHERE matnr NE space.
* Validate material
    SELECT SINGLE matnr
      INTO v_matnr
      FROM mara WHERE matnr = matnr_tab-matnr.
*-set source material as object
    IF sy-subrc = 0.
      CLEAR: object.
      REFRESH: object.
      object-field = 'MATNR'.
      object-value = matnr_tab-matnr.
      APPEND object.

      REFRESH alloc.
*-Read class 300 allocation of source material
      CALL FUNCTION 'CACL_OBJECT_READ_ALLOCATIONS'
           EXPORTING
                object_type           = 'MARA'
                class_type            = '300'
                date                  = v_date
           TABLES
                object_identification = object
                allocations           = alloc
           EXCEPTIONS
                error                 = 1
                warning               = 2
                OTHERS                = 3.

**-if source allocation not found then exit
      IF sy-subrc NE 0.
         MOVE matnr_tab-matnr to class_tab-matnr.
         MOVE ';' to class_tab-semicolon.
         MOVE 'NO ALLOC' to class_tab-class.
         APPEND class_tab.
         ADD 1 TO class_count.
      ENDIF.

      LOOP AT alloc.
        MOVE alloc-class TO class_tab-class.
        MOVE ';' to class_tab-semicolon.
        MOVE matnr_tab-matnr TO class_tab-matnr.
        APPEND class_tab.
        ADD 1 TO class_count.
      ENDLOOP.

    ELSE.
      MOVE matnr_tab-matnr to class_tab-matnr.
      MOVE ';' to class_tab-semicolon.
      MOVE 'MATNR NOT FOUND' to class_tab-class.
      APPEND class_tab.
      ADD 1 TO class_count.
    ENDIF.

  ENDLOOP.
ENDFORM.
*---------------------------------------------------------------------*
*       FORM upload_file                                              *
*---------------------------------------------------------------------*
*       Upload input file of materials                                *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_filein                                                      *
*---------------------------------------------------------------------*
FORM upload_file USING v_filein LIKE rlgrap-filename.
*  CALL FUNCTION 'WS_UPLOAD'
*      EXPORTING
**         CODEPAGE                = ' '
*           filename                = v_filein
*           filetype                = 'DAT'
**         HEADLEN                 = ' '
**         LINE_EXIT               = ' '
**         TRUNCLEN                = ' '
**         USER_FORM               = ' '
**         USER_PROG               = ' '
**         DAT_D_FORMAT            = ' '
**    IMPORTING
**         FILELENGTH              =
*       TABLES
*            data_tab                = matnr_tab
*      EXCEPTIONS
*           conversion_error        = 1
*           file_open_error         = 2
*           file_read_error         = 3
*           invalid_type            = 4
*           no_batch                = 5
*           unknown_error           = 6
*           invalid_table_width     = 7
*           gui_refuse_filetransfer = 8
*           customer_error          = 9
*           OTHERS                  = 10
*            .

  data file type string.
  file = v_filein.

  CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
*         CODEPAGE                = ' '
           filename                = file
           has_field_separator           = 'X'
*         HEADLEN                 = ' '
*         LINE_EXIT               = ' '
*         TRUNCLEN                = ' '
*         USER_FORM               = ' '
*         USER_PROG               = ' '
*         DAT_D_FORMAT            = ' '
*    IMPORTING
*         FILELENGTH              =
       TABLES
            data_tab                = matnr_tab
      EXCEPTIONS
            FILE_OPEN_ERROR               = 1
            FILE_READ_ERROR               = 2
            NO_BATCH                      = 3
            GUI_REFUSE_FILETRANSFER       = 4
            INVALID_TYPE                  = 5
            NO_AUTHORITY                  = 6
            UNKNOWN_ERROR                 = 7
            BAD_DATA_FORMAT               = 8
            HEADER_NOT_ALLOWED            = 9
            SEPARATOR_NOT_ALLOWED         = 10
            HEADER_TOO_LONG               = 11
            UNKNOWN_DP_ERROR              = 12
            ACCESS_DENIED                 = 13
            DP_OUT_OF_MEMORY              = 14
            DISK_FULL                     = 15
            DP_TIMEOUT                    = 16
            OTHERS                        = 17
    .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.
*---------------------------------------------------------------------*
*       FORM download_file                                            *
*---------------------------------------------------------------------*
*       Download output file of classes                               *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_fileout                                                     *
*---------------------------------------------------------------------*
FORM download_file USING v_fileout LIKE rlgrap-filename.
*  CALL FUNCTION 'WS_DOWNLOAD'
*      EXPORTING
**         BIN_FILESIZE            = ' '
**         CODEPAGE                = ' '
*           filename                = v_fileout
*           filetype                = 'DAT'
**         MODE                    = ' '
**         WK1_N_FORMAT            = ' '
**         WK1_N_SIZE              = ' '
**         WK1_T_FORMAT            = ' '
**         WK1_T_SIZE              = ' '
**         COL_SELECT              = ' '
**         COL_SELECTMASK          = ' '
**         NO_AUTH_CHECK           = ' '
**    IMPORTING
**         FILELENGTH              =
*       TABLES
*            data_tab                = class_tab
**         FIELDNAMES              =
*      EXCEPTIONS
*           file_open_error         = 1
*           file_write_error        = 2
*           invalid_filesize        = 3
*           invalid_type            = 4
*           no_batch                = 5
*           unknown_error           = 6
*           invalid_table_width     = 7
*           gui_refuse_filetransfer = 8
*           customer_error          = 9
*           OTHERS                  = 10
*            .
  data file type string.
  file = v_fileout.

  CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
*         BIN_FILESIZE            = ' '
*         CODEPAGE                = ' '
           filename                = file
           write_field_separator           = 'X'
*         MODE                    = ' '
*         WK1_N_FORMAT            = ' '
*         WK1_N_SIZE              = ' '
*         WK1_T_FORMAT            = ' '
*         WK1_T_SIZE              = ' '
*         COL_SELECT              = ' '
*         COL_SELECTMASK          = ' '
*         NO_AUTH_CHECK           = ' '
*    IMPORTING
*         FILELENGTH              =
       TABLES
            data_tab                = class_tab
*         FIELDNAMES              =
      EXCEPTIONS
           FILE_WRITE_ERROR        = 1
            NO_BATCH                = 2
            GUI_REFUSE_FILETRANSFER = 3
            INVALID_TYPE            = 4
            NO_AUTHORITY            = 5
            UNKNOWN_ERROR           = 6
            HEADER_NOT_ALLOWED      = 7
            SEPARATOR_NOT_ALLOWED   = 8
            FILESIZE_NOT_ALLOWED    = 9
            HEADER_TOO_LONG         = 10
            DP_ERROR_CREATE         = 11
            DP_ERROR_SEND           = 12
            DP_ERROR_WRITE          = 13
            UNKNOWN_DP_ERROR        = 14
            ACCESS_DENIED           = 15
            DP_OUT_OF_MEMORY        = 16
            DISK_FULL               = 17
            DP_TIMEOUT              = 18
            FILE_NOT_FOUND          = 19
            DATAPROVIDER_EXCEPTION  = 20
            CONTROL_FLUSH_ERROR     = 21
            OTHERS                  = 22
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.
*---------------------------------------------------------------------*
*       FORM REQUEST_FILENAME                                         *
*---------------------------------------------------------------------*
*       Prompt for a file name                                        *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_file                                                        *
*---------------------------------------------------------------------*
FORM request_filename USING v_file
                            LIKE rlgrap-filename.

  DATA : v_repid LIKE sy-repid.
  v_repid = sy-repid.

  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
            program_name  = v_repid
            dynpro_number = syst-dynnr
            static        = ' '
            mask          = ' '
       CHANGING
            file_name     = v_file
       EXCEPTIONS
            mask_too_long = 1
            OTHERS        = 2.
ENDFORM.                    " REQUEST_FILENAME&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this code is what you needed.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Title           : Extract class type 300's for input materials 
*   Brief Purpose   :                                                  *
*   Read an input file of materials and produce an output file of      *
*   class type 300's.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Dec 2005 12:06:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-27T12:06:33Z</dc:date>
    <item>
      <title>Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095695#M102080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advanced Thanks to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Get the 300 class of the configurable entered using the function module CACL_OBJECT_READ_ALLOCATIONS.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are Input Parameters used in this FM&lt;/P&gt;&lt;P&gt;Send me the sample code for this FM CACL_OBJECT_READ_ALLOCATIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Function module CARD_CLASS_READ_CHARACTS is use to retrieve all the characteristics of the 300 class retrieved for the configurable material entered.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are Input Parameters used in this FM&lt;/P&gt;&lt;P&gt;Send me the sample code for this FM CARD_CLASS_READ_CHARACTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i look forward to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;RSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095695#M102080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095696#M102081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for first one check out  RCDDSSEL prog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second one check out  SEWGRF01 prog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:04:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095696#M102081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095697#M102082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'CACL_OBJECT_READ_ALLOCATIONS'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            object_type           = l_objtype&lt;/P&gt;&lt;P&gt;            class_type            = l_classtype&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            object_identification = lt_object_ident&lt;/P&gt;&lt;P&gt;            allocations           = lt_allocations&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            error                 = 1&lt;/P&gt;&lt;P&gt;            warning               = 2&lt;/P&gt;&lt;P&gt;            others                = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;GSR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095697#M102082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095698#M102083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT (sy-repid) MESSAGE-ID zmm.


************************************************************************
*                                                                      *
*    Data Declarations                                                 *
*                                                                      *
************************************************************************

DATA: BEGIN OF matnr_tab OCCURS 0,
         matnr TYPE mara-matnr,
      END OF matnr_tab.

DATA: BEGIN OF class_tab OCCURS 0,
         matnr TYPE mara-matnr,
         semicolon(1) TYPE C,
         class TYPE klah-class,
      END OF class_tab.

DATA: class_count TYPE i VALUE 0.

*DATA: matnr_tab TYPE TABLE OF mara-matnr WITH HEADER LINE.
*DATA: class_tab TYPE TABLE OF klah-class WITH HEADER LINE.
*****************************************************************
*     Parameter selection screen
*****************************************************************
PARAMETERS : p_infile LIKE rlgrap-filename OBLIGATORY,

             p_outfil  LIKE rlgrap-filename OBLIGATORY.

* For Input File Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
  PERFORM request_filename USING p_infile.

* For Output File Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_outfil.
  PERFORM request_filename USING p_outfil.


START-OF-SELECTION.
* Read input file
  PERFORM upload_file  USING p_infile.
* Get all associated class 300's for materials
  PERFORM get_classes_for_materials.
* If classes found, write to output file.
  IF class_count &amp;gt; 0.
*   PERFORM download_file USING p_outfil.
    loop at class_tab.
       write: / class_tab-matnr, class_tab-class.
    endloop.
    MESSAGE i000 WITH 'Classes written to output file: '
                 class_count.
  ELSE.
    MESSAGE i000 WITH 'No classes found for materials'.
  ENDIF.


*---------------------------------------------------------------------*
*       FORM get_classes_for_materials                                *
*---------------------------------------------------------------------*
*       Read all class type 300's for materials in list               *
*---------------------------------------------------------------------*
FORM
get_classes_for_materials.
  DATA: object    TYPE TABLE OF api_ob_key WITH HEADER LINE,
        alloc     TYPE TABLE OF api_alloc  WITH HEADER LINE,
        v_matnr   TYPE mara-matnr,
        v_date    TYPE clbasd-val_from.

  CLEAR class_tab.
  WRITE sy-datum TO v_date.

  LOOP AT matnr_tab. " WHERE matnr NE space.
* Validate material
    SELECT SINGLE matnr
      INTO v_matnr
      FROM mara WHERE matnr = matnr_tab-matnr.
*-set source material as object
    IF sy-subrc = 0.
      CLEAR: object.
      REFRESH: object.
      object-field = 'MATNR'.
      object-value = matnr_tab-matnr.
      APPEND object.

      REFRESH alloc.
*-Read class 300 allocation of source material
      CALL FUNCTION 'CACL_OBJECT_READ_ALLOCATIONS'
           EXPORTING
                object_type           = 'MARA'
                class_type            = '300'
                date                  = v_date
           TABLES
                object_identification = object
                allocations           = alloc
           EXCEPTIONS
                error                 = 1
                warning               = 2
                OTHERS                = 3.

**-if source allocation not found then exit
      IF sy-subrc NE 0.
         MOVE matnr_tab-matnr to class_tab-matnr.
         MOVE ';' to class_tab-semicolon.
         MOVE 'NO ALLOC' to class_tab-class.
         APPEND class_tab.
         ADD 1 TO class_count.
      ENDIF.

      LOOP AT alloc.
        MOVE alloc-class TO class_tab-class.
        MOVE ';' to class_tab-semicolon.
        MOVE matnr_tab-matnr TO class_tab-matnr.
        APPEND class_tab.
        ADD 1 TO class_count.
      ENDLOOP.

    ELSE.
      MOVE matnr_tab-matnr to class_tab-matnr.
      MOVE ';' to class_tab-semicolon.
      MOVE 'MATNR NOT FOUND' to class_tab-class.
      APPEND class_tab.
      ADD 1 TO class_count.
    ENDIF.

  ENDLOOP.
ENDFORM.
*---------------------------------------------------------------------*
*       FORM upload_file                                              *
*---------------------------------------------------------------------*
*       Upload input file of materials                                *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_filein                                                      *
*---------------------------------------------------------------------*
FORM upload_file USING v_filein LIKE rlgrap-filename.
*  CALL FUNCTION 'WS_UPLOAD'
*      EXPORTING
**         CODEPAGE                = ' '
*           filename                = v_filein
*           filetype                = 'DAT'
**         HEADLEN                 = ' '
**         LINE_EXIT               = ' '
**         TRUNCLEN                = ' '
**         USER_FORM               = ' '
**         USER_PROG               = ' '
**         DAT_D_FORMAT            = ' '
**    IMPORTING
**         FILELENGTH              =
*       TABLES
*            data_tab                = matnr_tab
*      EXCEPTIONS
*           conversion_error        = 1
*           file_open_error         = 2
*           file_read_error         = 3
*           invalid_type            = 4
*           no_batch                = 5
*           unknown_error           = 6
*           invalid_table_width     = 7
*           gui_refuse_filetransfer = 8
*           customer_error          = 9
*           OTHERS                  = 10
*            .

  data file type string.
  file = v_filein.

  CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
*         CODEPAGE                = ' '
           filename                = file
           has_field_separator           = 'X'
*         HEADLEN                 = ' '
*         LINE_EXIT               = ' '
*         TRUNCLEN                = ' '
*         USER_FORM               = ' '
*         USER_PROG               = ' '
*         DAT_D_FORMAT            = ' '
*    IMPORTING
*         FILELENGTH              =
       TABLES
            data_tab                = matnr_tab
      EXCEPTIONS
            FILE_OPEN_ERROR               = 1
            FILE_READ_ERROR               = 2
            NO_BATCH                      = 3
            GUI_REFUSE_FILETRANSFER       = 4
            INVALID_TYPE                  = 5
            NO_AUTHORITY                  = 6
            UNKNOWN_ERROR                 = 7
            BAD_DATA_FORMAT               = 8
            HEADER_NOT_ALLOWED            = 9
            SEPARATOR_NOT_ALLOWED         = 10
            HEADER_TOO_LONG               = 11
            UNKNOWN_DP_ERROR              = 12
            ACCESS_DENIED                 = 13
            DP_OUT_OF_MEMORY              = 14
            DISK_FULL                     = 15
            DP_TIMEOUT                    = 16
            OTHERS                        = 17
    .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.
*---------------------------------------------------------------------*
*       FORM download_file                                            *
*---------------------------------------------------------------------*
*       Download output file of classes                               *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_fileout                                                     *
*---------------------------------------------------------------------*
FORM download_file USING v_fileout LIKE rlgrap-filename.
*  CALL FUNCTION 'WS_DOWNLOAD'
*      EXPORTING
**         BIN_FILESIZE            = ' '
**         CODEPAGE                = ' '
*           filename                = v_fileout
*           filetype                = 'DAT'
**         MODE                    = ' '
**         WK1_N_FORMAT            = ' '
**         WK1_N_SIZE              = ' '
**         WK1_T_FORMAT            = ' '
**         WK1_T_SIZE              = ' '
**         COL_SELECT              = ' '
**         COL_SELECTMASK          = ' '
**         NO_AUTH_CHECK           = ' '
**    IMPORTING
**         FILELENGTH              =
*       TABLES
*            data_tab                = class_tab
**         FIELDNAMES              =
*      EXCEPTIONS
*           file_open_error         = 1
*           file_write_error        = 2
*           invalid_filesize        = 3
*           invalid_type            = 4
*           no_batch                = 5
*           unknown_error           = 6
*           invalid_table_width     = 7
*           gui_refuse_filetransfer = 8
*           customer_error          = 9
*           OTHERS                  = 10
*            .
  data file type string.
  file = v_fileout.

  CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
*         BIN_FILESIZE            = ' '
*         CODEPAGE                = ' '
           filename                = file
           write_field_separator           = 'X'
*         MODE                    = ' '
*         WK1_N_FORMAT            = ' '
*         WK1_N_SIZE              = ' '
*         WK1_T_FORMAT            = ' '
*         WK1_T_SIZE              = ' '
*         COL_SELECT              = ' '
*         COL_SELECTMASK          = ' '
*         NO_AUTH_CHECK           = ' '
*    IMPORTING
*         FILELENGTH              =
       TABLES
            data_tab                = class_tab
*         FIELDNAMES              =
      EXCEPTIONS
           FILE_WRITE_ERROR        = 1
            NO_BATCH                = 2
            GUI_REFUSE_FILETRANSFER = 3
            INVALID_TYPE            = 4
            NO_AUTHORITY            = 5
            UNKNOWN_ERROR           = 6
            HEADER_NOT_ALLOWED      = 7
            SEPARATOR_NOT_ALLOWED   = 8
            FILESIZE_NOT_ALLOWED    = 9
            HEADER_TOO_LONG         = 10
            DP_ERROR_CREATE         = 11
            DP_ERROR_SEND           = 12
            DP_ERROR_WRITE          = 13
            UNKNOWN_DP_ERROR        = 14
            ACCESS_DENIED           = 15
            DP_OUT_OF_MEMORY        = 16
            DISK_FULL               = 17
            DP_TIMEOUT              = 18
            FILE_NOT_FOUND          = 19
            DATAPROVIDER_EXCEPTION  = 20
            CONTROL_FLUSH_ERROR     = 21
            OTHERS                  = 22
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.
*---------------------------------------------------------------------*
*       FORM REQUEST_FILENAME                                         *
*---------------------------------------------------------------------*
*       Prompt for a file name                                        *
*---------------------------------------------------------------------*
*  --&amp;gt;  v_file                                                        *
*---------------------------------------------------------------------*
FORM request_filename USING v_file
                            LIKE rlgrap-filename.

  DATA : v_repid LIKE sy-repid.
  v_repid = sy-repid.

  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
            program_name  = v_repid
            dynpro_number = syst-dynnr
            static        = ' '
            mask          = ' '
       CHANGING
            file_name     = v_file
       EXCEPTIONS
            mask_too_long = 1
            OTHERS        = 2.
ENDFORM.                    " REQUEST_FILENAME&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this code is what you needed.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Title           : Extract class type 300's for input materials 
*   Brief Purpose   :                                                  *
*   Read an input file of materials and produce an output file of      *
*   class type 300's.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:06:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095698#M102083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095699#M102084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u very much to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz Clarify the following Assumptiones&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finding type 300 class AUSP-KLART characteristics associated with the configurable material MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From INOB (Link between Internal Number and Object ) table INOB- CUOBJ is retrieved.&lt;/P&gt;&lt;P&gt;Select CUOBJ from INOB where OBJEK = &amp;lt; configurable material&amp;gt; and KLART = 300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using INOB- CUOBJ the CLINT is retrieved from KSSK (Allocation Table: Object to Class ) table. Here we can get more than one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting common class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select OBJEK from KSSK where OBJEK in &amp;lt;OBJEK&amp;gt; and MAFID = &amp;#145;K&amp;#146;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Getting CLINT value for all OBJEK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select CLINT from KSSK where OBJEK = &amp;lt; OBJEK &amp;gt; and MAFID = &amp;#145;O&amp;#146;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to develop the query for the above assumptiones&lt;/P&gt;&lt;P&gt;is there is any FM for above Requirement&lt;/P&gt;&lt;P&gt;Plz Guide me with code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i look forward to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award Points &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tahnks &amp;amp;  Regards&lt;/P&gt;&lt;P&gt;RSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095699#M102084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095700#M102085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Using FM CARD_CLASS_READ_CHARACTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KLAH-KLART Class Type&lt;/P&gt;&lt;P&gt;KLAH-CLASS Class number&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Just pass class and class type.

CALL FUNCTION 'CARD_CLASS_READ_CHARACTS'
   EXPORTING
        CLASS                  = KLAH-CLASS 
        CLASS_TYPE             = KLAH-KLART 
        DATE                   = sy-DATum
*        LANGUAGE               = LANGUINT
*        FL_WITH_CHAR_VALUES    = 'X'
   IMPORTING 
        BASIC_DATA             = wa_BASIC
        CLASS_NOT_VALID        = wa_INVALID
        DOCUMENT_IDENT         = wa_K_DOCUMENT
   TABLES
        CHARACTERISTICS        = C_CHAR
        CHARACTERISTICS_VALUES = C_VALUES
   EXCEPTIONS OTHERS           = 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using FM CACL_OBJECT_READ_ALLOCATIONS&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'CACL_OBJECT_READ_ALLOCATIONS'
   EXPORTING
     object_type                 = u_object_type
     class_type                  = u_class_type
     date                        = l_date
     LANGUAGE                    = SYST-LANGU
     i_obj_not_chk               = ppet_true
    i_aennr                      = space
   TABLES
     object_identification       = ut_object_ident
     allocations                 = lt_allocations
   EXCEPTIONS
     error                       = 1
     warning                     = 2
     OTHERS                      = 3 .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lokesh&lt;/P&gt;&lt;P&gt;Pls. reward appropriate points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:46:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095700#M102085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095701#M102086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above program will do exactly what ever you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will list all the materials with 300 class type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Dec 2005 12:50:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095701#M102086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-27T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095702#M102087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lokesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz send the sample code using 2 function modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FM:CARD_CLASS_READ_CHARACTS&lt;/P&gt;&lt;P&gt;FM:CACL_OBJECT_READ_ALLOCATIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this function modules variable declaration part&lt;/P&gt;&lt;P&gt;plz send the code sample using 2 FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I look forward to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &amp;amp; Thanks&lt;/P&gt;&lt;P&gt;Raja Sekhar.T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 05:29:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095702#M102087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T05:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095703#M102088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi my code will tell you how to use the below FM.&lt;/P&gt;&lt;P&gt;CACL_OBJECT_READ_ALLOCATIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and please see the above mentioned code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you never closed a single thread, please close your threads and reward for helpful answers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 05:40:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095703#M102088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T05:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095704#M102089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want code sample for FM 'CARD_CLASS_READ_CHARACTS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i look forward to your reply&lt;/P&gt;&lt;P&gt;reward points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;SEK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 07:03:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095704#M102089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T07:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095705#M102090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this FM Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CARD_CLASS_READ_CHARACTS'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;        CLASS                  = KLAH-CLASS &lt;/P&gt;&lt;P&gt;        CLASS_TYPE       = KLAH-KLART &lt;/P&gt;&lt;P&gt;        DATE                     = SY-DATUM&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       LANGUAGE        = LANGUINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       FL_WITH_CHAR_VALUES    = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING &lt;/P&gt;&lt;P&gt;        BASIC_DATA                    = WA_BASIC&lt;/P&gt;&lt;P&gt;        CLASS_NOT_VALID        = WA_INVALID&lt;/P&gt;&lt;P&gt;        DOCUMENT_IDENT         = WA_K_DOCUMENT&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;        CHARACTERISTICS                  = C_CHAR&lt;/P&gt;&lt;P&gt;        CHARACTERISTICS_VALUES = C_VALUES&lt;/P&gt;&lt;P&gt;   EXCEPTIONS OTHERS                    = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want help on below mention Paramenters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   IMPORTING &lt;/P&gt;&lt;P&gt;        BASIC_DATA                    = WA_BASIC&lt;/P&gt;&lt;P&gt;        CLASS_NOT_VALID        = WA_INVALID&lt;/P&gt;&lt;P&gt;        DOCUMENT_IDENT         = WA_K_DOCUMENT&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;        CHARACTERISTICS                  = C_CHAR&lt;/P&gt;&lt;P&gt;        CHARACTERISTICS_VALUES = C_VALUES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to define in declaration section for &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORT and TABLES parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz guide me with sample code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i look forward to your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;SEK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 07:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095705#M102090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T07:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095706#M102091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi just see this FM &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BAPI_CLASS_GETDETAIL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how they have declared...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 07:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095706#M102091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T07:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095707#M102092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BASIC_DATA LIKE  CLBASD STRUCTURE  CLBASD&lt;/P&gt;&lt;P&gt;CLASS_NOT_VALID LIKE  RMCLM-BASISD&lt;/P&gt;&lt;P&gt;DOCUMENT_IDENT LIKE  DOC_IDENT STRUCTURE  DOC_IDENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHARACTERISTICS STRUCTURE  CLA_CH_AT&lt;/P&gt;&lt;P&gt;CHARACTERISTICS_VALUES STRUCTURE  CHA_VALDSC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2005 08:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095707#M102092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-28T08:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095708#M102093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Raja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a sample code for how to use function&amp;nbsp;&amp;nbsp; CACL_OBJECT_READ_ALLOCATIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DATA: IT_OBJKEY &lt;SPAN class="L0S52"&gt;TYPE &lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;API_OB_KEY, "this is an input table &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WA_OBJKEY &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;IT_OBJKEY,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IT_ALLOC &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;API_ALLOC, "this is an output table&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WA_ALLOC &lt;SPAN class="L0S52"&gt;LIKE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;IT_ALLOC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;WA_OBJKEY-FIELD = &lt;SPAN class="L0S33"&gt;'MATNR'&lt;/SPAN&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "filling sample data for table object_identification&lt;BR /&gt;WA_OBJKEY-VALUE = &lt;SPAN class="L0S33"&gt;'33-253754-04'&lt;/SPAN&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "please check if these data exist in your&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;APPEND &lt;/SPAN&gt;WA_OBJKEY &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;IT_OBJKEY.&amp;nbsp;&amp;nbsp;&amp;nbsp; "server&amp;nbsp; if&amp;nbsp;&amp;nbsp; not change them.&lt;BR /&gt;WA_OBJKEY-FIELD = &lt;SPAN class="L0S33"&gt;'CHARG'&lt;/SPAN&gt;.&lt;BR /&gt;WA_OBJKEY-VALUE = &lt;SPAN class="L0S33"&gt;'0000000526'&lt;/SPAN&gt;.&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;APPEND &lt;/SPAN&gt;WA_OBJKEY &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;IT_OBJKEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FUNCTION &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'CACL_OBJECT_READ_ALLOCATIONS'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXPORTING&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; OBJECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; object_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;SPAN class="L0S33"&gt;'MCHA'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;SPAN class="L0S33"&gt;'023'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; LANGUAGE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = SYST-LANGU&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; I_OBJ_NOT_CHK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ' '&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; I_AENNR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;*&amp;nbsp;&amp;nbsp; I_SORT_POSNR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ' '&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TABLES&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; object_identification&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = IT_OBJKEY "if u do not give in data in this table program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allocations&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = IT_ALLOC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " might go for dump&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;EXCEPTIONS&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ERROR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; WARNING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;= &lt;SPAN class="L0S32"&gt;3&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;sy-subrc &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S31"&gt;"suitable logic&lt;/SPAN&gt;&lt;BR /&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;sry for any &lt;/SPAN&gt;&lt;/SPAN&gt;inconvienence this is my first reply on scn hopefully it will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 09:11:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095708#M102093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-12-11T09:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Function Modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095709#M102094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand this is your first reply on scn, welcome on the forum as an active member, but replying to a discussion from 2005 is not that much helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This thread should have been closed long time ago.&amp;nbsp; &lt;SPAN __jive_emoticon_name="mischief" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1103/images/emoticons/mischief.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be aware that some of the threads are open for years because the poster didn't bother to close thread after the solution was provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and I wish you many fruitfull coöperations on this forum&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 10:24:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-modules/m-p/1095709#M102094</guid>
      <dc:creator>PeterJonker</dc:creator>
      <dc:date>2014-12-11T10:24:34Z</dc:date>
    </item>
  </channel>
</rss>

