‎2008 Jun 18 2:00 PM
hi all,
in my report i have a select option of GL ACCOUNT.
I need to restrict the GL Account range from 5000 to 100000.
if account is outside the range then i need to get a error message like enter with in the range 5000 to 10000.
please help me how to write code for restrict the account from 5000 to 10000 and code for to get message.
thanks in advance
‎2008 Jun 18 2:05 PM
hi,
put the conditon like this.
if s_glac-low > '5000' AND
s_glac-high < 100000.
message 'error'.
else.
your code***********.
endif.
Regards
Sandeep Reddy
Edited by: Sandeep Reddy on Jun 18, 2008 3:07 PM
‎2008 Jun 18 2:06 PM
do like this..
add this in the initialization.
s_field-low = '5000'.
s_feild-sign = 'E'.
s_field-option = 'BT'.
s_field-high = '10000'.
append s_field.
‎2008 Jun 18 2:07 PM
Hi ,
Check in the code whether your select option values are inside the range . IF not show the error message .
For this you can write :
loop at s_gl.
if s_gl-low LT 5000 OR GT 10000
Show message .
else.
Continue.
endloop.
‎2008 Jun 18 2:08 PM
Hi Sai,
At selection screen event check if so_glaccount-low is less than 5000 and so_glaccount-high is greater than 10000 , if yes raise the required error message.
AT SELECTION-SCREEN.
If gl_account-low le 5000 and gl_account-high >10000.
MESSAGE 'enter with in the range 5000 to 10000'.
ENDIF.
Regards,
Sachin M M
‎2008 Jun 18 2:09 PM
hi
u can do this funtionality in AT SELCTION-SCREEN OUTPUT
Check the value of selectoption HIGH AND LOW in this event and display an message
PLZ REWARD POINTS
Cheers
Snehi
‎2008 Jun 18 2:10 PM
if s_glact-low < '5000' or
s_glact-high > '100000' or
message e000 with 'error'.
endif.
‎2008 Jun 18 2:18 PM
hi,
there are several cases while validating this.
I hope the below logic works in all the cases
Loop at s_account.
IF s_account-low < '5000' or s_account-low > '100000'
or s-account-high > '100000'.
message error.
endif.
endloop.
‎2008 Jun 18 2:27 PM
Hi Latha,
Everytime you create a Select-Option (eg SO_SAKNR) an internal table is created with coloumns:
sign
option
low
high
where sign represents I/E which means Including or Excluding
Option may be EQ/LT/GT/NE/BT...... which represents EQual to/ LessThan/ Greater Than/ NotEqual/BeTween.....
low is for low range
high for higher limit/range
So in your report in event
AT SELECTION-SCREEN
*looping is required in case you have not used NO EXTENSION *option in ur selectop
loop at so_saknr.
if SO_SAKNR-LOW LT 5000 or SO_SAKNR-HIGH GT 100000.
*This will check whether user is entering a single field or range
if so_saknr-option eq 'BT'
message appropriate error message
endif.
endif.
endloop.
this was for your guidance the exact code can be build based on your actual scenario.
Thanks,
Saurabh
‎2008 Jun 18 2:40 PM
write the logic of this sudo logic in
at selection-screen.
select all gl account from gl master where glaccount in s_gl_accont.
loop through g/l table.
if g/l account < 5000
or g/l account > 10000.
message e208(00) with 'enter in 5000-100000 range only'.
endloop.
‎2008 Jun 18 2:51 PM
Hi,
at selection-screen.
if s_glaccount-low lt 5000 and s_glaccount-high gt 10000.
message text-001 type 'e'.
endif.
Hope it helps u.
Regards
Manjari.