SAP Function Modules

ISH_PROCESS_MOVEMENTS SAP Function module







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

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


Pattern for FM ISH_PROCESS_MOVEMENTS - ISH PROCESS MOVEMENTS





CALL FUNCTION 'ISH_PROCESS_MOVEMENTS' "
  EXPORTING
    ausbegdt =                  " sy-datum      Evaluation Start
    ausenddt =                  " sy-datum      Evaluation End
*   calc_orgfa = 'X'            "
*   calc_orgpf = 'X'            "
*   cases_24h = SPACE           "               Include 24-hour Cases (ON/OFF)
*   complete_orgfa = SPACE      "
*   complete_orgpf = SPACE      "
*   complete_sections = SPACE   "
    einri =                     " tn01-einri    Institution
*   escorts = SPACE             "               Include Companions (ON/OFF)
*   fatyp = SPACE               " tnkfa-fatyp
    number_of_cases =           "               Number of Cases per Call
*   repl_int_sections = SPACE   "
*   stasp = 'X'                 " nfal-stasp    Include Statistical Block of Case (ON/OFF)
    verbegdt =                  " sy-datum      Start of Comparison
    verenddt =                  " sy-datum      End of Comparison
*   visits = SPACE              "               Include Outpatient Visits (ON/OFF)
*   all_moves = SPACE           "               Select all Movements (ON/OFF)
*   inp_without_adm = SPACE     "               -> F2
*   lastv = SPACE               "               Only Include Last Inpat. Movement of Day
*   foreigner = 'N'             "               Include Foreign Cases -> F2
*   address = SPACE             "
*   multiple_sick_newborns = 'X'  "
*   united_return_cases = ' '   "
*   i_ignore_eo = SPACE         " ish_on_off
*   i_plan_end = SPACE          "
*   i_surgery_moves = SPACE     " ish_on_off
  TABLES
    falar =                     " rnsfalar      Relevant Case Types
    gschl =                     " rnsgschl      Relevant Sexes
    moves =                     " rnsbew
    orgfa =                     " rnsorgid
    orgpf =                     " rnsorgid
    patients =                  " rnspat
*   napx_fal =                  " napx_fal
  EXCEPTIONS
    BEGDT_GT_ENDDT = 1          "               Start Later than End
    INVALID_EINRI = 2           "               Wrong Institution
    INVALID_FATYP = 3           "
    INVALID_PERIOD = 4          "
    NO_FALNR_LEFT = 5           "               No More Case Numbers to Select
    .  "  ISH_PROCESS_MOVEMENTS

ABAP code example for Function Module ISH_PROCESS_MOVEMENTS





The ABAP code below is a full code listing to execute function module ISH_PROCESS_MOVEMENTS 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_falar  TYPE STANDARD TABLE OF RNSFALAR,"TABLES PARAM
wa_falar  LIKE LINE OF it_falar ,
it_gschl  TYPE STANDARD TABLE OF RNSGSCHL,"TABLES PARAM
wa_gschl  LIKE LINE OF it_gschl ,
it_moves  TYPE STANDARD TABLE OF RNSBEW,"TABLES PARAM
wa_moves  LIKE LINE OF it_moves ,
it_orgfa  TYPE STANDARD TABLE OF RNSORGID,"TABLES PARAM
wa_orgfa  LIKE LINE OF it_orgfa ,
it_orgpf  TYPE STANDARD TABLE OF RNSORGID,"TABLES PARAM
wa_orgpf  LIKE LINE OF it_orgpf ,
it_patients  TYPE STANDARD TABLE OF RNSPAT,"TABLES PARAM
wa_patients  LIKE LINE OF it_patients ,
it_napx_fal  TYPE STANDARD TABLE OF NAPX_FAL,"TABLES PARAM
wa_napx_fal  LIKE LINE OF it_napx_fal .

