Sunday, August 30, 2009
Convert month value of a date to text
The following ABAP code gets the month value of a particular date (YYYYMMDD) and converts
it to its text value. I know its a very crude way of doing it but it does the job and having the
ABAP code below provides a quick and easy way to copy and paste it into your SAP program.
*
DATA: gd_datetext TYPE string.
CASE sy-datum+4(2).
WHEN '01'.
gd_datetext = 'January'.
WHEN '02'.
gd_datetext = 'February'.
WHEN '03'.
gd_datetext = 'March'.
WHEN '04'.
gd_datetext = 'April'.
WHEN '05'.
gd_datetext = 'May'.
WHEN '06'.
gd_datetext = 'June'.
WHEN '07'.
gd_datetext = 'July'.
WHEN '08'.
gd_datetext = 'August'.
WHEN '09'.
gd_datetext = 'September'.
WHEN '10'.
gd_datetext = 'October'.
WHEN '11'.
gd_datetext = 'November'.
WHEN '12'.
gd_datetext = 'December'.
ENDCASE.
concatenate sy-datum(2) gd_datetext sy-datum+2(2) into gd_datetext
separated by space.
Pos
Subscribe to:
Post Comments (Atom)
Automation Testing
- Manual and Automation testing Challenges
- What you need to know about BVT (Build Verification Testing)
- BVT types
- Learning basics of QTP automation tool and preparation of QTP interview questions
- QuickTest Pro - QTP Functional testing tool review
- Tips you should read before automating your testing work
- Choosing Automation tool for your organization
Blog Archive
-
▼
2009
(14)
-
▼
August
(14)
- Convert month value of a date to text
- Convert month value of a date to text
- Add n number of working days to date
- Add n number of working days to date (using SAP pe...
- Add n number of working days to date
- Pop a Date in ABAP Report Selection Screens
- ABAP Date Time Variables and Addressing Subfields
- Different method of Converting Date in ABAP
- Understanding Date Selections Using the HR Logical...
- sample program1
- Substring in SAP's ABAP programming
- Date and Time Calculations
- Program 1
- Program2
-
▼
August
(14)
No comments:
Post a Comment