SAP TPM_TRAC_PJ_GET_DATA_FOR_POS Function Module for Posting Information for a Position
TPM_TRAC_PJ_GET_DATA_FOR_POS is a standard tpm trac pj get data for pos SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Posting Information for a Position 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 tpm trac pj get data for pos FM, simply by entering the name TPM_TRAC_PJ_GET_DATA_FOR_POS into the relevant SAP transaction such as SE37 or SE38.
Function Group: TPM_TRAC_PJ
Program Name: SAPLTPM_TRAC_PJ
Main Program: SAPLTPM_TRAC_PJ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TPM_TRAC_PJ_GET_DATA_FOR_POS 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 'TPM_TRAC_PJ_GET_DATA_FOR_POS'"Posting Information for a Position.
EXPORTING
IM_IDENTIFIER = "Persistent Flow Selector
* IM_AC_POSTING_DATE = "Stichtag (Buchungsdatum)
IMPORTING
EX_AA_REF = "Account Assignment Reference
EX_POSITION_ACCOUNT = "Balance Sheet Account
EXCEPTIONS
NO_POSITION_CONTEXT = 1 NO_AA_REF = 2 NO_POSTINGS = 3
IMPORTING Parameters details for TPM_TRAC_PJ_GET_DATA_FOR_POS
IM_IDENTIFIER - Persistent Flow Selector
Data type: CL_POS_IDENTIFIER_DIFOptional: No
Call by Reference: No ( called with pass by value option)
IM_AC_POSTING_DATE - Stichtag (Buchungsdatum)
Data type: BUDATOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TPM_TRAC_PJ_GET_DATA_FOR_POS
EX_AA_REF - Account Assignment Reference
Data type: TPM_AA_REFOptional: No
Call by Reference: Yes
EX_POSITION_ACCOUNT - Balance Sheet Account
Data type: SAKNROptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_POSITION_CONTEXT - Position Context Not Found
Data type:Optional: No
Call by Reference: Yes
NO_AA_REF - Position Context hat keine Kontierungsreferenz
Data type:Optional: No
Call by Reference: Yes
NO_POSTINGS - Position Context wurde noch nicht bebucht
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TPM_TRAC_PJ_GET_DATA_FOR_POS 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_ex_aa_ref | TYPE TPM_AA_REF, " | |||
| lv_im_identifier | TYPE CL_POS_IDENTIFIER_DIF, " | |||
| lv_no_position_context | TYPE CL_POS_IDENTIFIER_DIF, " | |||
| lv_no_aa_ref | TYPE CL_POS_IDENTIFIER_DIF, " | |||
| lv_im_ac_posting_date | TYPE BUDAT, " | |||
| lv_ex_position_account | TYPE SAKNR, " | |||
| lv_no_postings | TYPE SAKNR. " |
|   CALL FUNCTION 'TPM_TRAC_PJ_GET_DATA_FOR_POS' "Posting Information for a Position |
| EXPORTING | ||
| IM_IDENTIFIER | = lv_im_identifier | |
| IM_AC_POSTING_DATE | = lv_im_ac_posting_date | |
| IMPORTING | ||
| EX_AA_REF | = lv_ex_aa_ref | |
| EX_POSITION_ACCOUNT | = lv_ex_position_account | |
| EXCEPTIONS | ||
| NO_POSITION_CONTEXT = 1 | ||
| NO_AA_REF = 2 | ||
| NO_POSTINGS = 3 | ||
| . " TPM_TRAC_PJ_GET_DATA_FOR_POS | ||
ABAP code using 7.40 inline data declarations to call FM TPM_TRAC_PJ_GET_DATA_FOR_POS
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.Search for further information about these or an SAP related objects