SAP Function Modules

ISHMED_PATREG_SEARCH SAP Function module







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

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


Pattern for FM ISHMED_PATREG_SEARCH - ISHMED PATREG SEARCH





CALL FUNCTION 'ISHMED_PATREG_SEARCH' "
* EXPORTING
*   i_mandt = SY-MANDT          " sy-mandt
*   i_einri = SPACE             " rnpa1-einri
*   i_patnr = SPACE             " n1prpatzuo-patnr
*   i_falnr = SPACE             " n1prfal-falnr
*   i_nname = SPACE             " n1prpat-nname
*   i_vname = SPACE             " n1prpat-vname
*   i_gbnam = SPACE             " n1prpat-gbnam
*   i_gbdav = '00000000'        " n1prpat-gbdat
*   i_gbdab = '00000000'        " n1prpat-gbdat
*   i_gschl = SPACE             " n1prpat-gschle
*   i_rvnum = SPACE             " n1prpat-rvnum
*   i_extnr = SPACE             " n1prpat-extnr
*   i_pasnr = SPACE             " n1prpat-passnr
*   i_sphon = SPACE             " rnpa1-suchp
*   i_flg_infobox = SPACE       "
*   i_flg_alvinit = SPACE       "
*   i_vcode = 'INS'             "
*   t_function_texts =          " ish_t_modify_function_texts
*   i_read_npap = SPACE         " xfeld
  IMPORTING
    e_okcode =                  " sy-ucomm
    e_n1prpat =                 " n1prpat
    e_patnr =                   " rnpa1-patnr
    e_pziff =                   " rnpa1-pziff
    e_vcode_new =               "
    e_pat_selected =            "
    e_next_screen =             "
    e_search_pat =              "
    e_sto_selected =            "
    e_papid =                   " npap-papid
  EXCEPTIONS
    SEARCH_ABORTED = 1          "
    NO_PATIENTS_FOUND = 2       "
    ALV_ERROR = 3               "
    MAX_CNT_EXCEED = 4          "
    NO_RFCDEST_FOUND = 5        "
    RFC_FAILURE = 6             "
    PATIENT_NOT_FOUND = 7       "
    LOCAL_SEARCH_ERROR = 8      "
    RFC_COMMUNICATION_ERROR = 9  "
    OTHERS = 10                 "
    .  "  ISHMED_PATREG_SEARCH

ABAP code example for Function Module ISHMED_PATREG_SEARCH





The ABAP code below is a full code listing to execute function module ISHMED_PATREG_SEARCH 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_okcode  TYPE SY-UCOMM ,
ld_e_n1prpat  TYPE N1PRPAT ,
ld_e_patnr  TYPE RNPA1-PATNR ,
ld_e_pziff  TYPE RNPA1-PZIFF ,
ld_e_vcode_new  TYPE STRING ,
ld_e_pat_selected  TYPE STRING ,
ld_e_next_screen  TYPE STRING ,
ld_e_search_pat  TYPE STRING ,
ld_e_sto_selected  TYPE STRING ,
ld_e_papid  TYPE NPAP-PAPID .

DATA(ld_i_mandt) = 'Check type of data required'.

DATA(ld_i_einri) = some text here

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


SELECT single FALNR
FROM N1PRFAL
INTO @DATA(ld_i_falnr).


SELECT single NNAME
FROM N1PRPAT
INTO @DATA(ld_i_nname).


SELECT single VNAME
FROM N1PRPAT
INTO @DATA(ld_i_vname).


SELECT single GBNAM
FROM N1PRPAT
INTO @DATA(ld_i_gbnam).


SELECT single GBDAT
FROM N1PRPAT
INTO @DATA(ld_i_gbdav).


SELECT single GBDAT
FROM N1PRPAT
INTO @DATA(ld_i_gbdab).


SELECT single GSCHLE
FROM N1PRPAT
INTO @DATA(ld_i_gschl).


SELECT single RVNUM
FROM N1PRPAT
INTO @DATA(ld_i_rvnum).


SELECT single EXTNR
FROM N1PRPAT
INTO @DATA(ld_i_extnr).


SELECT single PASSNR
FROM N1PRPAT
INTO @DATA(ld_i_pasnr).