DATA(ld_ausbegdt) = '20210129'.
DATA(ld_ausenddt) = '20210129'.
DATA(ld_calc_orgfa) = 'some text here'.
DATA(ld_calc_orgpf) = 'some text here'.
DATA(ld_cases_24h) = 'some text here'.
DATA(ld_complete_orgfa) = 'some text here'.
DATA(ld_complete_orgpf) = 'some text here'.
DATA(ld_complete_sections) = 'some text here'.

SELECT single EINRI
FROM TN01
INTO @DATA(ld_einri).

DATA(ld_escorts) = 'some text here'.

SELECT single FATYP
FROM TNKFA
INTO @DATA(ld_fatyp).

DATA(ld_number_of_cases) = 'some text here'.
DATA(ld_repl_int_sections) = 'some text here'.

SELECT single STASP
FROM NFAL
INTO @DATA(ld_stasp).

DATA(ld_verbegdt) = '20210129'.
DATA(ld_verenddt) = '20210129'.
DATA(ld_visits) = 'some text here'.
DATA(ld_all_moves) = 'some text here'.
DATA(ld_inp_without_adm) = 'some text here'.
DATA(ld_lastv) = 'some text here'.
DATA(ld_foreigner) = 'some text here'.
DATA(ld_address) = 'some text here'.
DATA(ld_multiple_sick_newborns) = 'some text here'.
DATA(ld_united_return_cases) = 'some text here'.
DATA(ld_i_ignore_eo) = '20210129'.
DATA(ld_i_plan_end) = 'some text here'.
DATA(ld_i_surgery_moves) = '20210129'.

"populate fields of struture and append to itab
append wa_falar to it_falar.

"populate fields of struture and append to itab
append wa_gschl to it_gschl.

"populate fields of struture and append to itab
append wa_moves to it_moves.

"populate fields of struture and append to itab
append wa_orgfa to it_orgfa.

"populate fields of struture and append to itab
append wa_orgpf to it_orgpf.

"populate fields of struture and append to itab
append wa_patients to it_patients.

