SAP Function Modules

AMDS_GEN_OBJECT_SERVICES_CALL SAP Function module







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

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


Pattern for FM AMDS_GEN_OBJECT_SERVICES_CALL - AMDS GEN OBJECT SERVICES CALL





CALL FUNCTION 'AMDS_GEN_OBJECT_SERVICES_CALL' "
  EXPORTING
*   i_awtyp =                   " acchd-awtyp
*   i_awref =                   " acchd-awref
*   i_aworg = SPACE             " acchd-aworg
*   i_awsys = SPACE             " acchd-awsys
*   i_bukrs = 0000              " anek-bukrs
*   i_anln1 = 000000000000      " anek-anln1
*   i_anln2 = 0000              " anek-anln2
*   i_gjahr = 0000              " anek-gjahr
    i_action =                  " char2
*   i_object = 'FIAA_BELEG'     " char10
*   i_barcod =                  " acchd-barcd
*   i_blart = SPACE             " t003-blart    Document Type
* TABLES
*   t_accdn =                   " accdn
*   t_netext =                  "
  EXCEPTIONS
    NOT_FOUND = 1               "
    BARCODE_ERROR = 2           "
    .  "  AMDS_GEN_OBJECT_SERVICES_CALL

ABAP code example for Function Module AMDS_GEN_OBJECT_SERVICES_CALL





The ABAP code below is a full code listing to execute function module AMDS_GEN_OBJECT_SERVICES_CALL 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_t_accdn  TYPE STANDARD TABLE OF ACCDN,"TABLES PARAM
wa_t_accdn  LIKE LINE OF it_t_accdn ,
it_t_netext  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_netext  LIKE LINE OF it_t_netext .


DATA(ld_i_awtyp) = some text here

DATA(ld_i_awref) = some text here

DATA(ld_i_aworg) = some text here

DATA(ld_i_awsys) = some text here

SELECT single BUKRS
FROM ANEK
INTO @DATA(ld_i_bukrs).


SELECT single ANLN1
FROM ANEK
INTO @DATA(ld_i_anln1).


SELECT single ANLN2
FROM ANEK
INTO @DATA(ld_i_anln2).


SELECT single GJAHR
FROM ANEK
INTO @DATA(ld_i_gjahr).

DATA(ld_i_action) = 'Check type of data required'.
DATA(ld_i_object) = 'Check type of data required'.

DATA(ld_i_barcod) = some text here

SELECT single BLART
FROM T003
INTO @DATA(ld_i_blart).


"populate fields of struture and append to itab
append wa_t_accdn to it_t_accdn.

"populate fields of struture and append to itab
append wa_t_netext to it_t_netext. . CALL FUNCTION 'AMDS_GEN_OBJECT_SERVICES_CALL' EXPORTING * i_awtyp = ld_i_awtyp * i_awref = ld_i_awref * i_aworg = ld_i_aworg * i_awsys = ld_i_awsys * i_bukrs = ld_i_bukrs * i_anln1 = ld_i_anln1 * i_anln2 = ld_i_anln2 * i_gjahr = ld_i_gjahr i_action = ld_i_action * i_object = ld_i_object * i_barcod = ld_i_barcod * i_blart = ld_i_blart * TABLES * t_accdn = it_t_accdn * t_netext = it_t_netext EXCEPTIONS NOT_FOUND = 1 BARCODE_ERROR = 2 . " AMDS_GEN_OBJECT_SERVICES_CALL
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_i_awtyp  TYPE ACCHD-AWTYP ,
it_t_accdn  TYPE STANDARD TABLE OF ACCDN ,
wa_t_accdn  LIKE LINE OF it_t_accdn,
ld_i_awref  TYPE ACCHD-AWREF ,
it_t_netext  TYPE STANDARD TABLE OF STRING ,
wa_t_netext  LIKE LINE OF it_t_netext,
ld_i_aworg  TYPE ACCHD-AWORG ,
ld_i_awsys  TYPE ACCHD-AWSYS ,
ld_i_bukrs  TYPE ANEK-BUKRS ,
ld_i_anln1  TYPE ANEK-ANLN1 ,
ld_i_anln2  TYPE ANEK-ANLN2 ,
ld_i_gjahr  TYPE ANEK-GJAHR ,
ld_i_action  TYPE CHAR2 ,
ld_i_object  TYPE CHAR10 ,
ld_i_barcod  TYPE ACCHD-BARCD ,
ld_i_blart  TYPE T003-BLART .


ld_i_awtyp = some text here

"populate fields of struture and append to itab
append wa_t_accdn to it_t_accdn.

ld_i_awref = some text here

"populate fields of struture and append to itab
append wa_t_netext to it_t_netext.

ld_i_aworg = some text here

ld_i_awsys = some text here

SELECT single BUKRS
FROM ANEK
INTO ld_i_bukrs.


SELECT single ANLN1
FROM ANEK
INTO ld_i_anln1.


SELECT single ANLN2
FROM ANEK
INTO ld_i_anln2.


SELECT single GJAHR
FROM ANEK
INTO ld_i_gjahr.

ld_i_action = 'Check type of data required'.
ld_i_object = 'Check type of data required'.

ld_i_barcod = some text here

SELECT single BLART
FROM T003
INTO ld_i_blart.

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