SAP Function Modules

SPRX_GET_OBJECT SAP Function module - Retrieve of a PROXY Object for versioning







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

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


Pattern for FM SPRX_GET_OBJECT - SPRX GET OBJECT





CALL FUNCTION 'SPRX_GET_OBJECT' "Retrieve of a PROXY Object for versioning
  EXPORTING
    sprxname =                  " trdir-name    ABAP Program Name
    r3state = 'A'               " d010sinf-r3state  ABAP: Program Status (Active, Saved, Transported...)
  TABLES
    psproxhdr =                 " sproxhdr_v    Proxy Header Data (substitution table)
    psprxhdr_id =               " sproxhdr_strg  Structure to divide STRING fields of SPROXHDR into CHARs
    psprxhdr_further_dat =      " sproxhdr_strg  Structure to divide STRING fields of SPROXHDR into CHARs
    psprxhdr_bo_data =          " sproxhdr_xstrg  Structure to divide STRING fields of SPROXHDR into CHARs
    psproxdel =                 " sproxdel_v    Deleted entries; only filled in snote target systems
    psproxdat =                 " sproxdat_v    Proxy Metadata for versioning (without STRING fields)
    psproxdat_id =              " sproxdat_strg  Structure to divide STRING fields of SPROXDAT into CHARs
    psproxdat_ifr_deflt =       " sproxdat_strg  Structure to divide STRING fields of SPROXDAT into CHARs
    psproxdat_further_dat =     " sproxdat_strg  Structure to divide STRING fields of SPROXDAT into CHARs
    psproxlpt =                 " sproxlpt_v    Proxy Meta Data for versioning (without STRING fields)
    psproxlpt_prop_string =     " sproxlpt_strg  Structure to divide STRING fields of SPROXLPT into CHARs
    psproxclass =               " sproxclass_v  UDDI Classifications  for versioning (without STRING fields)
    psproxclass_code =          " sproxclass_strg  Structure to divide STRING fields of SPROXCLASS into CHARs
    psproxclass_desc =          " sproxclass_strg  Structure to divide STRING fields of SPROXCLASS into CHARs
    psproxclass_reg =           " sproxclass_strg  Structure to divide STRING fields of SPROXCLASS into CHARs
    psproxsvardat =             " sproxsvardat_v  Proxy Header Data for versioning (without STRING fields)
    psproxsvar_ref_obj_id =     " sproxsvardat_str  Structure to divide STRING fields of SPROXSVARDAT into CHARs
    psproxsvar_field_val =      " sproxsvardat_xstr  Structure to divide STRING fields of SPROXSVARDAT into CHARs
    psproxmatchintf =           " sproxmatchintf_v  assigned interfaces for configuration
    psmodilog =                 " smodilog      Log of Customer Modifications to Dev. Env. Objects
  EXCEPTIONS
    VERSION_NOT_FOUND = 1       "
    SPRX_NOT_EXIST = 2          "
    .  "  SPRX_GET_OBJECT

ABAP code example for Function Module SPRX_GET_OBJECT





