Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to display data type d like MMDD

Former Member
0 Kudos
166

Hi everybody,

I have a problem in my development.

I select some data from DB table , one field of the table is type D, and in the ALV display function,I want the field in my internal table displayed like MMDD. for example, the field of one data record selected by me is "xx,2008.11.24,xx,xx". And I want this record displayed in the ALV like this "xx,11.24,xx,xx".that is to say,I don't want the year displayed in the ALV .How can I achieve this?

Thanks for your help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
132

Hi,

Try using offset method.

It will help u out.

Thanks & Regards

7 REPLIES 7

Former Member
0 Kudos
132

Hi,

using the offset select the required day and month from the date field instead all.

0 Kudos
132

Hi avinash kodarapu,

could you please explain a little more detailed for me?

I don't know how to set offset.

thanks a lot.

Former Member
0 Kudos
133

Hi,

Try using offset method.

It will help u out.

Thanks & Regards

0 Kudos
132

Hi Ranjit Kumar,

could you please explain a little more detailed for me?

I don't know how to set offset.

thanks a lot.

0 Kudos
132

you have to pick up another field into the internal table, the field has to be character type with length 5. After you select the data from the database you have to loop through the internal table and fill the new field the following way:

CONCATENATE date+4(2) date+6(2) INTO field SEPARATEDY BY '.'.

Former Member
0 Kudos
132

Hi Aaron Shen ,

g_date = sy-datum+6(2). Date

g_date1 = sy-datum+4(2). Month

g_date2 = sy-datum+(4). Year

former_member203501
Active Contributor
0 Kudos
132

data: v_char type char20 value 'xx,2008.11.24,xx,xx'.

data: result type char20 .

concatenate v_char0(3) v_char8(11) into result .

write: result .