Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

EXIT

Former Member
0 Kudos

hI all,

what is the use of EHSHEX01 exit?

2 REPLIES 2

Former Member
0 Kudos

HI,

Different examination categories are available in the Medical Service

component of EH&S Occupational Health.

At present the standard system contains the following examination

categories:

o Audiogram

o Laboratory

o Physical

o Pulmonary function

These examination categories are usually all you need to represent the necessary medical examinations and tests in the system.

This enhancement gives you the option of defining additional examination

categories if you require them.

The enhancement is made up of seven function module exits and one screen

exit.

Parameters

Enhancement EHSHEX01 contains the following components:

o Function module exits:

- EXIT_SAPLEHS00AMBTAET_NEU_001: Transfers the header data for the

called examination, loads the corresponding data into internal

tables, and sends the screen number of the user-defined

subscreen to the main program.

- EXIT_SAPLEHS00AMBTAET_NEU_002: Transfers the OK code from the

main program.

- EXIT_SAPLEHS00AMBTAET_NEU_003: Supplies the indicator for

registering a data change on the user-defined subscreen.

- EXIT_SAPLEHS00AMBTAET_NEU_004: Calls a user-defined detail

screen.

- EXIT_SAPLEHS00AMBTAET_NEU_005: If the request to save the data

is rejected, this exit resets the user-defined internal tables

when changing to the display mode.

- EXIT_SAPLEHS00AMBTAET_NEU_006: Depending on the action

indicator, medical tests in (internal) tables are created,

deleted, initialized, or filled with data by means of an import

program. Can also lock table entries.

- EXIT_SAPLEHS00AMBTAET_NEU_007: Creates medical tests in the

corresponding database tables when a medical service is opened.

o Screen exit:

- SAPLXEHS00EXAMEXIT: The subscreen belonging to the examination

category is created in function group SAPLXEHS00EXAMEXIT. The

number is freely definable and is transferred to function module

EXIT_SAPLEHS00AMBTAET_NEU_001.

The screen exit is called at the PBO or PAI time for subscreen

'2579' of function group SAPLEHS00AMBTAET_NEU.

Procedure

To create your own examination categories, proceed as follows:

1. In the Implementation Guide for Occupational Health, choose Specify

Examination Categories and add the key and description for the new

examination category. For the key, use your namespace '5_' to '9_'

(for example: '91' "Laboratory - Customer").

2. Create a transparent table in the customer namespace of the Data

Dictionary. This table must have the same key fields as the tables

T7EHS00_EXA_LAB, T7EHS00_EXA_PHY, T7EHS00_EXA_PUL, and

T7EHS00_EXA_AUD. The 'TEST_NO' key field is used to differentiate

between several medical tests in one examination (in laboratory

tests, for example), and can be ignored if your examination does not

need this sub-classification.

3. In addition to this tranparent table, you can create a structure in

which you use '.include "Tabname"' to include the fields and to

define any additional fields that you want to display on the

subscreen (for example, see EHS00S_EXA_LAB for the laboratory test).

4. Create the subscreen in the X function group XEHS00EXAMEXIT. To set

up your subscreen in Screen Painter, use the structure given above.

The function module EXIT_SAPLEHS00AMBTAET_NEU_001 then also

transfers the parameter EXAM_MODE. This parameter contains the value

'C' if the screen fields are meant to be changeable; if not, the

value is 'D'. In the PBO of your subscreen, use LOOP AT SCREEN and

the modification groups to set the input status of the input fields

accordingly.

5. In the flow logic of your subscreen, program the following:

- The SELECT for the data from the database (use the function

module EXIT_SAPLEHS00AMBTAET_NEU_001 to get the key for the

WHERE condition).

- Data processing by means of internal tables and work areas.

- If required, processing of the OK code that is supplied with

function module EXIT_SAPLEHS00AMBTAET_NEU_002 (for scrolling,

sorting or searching in the user-defined subscreen, or for

navigating in a user-defined detail screen).

- Navigation in a user-defined detail screen by double-clicking or

using radio buttons. For this, the OK code is transferred with

function module EXIT_SAPLEHS00AMBTAET_NEU_002 to the

user-defined program, so that the relevant internal tables and

work areas can be filled. The screen number for the detail

screen is also set. The detail screen is called by function

module EXIT_SAPLEHS00AMBTAET_NEU_004.

- Storage of the data in the database by means of a FORM routine

with the addition 'ON COMMIT'. This FORM routine is executed if

a 'COMMIT WORK' is called in the main program. If the data on

your subscreen has been changed, use the function module

EXIT_SAPLEHS00AMBTAET_NEU_003 to set the parameter UPDATE_FLAG =

'X'. If you set this indicator, a query about saving the data

appears on the screen when you exit from the program

If you answer 'No' to the query to save, this calls a 'ROLLBACK

WORK' in the main program. All change indicators are

initialized, and all changes in the internal tables and work

areas are cancelled. You can use the function module

EXIT_SAPLEHS00AMBTAET_NEU_005 to reset this data in a

user-defined program.

If you are adding an examination to the main program, the tests

belonging to this examination must be selected from the database

and appended to the corresponding internal tables when you call

the user-defined subscreen. As long as you do not save your

data, the new examination can still be deleted from the main

program. Function module EXIT_SAPLEHS00AMBTAET_NEU_006 can also

be used to delete the tests for the examination from the

internal tables.

You can use the function group SAPLEHS00_MEDTESTS as a template for the

steps described above. This function group contains the controls for the

examination types delivered with the standard system. It also uses the

same interfaces.

6. Activate your project.

Note:

For information on the procedure for using enhancements, call the

enhancement transaction CMOD and choose Utilities -> Online manual.

For more information, see BC - Basis -> ABAP Workbench -> BC - Changing

the SAP Standard, as well as the documentation on the individual

function modules for this customer exit.

Former Member
0 Kudos

Check out this related thread

http://www.sap-img.com/abap/what-is-user-exits.htm

Regards,

Santosh