SD_PRINT_TERMS_OF_PAYMENT Format Terms of Payment for Printing
Converts a payment terms key (T052) into readable text lines based on the document date and language; due dates, discount percentages and installment splits are turned into text. It is used in invoice, order confirmation and pro forma forms to print the payment terms text. Pass the document, posting or entry date for correct due dates; if the payment terms are not defined the TERMS_OF_PAYMENT_NOT_IN_T052 exception is raised.
- Function group
- VPRI
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| TERMS_OF_PAYMENT | T052-ZTERM | Terms of payment key | Yes |
| BLDAT | VBRK-ERDAT | Document date | — |
| BUDAT | VBRK-FKDAT | Posting date | — |
| CPUDT | VBRK-ERDAT | Entry date | — |
| LANGUAGE | NAST-SPRAS | Language | — |
| COUNTRY | KNA1-LAND1 | Country | — |
| DOCUMENT_CURRENCY | VBRK-WAERK | Document currency | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| BASELINE_DATE | VBRK-FKDAT | Baseline date |
| PAYMENT_SPLIT | VBDKR-P_SPLIT | Installment payment indicator |
| ZFBDT | VBDKR-ZFBDT | Baseline date for due date calculation |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| TOP_TEXT | VTOPIS | Terms of payment text lines | Yes |
Exceptions
- TERMS_OF_PAYMENT_NOT_IN_T052 — Payment terms not in T052
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'SD_PRINT_TERMS_OF_PAYMENT'
EXPORTING
terms_of_payment = lv_terms_of_payment
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
OTHERS = 2.Related tables
Solutions using this function
Sales Invoice and Delivery Note Forms for Domestic, Export and Export-Registered Sales with Email Sending
A custom form and output program that prints invoices and delivery notes with the right layout for each type of sale. Domestic, export and …
Sales Order Confirmation and Proforma Invoice Output with Automatic Email
A custom form program that prepares the order confirmation and, when needed, the proforma invoice as PDF the moment the sales order is saved and …
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.