DATA(ld_i_sphon) = some text here
DATA(ld_i_flg_infobox) = 'some text here'.
DATA(ld_i_flg_alvinit) = 'some text here'.
DATA(ld_i_vcode) = 'some text here'.
DATA(ld_t_function_texts) = 'Check type of data required'.
DATA(ld_i_read_npap) = 'Check type of data required'. . CALL FUNCTION 'ISHMED_PATREG_SEARCH' * EXPORTING * i_mandt = ld_i_mandt * i_einri = ld_i_einri * i_patnr = ld_i_patnr * i_falnr = ld_i_falnr * i_nname = ld_i_nname * i_vname = ld_i_vname * i_gbnam = ld_i_gbnam * i_gbdav = ld_i_gbdav * i_gbdab = ld_i_gbdab * i_gschl = ld_i_gschl * i_rvnum = ld_i_rvnum * i_extnr = ld_i_extnr * i_pasnr = ld_i_pasnr * i_sphon = ld_i_sphon * i_flg_infobox = ld_i_flg_infobox * i_flg_alvinit = ld_i_flg_alvinit * i_vcode = ld_i_vcode * t_function_texts = ld_t_function_texts * i_read_npap = ld_i_read_npap IMPORTING e_okcode = ld_e_okcode e_n1prpat = ld_e_n1prpat e_patnr = ld_e_patnr e_pziff = ld_e_pziff e_vcode_new = ld_e_vcode_new e_pat_selected = ld_e_pat_selected e_next_screen = ld_e_next_screen e_search_pat = ld_e_search_pat e_sto_selected = ld_e_sto_selected e_papid = ld_e_papid EXCEPTIONS SEARCH_ABORTED = 1 NO_PATIENTS_FOUND = 2 ALV_ERROR = 3 MAX_CNT_EXCEED = 4 NO_RFCDEST_FOUND = 5 RFC_FAILURE = 6 PATIENT_NOT_FOUND = 7 LOCAL_SEARCH_ERROR = 8 RFC_COMMUNICATION_ERROR = 9 OTHERS = 10 . " ISHMED_PATREG_SEARCH
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 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_okcode  TYPE SY-UCOMM ,
ld_i_mandt  TYPE SY-MANDT ,
ld_e_n1prpat  TYPE N1PRPAT ,
ld_i_einri  TYPE RNPA1-EINRI ,
ld_e_patnr  TYPE RNPA1-PATNR ,
ld_i_patnr  TYPE N1PRPATZUO-PATNR ,
ld_i_falnr  TYPE N1PRFAL-FALNR ,
ld_e_pziff  TYPE RNPA1-PZIFF ,
ld_i_nname  TYPE N1PRPAT-NNAME ,
ld_e_vcode_new  TYPE STRING ,
ld_i_vname  TYPE N1PRPAT-VNAME ,
ld_e_pat_selected  TYPE STRING ,
ld_i_gbnam  TYPE N1PRPAT-GBNAM ,
ld_e_next_screen  TYPE STRING ,
ld_e_search_pat  TYPE STRING ,
ld_i_gbdav  TYPE N1PRPAT-GBDAT ,
ld_e_sto_selected  TYPE STRING ,
ld_i_gbdab  TYPE N1PRPAT-GBDAT ,
ld_i_gschl  TYPE N1PRPAT-GSCHLE ,
ld_e_papid  TYPE NPAP-PAPID ,
ld_i_rvnum  TYPE N1PRPAT-RVNUM ,
ld_i_extnr  TYPE N1PRPAT-EXTNR ,
ld_i_pasnr  TYPE N1PRPAT-PASSNR ,
ld_i_sphon  TYPE RNPA1-SUCHP ,
ld_i_flg_infobox  TYPE STRING ,
ld_i_flg_alvinit  TYPE STRING ,
ld_i_vcode  TYPE STRING ,
ld_t_function_texts  TYPE ISH_T_MODIFY_FUNCTION_TEXTS ,
ld_i_read_npap  TYPE XFELD .

ld_i_mandt = 'Check type of data required'.

ld_i_einri = some text here

SELECT single PATNR
FROM N1PRPATZUO
INTO ld_i_patnr.


SELECT single FALNR
FROM N1PRFAL
INTO ld_i_falnr.


SELECT single NNAME
FROM N1PRPAT
INTO ld_i_nname.


SELECT single VNAME
FROM N1PRPAT
INTO ld_i_vname.


SELECT single GBNAM
FROM N1PRPAT
INTO ld_i_gbnam.


SELECT single GBDAT
FROM N1PRPAT
INTO ld_i_gbdav.


SELECT single GBDAT
FROM N1PRPAT
INTO ld_i_gbdab.


SELECT single GSCHLE
FROM N1PRPAT
INTO ld_i_gschl.


SELECT single RVNUM
FROM N1PRPAT
INTO ld_i_rvnum.


SELECT single EXTNR
FROM N1PRPAT
INTO ld_i_extnr.


SELECT single PASSNR
FROM N1PRPAT
INTO ld_i_pasnr.


ld_i_sphon = some text here
ld_i_flg_infobox = 'some text here'.
ld_i_flg_alvinit = 'some text here'.
ld_i_vcode = 'some text here'.
ld_t_function_texts = 'Check type of data required'.
ld_i_read_npap = '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 ISHMED_PATREG_SEARCH or its description.