SAP Function Modules

NBWD_0HC_PCS_ENRICH SAP Function module







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

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


Pattern for FM NBWD_0HC_PCS_ENRICH - NBWD 0HC PCS ENRICH





CALL FUNCTION 'NBWD_0HC_PCS_ENRICH' "
  EXPORTING
    i_pcs_type =                " ish_pcs_type  IS-H: PCS Type (PCS = Patient Classification System)
*   i_taspa =                   " ntsp-taspa    IS-H: Column in Service Catalog
  TABLES
    i_t_cases =                 " ish_einri_falnr
*   e_t_nbwd_0hc_pcs =          " nbwd_0hc_pcs  IS-H: Extract Structure for DataSource Services for BW
    i_range_institution =       " rnseinri
  EXCEPTIONS
    PREPARE_ERROR = 1           "
    COUNTRY_VERSION_NOT_SUPPORTED = 2  "
    .  "  NBWD_0HC_PCS_ENRICH

ABAP code example for Function Module NBWD_0HC_PCS_ENRICH





The ABAP code below is a full code listing to execute function module NBWD_0HC_PCS_ENRICH 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:
it_i_t_cases  TYPE STANDARD TABLE OF ISH_EINRI_FALNR,"TABLES PARAM
wa_i_t_cases  LIKE LINE OF it_i_t_cases ,
it_e_t_nbwd_0hc_pcs  TYPE STANDARD TABLE OF NBWD_0HC_PCS,"TABLES PARAM
wa_e_t_nbwd_0hc_pcs  LIKE LINE OF it_e_t_nbwd_0hc_pcs ,
it_i_range_institution  TYPE STANDARD TABLE OF RNSEINRI,"TABLES PARAM
wa_i_range_institution  LIKE LINE OF it_i_range_institution .

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

SELECT single TASPA
FROM NTSP
INTO @DATA(ld_i_taspa).


"populate fields of struture and append to itab
append wa_i_t_cases to it_i_t_cases.

"populate fields of struture and append to itab
append wa_e_t_nbwd_0hc_pcs to it_e_t_nbwd_0hc_pcs.

"populate fields of struture and append to itab
append wa_i_range_institution to it_i_range_institution. . CALL FUNCTION 'NBWD_0HC_PCS_ENRICH' EXPORTING i_pcs_type = ld_i_pcs_type * i_taspa = ld_i_taspa TABLES i_t_cases = it_i_t_cases * e_t_nbwd_0hc_pcs = it_e_t_nbwd_0hc_pcs i_range_institution = it_i_range_institution EXCEPTIONS PREPARE_ERROR = 1 COUNTRY_VERSION_NOT_SUPPORTED = 2 . " NBWD_0HC_PCS_ENRICH
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 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_i_pcs_type  TYPE ISH_PCS_TYPE ,
it_i_t_cases  TYPE STANDARD TABLE OF ISH_EINRI_FALNR ,
wa_i_t_cases  LIKE LINE OF it_i_t_cases,
ld_i_taspa  TYPE NTSP-TASPA ,
it_e_t_nbwd_0hc_pcs  TYPE STANDARD TABLE OF NBWD_0HC_PCS ,
wa_e_t_nbwd_0hc_pcs  LIKE LINE OF it_e_t_nbwd_0hc_pcs,
it_i_range_institution  TYPE STANDARD TABLE OF RNSEINRI ,
wa_i_range_institution  LIKE LINE OF it_i_range_institution.

ld_i_pcs_type = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_t_cases to it_i_t_cases.

SELECT single TASPA
FROM NTSP
INTO ld_i_taspa.


"populate fields of struture and append to itab
append wa_e_t_nbwd_0hc_pcs to it_e_t_nbwd_0hc_pcs.

"populate fields of struture and append to itab
append wa_i_range_institution to it_i_range_institution.

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