SAP® Documentation

Single view

CL_BDT_AMOUNT - BDT Amount

Addresses (Business Address Services)   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This class represents the Business Data Type Amount.

Relationships

Inherits from: Cl_Bdt_Generic_Unit

The BDT Amount receives the BDT Code as a s Supplementary Component CurrencyCode.

Example

REPORT  bdt_Format_Test.

data:
  bdt_Amount           type ref to if_Bdt,
  bdt_Container_Amount type if_Bdt_Types=>ty_S_Container_Amount,
  formatting_Options   type ref to if_Bdt_Formatting_Options,
  formatted_Value      type string.

bdt_Container_Amount-content              = '1200'.
bdt_Container_Amount-currencyCode-content = 'EUR'.

formatting_Options = cl_Bdt_Formatting_Options=>create( ).
formatting_Options->set_Option(
  i_Key   = if_Bdt_Constants=>co_Curr_Presentation_mode
  i_Value = if_Bdt_Constants=>co_S_Curr_Presentation_mode-code ).

bdt_Amount = cl_Bdt_Factory=>create( if_Bdt_Constants=>co_Bdt_Amount ).

formatted_Value = bdt_Amount->format_Single(
  i_Container          = bdt_Container_Amount
  i_Formatting_Options = formatting_Options ).

write formatted_Value.

Notes

Formatting Options: currencyPresentationMode
Formatting Option Values: none, code, displayOnlyCode, displayOnlyDescription

Further information

Container-Definition:if_Bdt_Types=>ty_S_Container_Amount






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 2229 Date: 20190627 Time: 060711     sap01-206 ( 8 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.