SAP Function Modules

ISHCM_GET_LAB_DATA_STRUCT SAP Function module







ISHCM_GET_LAB_DATA_STRUCT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ISHCM_GET_LAB_DATA_STRUCT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: N206
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ISHCM_GET_LAB_DATA_STRUCT - ISHCM GET LAB DATA STRUCT





CALL FUNCTION 'ISHCM_GET_LAB_DATA_STRUCT' "
  EXPORTING
*   book_immediatly = '0'       " rncom-flag
*   data_direct_given = '0'     " rncom-flag
*   mapname = 'ISHN2LAB'        " apqi-groupid
    system =                    " tn02s-system
  IMPORTING
    qnterrormails =             " ncst-enerrqnt
    qntmails =                  " ncst-enqnt
  TABLES
    itran =                     " rnrtran
  EXCEPTIONS
    BAD_ENVIRONMENT = 1         "
    BAD_SYSTEM_PARAMS = 2       "
    CONNECTION_FAILED = 3       "
    FILECHANGE_FAILED = 4       "
    FILECREATE_FAILED = 5       "
    FILELOCK_FAILED = 6         "
    FILERENAME_FAILED = 7       "
    GATEWAY_ERROR = 8           "
    MAPCREATE_FAILED = 9        "
    NO_CLIENTDATA_THERE = 10    "
    NO_CORRECT_FORMAT = 11      "
    NO_DATA_THERE = 12          "
    NO_SEGMENTS = 13            "
    NO_TN02S_ENTRY = 14         "
    NO_TNCI1_ENTRY = 15         "
    NO_TXCOM_ENTRY = 16         "
    OPEN_DATFILE_FAILED = 17    "
    OPEN_SSTAT_FAILED = 18      "
    QUANTITY_ERROR = 19         "
    TMPFILES_EXISTS = 20        "
    UNKNOWN_ERROR = 21          "               Unknown error
    .  "  ISHCM_GET_LAB_DATA_STRUCT

ABAP code example for Function Module ISHCM_GET_LAB_DATA_STRUCT





The ABAP code below is a full code listing to execute function module ISHCM_GET_LAB_DATA_STRUCT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_qnterrormails  TYPE NCST-ENERRQNT ,
ld_qntmails  TYPE NCST-ENQNT ,
it_itran  TYPE STANDARD TABLE OF RNRTRAN,"TABLES PARAM
wa_itran  LIKE LINE OF it_itran .


DATA(ld_book_immediatly) = some text here

DATA(ld_data_direct_given) = some text here

SELECT single GROUPID
FROM APQI
INTO @DATA(ld_mapname).


SELECT single SYSTEM
FROM TN02S
INTO @DATA(ld_system).


"populate fields of struture and append to itab
append wa_itran to it_itran. . CALL FUNCTION 'ISHCM_GET_LAB_DATA_STRUCT' EXPORTING * book_immediatly = ld_book_immediatly * data_direct_given = ld_data_direct_given * mapname = ld_mapname system = ld_system IMPORTING qnterrormails = ld_qnterrormails qntmails = ld_qntmails TABLES itran = it_itran EXCEPTIONS BAD_ENVIRONMENT = 1 BAD_SYSTEM_PARAMS = 2 CONNECTION_FAILED = 3 FILECHANGE_FAILED = 4 FILECREATE_FAILED = 5 FILELOCK_FAILED = 6 FILERENAME_FAILED = 7 GATEWAY_ERROR = 8 MAPCREATE_FAILED = 9 NO_CLIENTDATA_THERE = 10 NO_CORRECT_FORMAT = 11 NO_DATA_THERE = 12 NO_SEGMENTS = 13 NO_TN02S_ENTRY = 14 NO_TNCI1_ENTRY = 15 NO_TXCOM_ENTRY = 16 OPEN_DATFILE_FAILED = 17 OPEN_SSTAT_FAILED = 18 QUANTITY_ERROR = 19 TMPFILES_EXISTS = 20 UNKNOWN_ERROR = 21 . " ISHCM_GET_LAB_DATA_STRUCT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 15. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 16. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 17. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 18. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 19. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 20. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 21. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_qnterrormails  TYPE NCST-ENERRQNT ,
ld_book_immediatly  TYPE RNCOM-FLAG ,
it_itran  TYPE STANDARD TABLE OF RNRTRAN ,
wa_itran  LIKE LINE OF it_itran,
ld_qntmails  TYPE NCST-ENQNT ,
ld_data_direct_given  TYPE RNCOM-FLAG ,
ld_mapname  TYPE APQI-GROUPID ,
ld_system  TYPE TN02S-SYSTEM .


ld_book_immediatly = some text here

"populate fields of struture and append to itab
append wa_itran to it_itran.

ld_data_direct_given = some text here

SELECT single GROUPID
FROM APQI
INTO ld_mapname.


SELECT single SYSTEM
FROM TN02S
INTO ld_system.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ISHCM_GET_LAB_DATA_STRUCT or its description.