# 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.

- Modules: SD
- Type: Function module
- Function group: VPRI
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/sd-print-terms-of-payment/

## 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)

```abap
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

T052

