SAP Function Modules

RM_ALM_ABAP_MEMORY_WRITE SAP Function module - Writes data of each export to ABAP memory







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

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


Pattern for FM RM_ALM_ABAP_MEMORY_WRITE - RM ALM ABAP MEMORY WRITE





CALL FUNCTION 'RM_ALM_ABAP_MEMORY_WRITE' "Writes data of each export to ABAP memory
* EXPORTING
*   gla_rplanv =                " jbaplanv-rplanv
*   gla_sichtid =               " jbaplanv-sichtid
*   gla_phid =                  " jbaplanv-phid
*   gla_name =                  " seucomm-name
*   gla_db_write =              " c
* TABLES
*   g_it_knotplpar =            " jbaplanpar
*   g_it_knotchar =             " jbaphkmerk
*   g_it_knotparlzb =           " jbaplanparlzb
*   g_it_knotparlzb2 =          " jbaplanparlzb2
    .  "  RM_ALM_ABAP_MEMORY_WRITE

ABAP code example for Function Module RM_ALM_ABAP_MEMORY_WRITE





The ABAP code below is a full code listing to execute function module RM_ALM_ABAP_MEMORY_WRITE 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_g_it_knotplpar  TYPE STANDARD TABLE OF JBAPLANPAR,"TABLES PARAM
wa_g_it_knotplpar  LIKE LINE OF it_g_it_knotplpar ,
it_g_it_knotchar  TYPE STANDARD TABLE OF JBAPHKMERK,"TABLES PARAM
wa_g_it_knotchar  LIKE LINE OF it_g_it_knotchar ,
it_g_it_knotparlzb  TYPE STANDARD TABLE OF JBAPLANPARLZB,"TABLES PARAM
wa_g_it_knotparlzb  LIKE LINE OF it_g_it_knotparlzb ,
it_g_it_knotparlzb2  TYPE STANDARD TABLE OF JBAPLANPARLZB2,"TABLES PARAM
wa_g_it_knotparlzb2  LIKE LINE OF it_g_it_knotparlzb2 .


SELECT single RPLANV
FROM JBAPLANV
INTO @DATA(ld_gla_rplanv).


SELECT single SICHTID
FROM JBAPLANV
INTO @DATA(ld_gla_sichtid).


SELECT single PHID
FROM JBAPLANV
INTO @DATA(ld_gla_phid).


DATA(ld_gla_name) = some text here
DATA(ld_gla_db_write) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_g_it_knotplpar to it_g_it_knotplpar.

"populate fields of struture and append to itab
append wa_g_it_knotchar to it_g_it_knotchar.

"populate fields of struture and append to itab
append wa_g_it_knotparlzb to it_g_it_knotparlzb.

"populate fields of struture and append to itab
append wa_g_it_knotparlzb2 to it_g_it_knotparlzb2. . CALL FUNCTION 'RM_ALM_ABAP_MEMORY_WRITE' * EXPORTING * gla_rplanv = ld_gla_rplanv * gla_sichtid = ld_gla_sichtid * gla_phid = ld_gla_phid * gla_name = ld_gla_name * gla_db_write = ld_gla_db_write * TABLES * g_it_knotplpar = it_g_it_knotplpar * g_it_knotchar = it_g_it_knotchar * g_it_knotparlzb = it_g_it_knotparlzb * g_it_knotparlzb2 = it_g_it_knotparlzb2 . " RM_ALM_ABAP_MEMORY_WRITE
IF SY-SUBRC EQ 0. "All OK 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_gla_rplanv  TYPE JBAPLANV-RPLANV ,
it_g_it_knotplpar  TYPE STANDARD TABLE OF JBAPLANPAR ,
wa_g_it_knotplpar  LIKE LINE OF it_g_it_knotplpar,
ld_gla_sichtid  TYPE JBAPLANV-SICHTID ,
it_g_it_knotchar  TYPE STANDARD TABLE OF JBAPHKMERK ,
wa_g_it_knotchar  LIKE LINE OF it_g_it_knotchar,
ld_gla_phid  TYPE JBAPLANV-PHID ,
it_g_it_knotparlzb  TYPE STANDARD TABLE OF JBAPLANPARLZB ,
wa_g_it_knotparlzb  LIKE LINE OF it_g_it_knotparlzb,
ld_gla_name  TYPE SEUCOMM-NAME ,
it_g_it_knotparlzb2  TYPE STANDARD TABLE OF JBAPLANPARLZB2 ,
wa_g_it_knotparlzb2  LIKE LINE OF it_g_it_knotparlzb2,
ld_gla_db_write  TYPE C .


SELECT single RPLANV
FROM JBAPLANV
INTO ld_gla_rplanv.


"populate fields of struture and append to itab
append wa_g_it_knotplpar to it_g_it_knotplpar.

SELECT single SICHTID
FROM JBAPLANV
INTO ld_gla_sichtid.


"populate fields of struture and append to itab
append wa_g_it_knotchar to it_g_it_knotchar.

SELECT single PHID
FROM JBAPLANV
INTO ld_gla_phid.


"populate fields of struture and append to itab
append wa_g_it_knotparlzb to it_g_it_knotparlzb.

ld_gla_name = some text here

"populate fields of struture and append to itab
append wa_g_it_knotparlzb2 to it_g_it_knotparlzb2.
ld_gla_db_write = '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 RM_ALM_ABAP_MEMORY_WRITE or its description.