SAP Function Modules

CO2O_ACT_SET_DURATION SAP Function module







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

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


Pattern for FM CO2O_ACT_SET_DURATION - CO2O ACT SET DURATION





CALL FUNCTION 'CO2O_ACT_SET_DURATION' "
  EXPORTING
    i_arbpl_old =               " afvgd-arbpl
    i_dauno_old =               " afvgd-dauno
    i_daune_old =               " afvgd-daune
    i_ewdan_old =               " afvgd-ewdan
    i_ewdne_old =               " afvgd-ewdne
    i_daumi_old =               " afvgd-daumi   Minimum activity duration
    i_daume_old =               " afvgd-daume   Unit for the minimum duration
    i_ddehn_old =               " afvgd-ddehn   Indicator: flexible duration
    i_afvgd_new =               " afvgd
*   i_new_mode =                " c
*   i_edit_mode = 'X'           " c             Edit Mode
  IMPORTING
    e_afvgd =                   " afvgd
  EXCEPTIONS
    NOT_OK = 1                  "
    .  "  CO2O_ACT_SET_DURATION

ABAP code example for Function Module CO2O_ACT_SET_DURATION





The ABAP code below is a full code listing to execute function module CO2O_ACT_SET_DURATION 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_e_afvgd  TYPE AFVGD .


DATA(ld_i_arbpl_old) = some text here

DATA(ld_i_dauno_old) = Check type of data required

DATA(ld_i_daune_old) = Check type of data required

DATA(ld_i_ewdan_old) = Check type of data required

DATA(ld_i_ewdne_old) = Check type of data required

DATA(ld_i_daumi_old) = Check type of data required

DATA(ld_i_daume_old) = Check type of data required

DATA(ld_i_ddehn_old) = some text here
DATA(ld_i_afvgd_new) = 'Check type of data required'.
DATA(ld_i_new_mode) = 'Check type of data required'.
DATA(ld_i_edit_mode) = 'Check type of data required'. . CALL FUNCTION 'CO2O_ACT_SET_DURATION' EXPORTING i_arbpl_old = ld_i_arbpl_old i_dauno_old = ld_i_dauno_old i_daune_old = ld_i_daune_old i_ewdan_old = ld_i_ewdan_old i_ewdne_old = ld_i_ewdne_old i_daumi_old = ld_i_daumi_old i_daume_old = ld_i_daume_old i_ddehn_old = ld_i_ddehn_old i_afvgd_new = ld_i_afvgd_new * i_new_mode = ld_i_new_mode * i_edit_mode = ld_i_edit_mode IMPORTING e_afvgd = ld_e_afvgd EXCEPTIONS NOT_OK = 1 . " CO2O_ACT_SET_DURATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_e_afvgd  TYPE AFVGD ,
ld_i_arbpl_old  TYPE AFVGD-ARBPL ,
ld_i_dauno_old  TYPE AFVGD-DAUNO ,
ld_i_daune_old  TYPE AFVGD-DAUNE ,
ld_i_ewdan_old  TYPE AFVGD-EWDAN ,
ld_i_ewdne_old  TYPE AFVGD-EWDNE ,
ld_i_daumi_old  TYPE AFVGD-DAUMI ,
ld_i_daume_old  TYPE AFVGD-DAUME ,
ld_i_ddehn_old  TYPE AFVGD-DDEHN ,
ld_i_afvgd_new  TYPE AFVGD ,
ld_i_new_mode  TYPE C ,
ld_i_edit_mode  TYPE C .


ld_i_arbpl_old = some text here

ld_i_dauno_old = Check type of data required

ld_i_daune_old = Check type of data required

ld_i_ewdan_old = Check type of data required

ld_i_ewdne_old = Check type of data required

ld_i_daumi_old = Check type of data required

ld_i_daume_old = Check type of data required

ld_i_ddehn_old = some text here
ld_i_afvgd_new = 'Check type of data required'.
ld_i_new_mode = 'Check type of data required'.
ld_i_edit_mode = 'Check type of data required'.

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