on 04-30-2013 10:59 AM
Hi All,
We have a requirement in MSS Add-On Time Approval screen to enable sort option for all coulmns in table and which is dynamic table. We have done almost except sorting on date fields "From date" and "To date" as those are coming as string data type from backend.
Can you pl suggest how we can acheive the column type from string to date and values to date and sort those columns.
Regards,
Suresh
Hi Suresh,
You should have used context attribute of type date for the From and To date. If your From date and To Date is bound to String type, then you can try to convert it to Date format using FM - CONVERT_DATE_TO_INTERNAL.
Regards
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
First you have to read the context attribute in String format and save it in the local variable str_date (let say your date is 30.04.2013).
Then call the function module
DATA: str_date type string,
dd_date type dats.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = str_date
* ACCEPT_INITIAL_DATE =
IMPORTING
DATE_INTERNAL = dd_date
* EXCEPTIONS
* DATE_EXTERNAL_IS_INVALID = 1
* OTHERS = 2
.
the internal date dd_date will be 20130430 which you can use for comparision.
Hope this helps.
Regards
Abhinav
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.