SAP EHS00_CREATESERVICE Function Module for









EHS00_CREATESERVICE is a standard ehs00 createservice 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 ehs00 createservice FM, simply by entering the name EHS00_CREATESERVICE into the relevant SAP transaction such as SE37 or SE38.

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



Function EHS00_CREATESERVICE 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 'EHS00_CREATESERVICE'"
EXPORTING
I_SRV_NUMBER = "
I_PERNR = "Personnel Number
* I_SRV_STATUS = '1' "Status of the Service
* I_SRV_REVIEW = '1' "
* I_SRV_OPENDATE = SY-DATUM "
* I_FLG_VACC_UPDATE = TRUE "
* I_SRV_REC = "

TABLES
I_PROTTAB = "

EXCEPTIONS
SERVICE_EXITS_ALREADY = 1 ERROR_IN_TEST_UPDATE = 2
.




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_SAPLEHS00AMBTAET_NEU_001 Transfer Header Data for Examination to Screen Exit
EXIT_SAPLEHS00AMBTAET_NEU_002 Transfer of OK Code from Medical Service
EXIT_SAPLEHS00AMBTAET_NEU_003 Return of a Change Flag to the Medical Service
EXIT_SAPLEHS00AMBTAET_NEU_004 Call of Main Screen from Medical Service
EXIT_SAPLEHS00AMBTAET_NEU_005 Reset Internal Tables After Change to Display Mode Without Saving
EXIT_SAPLEHS00AMBTAET_NEU_006 Tests: Create, Delete, Initialize, or Data Import
EXIT_SAPLEHS00AMBTAET_NEU_007 Create the Medical Tests While Creating a Service
EXIT_SAPLEHS00AMBTAET_NEU_008 Control of Reports for Person-Specific Overviews

IMPORTING Parameters details for EHS00_CREATESERVICE

I_SRV_NUMBER -

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

I_PERNR - Personnel Number

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

I_SRV_STATUS - Status of the Service

Data type: T7EHS00_SERVICE-SRV_STATUS
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SRV_REVIEW -

Data type: T7EHS00_SERVICE-SRV_REVIEW
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SRV_OPENDATE -

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

I_FLG_VACC_UPDATE -

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

I_SRV_REC -

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

TABLES Parameters details for EHS00_CREATESERVICE

I_PROTTAB -

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

EXCEPTIONS details

SERVICE_EXITS_ALREADY - Service Already Exists

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

ERROR_IN_TEST_UPDATE -

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

Copy and paste ABAP code example for EHS00_CREATESERVICE 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_i_prottab  TYPE STANDARD TABLE OF T7EHS00_SRV_PROT, "   
lv_i_srv_number  TYPE T7EHS00_SERVICE-SRV_NUMBER, "   
lv_service_exits_already  TYPE T7EHS00_SERVICE, "   
lv_i_pernr  TYPE T7EHS00_SERVICE-PERNR, "   
lv_error_in_test_update  TYPE T7EHS00_SERVICE, "   
lv_i_srv_status  TYPE T7EHS00_SERVICE-SRV_STATUS, "   '1'
lv_i_srv_review  TYPE T7EHS00_SERVICE-SRV_REVIEW, "   '1'
lv_i_srv_opendate  TYPE SY-DATUM, "   SY-DATUM
lv_i_flg_vacc_update  TYPE ESP1_BOOLEAN, "   TRUE
lv_i_srv_rec  TYPE EHS00S_SERVICE. "   

  CALL FUNCTION 'EHS00_CREATESERVICE'  "
    EXPORTING
         I_SRV_NUMBER = lv_i_srv_number
         I_PERNR = lv_i_pernr
         I_SRV_STATUS = lv_i_srv_status
         I_SRV_REVIEW = lv_i_srv_review
         I_SRV_OPENDATE = lv_i_srv_opendate
         I_FLG_VACC_UPDATE = lv_i_flg_vacc_update
         I_SRV_REC = lv_i_srv_rec
    TABLES
         I_PROTTAB = lt_i_prottab
    EXCEPTIONS
        SERVICE_EXITS_ALREADY = 1
        ERROR_IN_TEST_UPDATE = 2
. " EHS00_CREATESERVICE




ABAP code using 7.40 inline data declarations to call FM EHS00_CREATESERVICE

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 SRV_NUMBER FROM T7EHS00_SERVICE INTO @DATA(ld_i_srv_number).
 
 
"SELECT single PERNR FROM T7EHS00_SERVICE INTO @DATA(ld_i_pernr).
 
 
"SELECT single SRV_STATUS FROM T7EHS00_SERVICE INTO @DATA(ld_i_srv_status).
DATA(ld_i_srv_status) = '1'.
 
"SELECT single SRV_REVIEW FROM T7EHS00_SERVICE INTO @DATA(ld_i_srv_review).
DATA(ld_i_srv_review) = '1'.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_srv_opendate).
DATA(ld_i_srv_opendate) = SY-DATUM.
 
DATA(ld_i_flg_vacc_update) = TRUE.
 
 


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!