‎2007 May 15 4:59 PM
Dear friends
I am checking date like below
if not i_date1 is initial. is this correct or i have to check like
if not i_date1 is space.
pls suggest
thanks in advance
karthik
‎2007 May 15 5:00 PM
‎2007 May 15 5:01 PM
Hi,
If the i_date1 is of data type D..Then you can check IF NOT i_date1 IS INITIAL..
Thanks,
Naren
‎2007 May 15 5:07 PM
Hi naran,
The I_date is declared as date only but when ever the I_date is space the condition not satisfying
pls see the below code
i_date = int_out1-zactcostdte.
if not i_date is initial.
CONCATENATE i_date6(2) i_date4(2) i_date(4) INTO
i_OUTPUT SEPARATED BY '.'.
int_out1-zactcostdte = i_output.
else.
int_out1-zactcostdte = '00.00.0000'.
endif.
if the i_date is space instead of '00000000' then it is going to concatenate instead of going to else part.
pls suggest
‎2007 May 15 5:09 PM
Hi,
DOn't check l_date is initial.
Check if ldate CO '00000000'.
Regards,
Deepu.K
‎2007 May 15 5:11 PM
Hi,
What is the data type of the field zactcostdte
Thanks,
Naren
‎2007 May 15 5:15 PM
‎2007 May 15 5:37 PM
dear naren
if i_date co '00000000' or i_date co ' ' or i_date is initial.
int_out1-zactcostdte = '00.00.0000'.
else.
CONCATENATE i_date6(2) i_date4(2) i_date(4) INTO
i_OUTPUT SEPARATED BY '.'.
int_out1-zactcostdte = i_output.
endif.
i have coded like above is it correct.
‎2007 May 15 5:43 PM
Hello Karthik,
Did u check my code ?
What is the problem in that ?
R u not getting the required output ?
I tried it in my system and after checking it then I fwded that to u.
Regards,
Deepu.K
‎2007 May 15 5:20 PM
Hi,
Probably while storing the data "int_out1-zactcostdte" the date value would have been blank...instead of initial value for date...
In this case..
Check for both NOT INTIIAL and NOT EQUAL SPACE..
if not i_date1 is space AND
not i_date1 is initial.
Concatenate
else.
Default
endif.
Thanks,
Naren
‎2007 May 15 5:28 PM
Hello ,
Try this :-
DATA: i_date TYPE sy-datum.
DATA: i_output TYPE char10.
i_date = sy-datum.
CLEAR i_date.
IF i_date CN '00000000'.
CONCATENATE i_date+6(2) i_date+4(2) i_date(4) INTO
i_output SEPARATED BY '.'.
i_date = i_output.
ELSE.
WRITE '00000000' TO i_date.
ENDIF.
WRITE:/ i_date.
WRITE:/ 'BLA BLA BLA '.
WRITE:/ i_output.
Hope this helps.
Regards,
Deepu.K
‎2007 May 15 5:44 PM
Hi,
Yes..Looks good..
But IS INITIAL and this condition i_date co '00000000' both are same..
You can remove one of them..
Thanks,
Naren