SAP SD_PRINT_TERMS_OF_PAYMENT Function Module for Format Terms of Payment According to Table 052
SD_PRINT_TERMS_OF_PAYMENT is a standard sd print terms of payment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Format Terms of Payment According to Table 052 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 sd print terms of payment FM, simply by entering the name SD_PRINT_TERMS_OF_PAYMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: VPRI
Program Name: SAPLVPRI
Main Program: SAPLVPRI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SD_PRINT_TERMS_OF_PAYMENT 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 'SD_PRINT_TERMS_OF_PAYMENT'"Format Terms of Payment According to Table 052.
EXPORTING
* BLDAT = 00000000 "Document date
* BUDAT = 00000000 "Posting date
* CPUDT = 00000000 "CPU date
* LANGUAGE = ' ' "Language
TERMS_OF_PAYMENT = "Terms of payment key
* COUNTRY = ' ' "
* HOLDBACK = ' ' "
* TOP_HOLDBACK_INFO = "
* DOCUMENT_CURRENCY = ' ' "
IMPORTING
BASELINE_DATE = "Baseline date for payment
PAYMENT_SPLIT = "
ZFBDT = "
TABLES
TOP_TEXT = "Table with text for terms of payment
EXCEPTIONS
TERMS_OF_PAYMENT_NOT_IN_T052 = 1
IMPORTING Parameters details for SD_PRINT_TERMS_OF_PAYMENT
BLDAT - Document date
Data type: VBRK-ERDATDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
BUDAT - Posting date
Data type: VBRK-FKDATDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
CPUDT - CPU date
Data type: VBRK-ERDATDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language
Data type: NAST-SPRASDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TERMS_OF_PAYMENT - Terms of payment key
Data type: T052-ZTERMOptional: No
Call by Reference: No ( called with pass by value option)
COUNTRY -
Data type: KNA1-LAND1Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
HOLDBACK -
Data type: VBDKR-P_SPLITDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TOP_HOLDBACK_INFO -
Data type: FPLTVBOptional: Yes
Call by Reference: No ( called with pass by value option)
DOCUMENT_CURRENCY -
Data type: VBRK-WAERKDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SD_PRINT_TERMS_OF_PAYMENT
BASELINE_DATE - Baseline date for payment
Data type: VBRK-FKDATOptional: No
Call by Reference: No ( called with pass by value option)
PAYMENT_SPLIT -
Data type: VBDKR-P_SPLITOptional: No
Call by Reference: No ( called with pass by value option)
ZFBDT -
Data type: VBDKR-ZFBDTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_PRINT_TERMS_OF_PAYMENT
TOP_TEXT - Table with text for terms of payment
Data type: VTOPISOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TERMS_OF_PAYMENT_NOT_IN_T052 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SD_PRINT_TERMS_OF_PAYMENT 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_bldat | TYPE VBRK-ERDAT, " 00000000 | |||
| lt_top_text | TYPE STANDARD TABLE OF VTOPIS, " | |||
| lv_baseline_date | TYPE VBRK-FKDAT, " | |||
| lv_terms_of_payment_not_in_t052 | TYPE VBRK, " | |||
| lv_budat | TYPE VBRK-FKDAT, " 00000000 | |||
| lv_payment_split | TYPE VBDKR-P_SPLIT, " | |||
| lv_cpudt | TYPE VBRK-ERDAT, " 00000000 | |||
| lv_zfbdt | TYPE VBDKR-ZFBDT, " | |||
| lv_language | TYPE NAST-SPRAS, " ' ' | |||
| lv_terms_of_payment | TYPE T052-ZTERM, " | |||
| lv_country | TYPE KNA1-LAND1, " ' ' | |||
| lv_holdback | TYPE VBDKR-P_SPLIT, " ' ' | |||
| lv_top_holdback_info | TYPE FPLTVB, " | |||
| lv_document_currency | TYPE VBRK-WAERK. " ' ' |
|   CALL FUNCTION 'SD_PRINT_TERMS_OF_PAYMENT' "Format Terms of Payment According to Table 052 |
| EXPORTING | ||
| BLDAT | = lv_bldat | |
| BUDAT | = lv_budat | |
| CPUDT | = lv_cpudt | |
| LANGUAGE | = lv_language | |
| TERMS_OF_PAYMENT | = lv_terms_of_payment | |
| COUNTRY | = lv_country | |
| HOLDBACK | = lv_holdback | |
| TOP_HOLDBACK_INFO | = lv_top_holdback_info | |
| DOCUMENT_CURRENCY | = lv_document_currency | |
| IMPORTING | ||
| BASELINE_DATE | = lv_baseline_date | |
| PAYMENT_SPLIT | = lv_payment_split | |
| ZFBDT | = lv_zfbdt | |
| TABLES | ||
| TOP_TEXT | = lt_top_text | |
| EXCEPTIONS | ||
| TERMS_OF_PAYMENT_NOT_IN_T052 = 1 | ||
| . " SD_PRINT_TERMS_OF_PAYMENT | ||
ABAP code using 7.40 inline data declarations to call FM SD_PRINT_TERMS_OF_PAYMENT
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 ERDAT FROM VBRK INTO @DATA(ld_bldat). | ||||
| DATA(ld_bldat) | = 00000000. | |||
| "SELECT single FKDAT FROM VBRK INTO @DATA(ld_baseline_date). | ||||
| "SELECT single FKDAT FROM VBRK INTO @DATA(ld_budat). | ||||
| DATA(ld_budat) | = 00000000. | |||
| "SELECT single P_SPLIT FROM VBDKR INTO @DATA(ld_payment_split). | ||||
| "SELECT single ERDAT FROM VBRK INTO @DATA(ld_cpudt). | ||||
| DATA(ld_cpudt) | = 00000000. | |||
| "SELECT single ZFBDT FROM VBDKR INTO @DATA(ld_zfbdt). | ||||
| "SELECT single SPRAS FROM NAST INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = ' '. | |||
| "SELECT single ZTERM FROM T052 INTO @DATA(ld_terms_of_payment). | ||||
| "SELECT single LAND1 FROM KNA1 INTO @DATA(ld_country). | ||||
| DATA(ld_country) | = ' '. | |||
| "SELECT single P_SPLIT FROM VBDKR INTO @DATA(ld_holdback). | ||||
| DATA(ld_holdback) | = ' '. | |||
| "SELECT single WAERK FROM VBRK INTO @DATA(ld_document_currency). | ||||
| DATA(ld_document_currency) | = ' '. | |||
Search for further information about these or an SAP related objects