SAP ISHCM_GET_LAB_DATA Function Module for









ISHCM_GET_LAB_DATA is a standard ishcm get lab data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 ishcm get lab data FM, simply by entering the name ISHCM_GET_LAB_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function ISHCM_GET_LAB_DATA 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 'ISHCM_GET_LAB_DATA'"
EXPORTING
* BOOK_IMMEDIATLY = '0' "Flag whether data should be updated directly
* DATA_DIRECT_GIVEN = '0' "Flag whether data was transferred directly
* MAPNAME = 'ISH_N2LAB' "Name of the batch input session to be created
SYSTEM = "Name of system from which data originates
* GET_DATA_LOCAL = '0' "

IMPORTING
QNTERRORMAILS = "No. of incorrect messges in total number
QNTMAILS = "Total number of message records transferred

TABLES
ITRAN = "Table containing data, if DATA_DIRECT_GIVEN

EXCEPTIONS
BAD_ENVIRONMENT = 1 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 BAD_SYSTEM_PARAMS = 2 TMPFILES_EXISTS = 20 UNKNOWN_ERROR = 21 CONNECTION_FAILED = 3 FILECHANGE_FAILED = 4 FILECREATE_FAILED = 5 FILELOCK_FAILED = 6 FILERENAME_FAILED = 7 GATEWAY_ERROR = 8 MAPCREATE_FAILED = 9
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLN206_001 IS-H*MED: User Exit for Initial Screen of the Cumulative Findings
EXIT_SAPLN206_002 IS-H*MED: User Exit for Lab Data Transfer in the HL7-Format

IMPORTING Parameters details for ISHCM_GET_LAB_DATA

BOOK_IMMEDIATLY - Flag whether data should be updated directly

Data type: RNCOM-FLAG
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATA_DIRECT_GIVEN - Flag whether data was transferred directly

Data type: RNCOM-FLAG
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAPNAME - Name of the batch input session to be created

Data type: APQI-GROUPID
Default: 'ISH_N2LAB'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SYSTEM - Name of system from which data originates

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

GET_DATA_LOCAL -

Data type: RNCOM-FLAG
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ISHCM_GET_LAB_DATA

QNTERRORMAILS - No. of incorrect messges in total number

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

QNTMAILS - Total number of message records transferred

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

TABLES Parameters details for ISHCM_GET_LAB_DATA

ITRAN - Table containing data, if DATA_DIRECT_GIVEN

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

EXCEPTIONS details

BAD_ENVIRONMENT - Partner environment incorrect

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

NO_CLIENTDATA_THERE - No data was defined for this client

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

NO_CORRECT_FORMAT - Data structures not correct (format error)

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

NO_DATA_THERE - No data was defined

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

NO_SEGMENTS - No segments defined for the message type

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

NO_TN02S_ENTRY - No TN02S entry for partner system

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

NO_TNCI1_ENTRY - No TNCI1 entry for partner system

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

NO_TXCOM_ENTRY - No TXCOM entry for partner system

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

OPEN_DATFILE_FAILED - Open data file in partner system failed

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

OPEN_SSTAT_FAILED - Open status file in partner system failed

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

QUANTITY_ERROR - No. of invalid/inconsistent data records

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

BAD_SYSTEM_PARAMS - Partner system parameters are incorrect

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

TMPFILES_EXISTS - Old .tmp files still in partner system

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

UNKNOWN_ERROR - Unknown error

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

CONNECTION_FAILED - Connection failed/terminated

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

FILECHANGE_FAILED - File cannot be overwritten in partner system

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

FILECREATE_FAILED - .tmp file could not be created in partner system

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

FILELOCK_FAILED - Partner file could not be locked

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

FILERENAME_FAILED - Could not rename file in partner system

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

GATEWAY_ERROR - Gateway error

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

MAPCREATE_FAILED - Failed to create session(s)

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

