SAP Function Modules

RH_PM_GET_TOTAL_VIA_T7PMG SAP Function module







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

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


Pattern for FM RH_PM_GET_TOTAL_VIA_T7PMG - RH PM GET TOTAL VIA T7PMG





CALL FUNCTION 'RH_PM_GET_TOTAL_VIA_T7PMG' "
  EXPORTING
    molga =                     " p1501-molga
    trfar =                     " p1501-trfar
    trfgb =                     " p1501-trfgb
    trfkz =                     " p1501-trfkz
    trfgr =                     " p1501-trfgr
    begda =                     " p1000-begda
    endda =                     " p1000-endda
*   ausart =                    " t7pm6-ausart
*   use_factor =                " flag
  IMPORTING
    total =                     " p1520-total
    curcy =                     " p1520-curcy
  EXCEPTIONS
    NO_ENTRY_IN_T7PMG = 1       "
    .  "  RH_PM_GET_TOTAL_VIA_T7PMG

ABAP code example for Function Module RH_PM_GET_TOTAL_VIA_T7PMG





The ABAP code below is a full code listing to execute function module RH_PM_GET_TOTAL_VIA_T7PMG 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_total  TYPE P1520-TOTAL ,
ld_curcy  TYPE P1520-CURCY .


DATA(ld_molga) = some text here

DATA(ld_trfar) = some text here

DATA(ld_trfgb) = some text here

DATA(ld_trfkz) = some text here

DATA(ld_trfgr) = some text here

DATA(ld_begda) = 20210129

DATA(ld_endda) = 20210129

SELECT single AUSART
FROM T7PM6
INTO @DATA(ld_ausart).

DATA(ld_use_factor) = 'Check type of data required'. . CALL FUNCTION 'RH_PM_GET_TOTAL_VIA_T7PMG' EXPORTING molga = ld_molga trfar = ld_trfar trfgb = ld_trfgb trfkz = ld_trfkz trfgr = ld_trfgr begda = ld_begda endda = ld_endda * ausart = ld_ausart * use_factor = ld_use_factor IMPORTING total = ld_total curcy = ld_curcy EXCEPTIONS NO_ENTRY_IN_T7PMG = 1 . " RH_PM_GET_TOTAL_VIA_T7PMG
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_total  TYPE P1520-TOTAL ,
ld_molga  TYPE P1501-MOLGA ,
ld_curcy  TYPE P1520-CURCY ,
ld_trfar  TYPE P1501-TRFAR ,
ld_trfgb  TYPE P1501-TRFGB ,
ld_trfkz  TYPE P1501-TRFKZ ,
ld_trfgr  TYPE P1501-TRFGR ,
ld_begda  TYPE P1000-BEGDA ,
ld_endda  TYPE P1000-ENDDA ,
ld_ausart  TYPE T7PM6-AUSART ,
ld_use_factor  TYPE FLAG .


ld_molga = some text here

ld_trfar = some text here

ld_trfgb = some text here

ld_trfkz = some text here

ld_trfgr = some text here

ld_begda = 20210129

ld_endda = 20210129

SELECT single AUSART
FROM T7PM6
INTO ld_ausart.

ld_use_factor = '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 RH_PM_GET_TOTAL_VIA_T7PMG or its description.