SAP Function Modules

RV_MESSAGE_SELECT SAP Function module







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

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


Pattern for FM RV_MESSAGE_SELECT - RV MESSAGE SELECT





CALL FUNCTION 'RV_MESSAGE_SELECT' "
* EXPORTING
*   msg_erdat = '00000000'      " nast-erdat    Date of creation
*   msg_eruhr = '000000'        " nast-eruhr    Creation time
*   msg_kappl = '   '           " nast-kappl    Output application
*   msg_parnr = ' '             " nast-parnr    Message Partner
*   msg_vsdat = '00000000'      " nast-vsdat    Shipping date
*   msg_vstat = ' '             " nast-vstat    Processing Status
*   msg_vsura = '000000'        " nast-vsura    Shipping Time
*   msg_vsztp = ' '             " nast-vsztp    Time of shipping
*   msg_sort1 =                 " nast-sort1
*   msg_sort2 =                 " nast-sort2
*   msg_sort3 =                 " nast-sort3
  TABLES
    msg_xnast =                 " nast          G/L account number
    msg_ynast =                 " nast          G/L account number
    s_kschl =                   "               Message Type
    s_nacha =                   "               Transm.Medium
    s_objky =                   "               Object Key
*   s_kappl =                   "               Application
    .  "  RV_MESSAGE_SELECT

ABAP code example for Function Module RV_MESSAGE_SELECT





The ABAP code below is a full code listing to execute function module RV_MESSAGE_SELECT 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_msg_xnast  TYPE STANDARD TABLE OF NAST,"TABLES PARAM
wa_msg_xnast  LIKE LINE OF it_msg_xnast ,
it_msg_ynast  TYPE STANDARD TABLE OF NAST,"TABLES PARAM
wa_msg_ynast  LIKE LINE OF it_msg_ynast ,
it_s_kschl  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_s_kschl  LIKE LINE OF it_s_kschl ,
it_s_nacha  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_s_nacha  LIKE LINE OF it_s_nacha ,
it_s_objky  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_s_objky  LIKE LINE OF it_s_objky ,
it_s_kappl  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_s_kappl  LIKE LINE OF it_s_kappl .


SELECT single ERDAT
FROM NAST
INTO @DATA(ld_msg_erdat).


SELECT single ERUHR
FROM NAST
INTO @DATA(ld_msg_eruhr).


SELECT single KAPPL
FROM NAST
INTO @DATA(ld_msg_kappl).


SELECT single PARNR
FROM NAST
INTO @DATA(ld_msg_parnr).


SELECT single VSDAT
FROM NAST
INTO @DATA(ld_msg_vsdat).


SELECT single VSTAT
FROM NAST
INTO @DATA(ld_msg_vstat).


SELECT single VSURA
FROM NAST
INTO @DATA(ld_msg_vsura).


SELECT single VSZTP
FROM NAST
INTO @DATA(ld_msg_vsztp).


SELECT single SORT1
FROM NAST
INTO @DATA(ld_msg_sort1).


SELECT single SORT2
FROM NAST
INTO @DATA(ld_msg_sort2).


SELECT single SORT3
FROM NAST
INTO @DATA(ld_msg_sort3).


"populate fields of struture and append to itab
append wa_msg_xnast to it_msg_xnast.

"populate fields of struture and append to itab
append wa_msg_ynast to it_msg_ynast.

"populate fields of struture and append to itab
append wa_s_kschl to it_s_kschl.

"populate fields of struture and append to itab
append wa_s_nacha to it_s_nacha.

"populate fields of struture and append to itab
append wa_s_objky to it_s_objky.

"populate fields of struture and append to itab
append wa_s_kappl to it_s_kappl. . CALL FUNCTION 'RV_MESSAGE_SELECT' * EXPORTING * msg_erdat = ld_msg_erdat * msg_eruhr = ld_msg_eruhr * msg_kappl = ld_msg_kappl * msg_parnr = ld_msg_parnr * msg_vsdat = ld_msg_vsdat * msg_vstat = ld_msg_vstat * msg_vsura = ld_msg_vsura * msg_vsztp = ld_msg_vsztp * msg_sort1 = ld_msg_sort1 * msg_sort2 = ld_msg_sort2 * msg_sort3 = ld_msg_sort3 TABLES msg_xnast = it_msg_xnast msg_ynast = it_msg_ynast s_kschl = it_s_kschl s_nacha = it_s_nacha s_objky = it_s_objky * s_kappl = it_s_kappl . " RV_MESSAGE_SELECT
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_msg_erdat  TYPE NAST-ERDAT ,
it_msg_xnast  TYPE STANDARD TABLE OF NAST ,
wa_msg_xnast  LIKE LINE OF it_msg_xnast,
ld_msg_eruhr  TYPE NAST-ERUHR ,
it_msg_ynast  TYPE STANDARD TABLE OF NAST ,
wa_msg_ynast  LIKE LINE OF it_msg_ynast,
ld_msg_kappl  TYPE NAST-KAPPL ,
it_s_kschl  TYPE STANDARD TABLE OF STRING ,
wa_s_kschl  LIKE LINE OF it_s_kschl,
ld_msg_parnr  TYPE NAST-PARNR ,
it_s_nacha  TYPE STANDARD TABLE OF STRING ,
wa_s_nacha  LIKE LINE OF it_s_nacha,
ld_msg_vsdat  TYPE NAST-VSDAT ,
it_s_objky  TYPE STANDARD TABLE OF STRING ,
wa_s_objky  LIKE LINE OF it_s_objky,
ld_msg_vstat  TYPE NAST-VSTAT ,
it_s_kappl  TYPE STANDARD TABLE OF STRING ,
wa_s_kappl  LIKE LINE OF it_s_kappl,
ld_msg_vsura  TYPE NAST-VSURA ,
ld_msg_vsztp  TYPE NAST-VSZTP ,
ld_msg_sort1  TYPE NAST-SORT1 ,
ld_msg_sort2  TYPE NAST-SORT2 ,
ld_msg_sort3  TYPE NAST-SORT3 .


SELECT single ERDAT
FROM NAST
INTO ld_msg_erdat.


"populate fields of struture and append to itab
append wa_msg_xnast to it_msg_xnast.

SELECT single ERUHR
FROM NAST
INTO ld_msg_eruhr.


"populate fields of struture and append to itab
append wa_msg_ynast to it_msg_ynast.

SELECT single KAPPL
FROM NAST
INTO ld_msg_kappl.


"populate fields of struture and append to itab
append wa_s_kschl to it_s_kschl.

SELECT single PARNR
FROM NAST
INTO ld_msg_parnr.


"populate fields of struture and append to itab
append wa_s_nacha to it_s_nacha.

SELECT single VSDAT
FROM NAST
INTO ld_msg_vsdat.


"populate fields of struture and append to itab
append wa_s_objky to it_s_objky.

SELECT single VSTAT
FROM NAST
INTO ld_msg_vstat.


"populate fields of struture and append to itab
append wa_s_kappl to it_s_kappl.

SELECT single VSURA
FROM NAST
INTO ld_msg_vsura.


SELECT single VSZTP
FROM NAST
INTO ld_msg_vsztp.


SELECT single SORT1
FROM NAST
INTO ld_msg_sort1.


SELECT single SORT2
FROM NAST
INTO ld_msg_sort2.


SELECT single SORT3
FROM NAST
INTO ld_msg_sort3.

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