SAP Function Modules

UPX_API_DATA_GET SAP Function module - Read data object to a planning







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

Associated Function Group: UPX_API
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM UPX_API_DATA_GET - UPX API DATA GET





CALL FUNCTION 'UPX_API_DATA_GET' "Read data object to a planning
  EXPORTING
    i_layout =                  " upx_api_ys_main-pob_key  Technical Key of a Planning Object
*   i_read_only =               " xfeld         Checkbox Field
  IMPORTING
    es_info =                   " upc_ys_api_info  Additional information
* TABLES
*   et_function =               " upx_api_ys_design  UPX: Planning Folder Design
*   et_head_info =              " upc_ys_api_head_info  API: Information on Header Characteristics
*   et_head =                   " upc_ys_api_head  Header Combination
*   et_row_info =               " upc_ys_api_row_info  API: Information on Row Characteristics
*   et_row =                    " upc_ys_api_row  Description of Lines
*   et_row_text =               " upc_ys_api_row_txt  Text per line (for complex lead columns only)
*   et_col_info =               " upc_ys_api_col_info  API: Information on Column Characteristics
*   et_col =                    " upc_ys_api_col  Column description
*   et_col_text =               " upc_ys_api_col_txt  Data Column Headers
*   et_data =                   " upc_ys_api_data  Data
*   et_return =                 " bapiret2      Return Parameter
*   et_info =                   " upc_ys_api_info  Additional information
    .  "  UPX_API_DATA_GET

ABAP code example for Function Module UPX_API_DATA_GET





The ABAP code below is a full code listing to execute function module UPX_API_DATA_GET 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_es_info  TYPE UPC_YS_API_INFO ,
it_et_function  TYPE STANDARD TABLE OF UPX_API_YS_DESIGN,"TABLES PARAM
wa_et_function  LIKE LINE OF it_et_function ,
it_et_head_info  TYPE STANDARD TABLE OF UPC_YS_API_HEAD_INFO,"TABLES PARAM
wa_et_head_info  LIKE LINE OF it_et_head_info ,
it_et_head  TYPE STANDARD TABLE OF UPC_YS_API_HEAD,"TABLES PARAM
wa_et_head  LIKE LINE OF it_et_head ,
it_et_row_info  TYPE STANDARD TABLE OF UPC_YS_API_ROW_INFO,"TABLES PARAM
wa_et_row_info  LIKE LINE OF it_et_row_info ,
it_et_row  TYPE STANDARD TABLE OF UPC_YS_API_ROW,"TABLES PARAM
wa_et_row  LIKE LINE OF it_et_row ,
it_et_row_text  TYPE STANDARD TABLE OF UPC_YS_API_ROW_TXT,"TABLES PARAM
wa_et_row_text  LIKE LINE OF it_et_row_text ,
it_et_col_info  TYPE STANDARD TABLE OF UPC_YS_API_COL_INFO,"TABLES PARAM
wa_et_col_info  LIKE LINE OF it_et_col_info ,
it_et_col  TYPE STANDARD TABLE OF UPC_YS_API_COL,"TABLES PARAM
wa_et_col  LIKE LINE OF it_et_col ,
it_et_col_text  TYPE STANDARD TABLE OF UPC_YS_API_COL_TXT,"TABLES PARAM
wa_et_col_text  LIKE LINE OF it_et_col_text ,
it_et_data  TYPE STANDARD TABLE OF UPC_YS_API_DATA,"TABLES PARAM
wa_et_data  LIKE LINE OF it_et_data ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_return  LIKE LINE OF it_et_return ,
it_et_info  TYPE STANDARD TABLE OF UPC_YS_API_INFO,"TABLES PARAM
wa_et_info  LIKE LINE OF it_et_info .


DATA(ld_i_layout) = some text here
DATA(ld_i_read_only) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_function to it_et_function.

"populate fields of struture and append to itab
append wa_et_head_info to it_et_head_info.

"populate fields of struture and append to itab
append wa_et_head to it_et_head.

"populate fields of struture and append to itab
append wa_et_row_info to it_et_row_info.

"populate fields of struture and append to itab
append wa_et_row to it_et_row.

