SAP Function Modules

AIP1_GET_VALUES_SINGLE SAP Function module







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

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


Pattern for FM AIP1_GET_VALUES_SINGLE - AIP1 GET VALUES SINGLE





CALL FUNCTION 'AIP1_GET_VALUES_SINGLE' "
* EXPORTING
*   i_index =                   " sy-tabix
*   i_objnr =                   " imzo-objnr
*   i_authflg =                 " im_authflg_type
*   i_authmsg =                 " im_authmsg_type
*   i_flg_raise_auth_exception = ' '  "
  IMPORTING
    e_obart =                   " imps-obart
    e_objnr =                   " imzo-objnr
    e_authrc =                  " im_authrc_type
* TABLES
*   t_bpge =                    " bpge
*   t_bpja =                    " bpja
*   t_raimact =                 " raimact
*   t_raipwi =                  " raipwi
  EXCEPTIONS
    NOT_FOUND = 1               "
    MISSING_AUTHORITY = 2       "
    .  "  AIP1_GET_VALUES_SINGLE

ABAP code example for Function Module AIP1_GET_VALUES_SINGLE





The ABAP code below is a full code listing to execute function module AIP1_GET_VALUES_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_e_obart  TYPE IMPS-OBART ,
ld_e_objnr  TYPE IMZO-OBJNR ,
ld_e_authrc  TYPE IM_AUTHRC_TYPE ,
it_t_bpge  TYPE STANDARD TABLE OF BPGE,"TABLES PARAM
wa_t_bpge  LIKE LINE OF it_t_bpge ,
it_t_bpja  TYPE STANDARD TABLE OF BPJA,"TABLES PARAM
wa_t_bpja  LIKE LINE OF it_t_bpja ,
it_t_raimact  TYPE STANDARD TABLE OF RAIMACT,"TABLES PARAM
wa_t_raimact  LIKE LINE OF it_t_raimact ,
it_t_raipwi  TYPE STANDARD TABLE OF RAIPWI,"TABLES PARAM
wa_t_raipwi  LIKE LINE OF it_t_raipwi .

DATA(ld_i_index) = '123 '.

SELECT single OBJNR
FROM IMZO
INTO @DATA(ld_i_objnr).

DATA(ld_i_authflg) = '123 '.
DATA(ld_i_authmsg) = '123 '.
DATA(ld_i_flg_raise_auth_exception) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_bpge to it_t_bpge.

"populate fields of struture and append to itab
append wa_t_bpja to it_t_bpja.

"populate fields of struture and append to itab
append wa_t_raimact to it_t_raimact.

"populate fields of struture and append to itab
append wa_t_raipwi to it_t_raipwi. . CALL FUNCTION 'AIP1_GET_VALUES_SINGLE' * EXPORTING * i_index = ld_i_index * i_objnr = ld_i_objnr * i_authflg = ld_i_authflg * i_authmsg = ld_i_authmsg * i_flg_raise_auth_exception = ld_i_flg_raise_auth_exception IMPORTING e_obart = ld_e_obart e_objnr = ld_e_objnr e_authrc = ld_e_authrc * TABLES * t_bpge = it_t_bpge * t_bpja = it_t_bpja * t_raimact = it_t_raimact * t_raipwi = it_t_raipwi EXCEPTIONS NOT_FOUND = 1 MISSING_AUTHORITY = 2 . " AIP1_GET_VALUES_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 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_e_obart  TYPE IMPS-OBART ,
ld_i_index  TYPE SY-TABIX ,
it_t_bpge  TYPE STANDARD TABLE OF BPGE ,
wa_t_bpge  LIKE LINE OF it_t_bpge,
ld_e_objnr  TYPE IMZO-OBJNR ,
ld_i_objnr  TYPE IMZO-OBJNR ,
it_t_bpja  TYPE STANDARD TABLE OF BPJA ,
wa_t_bpja  LIKE LINE OF it_t_bpja,
ld_e_authrc  TYPE IM_AUTHRC_TYPE ,
ld_i_authflg  TYPE IM_AUTHFLG_TYPE ,
it_t_raimact  TYPE STANDARD TABLE OF RAIMACT ,
wa_t_raimact  LIKE LINE OF it_t_raimact,
ld_i_authmsg  TYPE IM_AUTHMSG_TYPE ,
it_t_raipwi  TYPE STANDARD TABLE OF RAIPWI ,
wa_t_raipwi  LIKE LINE OF it_t_raipwi,
ld_i_flg_raise_auth_exception  TYPE STRING .

ld_i_index = '123 '.

"populate fields of struture and append to itab
append wa_t_bpge to it_t_bpge.

SELECT single OBJNR
FROM IMZO
INTO ld_i_objnr.


"populate fields of struture and append to itab
append wa_t_bpja to it_t_bpja.
ld_i_authflg = '123 '.

"populate fields of struture and append to itab
append wa_t_raimact to it_t_raimact.
ld_i_authmsg = '123 '.

"populate fields of struture and append to itab
append wa_t_raipwi to it_t_raipwi.
ld_i_flg_raise_auth_exception = '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 AIP1_GET_VALUES_SINGLE or its description.