Skip to Content
0
Former Member
Feb 11, 2008 at 07:05 PM

Error when field contains characters

19 Views

Hi All,

I have itab_output2-storeno field which usually gets store number in it but sometimes I get a string with characters in it. How can I send a error message when itab_output2-storeno has chracters.

Thanks,

Veni.

FORM FORMAT_STORENO.

IF itab_output2-storeno >= 1 AND itab_output2-storeno <= 9.

CONCATENATE '1012'

'00000'

itab_output2-storeno

INTO wa1-storeno.

ELSEIF itab_output2-storeno > 9 AND itab_output2-storeno < 100.

CONCATENATE '1012'

'0000'

itab_output2-storeno

INTO wa1-storeno.

ELSEIF itab_output2-storeno > 99 AND itab_output2-storeno < 1000.

CONCATENATE '1012'

'000'

itab_output2-storeno

INTO wa1-storeno.

ELSEIF itab_output2-storeno > 999 AND itab_output2-storeno < 10000.

CONCATENATE '1012'

'00'

itab_output2-storeno

INTO wa1-storeno.

ENDIF.

ENDFORM. " FORMAT_STORENO