SAP TPM_TRCO_MDATA_CTY_DISPLAY Function Module for Retrieve relevant info of a particluar commodity
TPM_TRCO_MDATA_CTY_DISPLAY is a standard tpm trco mdata cty display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Retrieve relevant info of a particluar commodity 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 trco mdata cty display FM, simply by entering the name TPM_TRCO_MDATA_CTY_DISPLAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: TPM_TRCO_MDATA
Program Name: SAPLTPM_TRCO_MDATA
Main Program: SAPLTPM_TRCO_MDATA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TPM_TRCO_MDATA_CTY_DISPLAY 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_TRCO_MDATA_CTY_DISPLAY'"Retrieve relevant info of a particluar commodity.
EXPORTING
I_TPM_CTY_ID = "Commodity ID identifying the commodity
IMPORTING
E_TRCOS_CTY_MASTER = "Commodity relevant master information
E_TRCOY_CTY_EXCHNG = "Exchange relevant master information
E_TRCOY_CTY_QUOTATION = "Commodity quotation sources information
E_TRCOY_CTY_FWD_PROV = "Provider settings for Forward Periods
E_COMMODITY_NAME = "Name of the Commodity
E_UNIT_OF_MEASURE = "Unit of measure for the Commodity
EXCEPTIONS
NO_COMMODITY_FOUND = 1
IMPORTING Parameters details for TPM_TRCO_MDATA_CTY_DISPLAY
I_TPM_CTY_ID - Commodity ID identifying the commodity
Data type: TRCO_COMM_IDOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TPM_TRCO_MDATA_CTY_DISPLAY
E_TRCOS_CTY_MASTER - Commodity relevant master information
Data type: TRCOS_CTY_MASTEROptional: No
Call by Reference: No ( called with pass by value option)
E_TRCOY_CTY_EXCHNG - Exchange relevant master information
Data type: TRCOY_CTY_EXCHNGOptional: No
Call by Reference: No ( called with pass by value option)
E_TRCOY_CTY_QUOTATION - Commodity quotation sources information
Data type: TRCOY_CTY_QUOTATIONOptional: No
Call by Reference: No ( called with pass by value option)
E_TRCOY_CTY_FWD_PROV - Provider settings for Forward Periods
Data type: TRCOY_CTY_PROVOptional: No
Call by Reference: No ( called with pass by value option)
E_COMMODITY_NAME - Name of the Commodity
Data type: TPM_CTY_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
E_UNIT_OF_MEASURE - Unit of measure for the Commodity
Data type: TPM_CTY_UOMOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_COMMODITY_FOUND - No commodity with given input exists
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TPM_TRCO_MDATA_CTY_DISPLAY 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_i_tpm_cty_id | TYPE TRCO_COMM_ID, " | |||
| lv_e_trcos_cty_master | TYPE TRCOS_CTY_MASTER, " | |||
| lv_no_commodity_found | TYPE TRCOS_CTY_MASTER, " | |||
| lv_e_trcoy_cty_exchng | TYPE TRCOY_CTY_EXCHNG, " | |||
| lv_e_trcoy_cty_quotation | TYPE TRCOY_CTY_QUOTATION, " | |||
| lv_e_trcoy_cty_fwd_prov | TYPE TRCOY_CTY_PROV, " | |||
| lv_e_commodity_name | TYPE TPM_CTY_NAME, " | |||
| lv_e_unit_of_measure | TYPE TPM_CTY_UOM. " |
|   CALL FUNCTION 'TPM_TRCO_MDATA_CTY_DISPLAY' "Retrieve relevant info of a particluar commodity |
| EXPORTING | ||
| I_TPM_CTY_ID | = lv_i_tpm_cty_id | |
| IMPORTING | ||
| E_TRCOS_CTY_MASTER | = lv_e_trcos_cty_master | |
| E_TRCOY_CTY_EXCHNG | = lv_e_trcoy_cty_exchng | |
| E_TRCOY_CTY_QUOTATION | = lv_e_trcoy_cty_quotation | |
| E_TRCOY_CTY_FWD_PROV | = lv_e_trcoy_cty_fwd_prov | |
| E_COMMODITY_NAME | = lv_e_commodity_name | |
| E_UNIT_OF_MEASURE | = lv_e_unit_of_measure | |
| EXCEPTIONS | ||
| NO_COMMODITY_FOUND = 1 | ||
| . " TPM_TRCO_MDATA_CTY_DISPLAY | ||
ABAP code using 7.40 inline data declarations to call FM TPM_TRCO_MDATA_CTY_DISPLAY
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