Application Development and Automation 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: 
Read only

Problem in output for date field

Former Member
0 Likes
562

Hi experts...

i have one requirement like if string is initial i need to display blank for date field in out put...

but it is showing 00.00.0000..

My code is...

data: V_TEMP TYPE sy-datum,

V_TEMP1 TYPE sy-datum,

v_str type string,

v_str1 type string.

v_str1 = '2008091123457'.

v_str = '0'.

REPLACE ALL OCCURRENCES OF ',' IN v_str WITH SPACE.

CONDENSE v_str NO-GAPS.

v_TEMP1 = v_str1+0(8).

if v_str <> 0.

v_TEMP = v_str+0(8).

else.

v_temp = ''.

endif.

write:/ v_temp1 ,V_TEMP.

output is: 11.09.2008 00.00.0000(BUt i want space here just blank...)

can any body plz help me.....

Hi experts...

i have one requirement like if string is initial i need to display blank for date field in out put...

but it is showing 00.00.0000..

My code is...

data: V_TEMP TYPE sy-datum,

V_TEMP1 TYPE sy-datum,

v_str type string,

v_str1 type string.

v_str1 = '2008091123457'.

v_str = '0'.

REPLACE ALL OCCURRENCES OF ',' IN v_str WITH SPACE.

CONDENSE v_str NO-GAPS.

v_TEMP1 = v_str1+0(8).

if v_str <> 0.

v_TEMP = v_str+0(8).

else.

v_temp = ''.

endif.

write:/ v_temp1 ,V_TEMP.

output is: 11.09.2008 00.00.0000(BUt i want space here just blank...)

can any body plz help me.....

3 REPLIES 3
Read only

Former Member
0 Likes
523

Hi,

You can use something like that:


WRITE: date NO-ZERO.

Best regards.

Read only

Former Member
0 Likes
523

Solved

Read only

0 Likes
523

<removed by moderator>

Edited by: Thomas Zloch on Nov 24, 2010 10:25 AM - please don't ask for points for yourself, let moderators remind OP about forum rules