The ABAP code below is a full code listing to execute function module SPRX_GET_OBJECT 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_psproxhdr  TYPE STANDARD TABLE OF SPROXHDR_V,"TABLES PARAM
wa_psproxhdr  LIKE LINE OF it_psproxhdr ,
it_psprxhdr_id  TYPE STANDARD TABLE OF SPROXHDR_STRG,"TABLES PARAM
wa_psprxhdr_id  LIKE LINE OF it_psprxhdr_id ,
it_psprxhdr_further_dat  TYPE STANDARD TABLE OF SPROXHDR_STRG,"TABLES PARAM
wa_psprxhdr_further_dat  LIKE LINE OF it_psprxhdr_further_dat ,
it_psprxhdr_bo_data  TYPE STANDARD TABLE OF SPROXHDR_XSTRG,"TABLES PARAM
wa_psprxhdr_bo_data  LIKE LINE OF it_psprxhdr_bo_data ,
it_psproxdel  TYPE STANDARD TABLE OF SPROXDEL_V,"TABLES PARAM
wa_psproxdel  LIKE LINE OF it_psproxdel ,
it_psproxdat  TYPE STANDARD TABLE OF SPROXDAT_V,"TABLES PARAM
wa_psproxdat  LIKE LINE OF it_psproxdat ,
it_psproxdat_id  TYPE STANDARD TABLE OF SPROXDAT_STRG,"TABLES PARAM
wa_psproxdat_id  LIKE LINE OF it_psproxdat_id ,
it_psproxdat_ifr_deflt  TYPE STANDARD TABLE OF SPROXDAT_STRG,"TABLES PARAM
wa_psproxdat_ifr_deflt  LIKE LINE OF it_psproxdat_ifr_deflt ,
it_psproxdat_further_dat  TYPE STANDARD TABLE OF SPROXDAT_STRG,"TABLES PARAM
wa_psproxdat_further_dat  LIKE LINE OF it_psproxdat_further_dat ,
it_psproxlpt  TYPE STANDARD TABLE OF SPROXLPT_V,"TABLES PARAM
wa_psproxlpt  LIKE LINE OF it_psproxlpt ,
it_psproxlpt_prop_string  TYPE STANDARD TABLE OF SPROXLPT_STRG,"TABLES PARAM
wa_psproxlpt_prop_string  LIKE LINE OF it_psproxlpt_prop_string ,
it_psproxclass  TYPE STANDARD TABLE OF SPROXCLASS_V,"TABLES PARAM
wa_psproxclass  LIKE LINE OF it_psproxclass ,
it_psproxclass_code  TYPE STANDARD TABLE OF SPROXCLASS_STRG,"TABLES PARAM
wa_psproxclass_code  LIKE LINE OF it_psproxclass_code ,
it_psproxclass_desc  TYPE STANDARD TABLE OF SPROXCLASS_STRG,"TABLES PARAM
wa_psproxclass_desc  LIKE LINE OF it_psproxclass_desc ,
it_psproxclass_reg  TYPE STANDARD TABLE OF SPROXCLASS_STRG,"TABLES PARAM
wa_psproxclass_reg  LIKE LINE OF it_psproxclass_reg ,
it_psproxsvardat  TYPE STANDARD TABLE OF SPROXSVARDAT_V,"TABLES PARAM
wa_psproxsvardat  LIKE LINE OF it_psproxsvardat ,
it_psproxsvar_ref_obj_id  TYPE STANDARD TABLE OF SPROXSVARDAT_STR,"TABLES PARAM
wa_psproxsvar_ref_obj_id  LIKE LINE OF it_psproxsvar_ref_obj_id ,
it_psproxsvar_field_val  TYPE STANDARD TABLE OF SPROXSVARDAT_XSTR,"TABLES PARAM
wa_psproxsvar_field_val  LIKE LINE OF it_psproxsvar_field_val ,
it_psproxmatchintf  TYPE STANDARD TABLE OF SPROXMATCHINTF_V,"TABLES PARAM
wa_psproxmatchintf  LIKE LINE OF it_psproxmatchintf ,
it_psmodilog  TYPE STANDARD TABLE OF SMODILOG,"TABLES PARAM
wa_psmodilog  LIKE LINE OF it_psmodilog .


SELECT single NAME
FROM TRDIR
INTO @DATA(ld_sprxname).


SELECT single R3STATE
FROM D010SINF
INTO @DATA(ld_r3state).


"populate fields of struture and append to itab
append wa_psproxhdr to it_psproxhdr.

"populate fields of struture and append to itab
append wa_psprxhdr_id to it_psprxhdr_id.

"populate fields of struture and append to itab
append wa_psprxhdr_further_dat to it_psprxhdr_further_dat.

"populate fields of struture and append to itab
append wa_psprxhdr_bo_data to it_psprxhdr_bo_data.

"populate fields of struture and append to itab
append wa_psproxdel to it_psproxdel.

"populate fields of struture and append to itab
append wa_psproxdat to it_psproxdat.

"populate fields of struture and append to itab
append wa_psproxdat_id to it_psproxdat_id.

"populate fields of struture and append to itab
append wa_psproxdat_ifr_deflt to it_psproxdat_ifr_deflt.

"populate fields of struture and append to itab
append wa_psproxdat_further_dat to it_psproxdat_further_dat.

"populate fields of struture and append to itab
append wa_psproxlpt to it_psproxlpt.

