SAP TB_CORR_ALLOCATION_DETERMIN Function Module for Determine Current Correspondence SI
TB_CORR_ALLOCATION_DETERMIN is a standard tb corr allocation determin SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Current Correspondence SI 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 tb corr allocation determin FM, simply by entering the name TB_CORR_ALLOCATION_DETERMIN into the relevant SAP transaction such as SE37 or SE38.
Function Group: TB80
Program Name: SAPLTB80
Main Program: SAPLTB80
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_CORR_ALLOCATION_DETERMIN 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 'TB_CORR_ALLOCATION_DETERMIN'"Determine Current Correspondence SI.
EXPORTING
COMPANYCODE = "Company Code
CORTYP = "Correspondence type
COUNTERPARTY = "Partner
* SFHAART = ' ' "Transaction type
SGSART = "Product type
* I_ZGP = "kein Einfluß! nur noch SAP GP
IMPORTING
CORR_ALLOCATION = "Correspondence Standing Instruction
EXCEPTIONS
ALLOCATION_NOT_FOUND = 1 SFHAART_NOT_FOUND = 2 SGSART_NOT_FOUND = 3
IMPORTING Parameters details for TB_CORR_ALLOCATION_DETERMIN
COMPANYCODE - Company Code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
CORTYP - Correspondence type
Data type: VTBSTA2-CORTYPOptional: No
Call by Reference: No ( called with pass by value option)
COUNTERPARTY - Partner
Data type: VTBSTA2-PARTNROptional: No
Call by Reference: No ( called with pass by value option)
SFHAART - Transaction type
Data type: VTBSTA2-SFHAARTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SGSART - Product type
Data type: VTBSTA2-SGSARTOptional: No
Call by Reference: No ( called with pass by value option)
I_ZGP - kein Einfluß! nur noch SAP GP
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for TB_CORR_ALLOCATION_DETERMIN
CORR_ALLOCATION - Correspondence Standing Instruction
Data type: VTBSTA2Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ALLOCATION_NOT_FOUND - No Standing Instruction Defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SFHAART_NOT_FOUND - Transaction Type Is Not Defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SGSART_NOT_FOUND - Product Type Is Not Defined
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TB_CORR_ALLOCATION_DETERMIN 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_companycode | TYPE T001-BUKRS, " | |||
| lv_corr_allocation | TYPE VTBSTA2, " | |||
| lv_allocation_not_found | TYPE VTBSTA2, " | |||
| lv_cortyp | TYPE VTBSTA2-CORTYP, " | |||
| lv_sfhaart_not_found | TYPE VTBSTA2, " | |||
| lv_counterparty | TYPE VTBSTA2-PARTNR, " | |||
| lv_sgsart_not_found | TYPE VTBSTA2, " | |||
| lv_sfhaart | TYPE VTBSTA2-SFHAART, " SPACE | |||
| lv_sgsart | TYPE VTBSTA2-SGSART, " | |||
| lv_i_zgp | TYPE BOOLE-BOOLE. " |
|   CALL FUNCTION 'TB_CORR_ALLOCATION_DETERMIN' "Determine Current Correspondence SI |
| EXPORTING | ||
| COMPANYCODE | = lv_companycode | |
| CORTYP | = lv_cortyp | |
| COUNTERPARTY | = lv_counterparty | |
| SFHAART | = lv_sfhaart | |
| SGSART | = lv_sgsart | |
| I_ZGP | = lv_i_zgp | |
| IMPORTING | ||
| CORR_ALLOCATION | = lv_corr_allocation | |
| EXCEPTIONS | ||
| ALLOCATION_NOT_FOUND = 1 | ||
| SFHAART_NOT_FOUND = 2 | ||
| SGSART_NOT_FOUND = 3 | ||
| . " TB_CORR_ALLOCATION_DETERMIN | ||
ABAP code using 7.40 inline data declarations to call FM TB_CORR_ALLOCATION_DETERMIN
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.| "SELECT single BUKRS FROM T001 INTO @DATA(ld_companycode). | ||||
| "SELECT single CORTYP FROM VTBSTA2 INTO @DATA(ld_cortyp). | ||||
| "SELECT single PARTNR FROM VTBSTA2 INTO @DATA(ld_counterparty). | ||||
| "SELECT single SFHAART FROM VTBSTA2 INTO @DATA(ld_sfhaart). | ||||
| DATA(ld_sfhaart) | = ' '. | |||
| "SELECT single SGSART FROM VTBSTA2 INTO @DATA(ld_sgsart). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_zgp). | ||||
Search for further information about these or an SAP related objects