ABAP Document: Understanding SAP Dates, Currency, and Units of Measure, Slides of Computer Programming

An in-depth exploration of how dates, currency, and units of measure are handled in abap, the programming language used by sap. It covers the unique treatment of dates as character types, the use of reference fields for quantities and currencies, and the configuration of exchange rates and units of measure.

Typology: Slides

2012/2013

Uploaded on 09/27/2013

vikrant
vikrant 🇮🇳

4.4

(9)

119 documents

1 / 35

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction ABAP
Dates
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download ABAP Document: Understanding SAP Dates, Currency, and Units of Measure and more Slides Computer Programming in PDF only on Docsity!

Introduction ABAP

Dates

Lecture Overview

 I go into more depth than your book about how currency and quantity values work

Dates (Data Type)

 We have a couple of ways to deal with dates  The primary date data type  System fields for date and time that come from the SYST struct

The SYST Structure

(Illustration)

The Date (D) Data Type (1)

 It’s just an 8 character string

The Date (D) Data Type (2)

 The internal format is YYYYMMDD  There are ABAP dictionary fields for dates  sy-datum gets the value of the system date  Example to print the current date

The Time (T) Data Type

 The Time (T) data type stores the time as a character string HHMMSS  ABAP dictionary types store timestamps in UTC format  TIMESTAMP (YYYMMMDDDhhmmss)  TIMESTAMPL (YYYMMDDhhmmssmmmuuun)  sy-uzeit gets the system time

Manipulating Date Parts

 When subtracting two dates, you get the number of elapsed days

Manipulating Time Parts

Introduction to Reference

Fields

 Quantity and currency amounts use reference fields  Quantities work with UNIT (units)  Currency fields work with (a currency key) CUKY  The reference table contains a field with the currency key (CUKY) Or unit of measure UNIT

Quantity and Currency Fields

 They are not primary data types  They are components of a structure in the ABAP dictionary

Currency Fields

 They are used to convert amounts from one currency to another

 They are really packed (P) BCD numbers  A currency must also have currency key, which designates the currency  CUKY type  Use of the CURR data type is discouraged

Currency Tables

 TCURC currency codes  TCURF conversion factors  TCURR exchange rate

Currency (Example)

 Using the table ZEKEDAHLTEST  PRICE is of type CURR