SAP Function Modules

RET1_VIMIMV_SELECT_SINGLE SAP Function module







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

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


Pattern for FM RET1_VIMIMV_SELECT_SINGLE - RET1 VIMIMV SELECT SINGLE





CALL FUNCTION 'RET1_VIMIMV_SELECT_SINGLE' "
* EXPORTING
*   iv_bukrs =                  " retiflds-bukrs
*   iv_smive =                  " retiflds-smive
*   iv_smvart =                 " retiflds-smvart
*   iv_partnr =                 " retiflds-partnr
*   iv_kunnr =                  " retiflds-kunnr
*   iv_lifnr =                  " retiflds-lifnr
*   iv_lastname =               " bp000-name_last
*   iv_firstname =              " bp000-name_first
*   iv_birthdate =              " bp000-birth_date
*   iv_keydate =                " retiflds-datum
*   iv_pstlz =                  " retiadrs-pstlz
*   iv_ort =                    " retiadrs-ort01
*   iv_stras =                  " retiadrs-stras
*   iv_kostl =                  " retiflds-kostl
*   iv_without_dialog = SPACE   "
  IMPORTING
    ev_vimimv =                 " vimimv
    ev_vicn01 =                 " vicn01
* TABLES
*   et_vimimv =                 " vimimv
*   et_vicn01 =                 " vicn01
  EXCEPTIONS
    MV_NOT_FOUND = 1            "
    PARTNER_NOT_FOUND = 2       "
    BUKRS_NOT_FOUND = 3         "
    .  "  RET1_VIMIMV_SELECT_SINGLE

ABAP code example for Function Module RET1_VIMIMV_SELECT_SINGLE





The ABAP code below is a full code listing to execute function module RET1_VIMIMV_SELECT_SINGLE 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_ev_vimimv  TYPE VIMIMV ,
ld_ev_vicn01  TYPE VICN01 ,
it_et_vimimv  TYPE STANDARD TABLE OF VIMIMV,"TABLES PARAM
wa_et_vimimv  LIKE LINE OF it_et_vimimv ,
it_et_vicn01  TYPE STANDARD TABLE OF VICN01,"TABLES PARAM
wa_et_vicn01  LIKE LINE OF it_et_vicn01 .


DATA(ld_iv_bukrs) = some text here

DATA(ld_iv_smive) = some text here

DATA(ld_iv_smvart) = some text here

DATA(ld_iv_partnr) = some text here

DATA(ld_iv_kunnr) = some text here

DATA(ld_iv_lifnr) = some text here

SELECT single NAME_LAST
FROM BP000
INTO @DATA(ld_iv_lastname).


SELECT single NAME_FIRST
FROM BP000
INTO @DATA(ld_iv_firstname).


SELECT single BIRTH_DATE
FROM BP000
INTO @DATA(ld_iv_birthdate).


DATA(ld_iv_keydate) = 20210129

DATA(ld_iv_pstlz) = some text here

DATA(ld_iv_ort) = some text here

DATA(ld_iv_stras) = some text here

DATA(ld_iv_kostl) = some text here
DATA(ld_iv_without_dialog) = 'some text here'.

"populate fields of struture and append to itab
append wa_et_vimimv to it_et_vimimv.

"populate fields of struture and append to itab
append wa_et_vicn01 to it_et_vicn01. . CALL FUNCTION 'RET1_VIMIMV_SELECT_SINGLE' * EXPORTING * iv_bukrs = ld_iv_bukrs * iv_smive = ld_iv_smive * iv_smvart = ld_iv_smvart * iv_partnr = ld_iv_partnr * iv_kunnr = ld_iv_kunnr * iv_lifnr = ld_iv_lifnr * iv_lastname = ld_iv_lastname * iv_firstname = ld_iv_firstname * iv_birthdate = ld_iv_birthdate * iv_keydate = ld_iv_keydate * iv_pstlz = ld_iv_pstlz * iv_ort = ld_iv_ort * iv_stras = ld_iv_stras * iv_kostl = ld_iv_kostl * iv_without_dialog = ld_iv_without_dialog IMPORTING ev_vimimv = ld_ev_vimimv ev_vicn01 = ld_ev_vicn01 * TABLES * et_vimimv = it_et_vimimv * et_vicn01 = it_et_vicn01 EXCEPTIONS MV_NOT_FOUND = 1 PARTNER_NOT_FOUND = 2 BUKRS_NOT_FOUND = 3 . " RET1_VIMIMV_SELECT_SINGLE
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 ELSEIF SY-SUBRC EQ 3. "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_ev_vimimv  TYPE VIMIMV ,
ld_iv_bukrs  TYPE RETIFLDS-BUKRS ,
it_et_vimimv  TYPE STANDARD TABLE OF VIMIMV ,
wa_et_vimimv  LIKE LINE OF it_et_vimimv,
ld_ev_vicn01  TYPE VICN01 ,
ld_iv_smive  TYPE RETIFLDS-SMIVE ,
it_et_vicn01  TYPE STANDARD TABLE OF VICN01 ,
wa_et_vicn01  LIKE LINE OF it_et_vicn01,
ld_iv_smvart  TYPE RETIFLDS-SMVART ,
ld_iv_partnr  TYPE RETIFLDS-PARTNR ,
ld_iv_kunnr  TYPE RETIFLDS-KUNNR ,
ld_iv_lifnr  TYPE RETIFLDS-LIFNR ,
ld_iv_lastname  TYPE BP000-NAME_LAST ,
ld_iv_firstname  TYPE BP000-NAME_FIRST ,
ld_iv_birthdate  TYPE BP000-BIRTH_DATE ,
ld_iv_keydate  TYPE RETIFLDS-DATUM ,
ld_iv_pstlz  TYPE RETIADRS-PSTLZ ,
ld_iv_ort  TYPE RETIADRS-ORT01 ,
ld_iv_stras  TYPE RETIADRS-STRAS ,
ld_iv_kostl  TYPE RETIFLDS-KOSTL ,
ld_iv_without_dialog  TYPE STRING .


ld_iv_bukrs = some text here

"populate fields of struture and append to itab
append wa_et_vimimv to it_et_vimimv.

ld_iv_smive = some text here

"populate fields of struture and append to itab
append wa_et_vicn01 to it_et_vicn01.

ld_iv_smvart = some text here

ld_iv_partnr = some text here

ld_iv_kunnr = some text here

ld_iv_lifnr = some text here

SELECT single NAME_LAST
FROM BP000
INTO ld_iv_lastname.


SELECT single NAME_FIRST
FROM BP000
INTO ld_iv_firstname.


SELECT single BIRTH_DATE
FROM BP000
INTO ld_iv_birthdate.


ld_iv_keydate = 20210129

ld_iv_pstlz = some text here

ld_iv_ort = some text here

ld_iv_stras = some text here

ld_iv_kostl = some text here
ld_iv_without_dialog = 'some text here'.

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