"populate fields of struture and append to itab
append wa_napx_fal to it_napx_fal. . CALL FUNCTION 'ISH_PROCESS_MOVEMENTS' EXPORTING ausbegdt = ld_ausbegdt ausenddt = ld_ausenddt * calc_orgfa = ld_calc_orgfa * calc_orgpf = ld_calc_orgpf * cases_24h = ld_cases_24h * complete_orgfa = ld_complete_orgfa * complete_orgpf = ld_complete_orgpf * complete_sections = ld_complete_sections einri = ld_einri * escorts = ld_escorts * fatyp = ld_fatyp number_of_cases = ld_number_of_cases * repl_int_sections = ld_repl_int_sections * stasp = ld_stasp verbegdt = ld_verbegdt verenddt = ld_verenddt * visits = ld_visits * all_moves = ld_all_moves * inp_without_adm = ld_inp_without_adm * lastv = ld_lastv * foreigner = ld_foreigner * address = ld_address * multiple_sick_newborns = ld_multiple_sick_newborns * united_return_cases = ld_united_return_cases * i_ignore_eo = ld_i_ignore_eo * i_plan_end = ld_i_plan_end * i_surgery_moves = ld_i_surgery_moves TABLES falar = it_falar gschl = it_gschl moves = it_moves orgfa = it_orgfa orgpf = it_orgpf patients = it_patients * napx_fal = it_napx_fal EXCEPTIONS BEGDT_GT_ENDDT = 1 INVALID_EINRI = 2 INVALID_FATYP = 3 INVALID_PERIOD = 4 NO_FALNR_LEFT = 5 . " ISH_PROCESS_MOVEMENTS
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "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:
it_falar  TYPE STANDARD TABLE OF RNSFALAR ,
wa_falar  LIKE LINE OF it_falar,
ld_ausbegdt  TYPE SY-DATUM ,
ld_ausenddt  TYPE SY-DATUM ,
it_gschl  TYPE STANDARD TABLE OF RNSGSCHL ,
wa_gschl  LIKE LINE OF it_gschl,
ld_calc_orgfa  TYPE STRING ,
it_moves  TYPE STANDARD TABLE OF RNSBEW ,
wa_moves  LIKE LINE OF it_moves,
ld_calc_orgpf  TYPE STRING ,
it_orgfa  TYPE STANDARD TABLE OF RNSORGID ,
wa_orgfa  LIKE LINE OF it_orgfa,
ld_cases_24h  TYPE STRING ,
it_orgpf  TYPE STANDARD TABLE OF RNSORGID ,
wa_orgpf  LIKE LINE OF it_orgpf,
ld_complete_orgfa  TYPE STRING ,
it_patients  TYPE STANDARD TABLE OF RNSPAT ,
wa_patients  LIKE LINE OF it_patients,
ld_complete_orgpf  TYPE STRING ,
it_napx_fal  TYPE STANDARD TABLE OF NAPX_FAL ,
wa_napx_fal  LIKE LINE OF it_napx_fal,
ld_complete_sections  TYPE STRING ,
ld_einri  TYPE TN01-EINRI ,
ld_escorts  TYPE STRING ,
ld_fatyp  TYPE TNKFA-FATYP ,
ld_number_of_cases  TYPE STRING ,
ld_repl_int_sections  TYPE STRING ,
ld_stasp  TYPE NFAL-STASP ,
ld_verbegdt  TYPE SY-DATUM ,
ld_verenddt  TYPE SY-DATUM ,
ld_visits  TYPE STRING ,
ld_all_moves  TYPE STRING ,
ld_inp_without_adm  TYPE STRING ,
ld_lastv  TYPE STRING ,
ld_foreigner  TYPE STRING ,
ld_address  TYPE STRING ,
ld_multiple_sick_newborns  TYPE STRING ,
ld_united_return_cases  TYPE STRING ,
ld_i_ignore_eo  TYPE ISH_ON_OFF ,
ld_i_plan_end  TYPE STRING ,
ld_i_surgery_moves  TYPE ISH_ON_OFF .


"populate fields of struture and append to itab
append wa_falar to it_falar.
ld_ausbegdt = '20210129'.
ld_ausenddt = '20210129'.

"populate fields of struture and append to itab
append wa_gschl to it_gschl.
ld_calc_orgfa = 'some text here'.

"populate fields of struture and append to itab
append wa_moves to it_moves.
ld_calc_orgpf = 'some text here'.

"populate fields of struture and append to itab
append wa_orgfa to it_orgfa.
ld_cases_24h = 'some text here'.

"populate fields of struture and append to itab
append wa_orgpf to it_orgpf.
ld_complete_orgfa = 'some text here'.

"populate fields of struture and append to itab
append wa_patients to it_patients.
ld_complete_orgpf = 'some text here'.

"populate fields of struture and append to itab
append wa_napx_fal to it_napx_fal.
ld_complete_sections = 'some text here'.

SELECT single EINRI
FROM TN01
INTO ld_einri.

ld_escorts = 'some text here'.

SELECT single FATYP
FROM TNKFA
INTO ld_fatyp.

ld_number_of_cases = 'some text here'.
ld_repl_int_sections = 'some text here'.

SELECT single STASP
FROM NFAL
INTO ld_stasp.

ld_verbegdt = '20210129'.
ld_verenddt = '20210129'.
ld_visits = 'some text here'.
ld_all_moves = 'some text here'.
ld_inp_without_adm = 'some text here'.
ld_lastv = 'some text here'.
ld_foreigner = 'some text here'.
ld_address = 'some text here'.
ld_multiple_sick_newborns = 'some text here'.
ld_united_return_cases = 'some text here'.
ld_i_ignore_eo = '20210129'.
ld_i_plan_end = 'some text here'.
ld_i_surgery_moves = '20210129'.

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