"populate fields of struture and append to itab
append wa_psproxlpt_prop_string to it_psproxlpt_prop_string.

"populate fields of struture and append to itab
append wa_psproxclass to it_psproxclass.

"populate fields of struture and append to itab
append wa_psproxclass_code to it_psproxclass_code.

"populate fields of struture and append to itab
append wa_psproxclass_desc to it_psproxclass_desc.

"populate fields of struture and append to itab
append wa_psproxclass_reg to it_psproxclass_reg.

"populate fields of struture and append to itab
append wa_psproxsvardat to it_psproxsvardat.

"populate fields of struture and append to itab
append wa_psproxsvar_ref_obj_id to it_psproxsvar_ref_obj_id.

"populate fields of struture and append to itab
append wa_psproxsvar_field_val to it_psproxsvar_field_val.

"populate fields of struture and append to itab
append wa_psproxmatchintf to it_psproxmatchintf.

"populate fields of struture and append to itab
append wa_psmodilog to it_psmodilog. . CALL FUNCTION 'SPRX_GET_OBJECT' EXPORTING sprxname = ld_sprxname r3state = ld_r3state TABLES psproxhdr = it_psproxhdr psprxhdr_id = it_psprxhdr_id psprxhdr_further_dat = it_psprxhdr_further_dat psprxhdr_bo_data = it_psprxhdr_bo_data psproxdel = it_psproxdel psproxdat = it_psproxdat psproxdat_id = it_psproxdat_id psproxdat_ifr_deflt = it_psproxdat_ifr_deflt psproxdat_further_dat = it_psproxdat_further_dat psproxlpt = it_psproxlpt psproxlpt_prop_string = it_psproxlpt_prop_string psproxclass = it_psproxclass psproxclass_code = it_psproxclass_code psproxclass_desc = it_psproxclass_desc psproxclass_reg = it_psproxclass_reg psproxsvardat = it_psproxsvardat psproxsvar_ref_obj_id = it_psproxsvar_ref_obj_id psproxsvar_field_val = it_psproxsvar_field_val psproxmatchintf = it_psproxmatchintf psmodilog = it_psmodilog EXCEPTIONS VERSION_NOT_FOUND = 1 SPRX_NOT_EXIST = 2 . " SPRX_GET_OBJECT
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_sprxname  TYPE TRDIR-NAME ,
it_psproxhdr  TYPE STANDARD TABLE OF SPROXHDR_V ,
wa_psproxhdr  LIKE LINE OF it_psproxhdr,
ld_r3state  TYPE D010SINF-R3STATE ,
it_psprxhdr_id  TYPE STANDARD TABLE OF SPROXHDR_STRG ,
wa_psprxhdr_id  LIKE LINE OF it_psprxhdr_id,
it_psprxhdr_further_dat  TYPE STANDARD TABLE OF SPROXHDR_STRG ,
wa_psprxhdr_further_dat  LIKE LINE OF it_psprxhdr_further_dat,
it_psprxhdr_bo_data  TYPE STANDARD TABLE OF SPROXHDR_XSTRG ,
wa_psprxhdr_bo_data  LIKE LINE OF it_psprxhdr_bo_data,
it_psproxdel  TYPE STANDARD TABLE OF SPROXDEL_V ,
wa_psproxdel  LIKE LINE OF it_psproxdel,
it_psproxdat  TYPE STANDARD TABLE OF SPROXDAT_V ,
wa_psproxdat  LIKE LINE OF it_psproxdat,
it_psproxdat_id  TYPE STANDARD TABLE OF SPROXDAT_STRG ,
wa_psproxdat_id  LIKE LINE OF it_psproxdat_id,
it_psproxdat_ifr_deflt  TYPE STANDARD TABLE OF SPROXDAT_STRG ,
wa_psproxdat_ifr_deflt  LIKE LINE OF it_psproxdat_ifr_deflt,
it_psproxdat_further_dat  TYPE STANDARD TABLE OF SPROXDAT_STRG ,
wa_psproxdat_further_dat  LIKE LINE OF it_psproxdat_further_dat,
it_psproxlpt  TYPE STANDARD TABLE OF SPROXLPT_V ,
wa_psproxlpt  LIKE LINE OF it_psproxlpt,
it_psproxlpt_prop_string  TYPE STANDARD TABLE OF SPROXLPT_STRG ,
wa_psproxlpt_prop_string  LIKE LINE OF it_psproxlpt_prop_string,
it_psproxclass  TYPE STANDARD TABLE OF SPROXCLASS_V ,
wa_psproxclass  LIKE LINE OF it_psproxclass,
it_psproxclass_code  TYPE STANDARD TABLE OF SPROXCLASS_STRG ,
wa_psproxclass_code  LIKE LINE OF it_psproxclass_code,
it_psproxclass_desc  TYPE STANDARD TABLE OF SPROXCLASS_STRG ,
wa_psproxclass_desc  LIKE LINE OF it_psproxclass_desc,
it_psproxclass_reg  TYPE STANDARD TABLE OF SPROXCLASS_STRG ,
wa_psproxclass_reg  LIKE LINE OF it_psproxclass_reg,
it_psproxsvardat  TYPE STANDARD TABLE OF SPROXSVARDAT_V ,
wa_psproxsvardat  LIKE LINE OF it_psproxsvardat,
it_psproxsvar_ref_obj_id  TYPE STANDARD TABLE OF SPROXSVARDAT_STR ,
wa_psproxsvar_ref_obj_id  LIKE LINE OF it_psproxsvar_ref_obj_id,
it_psproxsvar_field_val  TYPE STANDARD TABLE OF SPROXSVARDAT_XSTR ,
wa_psproxsvar_field_val  LIKE LINE OF it_psproxsvar_field_val,
it_psproxmatchintf  TYPE STANDARD TABLE OF SPROXMATCHINTF_V ,
wa_psproxmatchintf  LIKE LINE OF it_psproxmatchintf,
it_psmodilog  TYPE STANDARD TABLE OF SMODILOG ,
wa_psmodilog  LIKE LINE OF it_psmodilog.


