Programme SAP PRC_MAST_GET_KEY_FLDS_TEST - Program PRC_MAST_GET_KEY_FLDS_TEST

Purpose
This report tests the functionality of the function module/SAPCND/MNT_GET_KEY_FIELDS_SRV. The function module /SAPCND/MNT
_GET_KEY_FIELDS_SRV fetches the condition table for the given inputparameters, application, usage, condition type and condition group.

Prerequisites
Condition technique business configuration objects are available. Thisincludes application, condition maintenance groups, condition tables,condition types, etc. This reports work only for PRT application.

Features
This report can be executed as a stand alone report or in a ABAP unittest framework. The report has seven test cases to check thefunctionalities of the function module /SAPCND/MNT_GET_KEY_FIELDS_SRV.

Output
The output will be displayed in the standard ABAP unit test framework oras a standard stand alone report output.

Activities
This report has two include programs.
1. prc_mast_get_key_flds_aunit_incl
This include program contains the definition and implementation of classcl_sapcnd_get_key_flds which has methods setup, sapcnd_get_key_flds andbapiret_to_aunit_assert.
2. prc_mast_get_key_flds_srv
This include program has seven test cases in it to check thefunctionalities of the function module /SAPCND/MNT_GET_KEY_FIELDS_SRV.
Case 1: When only application and condition type are given and usageand groupname are empty.
Inputs:
Application: PRT
Condn Type: 1CT2
Expected result: SAP00008 SAP00004
Case 2: When application condition type and Group name is given.
Inputs:
Application: PRT
Condn Type: 1CT2
Groupname: PRT_UT1
Expected result: SAP00008 SAP00004
Case 3: When Application, condition type and wrong group name is given.
Inputs:
Application: PRT
Condn Type: 1CT2
Groupname: PRT_FIELD
Expected result : None
Case 4: Repetation of case 1 to check whether the static variablebuffering inside function module works correctly.
Inputs:
Application: PRT
Condn Type: 1CT2
Expected result: SAP00008 SAP00004
Case 5: When application, condition type and condition group name isgiven with usage not given.
Inputs:
Application: PRT
Condn Type: 1CT1
Expected result: SAP00008
Tables are fetched independent of usage.
Case 6: When application, condition type, usage and condition groupgiven
Inputs:
Application: PRT
Condn Type: 1CT2
Usage: PR
Groupname: PRT_UT1
Expected result: SAP00008 SAP00004
Case 7: When application, condition type and wrong group name is given.
Inputs:
Application: PRT
Condn Type: 1CT2
Groupname: PRT_FIELD
Expected result : None