cancel
Showing results for 
Search instead for 
Did you mean: 

How to display date field in Webdynpro ALV in format 'DD/MM/YYYY'?

0 Kudos

Hi experts,

I am not getting displayed the date field in ALV in the format 'DD/MM/YYYY' if it is different than my user setting's format (DD.MM.YYYY).

I could not find the conversion routine for this. Is it possible to write customer conversion routine?

I have to use DATE field, otherwise if I display this format in CHAR10 field , sorting in ALV does not work for this field.

PLEASE ANY HELP!

Kind regards,

Syed

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member211591
Contributor
0 Kudos

additionally:

probably sorting in the ALV is based on the internal format YYYYMMDD (please check thats correct by comparing the dates in your application).

I don't know if it is possible to sort by the displayed format DD/MM/YYYY; I'am afraid not.

Regards

ismail

0 Kudos

Thanks Ismail for your efforts,

I had managed to display the date in DD/MM/YYYY format in alv .....but the sort is not working correctly as it works for YYYYMMDD.

Thanks

Syed

former_member211591
Contributor
0 Kudos

Hi Syed,

the standard conversion exit converts the date using the user setting's format.

But you can create a datatype (with own domain) with your own conversion exit.

create your own conversion exit for output with:

DATA: D3DAT(10) VALUE '__/__/____'.
*=*
   CLEAR OUTPUT.
   MOVE INPUT(4)    TO D3DAT+6(4).
   MOVE INPUT+4(2TO D3DAT+3(2).
   MOVE INPUT+6(2TO D3DAT(2).
*=*
   OUTPUT = D3DAT.


and vice versa for conversion exit input.


You can compare with these conversion exits:

CONVERSION_EXIT_D3DAT_OUTPUT

CONVERSION_EXIT_D3DAT_INPUT


Regards

ismail