SAP ISHMED_ME_SEARCH_DRUGS Function Module for
ISHMED_ME_SEARCH_DRUGS is a standard ishmed me search drugs 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 ishmed me search drugs FM, simply by entering the name ISHMED_ME_SEARCH_DRUGS into the relevant SAP transaction such as SE37 or SE38.
Function Group: N1ME_SEARCH
Program Name: SAPLN1ME_SEARCH
Main Program: SAPLN1ME_SEARCH
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function ISHMED_ME_SEARCH_DRUGS 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 'ISHMED_ME_SEARCH_DRUGS'".
EXPORTING
* I_EINRI = "
* I_ACTIVE = '1' "
* I_TITLE = "
* IT_FILTER_TPGTX = "
* IT_FILTER_TPTX = "
* IT_FILTER_UNAME = "
* I_INPATIENT = "
* I_OUTPATIENT = "
* I_CALLER = "
* I_SEARCH_STRING = "
* I_FILTER = "
* I_SEARCH = '1' "
* I_SEARCH_RESTRICTION = '3' "
* I_SEARCH_TEMPLATE = '3' "
* I_ONLY_ONE = ' ' "
* I_DIALOG = ' ' "
* I_ADMIND = '1' "
IMPORTING
E_RC = "
CHANGING
CR_ERRORHANDLER = "
TABLES
* S_FORMTY = "
* S_ORGID = "
* S_GPARTNER = "
* S_DIAGNOSEN = "
* R_FORMULARY = "
* R_TEMPLATE = "
IMPORTING Parameters details for ISHMED_ME_SEARCH_DRUGS
I_EINRI -
Data type: EINRIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ACTIVE -
Data type: CHAR1Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TITLE -
Data type: CUA_TIT_TXOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_FILTER_TPGTX -
Data type: ISHMED_T_ME_RANGE_TPGTXOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_FILTER_TPTX -
Data type: ISHMED_T_ME_RANGE_TPTXOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_FILTER_UNAME -
Data type: ISHMED_T_ME_RANGE_UNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_INPATIENT -
Data type: N1ME_INPAT_ALLOWEDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_OUTPATIENT -
Data type: N1ME_OUTPAT_ALLOWEDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CALLER -
Data type: SY-CPROGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SEARCH_STRING -
Data type: W3_QVALUEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FILTER -
Data type: RN1ME_DRUG_FILTEROptional: Yes
Call by Reference: No ( called with pass by value option)
I_SEARCH -
Data type: CHAR1Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SEARCH_RESTRICTION -
Data type: CHAR1Default: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SEARCH_TEMPLATE -
Data type: CHAR1Default: '3'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLY_ONE -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_DIALOG -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ADMIND -
Data type: CHAR1Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ISHMED_ME_SEARCH_DRUGS
E_RC -
Data type: ISH_METHOD_RCOptional: No
Call by Reference: Yes
CHANGING Parameters details for ISHMED_ME_SEARCH_DRUGS
CR_ERRORHANDLER -
Data type: CL_ISHMED_ERRORHANDLINGOptional: No
Call by Reference: Yes
TABLES Parameters details for ISHMED_ME_SEARCH_DRUGS
S_FORMTY -
Data type: ISHMED_ME_FORMTY_ROptional: Yes
Call by Reference: Yes
S_ORGID -
Data type: ISHMED_ME_ORGID_ROptional: Yes
Call by Reference: Yes
S_GPARTNER -
Data type: ISHMED_ME_GPARTNER_ROptional: Yes
Call by Reference: Yes
S_DIAGNOSEN -
Data type: ISHMED_ME_ICDS_ROptional: Yes
Call by Reference: Yes
R_FORMULARY -
Data type: ISHMED_T_RN1FORMULARYOptional: Yes
Call by Reference: Yes
R_TEMPLATE -
Data type: ISHMED_ME_TEMPLATEOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for ISHMED_ME_SEARCH_DRUGS 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: | ||||
lv_e_rc | TYPE ISH_METHOD_RC, " | |||
lv_i_einri | TYPE EINRI, " | |||
lt_s_formty | TYPE STANDARD TABLE OF ISHMED_ME_FORMTY_R, " | |||
lv_cr_errorhandler | TYPE CL_ISHMED_ERRORHANDLING, " | |||
lv_i_active | TYPE CHAR1, " '1' | |||
lv_i_title | TYPE CUA_TIT_TX, " | |||
lv_it_filter_tpgtx | TYPE ISHMED_T_ME_RANGE_TPGTX, " | |||
lv_it_filter_tptx | TYPE ISHMED_T_ME_RANGE_TPTX, " | |||
lv_it_filter_uname | TYPE ISHMED_T_ME_RANGE_UNAME, " | |||
lv_i_inpatient | TYPE N1ME_INPAT_ALLOWED, " | |||
lv_i_outpatient | TYPE N1ME_OUTPAT_ALLOWED, " | |||
lv_i_caller | TYPE SY-CPROG, " | |||
lt_s_orgid | TYPE STANDARD TABLE OF ISHMED_ME_ORGID_R, " | |||
lv_i_search_string | TYPE W3_QVALUE, " | |||
lv_i_filter | TYPE RN1ME_DRUG_FILTER, " | |||
lt_s_gpartner | TYPE STANDARD TABLE OF ISHMED_ME_GPARTNER_R, " | |||
lv_i_search | TYPE CHAR1, " '1' | |||
lt_s_diagnosen | TYPE STANDARD TABLE OF ISHMED_ME_ICDS_R, " | |||
lt_r_formulary | TYPE STANDARD TABLE OF ISHMED_T_RN1FORMULARY, " | |||
lv_i_search_restriction | TYPE CHAR1, " '3' | |||
lt_r_template | TYPE STANDARD TABLE OF ISHMED_ME_TEMPLATE, " | |||
lv_i_search_template | TYPE CHAR1, " '3' | |||
lv_i_only_one | TYPE CHAR1, " SPACE | |||
lv_i_dialog | TYPE CHAR1, " SPACE | |||
lv_i_admind | TYPE CHAR1. " '1' |
  CALL FUNCTION 'ISHMED_ME_SEARCH_DRUGS' " |
