SAP Function Modules

FREIGABE_GET_INITSTATUS SAP Function module







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

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


Pattern for FM FREIGABE_GET_INITSTATUS - FREIGABE GET INITSTATUS





CALL FUNCTION 'FREIGABE_GET_INITSTATUS' "
* EXPORTING
*   bukrs = SPACE               " t001-bukrs
*   fgobj = SPACE               " tzfo-sfgobj
*   amount = 0                  " bzusage
*   sparam1 = SPACE             " tzfsp-ssparam1
*   sparam2 = SPACE             " tzfsp-ssparam2
*   waers = SPACE               " tcurc-waers
  IMPORTING
    fgst =                      " tzfs-sfgst
  EXCEPTIONS
    ERROR_FOUND = 1             "
    FGOBJ_NOT_FOUND = 2         "
    .  "  FREIGABE_GET_INITSTATUS

ABAP code example for Function Module FREIGABE_GET_INITSTATUS





The ABAP code below is a full code listing to execute function module FREIGABE_GET_INITSTATUS 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_fgst  TYPE TZFS-SFGST .


SELECT single BUKRS
FROM T001
INTO @DATA(ld_bukrs).


SELECT single SFGOBJ
FROM TZFO
INTO @DATA(ld_fgobj).

DATA(ld_amount) = 'Check type of data required'.

SELECT single SSPARAM1
FROM TZFSP
INTO @DATA(ld_sparam1).


SELECT single SSPARAM2
FROM TZFSP
INTO @DATA(ld_sparam2).


SELECT single WAERS
FROM TCURC
INTO @DATA(ld_waers).
. CALL FUNCTION 'FREIGABE_GET_INITSTATUS' * EXPORTING * bukrs = ld_bukrs * fgobj = ld_fgobj * amount = ld_amount * sparam1 = ld_sparam1 * sparam2 = ld_sparam2 * waers = ld_waers IMPORTING fgst = ld_fgst EXCEPTIONS ERROR_FOUND = 1 FGOBJ_NOT_FOUND = 2 . " FREIGABE_GET_INITSTATUS
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_fgst  TYPE TZFS-SFGST ,
ld_bukrs  TYPE T001-BUKRS ,
ld_fgobj  TYPE TZFO-SFGOBJ ,
ld_amount  TYPE BZUSAGE ,
ld_sparam1  TYPE TZFSP-SSPARAM1 ,
ld_sparam2  TYPE TZFSP-SSPARAM2 ,
ld_waers  TYPE TCURC-WAERS .


SELECT single BUKRS
FROM T001
INTO ld_bukrs.


SELECT single SFGOBJ
FROM TZFO
INTO ld_fgobj.

ld_amount = 'Check type of data required'.

SELECT single SSPARAM1
FROM TZFSP
INTO ld_sparam1.


SELECT single SSPARAM2
FROM TZFSP
INTO ld_sparam2.


SELECT single WAERS
FROM TCURC
INTO ld_waers.

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