Copy and paste ABAP code example for ISHCM_GET_LAB_DATA 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:
lt_itran  TYPE STANDARD TABLE OF RNRTRAN, "   
lv_qnterrormails  TYPE NCST-ENERRQNT, "   
lv_bad_environment  TYPE NCST, "   
lv_book_immediatly  TYPE RNCOM-FLAG, "   '0'
lv_no_clientdata_there  TYPE RNCOM, "   
lv_no_correct_format  TYPE RNCOM, "   
lv_no_data_there  TYPE RNCOM, "   
lv_no_segments  TYPE RNCOM, "   
lv_no_tn02s_entry  TYPE RNCOM, "   
lv_no_tnci1_entry  TYPE RNCOM, "   
lv_no_txcom_entry  TYPE RNCOM, "   
lv_open_datfile_failed  TYPE RNCOM, "   
lv_open_sstat_failed  TYPE RNCOM, "   
lv_quantity_error  TYPE RNCOM, "   
lv_qntmails  TYPE NCST-ENQNT, "   
lv_bad_system_params  TYPE NCST, "   
lv_data_direct_given  TYPE RNCOM-FLAG, "   '0'
lv_tmpfiles_exists  TYPE RNCOM, "   
lv_unknown_error  TYPE RNCOM, "   
lv_mapname  TYPE APQI-GROUPID, "   'ISH_N2LAB'
lv_connection_failed  TYPE APQI, "   
lv_system  TYPE TN02S-SYSTEM, "   
lv_filechange_failed  TYPE TN02S, "   
lv_get_data_local  TYPE RNCOM-FLAG, "   '0'
lv_filecreate_failed  TYPE RNCOM, "   
lv_filelock_failed  TYPE RNCOM, "   
lv_filerename_failed  TYPE RNCOM, "   
lv_gateway_error  TYPE RNCOM, "   
lv_mapcreate_failed  TYPE RNCOM. "   

  CALL FUNCTION 'ISHCM_GET_LAB_DATA'  "
    EXPORTING
         BOOK_IMMEDIATLY = lv_book_immediatly
         DATA_DIRECT_GIVEN = lv_data_direct_given
         MAPNAME = lv_mapname
         SYSTEM = lv_system
         GET_DATA_LOCAL = lv_get_data_local
    IMPORTING
         QNTERRORMAILS = lv_qnterrormails
         QNTMAILS = lv_qntmails
    TABLES
         ITRAN = lt_itran
    EXCEPTIONS
        BAD_ENVIRONMENT = 1
        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
        BAD_SYSTEM_PARAMS = 2
        TMPFILES_EXISTS = 20
        UNKNOWN_ERROR = 21
        CONNECTION_FAILED = 3
        FILECHANGE_FAILED = 4
        FILECREATE_FAILED = 5
        FILELOCK_FAILED = 6
        FILERENAME_FAILED = 7
        GATEWAY_ERROR = 8
        MAPCREATE_FAILED = 9
. " ISHCM_GET_LAB_DATA




ABAP code using 7.40 inline data declarations to call FM ISHCM_GET_LAB_DATA

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 ENERRQNT FROM NCST INTO @DATA(ld_qnterrormails).
 
 
"SELECT single FLAG FROM RNCOM INTO @DATA(ld_book_immediatly).
DATA(ld_book_immediatly) = '0'.
 
 
 
 
 
 
 
 
 
 
 
"SELECT single ENQNT FROM NCST INTO @DATA(ld_qntmails).
 
 
"SELECT single FLAG FROM RNCOM INTO @DATA(ld_data_direct_given).
DATA(ld_data_direct_given) = '0'.
 
 
 
"SELECT single GROUPID FROM APQI INTO @DATA(ld_mapname).
DATA(ld_mapname) = 'ISH_N2LAB'.
 
 
"SELECT single SYSTEM FROM TN02S INTO @DATA(ld_system).
 
 
"SELECT single FLAG FROM RNCOM INTO @DATA(ld_get_data_local).
DATA(ld_get_data_local) = '0'.
 
 
 
 
 
 


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!