EXPORTING | ||
I_EINRI | = lv_i_einri | |
I_ACTIVE | = lv_i_active | |
I_TITLE | = lv_i_title | |
IT_FILTER_TPGTX | = lv_it_filter_tpgtx | |
IT_FILTER_TPTX | = lv_it_filter_tptx | |
IT_FILTER_UNAME | = lv_it_filter_uname | |
I_INPATIENT | = lv_i_inpatient | |
I_OUTPATIENT | = lv_i_outpatient | |
I_CALLER | = lv_i_caller | |
I_SEARCH_STRING | = lv_i_search_string | |
I_FILTER | = lv_i_filter | |
I_SEARCH | = lv_i_search | |
I_SEARCH_RESTRICTION | = lv_i_search_restriction | |
I_SEARCH_TEMPLATE | = lv_i_search_template | |
I_ONLY_ONE | = lv_i_only_one | |
I_DIALOG | = lv_i_dialog | |
I_ADMIND | = lv_i_admind | |
IMPORTING | ||
E_RC | = lv_e_rc | |
CHANGING | ||
CR_ERRORHANDLER | = lv_cr_errorhandler | |
TABLES | ||
S_FORMTY | = lt_s_formty | |
S_ORGID | = lt_s_orgid | |
S_GPARTNER | = lt_s_gpartner | |
S_DIAGNOSEN | = lt_s_diagnosen | |
R_FORMULARY | = lt_r_formulary | |
R_TEMPLATE | = lt_r_template | |
. " ISHMED_ME_SEARCH_DRUGS |
ABAP code using 7.40 inline data declarations to call FM ISHMED_ME_SEARCH_DRUGS
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.DATA(ld_i_active) | = '1'. | |||
"SELECT single CPROG FROM SY INTO @DATA(ld_i_caller). | ||||
DATA(ld_i_search) | = '1'. | |||
DATA(ld_i_search_restriction) | = '3'. | |||
DATA(ld_i_search_template) | = '3'. | |||
DATA(ld_i_only_one) | = ' '. | |||
DATA(ld_i_dialog) | = ' '. | |||
DATA(ld_i_admind) | = '1'. | |||
Search for further information about these or an SAP related objects