SAP Function Modules

RH_BUILD_BEFORE_IMAGE SAP Function module







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

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


Pattern for FM RH_BUILD_BEFORE_IMAGE - RH BUILD BEFORE IMAGE





CALL FUNCTION 'RH_BUILD_BEFORE_IMAGE' "
* EXPORTING
*   plvar =                     " hripkey-plvar  Plan Version
*   otype =                     " hripkey-otype  Object Type
*   objid =                     " hripkey-objid  Object ID
*   infty =                     " hripkey-infty  Info. Category
*   subty =                     " hripkey-subty  Subtype
*   istat =                     " hripkey-istat  Planning Status
*   begda = '19000101'          " hripkey-begda  Start Date
*   endda = '99991231'          " hripkey-endda  End Date
*   set_rhap_before_image = SPACE  " flag
* TABLES
*   image_keys =                " hripkey
*   before_image_tab =          " bef_image     Before-Image for Creating Events when Updating Database
  EXCEPTIONS
    INVALID_INPUT = 1           "
    .  "  RH_BUILD_BEFORE_IMAGE

ABAP code example for Function Module RH_BUILD_BEFORE_IMAGE





The ABAP code below is a full code listing to execute function module RH_BUILD_BEFORE_IMAGE 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:
it_image_keys  TYPE STANDARD TABLE OF HRIPKEY,"TABLES PARAM
wa_image_keys  LIKE LINE OF it_image_keys ,
it_before_image_tab  TYPE STANDARD TABLE OF BEF_IMAGE,"TABLES PARAM
wa_before_image_tab  LIKE LINE OF it_before_image_tab .


DATA(ld_plvar) = some text here

DATA(ld_otype) = some text here

DATA(ld_objid) = Check type of data required

DATA(ld_infty) = some text here

DATA(ld_subty) = some text here

DATA(ld_istat) = some text here

DATA(ld_begda) = 20210129

DATA(ld_endda) = 20210129
DATA(ld_set_rhap_before_image) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_image_keys to it_image_keys.

"populate fields of struture and append to itab
append wa_before_image_tab to it_before_image_tab. . CALL FUNCTION 'RH_BUILD_BEFORE_IMAGE' * EXPORTING * plvar = ld_plvar * otype = ld_otype * objid = ld_objid * infty = ld_infty * subty = ld_subty * istat = ld_istat * begda = ld_begda * endda = ld_endda * set_rhap_before_image = ld_set_rhap_before_image * TABLES * image_keys = it_image_keys * before_image_tab = it_before_image_tab EXCEPTIONS INVALID_INPUT = 1 . " RH_BUILD_BEFORE_IMAGE
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_plvar  TYPE HRIPKEY-PLVAR ,
it_image_keys  TYPE STANDARD TABLE OF HRIPKEY ,
wa_image_keys  LIKE LINE OF it_image_keys,
ld_otype  TYPE HRIPKEY-OTYPE ,
it_before_image_tab  TYPE STANDARD TABLE OF BEF_IMAGE ,
wa_before_image_tab  LIKE LINE OF it_before_image_tab,
ld_objid  TYPE HRIPKEY-OBJID ,
ld_infty  TYPE HRIPKEY-INFTY ,
ld_subty  TYPE HRIPKEY-SUBTY ,
ld_istat  TYPE HRIPKEY-ISTAT ,
ld_begda  TYPE HRIPKEY-BEGDA ,
ld_endda  TYPE HRIPKEY-ENDDA ,
ld_set_rhap_before_image  TYPE FLAG .


ld_plvar = some text here

"populate fields of struture and append to itab
append wa_image_keys to it_image_keys.

ld_otype = some text here

"populate fields of struture and append to itab
append wa_before_image_tab to it_before_image_tab.

ld_objid = Check type of data required

ld_infty = some text here

ld_subty = some text here

ld_istat = some text here

ld_begda = 20210129

ld_endda = 20210129
ld_set_rhap_before_image = '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_BUILD_BEFORE_IMAGE or its description.