SELECT single NAME
FROM TRDIR
INTO ld_sprxname.


"populate fields of struture and append to itab
append wa_psproxhdr to it_psproxhdr.

SELECT single R3STATE
FROM D010SINF
INTO ld_r3state.


"populate fields of struture and append to itab
append wa_psprxhdr_id to it_psprxhdr_id.

"populate fields of struture and append to itab
append wa_psprxhdr_further_dat to it_psprxhdr_further_dat.

"populate fields of struture and append to itab
append wa_psprxhdr_bo_data to it_psprxhdr_bo_data.

"populate fields of struture and append to itab
append wa_psproxdel to it_psproxdel.

"populate fields of struture and append to itab
append wa_psproxdat to it_psproxdat.

"populate fields of struture and append to itab
append wa_psproxdat_id to it_psproxdat_id.

"populate fields of struture and append to itab
append wa_psproxdat_ifr_deflt to it_psproxdat_ifr_deflt.

"populate fields of struture and append to itab
append wa_psproxdat_further_dat to it_psproxdat_further_dat.

"populate fields of struture and append to itab
append wa_psproxlpt to it_psproxlpt.

"populate fields of struture and append to itab
append wa_psproxlpt_prop_string to it_psproxlpt_prop_string.

"populate fields of struture and append to itab
append wa_psproxclass to it_psproxclass.

"populate fields of struture and append to itab
append wa_psproxclass_code to it_psproxclass_code.

"populate fields of struture and append to itab
append wa_psproxclass_desc to it_psproxclass_desc.

"populate fields of struture and append to itab
append wa_psproxclass_reg to it_psproxclass_reg.

"populate fields of struture and append to itab
append wa_psproxsvardat to it_psproxsvardat.

"populate fields of struture and append to itab
append wa_psproxsvar_ref_obj_id to it_psproxsvar_ref_obj_id.

"populate fields of struture and append to itab
append wa_psproxsvar_field_val to it_psproxsvar_field_val.

"populate fields of struture and append to itab
append wa_psproxmatchintf to it_psproxmatchintf.

"populate fields of struture and append to itab
append wa_psmodilog to it_psmodilog.

SAP Documentation for FM SPRX_GET_OBJECT


The export tables correspond mainly to the proxy database tables. However<(>,<)> since versioning cannot handle string/rawstring fields, ...See here for full SAP fm documentation

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