‎2008 May 09 9:46 AM
IF sa30-yygpreisbi CA '#'.
EXIT.
ELSE.
IF sa30-yygpreisbi <= hgvabbv_30-yygpreisab.
fehler_vertrag = 1.
IF xscreen = space.
syst-msgno = '442'.
syst-msgid = 'YS'.
syst-msgty = 'W'.
PERFORM protokollausgabe.
ELSE.
MESSAGE e442.
ENDIF.
return_code = 4.
ENDIF.
ENDIF.
please tell me the reason?
my presbi is a date field also if it contains #### then also its not exiting
‎2008 May 09 9:48 AM
‎2008 May 09 9:56 AM
My preisbi is a date field so if a situation arises when it contains a #### characters
then it shlod check and exit from perform
but its not doing that ?
‎2008 May 09 10:00 AM
below code works fine for me ...
data : v_c type C value '#'.
data : v_datum like sy-datum.
start-of-selection.
v_datum = '####'.
if v_datum CA v_c.
exit.
else.
*coding
endif.
‎2008 May 09 9:56 AM
hi bhanu,
i dunno wot u using for CA = contains any..if that contains '#' ..it will exit..othawise i doesnt..
hope this helps
regds
‎2008 May 09 9:58 AM
how do you ever get a situation where in you get a date field having characters '####' ??
‎2008 May 09 10:07 AM
There is a structure SA30 which contains all my dates
after this check its like
sa30 is been sa30 USING low_value_translator
which leads to value in sa-30 date field -00000 to #######
cn u please help me?
‎2008 May 12 11:36 AM
Hi,
If the content '####' is fixed then use the following condition
IF date CP '########'.
statements if condition is true.
endif.
If there are 4 # in the string then use 8 # in the if condition.
As # is escape character. If comparision is with '##', while execution the code will be interpreted like, first # is escape character, it will take next character # for the comparision.
reward if helps.
regards,
mahantesh
‎2008 May 09 10:06 AM
Check this code. Its working fine.
REPORT ZSCD_TEST3.
data : dat(8) type c.
dat = 'sachin#'.
if dat CA '#'.
write:/ ' contain #'.
else.
write:/ ' Does contain #'.
endif.
**************************************
In your code, see in the debug mode what is the value coming in sa30-yygpreisbi.
It might be the reason that it does not contain the desired data.
regads,