SAP GET_POSITION_VALUES Function Module for Return Differentiations and Position Values









GET_POSITION_VALUES is a standard get position values SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Return Differentiations and Position Values processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for get position values FM, simply by entering the name GET_POSITION_VALUES into the relevant SAP transaction such as SE37 or SE38.

Function Group: TPM_TRL_REP
Program Name: SAPLTPM_TRL_REP
Main Program: SAPLTPM_TRL_REP
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GET_POSITION_VALUES pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'GET_POSITION_VALUES'"Return Differentiations and Position Values
EXPORTING
IM_TAB_POSITION = "Table Type Treasury Ledger Position
* IM_ACC_DEF_SIM = ' ' "Simulate accruals based on TPM44
* IM_FLG_NO_PROGIND = ' ' "Suppress Progress Indicator
IM_DATE = "Date
* IM_NO_ZEROS = 'X' "Single-Character Indicator
* IM_WITH_PLANNED = 'X' "Single-Character Indicator
* IM_BY_POSTING_DATE = "Single-Character Indicator
* IM_SEARCH_STRATEGY = TPMCO_SEARCH_DB_RO "Search Strategy
* IM_SIMULATE_VALUATION = ' ' "Simulated Valuation
* IM_POSTING_FLAG_NEEDED = ' ' "
* IM_FLG_SKIP_POSTING_BUFFER = ' ' "

IMPORTING
EX_TAB_POSITION_VALUE = "Tabelle der Bestandswerte
EX_TAB_MESSAGES = "Table Type for Error Handling
EX_TAB_SUBPOS_VALUE_REP = "Table Type for TRLS_SUBPOS_VALUE_REP
EX_TAB_POSITION_VALUE_SIM = "Table Type for TRLS_POSITION_VALUE_SIM
.



IMPORTING Parameters details for GET_POSITION_VALUES

IM_TAB_POSITION - Table Type Treasury Ledger Position

Data type: TRLY_POSITION
Optional: No
Call by Reference: Yes

IM_ACC_DEF_SIM - Simulate accruals based on TPM44

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: Yes

IM_FLG_NO_PROGIND - Suppress Progress Indicator

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: Yes

IM_DATE - Date

Data type: DATUM
Optional: No
Call by Reference: Yes

IM_NO_ZEROS - Single-Character Indicator

Data type: CHAR1
Default: 'X'
Optional: Yes
Call by Reference: Yes

IM_WITH_PLANNED - Single-Character Indicator

Data type: CHAR1
Default: 'X'
Optional: Yes
Call by Reference: Yes

IM_BY_POSTING_DATE - Single-Character Indicator

Data type: CHAR1
Optional: Yes
Call by Reference: Yes

IM_SEARCH_STRATEGY - Search Strategy

Data type: TPM_SEARCH_STRATEGY
Default: TPMCO_SEARCH_DB_RO
Optional: Yes
Call by Reference: Yes

IM_SIMULATE_VALUATION - Simulated Valuation

Data type: CHAR1
Default: ' '
Optional: Yes
Call by Reference: Yes

IM_POSTING_FLAG_NEEDED -

Data type: XFELD
Default: ' '
Optional: Yes
Call by Reference: Yes

IM_FLG_SKIP_POSTING_BUFFER -

Data type: XFELD
Default: ' '
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for GET_POSITION_VALUES

EX_TAB_POSITION_VALUE - Tabelle der Bestandswerte

Data type: TRLY_POSITION_VALUE
Optional: No
Call by Reference: Yes

EX_TAB_MESSAGES - Table Type for Error Handling

Data type: BAPIERR_T
Optional: No
Call by Reference: Yes

EX_TAB_SUBPOS_VALUE_REP - Table Type for TRLS_SUBPOS_VALUE_REP

Data type: TRLY_SUBPOS_VALUE_REP
Optional: No
Call by Reference: Yes

EX_TAB_POSITION_VALUE_SIM - Table Type for TRLS_POSITION_VALUE_SIM

Data type: TRLY_POSITION_VALUE_SIM
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GET_POSITION_VALUES Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_im_tab_position  TYPE TRLY_POSITION, "   
lv_ex_tab_position_value  TYPE TRLY_POSITION_VALUE, "   
lv_im_acc_def_sim  TYPE CHAR1, "   ' '
lv_im_flg_no_progind  TYPE CHAR1, "   ' '
lv_im_date  TYPE DATUM, "   
lv_ex_tab_messages  TYPE BAPIERR_T, "   
lv_im_no_zeros  TYPE CHAR1, "   'X'
lv_ex_tab_subpos_value_rep  TYPE TRLY_SUBPOS_VALUE_REP, "   
lv_im_with_planned  TYPE CHAR1, "   'X'
lv_ex_tab_position_value_sim  TYPE TRLY_POSITION_VALUE_SIM, "   
lv_im_by_posting_date  TYPE CHAR1, "   
lv_im_search_strategy  TYPE TPM_SEARCH_STRATEGY, "   TPMCO_SEARCH_DB_RO
lv_im_simulate_valuation  TYPE CHAR1, "   ' '
lv_im_posting_flag_needed  TYPE XFELD, "   ' '
lv_im_flg_skip_posting_buffer  TYPE XFELD. "   ' '

  CALL FUNCTION 'GET_POSITION_VALUES'  "Return Differentiations and Position Values
    EXPORTING
         IM_TAB_POSITION = lv_im_tab_position
         IM_ACC_DEF_SIM = lv_im_acc_def_sim
         IM_FLG_NO_PROGIND = lv_im_flg_no_progind
         IM_DATE = lv_im_date
         IM_NO_ZEROS = lv_im_no_zeros
         IM_WITH_PLANNED = lv_im_with_planned
         IM_BY_POSTING_DATE = lv_im_by_posting_date
         IM_SEARCH_STRATEGY = lv_im_search_strategy
         IM_SIMULATE_VALUATION = lv_im_simulate_valuation
         IM_POSTING_FLAG_NEEDED = lv_im_posting_flag_needed
         IM_FLG_SKIP_POSTING_BUFFER = lv_im_flg_skip_posting_buffer
    IMPORTING
         EX_TAB_POSITION_VALUE = lv_ex_tab_position_value
         EX_TAB_MESSAGES = lv_ex_tab_messages
         EX_TAB_SUBPOS_VALUE_REP = lv_ex_tab_subpos_value_rep
         EX_TAB_POSITION_VALUE_SIM = lv_ex_tab_position_value_sim
. " GET_POSITION_VALUES




ABAP code using 7.40 inline data declarations to call FM GET_POSITION_VALUES

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
DATA(ld_im_acc_def_sim) = ' '.
 
DATA(ld_im_flg_no_progind) = ' '.
 
 
 
DATA(ld_im_no_zeros) = 'X'.
 
 
DATA(ld_im_with_planned) = 'X'.
 
 
 
DATA(ld_im_search_strategy) = TPMCO_SEARCH_DB_RO.
 
DATA(ld_im_simulate_valuation) = ' '.
 
DATA(ld_im_posting_flag_needed) = ' '.
 
DATA(ld_im_flg_skip_posting_buffer) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!