SAP ABAP IMG Activity ISH_CASELIST_MVMTFLD (BAdI: Add Movement Level User Field to Case List)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       NPVS (Package) Application development patient management system
IMG Activity
ID ISH_CASELIST_MVMTFLD BAdI: Add Movement Level User Field to Case List  
Transaction Code S_KK4_96000659   (empty) 
Created on 20020918    
Customizing Attributes ISH_CASELIST_MVMTFLD   BAdI: Add Movement Level User Field to Case List 
Customizing Activity ISH_CASELIST_MVMTFLD   BAdI: Add Movement Level User Field to Case List 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name ISH_CASELIST_MVMTFLD    

Use

The Business Add-In IS-H: Add Movement Level User Field to Case List (ISH_CASELIST_MVMTFLD) lets you add your own field to each movement on the case list and add a title for your field in the case list heading.

The BAdI method GET_MVMT_FIELD adds your field to the case list. The system calls this BAdI for each movement displayed on the case list. The system also calls the BAdI method for each movement displayed on the case list when you refresh the case list.

The BAdI method GET_MVMT_FIELD_TITLE adds your title to the case list display heading. The system calls this BAdI method only the first time the case list is displayed. The system does not call the BAdI method again when you refresh the case list.

Note: The field you have added using the BAdI will only appear in the case list if you have added it to the case list layout.

For more information, refer to the interface documentation and the method documentation of the BAdI.

Method GET_MVMT_FIELD

Import Parameters

The import interface consists of the patient data, case data, and movement data:

  • P_PATIENT_DATA

    This table contains the patient's master data.

  • P_CASE_DATA

    This table contains the case data.

  • P_CURR_MVMT

    This table contains the data of the movement currently being processed as the case list is being created. To process this data, use a local variable of type NBEW.

  • P_MVMT_DATA table parameter

    This table contains the movement data for all movements of the case. To process the table data, use a local parameter of the table type ISH_YT_VNBEW or a local parameter of TYPE TABLE of VNBEW. If you need a work area, declare a local variable with structure type VNBEW. See the example for more information.

Exporting Parameters

  • P_USER_MVMT_FIELD

    Use this parameter to return the movement field that you want to display in the case list.

Further Notes

The movement field returned by this BAdI method (P_USER_CASE_FIELD) can be up to 30 characters in length.

BAdI Method Call

The BAdI method GET_MVMT_FIELD is called from the PAI module LIST_FALL (function group N00P).

Method GET_MVMT_FIELD_TITLE

Import Parameters

The import interface consists of the patient data, case data, and movement data.

  • P_PATIENT_DATA

    This table contains the patient's master data.

  • P_CASE_DATA

    This table contains the case data for all cases on the case list. To manipulate the table data, use a local parameter of the table type ISH_YT_NFAL or a local parameter of TYPE TABLE NFAL. If you need a work area, declare a local variable with structure type VNBEW. See the example for more information.

  • P_MVMT_DATA table parameter

    This table contains the movement data for all movements on the case list. To manipulate the table data, use a local parameter of the table type ISH_YT_VNBEW or a local parameter of TYPE TABLE VNBEW. If you need a work area, declare a local variable with structure type VNBEW. See the example for more information.

Exporting Parameters

  • P_USER_MVMT_FIELD_TITLE

    Use this parameter to return the movement field title that you want to display in the case list heading.

Further Notes

The movement field title returned by the BAdI method (GET_USER_MVMT_FIELD_TITLE) can be up to 30 characters in length.

BAdI Method Call

The BAdI method GET_MVMT_FIELD_TITLE is called from the form FILL_FIELDCAT_FAL (function group N00P).

Requirements

Standard settings

Activities

You have to implement the BAdI. To do this, proceed as follows:

  1. Perform the IMG activity BAdI: IS-H: Add Movement Level User Field to Case List.
  2. Create an implementation of the BAdI in the customer namespace.

    Note: This implementation does not yet have any program code for the method.

  3. The interface of your implementation contains the methods GET_MVMT_FIELD and GET_MVMT_FIELD_TITLE. Double-clicking on each method takes you into the code editor, where you can put your own code that satisfies your particular requirements.
  4. Once you have completed your modifications, you still have to activate the implementation so that these modifications can also be executed by the application programs.

    Note that only one implementation can be active at a time.

Example

METHOD IF_EX_ISH_CASELIST_MVMTFLD~GET_MVMT_FIELD .

* ...

*----------------------------------------------------------------------*

* Method to add a movement level user field to the case list.

* Available interface:

* P_PATIENT_DATA : patient master data

* P_CASE_DATA : case data for all cases displayed on the case list

* P_CURR_MVMT : movement data for the current movement

* P_MVMT_DATA : movement data for all movements displayed on the

* case list

* P_USER_MVMT_FIELD : user field (to be returned)

*----------------------------------------------------------------------*

* The coding below is only an example. Refer to the BAdI documentation

* for more information.

*----------------------------------------------------------------------*

* The sample code performs the following steps:

* 1) Assign data from parameters to local data objects.

* - use the data types shown to process the import parameter

* data.

* - you can process the data in the movement list by looping through

* the movements.

* - you can process the data in the case list by looping through

* the cases.

* - you can use the data from patient master data, the cases, and

* the movements.

*

* 2) Read the case to person assignments for the case.

*

* 3) Check if there is a social worker assigned to the case at the

* beginning of the current movement. If there is more than one,

* use the first one found. This example assumes social worker has

* been added as a category of the case-to-person assignment in IMG

* Define Functions of a Case-to-Person Assignment with external

* function 'S' and internal function '0' (other person).

*

* 4) Get social worker's name. If it cannot be found, use the person

* number.

*

*----------------------------------------------------------------------*

DATA: l_count_transfers(4) TYPE c,

l_find_nfpz TYPE ish_true_false,

l_find_ngpa TYPE ish_true_false,

s_patient TYPE npat,

s_case TYPE nfal,

s_movement TYPE vnbew,

s_nfpz TYPE nfpz,

s_ngpa TYPE ngpa,

s_nadr TYPE nadr,

t_movement TYPE TABLE OF vnbew,

t_nfpz TYPE TABLE OF nfpz.

CONSTANTS: true TYPE ish_true_false VALUE '1',

false TYPE ish_true_false VALUE '0'.

l_count_transfers = 0.

* local structures to process patient and case data

s_patient = p_patient_data.

s_case = p_case_data.

* local table to process movement data

t_movement = p_mvmt_data.

* process the movements

LOOP AT t_movement INTO s_movement.

IF s_movement-bewty = '3'.

l_count_transfers = l_count_transfers + 1.

ENDIF.

ENDLOOP.

* get the case-to-person assignments for this case

CALL FUNCTION 'ISH_READ_NFPZ'

EXPORTING

SS_EINRI = s_case-einri

SS_FALNR = s_case-falnr

TABLES

SS_NFPZ = t_nfpz.

* check if there is a social worker assigned to the case

* at the start of the current movement (if there is more

* than one, use the first one found)

l_find_nfpz = false.

LOOP AT t_nfpz INTO s_nfpz.

CHECK s_nfpz-einri = p_curr_mvmt-einri

AND s_nfpz-falnr = p_curr_mvmt-falnr

AND s_nfpz-farzt = '0'

AND s_nfpz-earzt&#x

Business Attributes
ASAP Roadmap ID    
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG ISH_CASELIST_MVMTFLD 0 I010004215 General Case Processing 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20020918 
SAP Release Created in 471