SAP Function Modules

ADFSH_REVISION_CREATE SAP Function module - test module for creating revision







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

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


Pattern for FM ADFSH_REVISION_CREATE - ADFSH REVISION CREATE





CALL FUNCTION 'ADFSH_REVISION_CREATE' "test module for creating revision
  EXPORTING
    i_floc =                    " adfsh_actplnr  Flight Scheduling: Actual Aircraft Registration
    i_frdate =                  " sy-datum      Date and time, current (application server) date
    i_todate =                  " sy-datum      Date and time, current (application server) date
    i_frtime =                  " sy-uzeit      Dat and time, current application server time
    i_totime =                  " sy-uzeit      Dat and time, current application server time
    i_fltnr =                   " adfsh_fltnum  Flight Scheduling: Flight Number
    i_airln =                   " adfsh_aircode  Flight Scheduling: Airline Code
    i_secnr =                   " adfsh_secnr   Flight Scheduling: Sector Number
    i_acdate =                  " adfsh_acdate  Flight Scheduling: Actual Date of Flight
  IMPORTING
    e_revnr =                   " revni         Revision for Plant Maintenance and Customer Service
  EXCEPTIONS
    INVALID_PLANT = 1           "               Invalid Plant
    ERROR = 2                   "               Program Error
    .  "  ADFSH_REVISION_CREATE

ABAP code example for Function Module ADFSH_REVISION_CREATE





The ABAP code below is a full code listing to execute function module ADFSH_REVISION_CREATE 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_revnr  TYPE REVNI .

DATA(ld_i_floc) = 'Check type of data required'.
DATA(ld_i_frdate) = '20210129'.
DATA(ld_i_todate) = '20210129'.
DATA(ld_i_frtime) = 'Check type of data required'.
DATA(ld_i_totime) = 'Check type of data required'.
DATA(ld_i_fltnr) = 'Check type of data required'.
DATA(ld_i_airln) = 'Check type of data required'.
DATA(ld_i_secnr) = 'Check type of data required'.
DATA(ld_i_acdate) = 'Check type of data required'. . CALL FUNCTION 'ADFSH_REVISION_CREATE' EXPORTING i_floc = ld_i_floc i_frdate = ld_i_frdate i_todate = ld_i_todate i_frtime = ld_i_frtime i_totime = ld_i_totime i_fltnr = ld_i_fltnr i_airln = ld_i_airln i_secnr = ld_i_secnr i_acdate = ld_i_acdate IMPORTING e_revnr = ld_e_revnr EXCEPTIONS INVALID_PLANT = 1 ERROR = 2 . " ADFSH_REVISION_CREATE
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 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_revnr  TYPE REVNI ,
ld_i_floc  TYPE ADFSH_ACTPLNR ,
ld_i_frdate  TYPE SY-DATUM ,
ld_i_todate  TYPE SY-DATUM ,
ld_i_frtime  TYPE SY-UZEIT ,
ld_i_totime  TYPE SY-UZEIT ,
ld_i_fltnr  TYPE ADFSH_FLTNUM ,
ld_i_airln  TYPE ADFSH_AIRCODE ,
ld_i_secnr  TYPE ADFSH_SECNR ,
ld_i_acdate  TYPE ADFSH_ACDATE .

ld_i_floc = 'Check type of data required'.
ld_i_frdate = '20210129'.
ld_i_todate = '20210129'.
ld_i_frtime = 'Check type of data required'.
ld_i_totime = 'Check type of data required'.
ld_i_fltnr = 'Check type of data required'.
ld_i_airln = 'Check type of data required'.
ld_i_secnr = 'Check type of data required'.
ld_i_acdate = '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 ADFSH_REVISION_CREATE or its description.