‎2007 Jun 08 10:51 AM
Dear friends:
I have a report.In the selection screen,In the sales group field , I should enter only C01 , If i give C02 or other input, the system should show a error message. Please help me with sample & simple code, because i am a functional consultant.
Thanks&Regards
MSReddy
‎2007 Jun 08 10:53 AM
Hello,
Do like this:
AT SELCTION-SCREEN ON P_VKGRP.
IF P_VKGRP NE 'C01'.
ERROR MESSAGE.
ENDIF.
If useful reward.
Vasanth
‎2007 Jun 08 10:54 AM
Hi Sridhar ,
Here is the sample code for the same
If the selection screen feild name is p_VKGRP.
AT SELECTION-SCREEN.
IF P_VKGRP NE 'C01'.
MESSAGE E001.
ENDIF.
Here E001 is the error message you want to diaplay.
Regards
Arun
Assign points if helpful
‎2007 Jun 08 10:54 AM
AT SELECTION-SCREEN.
If p_sgroup ne 'C01'.
Message e000(zz) with 'Please Enter C01'.
endif.
‎2007 Jun 08 10:55 AM
hi,
AT SELCTION-SCREEN ON P_SALGRP.
IF P_SALGRP NE 'C01'.
MESSAGE E001(MESSAGE CLASS).
ENDIF.
‎2007 Jun 08 10:57 AM
hi sridhar,
write this code,
at selection-screen output.
if parameter NE 'CO1'.
message e001(message class)."sales group should be co1.
exit.
endif.
reward points if helpful.
regards,
seshu.
‎2007 Jun 08 10:58 AM
Hi,
at selection-screen output.
loop at screen.
if screen-name eq 'S_SALES'.
if S_slaes NE 'C01'.
message e001.
endif.
endif.
and you have to create one text element by double clickling on e001. you can give messge you want to display there.
regards,
Ruchika
reward if useful..............
‎2007 Jun 08 11:02 AM
hi,
we can write logic for that one in
data: var type <sales group field> value C01.
at selection-screen.
if var ne <sales group field>.
**here write error message using write statement
endif.regards,
AshokReddy.
‎2007 Jun 08 11:04 AM
hi,
u have to write all your validations at AT SELECTION-SCREEN event.
u can valdate a single field or no.of. fileds based on your requirement.
parameters: p_group like [salesgroup name].
AT selection-screen. [ for no of fields]
if p_group NE 'C01'.
message E000 with 'NTER ONLY C01 materials'.
endif.
for single field in selection screen then
AT selection-screen on fldname. [ for single field]
if p_group NE 'C01'.
message E000 with 'NTER ONLY C01 materials'.
endif.
if helpful reward soem points.
with regards,
suersh.
‎2007 Jun 08 11:05 AM
parameters : p_vkorg like vbak-vkorg.
at selection-screen.
if p_vkorg ne 'C01'.
message 'Please enter C01 in sales org' type 'E'.
endif.
strat-of-selection.
regards
shiba dutta
‎2007 Jun 08 11:10 AM
AT SELCTION-SCREEN ON <FIeld name>.
i.e in which field you are entering C01
IF <FIeld name> NE 'C01'.
MESSAGE E000(MU) WITH 'Sales group cannot be other than C01'..
ENDIF.
Write the above code before start-of-selection in your program
Reward points if useful.. If not send you code I will modify and send it back to you.
Regards,
Sairam
‎2009 Apr 20 7:07 AM