"populate fields of struture and append to itab
append wa_et_row_text to it_et_row_text.

"populate fields of struture and append to itab
append wa_et_col_info to it_et_col_info.

"populate fields of struture and append to itab
append wa_et_col to it_et_col.

"populate fields of struture and append to itab
append wa_et_col_text to it_et_col_text.

"populate fields of struture and append to itab
append wa_et_data to it_et_data.

"populate fields of struture and append to itab
append wa_et_return to it_et_return.

"populate fields of struture and append to itab
append wa_et_info to it_et_info. . CALL FUNCTION 'UPX_API_DATA_GET' EXPORTING i_layout = ld_i_layout * i_read_only = ld_i_read_only IMPORTING es_info = ld_es_info * TABLES * et_function = it_et_function * et_head_info = it_et_head_info * et_head = it_et_head * et_row_info = it_et_row_info * et_row = it_et_row * et_row_text = it_et_row_text * et_col_info = it_et_col_info * et_col = it_et_col * et_col_text = it_et_col_text * et_data = it_et_data * et_return = it_et_return * et_info = it_et_info . " UPX_API_DATA_GET
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_es_info  TYPE UPC_YS_API_INFO ,
ld_i_layout  TYPE UPX_API_YS_MAIN-POB_KEY ,
it_et_function  TYPE STANDARD TABLE OF UPX_API_YS_DESIGN ,
wa_et_function  LIKE LINE OF it_et_function,
ld_i_read_only  TYPE XFELD ,
it_et_head_info  TYPE STANDARD TABLE OF UPC_YS_API_HEAD_INFO ,
wa_et_head_info  LIKE LINE OF it_et_head_info,
it_et_head  TYPE STANDARD TABLE OF UPC_YS_API_HEAD ,
wa_et_head  LIKE LINE OF it_et_head,
it_et_row_info  TYPE STANDARD TABLE OF UPC_YS_API_ROW_INFO ,
wa_et_row_info  LIKE LINE OF it_et_row_info,
it_et_row  TYPE STANDARD TABLE OF UPC_YS_API_ROW ,
wa_et_row  LIKE LINE OF it_et_row,
it_et_row_text  TYPE STANDARD TABLE OF UPC_YS_API_ROW_TXT ,
wa_et_row_text  LIKE LINE OF it_et_row_text,
it_et_col_info  TYPE STANDARD TABLE OF UPC_YS_API_COL_INFO ,
wa_et_col_info  LIKE LINE OF it_et_col_info,
it_et_col  TYPE STANDARD TABLE OF UPC_YS_API_COL ,
wa_et_col  LIKE LINE OF it_et_col,
it_et_col_text  TYPE STANDARD TABLE OF UPC_YS_API_COL_TXT ,
wa_et_col_text  LIKE LINE OF it_et_col_text,
it_et_data  TYPE STANDARD TABLE OF UPC_YS_API_DATA ,
wa_et_data  LIKE LINE OF it_et_data,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_return  LIKE LINE OF it_et_return,
it_et_info  TYPE STANDARD TABLE OF UPC_YS_API_INFO ,
wa_et_info  LIKE LINE OF it_et_info.


ld_i_layout = some text here

"populate fields of struture and append to itab
append wa_et_function to it_et_function.
ld_i_read_only = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_head_info to it_et_head_info.

"populate fields of struture and append to itab
append wa_et_head to it_et_head.

"populate fields of struture and append to itab
append wa_et_row_info to it_et_row_info.

"populate fields of struture and append to itab
append wa_et_row to it_et_row.

"populate fields of struture and append to itab
append wa_et_row_text to it_et_row_text.

"populate fields of struture and append to itab
append wa_et_col_info to it_et_col_info.

"populate fields of struture and append to itab
append wa_et_col to it_et_col.

"populate fields of struture and append to itab
append wa_et_col_text to it_et_col_text.

"populate fields of struture and append to itab
append wa_et_data to it_et_data.

"populate fields of struture and append to itab
append wa_et_return to it_et_return.

"populate fields of struture and append to itab
append wa_et_info to it_et_info.

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