SAP Function Modules

ISH_GET_ENDDATE_SERVICES SAP Function module - IS-H: Determine end date of an extended service







ISH_GET_ENDDATE_SERVICES 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 ISH_GET_ENDDATE_SERVICES into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM ISH_GET_ENDDATE_SERVICES - ISH GET ENDDATE SERVICES





CALL FUNCTION 'ISH_GET_ENDDATE_SERVICES' "IS-H: Determine end date of an extended service
  EXPORTING
*   aufdt = '19931001'          " sy-datum      Date at which case admitted
*   aufzt = '100000'            " sy-uzeit      Time at which case admitted
*   begdt = '19931001'          " sy-datum      Date at which service begins
*   begzt = '100000'            " sy-uzeit      Time at which service begins
*   einri = '0001'              " tn01-einri    Institution
    falnr =                     " nfal-falnr    Case Number
*   etlart = 'X'                " nbew-bwart    Discharge type of case
*   etldt = '19931001'          " sy-datum      Date at which case discharged
*   etlzt = '220000'            " sy-uzeit      Time at which case discharged
*   quantity =                  "               Service Quantity
*   s_param = '01'              " ntpk-bform    Parameter which service should be billed
*   exact_abdat = ' '           " npdok-xfeld   Procedure determination ENDDT ->F2
*   talst = SPACE               " ntpk-talst    Charge master of performed service
*   tarid = SPACE               " ntpk-tarif    ID of performed service
  IMPORTING
    enddt =                     " sy-datum      Date at which service ends
  EXCEPTIONS
    AUFDT_GT_BEGDT = 1          "               Admission date > start of service
    AUF_GT_ETL = 2              "               Admission of case after discharge
    BEGDT_GT_ENDDT = 3          "
    ETLDT_LT_ENDDT = 4          "               Discharge date < end of service
    INVALID_EINRI = 5           "               Wrong institution
    INVALID_S_PARAM = 6         "               Wrong parameter specified
    ZUW_LEIST = 7               "
    .  "  ISH_GET_ENDDATE_SERVICES

ABAP code example for Function Module ISH_GET_ENDDATE_SERVICES





The ABAP code below is a full code listing to execute function module ISH_GET_ENDDATE_SERVICES 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_enddt  TYPE SY-DATUM .

DATA(ld_aufdt) = '20210129'.
DATA(ld_aufzt) = 'Check type of data required'.
DATA(ld_begdt) = '20210129'.
DATA(ld_begzt) = 'Check type of data required'.

SELECT single EINRI
FROM TN01
INTO @DATA(ld_einri).


SELECT single FALNR
FROM NFAL
INTO @DATA(ld_falnr).


SELECT single BWART
FROM NBEW
INTO @DATA(ld_etlart).

DATA(ld_etldt) = '20210129'.
DATA(ld_etlzt) = 'Check type of data required'.
DATA(ld_quantity) = 'some text here'.

SELECT single BFORM
FROM NTPK
INTO @DATA(ld_s_param).


DATA(ld_exact_abdat) = some text here

SELECT single TALST
FROM NTPK
INTO @DATA(ld_talst).


SELECT single TARIF
FROM NTPK
INTO @DATA(ld_tarid).
. CALL FUNCTION 'ISH_GET_ENDDATE_SERVICES' EXPORTING * aufdt = ld_aufdt * aufzt = ld_aufzt * begdt = ld_begdt * begzt = ld_begzt * einri = ld_einri falnr = ld_falnr * etlart = ld_etlart * etldt = ld_etldt * etlzt = ld_etlzt * quantity = ld_quantity * s_param = ld_s_param * exact_abdat = ld_exact_abdat * talst = ld_talst * tarid = ld_tarid IMPORTING enddt = ld_enddt EXCEPTIONS AUFDT_GT_BEGDT = 1 AUF_GT_ETL = 2 BEGDT_GT_ENDDT = 3 ETLDT_LT_ENDDT = 4 INVALID_EINRI = 5 INVALID_S_PARAM = 6 ZUW_LEIST = 7 . " ISH_GET_ENDDATE_SERVICES
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 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_enddt  TYPE SY-DATUM ,
ld_aufdt  TYPE SY-DATUM ,
ld_aufzt  TYPE SY-UZEIT ,
ld_begdt  TYPE SY-DATUM ,
ld_begzt  TYPE SY-UZEIT ,
ld_einri  TYPE TN01-EINRI ,
ld_falnr  TYPE NFAL-FALNR ,
ld_etlart  TYPE NBEW-BWART ,
ld_etldt  TYPE SY-DATUM ,
ld_etlzt  TYPE SY-UZEIT ,
ld_quantity  TYPE STRING ,
ld_s_param  TYPE NTPK-BFORM ,
ld_exact_abdat  TYPE NPDOK-XFELD ,
ld_talst  TYPE NTPK-TALST ,
ld_tarid  TYPE NTPK-TARIF .

ld_aufdt = '20210129'.
ld_aufzt = 'Check type of data required'.
ld_begdt = '20210129'.
ld_begzt = 'Check type of data required'.

SELECT single EINRI
FROM TN01
INTO ld_einri.


SELECT single FALNR
FROM NFAL
INTO ld_falnr.


SELECT single BWART
FROM NBEW
INTO ld_etlart.

ld_etldt = '20210129'.
ld_etlzt = 'Check type of data required'.
ld_quantity = 'some text here'.

SELECT single BFORM
FROM NTPK
INTO ld_s_param.


ld_exact_abdat = some text here

SELECT single TALST
FROM NTPK
INTO ld_talst.


SELECT single TARIF
FROM NTPK
INTO ld_tarid.

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 ISH_GET_ENDDATE_SERVICES or its description.