Exam C_ABAPD_2507 Topic 4 Question 8 Discussion
Actual exam question for SAP's C_ABAPD_2507 exam
Question #: 8
Topic #: 4
Question #: 8
Topic #: 4
You select a field flight_date with type DATS in the field list of a CDS view.
Which of the following expressions returns the 2-digit month from the field?
(Select 2 correct answers)
Which of the following expressions returns the 2-digit month from the field?
(Select 2 correct answers)
Suggested Answer: A,B Vote an answer
Comprehensive and Detailed Explanation from Exact Extract:
A DATS field is stored as YYYYMMDD.
* Option A: substring( flight_date, 5, 2 ) # Extracts characters 5-6 # correct month.
* Option B: right( left( flight_date, 6 ), 2 ) # Takes first 6 chars YYYYMM, then last 2 # correct month.
* Option C: Wrong, extracts last 2 chars of MMDD, results in day not month.
* Option D: Wrong, starts at 4 # gives YM instead of MM.
Study Guide Reference: ABAP CDS Development Guide - String Functions in CDS.
A DATS field is stored as YYYYMMDD.
* Option A: substring( flight_date, 5, 2 ) # Extracts characters 5-6 # correct month.
* Option B: right( left( flight_date, 6 ), 2 ) # Takes first 6 chars YYYYMM, then last 2 # correct month.
* Option C: Wrong, extracts last 2 chars of MMDD, results in day not month.
* Option D: Wrong, starts at 4 # gives YM instead of MM.
Study Guide Reference: ABAP CDS Development Guide - String Functions in CDS.
by Vanessa at Dec 21, 2025, 04:16 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).