SAP Function Modules

ISH_PATNAME_GET SAP Function module







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

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


Pattern for FM ISH_PATNAME_GET - ISH PATNAME GET





CALL FUNCTION 'ISH_PATNAME_GET' "
  EXPORTING
*   i_einri = '*'               " rnpa1-einri   Institution -> F2
    i_patnr =                   " npat-patnr    Patient Number
*   i_read_npat = ' '           " npdok-xfeld   Read Patient Master Data (ON/OFF)
*   i_npat =                    " npat          Patient Master Data
*   i_npat_complete = ' '       " npdok-xfeld   Complete Patient Master Data (ON/OFF) -> F2
*   i_list = ' '                " npdok-xfeld   Output Name on List (ON/OFF)
*   i_show_age = 'X'            " npdok-xfeld   Output Age (ON/OFF)
*   i_date = SY-DATUM           " fixed_date    Key Date for Age Calculation
*   i_show_gender = 'X'         " npdok-xfeld   Output Sex (ON/OFF)
*   i_langu = SY-LANGU          " spras         Language for Sex Key
*   i_read_db = ' '             " npdok-xfeld
*   i_pseudo_override = ' '     " ish_on_off    Read Original Data
  IMPORTING
    e_pnamec =                  " any           Patient Name
    e_pnamec1 =                 " any           Patient Name (Sex, Age)
    e_gender =                  " tn17t-gschle  Sex Indicator - User-Specific
    e_age =                     " any           Age on Key Date
  EXCEPTIONS
    PATNR_NOT_FOUND = 1         "               Record with Key I_PATNR not Found
    NO_AUTHORITY = 2            "               No Authorization for I_PATNR
    NO_EINRI = 3                "               No Institution with Read NPAE
    GENDER_NOT_FOUND = 4        "               Sex Could not Be Determined
    AGE_NOT_FOUND = 5           "               Age Could not Be Determined
    .  "  ISH_PATNAME_GET

ABAP code example for Function Module ISH_PATNAME_GET





The ABAP code below is a full code listing to execute function module ISH_PATNAME_GET 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_e_pnamec  TYPE ANY ,
ld_e_pnamec1  TYPE ANY ,
ld_e_gender  TYPE TN17T-GSCHLE ,
ld_e_age  TYPE ANY .


DATA(ld_i_einri) = some text here

SELECT single PATNR
FROM NPAT
INTO @DATA(ld_i_patnr).


DATA(ld_i_read_npat) = some text here
DATA(ld_i_npat) = 'Check type of data required'.

DATA(ld_i_npat_complete) = some text here

DATA(ld_i_list) = some text here

DATA(ld_i_show_age) = some text here
DATA(ld_i_date) = 'Check type of data required'.

DATA(ld_i_show_gender) = some text here
DATA(ld_i_langu) = 'Check type of data required'.

DATA(ld_i_read_db) = some text here
DATA(ld_i_pseudo_override) = 'Check type of data required'. . CALL FUNCTION 'ISH_PATNAME_GET' EXPORTING * i_einri = ld_i_einri i_patnr = ld_i_patnr * i_read_npat = ld_i_read_npat * i_npat = ld_i_npat * i_npat_complete = ld_i_npat_complete * i_list = ld_i_list * i_show_age = ld_i_show_age * i_date = ld_i_date * i_show_gender = ld_i_show_gender * i_langu = ld_i_langu * i_read_db = ld_i_read_db * i_pseudo_override = ld_i_pseudo_override IMPORTING e_pnamec = ld_e_pnamec e_pnamec1 = ld_e_pnamec1 e_gender = ld_e_gender e_age = ld_e_age EXCEPTIONS PATNR_NOT_FOUND = 1 NO_AUTHORITY = 2 NO_EINRI = 3 GENDER_NOT_FOUND = 4 AGE_NOT_FOUND = 5 . " ISH_PATNAME_GET
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 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_e_pnamec  TYPE ANY ,
ld_i_einri  TYPE RNPA1-EINRI ,
ld_e_pnamec1  TYPE ANY ,
ld_i_patnr  TYPE NPAT-PATNR ,
ld_e_gender  TYPE TN17T-GSCHLE ,
ld_i_read_npat  TYPE NPDOK-XFELD ,
ld_e_age  TYPE ANY ,
ld_i_npat  TYPE NPAT ,
ld_i_npat_complete  TYPE NPDOK-XFELD ,
ld_i_list  TYPE NPDOK-XFELD ,
ld_i_show_age  TYPE NPDOK-XFELD ,
ld_i_date  TYPE FIXED_DATE ,
ld_i_show_gender  TYPE NPDOK-XFELD ,
ld_i_langu  TYPE SPRAS ,
ld_i_read_db  TYPE NPDOK-XFELD ,
ld_i_pseudo_override  TYPE ISH_ON_OFF .


ld_i_einri = some text here

SELECT single PATNR
FROM NPAT
INTO ld_i_patnr.


ld_i_read_npat = some text here
ld_i_npat = 'Check type of data required'.

ld_i_npat_complete = some text here

ld_i_list = some text here

ld_i_show_age = some text here
ld_i_date = 'Check type of data required'.

ld_i_show_gender = some text here
ld_i_langu = 'Check type of data required'.

ld_i_read_db = some text here
ld_i_pseudo_override = 'Check type of data required'.

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