SAP Function Modules

OIJ_LT_ACT_H SAP Function module - Calculate actual laytime - header







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

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


Pattern for FM OIJ_LT_ACT_H - OIJ LT ACT H





CALL FUNCTION 'OIJ_LT_ACT_H' "Calculate actual laytime - header
  EXPORTING
    it_roijnomiio =             " roijnomiio_t  Nomination Item Communication
    is_roijnomhio =             " roijnomhio    TSW Nomination Header Communication Structure
    it_roijne =                 " oijne_t       TSW Nomination Events
  IMPORTING
    et_lt_peg =                 " oijltcalc12_t  Laytime - Pegged items
    et_roijltlist =             " roijltlist_t  Table of laytime, demurrage information
    et_return =                 " bapiret2_t    Return parameter table
  EXCEPTIONS
    CONV_TO_TIMESTAMP_FAILED = 1  "             Could not convert to timestamp
    WRONG_EVENT_INPUT = 2       "               Laytime end event occurred before start event
    NO_NOMITEM_INPUT = 3        "               Nomination item
    NO_LT_EVT_INPUT = 4         "               Laytime events not provided as input
    NO_WINDOW_PERIOD_EVENT = 5  "               Freight contract input - no value fpr WP_EVENT
    NO_ACTUALEV_FOR_ITEM = 6    "               Actual events for nom item not recorded
    NO_WINDOW_PERIOD = 7        "               Schedule arrival date range for nomination is blank
    WP_EVENT_NOT_OCCUR = 8      "               WP event did not occur
    NO_FRT_CONTRACT_AT_HDR = 9  "
    .  "  OIJ_LT_ACT_H

ABAP code example for Function Module OIJ_LT_ACT_H





The ABAP code below is a full code listing to execute function module OIJ_LT_ACT_H 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:
ld_et_lt_peg  TYPE OIJLTCALC12_T ,
ld_et_roijltlist  TYPE ROIJLTLIST_T ,
ld_et_return  TYPE BAPIRET2_T .

DATA(ld_it_roijnomiio) = 'Check type of data required'.
DATA(ld_is_roijnomhio) = 'Check type of data required'.
DATA(ld_it_roijne) = 'Check type of data required'. . CALL FUNCTION 'OIJ_LT_ACT_H' EXPORTING it_roijnomiio = ld_it_roijnomiio is_roijnomhio = ld_is_roijnomhio it_roijne = ld_it_roijne IMPORTING et_lt_peg = ld_et_lt_peg et_roijltlist = ld_et_roijltlist et_return = ld_et_return EXCEPTIONS CONV_TO_TIMESTAMP_FAILED = 1 WRONG_EVENT_INPUT = 2 NO_NOMITEM_INPUT = 3 NO_LT_EVT_INPUT = 4 NO_WINDOW_PERIOD_EVENT = 5 NO_ACTUALEV_FOR_ITEM = 6 NO_WINDOW_PERIOD = 7 WP_EVENT_NOT_OCCUR = 8 NO_FRT_CONTRACT_AT_HDR = 9 . " OIJ_LT_ACT_H
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 ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "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_et_lt_peg  TYPE OIJLTCALC12_T ,
ld_it_roijnomiio  TYPE ROIJNOMIIO_T ,
ld_et_roijltlist  TYPE ROIJLTLIST_T ,
ld_is_roijnomhio  TYPE ROIJNOMHIO ,
ld_et_return  TYPE BAPIRET2_T ,
ld_it_roijne  TYPE OIJNE_T .

ld_it_roijnomiio = 'Check type of data required'.
ld_is_roijnomhio = 'Check type of data required'.
ld_it_roijne = 'Check type of data required'.

SAP Documentation for FM OIJ_LT_ACT_H


Calculate actual laytime as per freight contract for the vehicle associated with nomination header . ...See here for full SAP fm documentation

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