10-16-2006 10:43 AM
Hi Friends,
I want to check the entries for the sales group.
vbak-vkgrp(Parameter).
can you pls write the statement.
Thanx in advance,
Venu
10-16-2006 12:16 PM
Hi Venu,
PARAMETERS : p_vkgrp type VKGRP.
data: ws_VKGRP type VKGRP.
select single VKGRP
into ws_VKGRP
from TVKGR
where VKGRP eq p_vkgrp.
if sy-subrc ne 0.
message s000 'Invalid Sales Group'.
exit.
endif.
Reward points if this helps.
Manish
10-16-2006 10:58 AM
Hi,
tables: TVKGR.
select single * from TVKGR where VKGRP eq vbak-vkgrp.
if sy-subrc ne 0.
message i002(sy) with 'Sales group not exists'.
exit.
endif.
Regards,
Rajesh
10-16-2006 11:03 AM
Hi venu,
For checking the values in the selection screen..u need to check the check table associated with that field..for this it is TVBVK..so u write the select statement for this table....and put a message..
Cheers
Badri.
10-16-2006 11:08 AM
AT SELECTION-SCREEN.
IF not p_vkgrp is initial.
select single vkgrp from <b>TVBVK</b> into vbak-vkgrp where
vkgrp = p_vkgrp.
if sy-subrc ne 0.
*display error message her
endif.
endif.
Message was edited by: Chandrasekhar Jagarlamudi
10-16-2006 12:16 PM
Hi Venu,
PARAMETERS : p_vkgrp type VKGRP.
data: ws_VKGRP type VKGRP.
select single VKGRP
into ws_VKGRP
from TVKGR
where VKGRP eq p_vkgrp.
if sy-subrc ne 0.
message s000 'Invalid Sales Group'.
exit.
endif.
Reward points if this helps.
Manish
10-16-2006 12:51 PM
hi ,
hope this will help you out.
tables: TVKGR.
data : l_vkgrp.
select single vkgrp from TVKGR into l_vkgrp where VKGRP eq p_vkgrp.
if sy-subrc ne 0.
message e002(sy) with 'Sales group not exists'.
exit.
endif.
regards,
10-17-2006 9:42 AM
Hi,
Tables:vbak.
data:itab like vbak occurs 0.
parameters:p_vkgrp like vbak-vkgrp.
select * from vbak into table itab
where vkgrp = p_vkgrp.
if sy-subrc <> 0.
message e000(z) with 'sales group does not exist'.
endif.
Regards,
Sowjanya.
10-17-2006 10:16 AM
see, as it is a parameter,
u can check like below.
<b>at selection screen.
if <parameter> = '...'. / check not <parameter is initial/ write <parameter></b>
any of the above statement will check/ give param value.
if it is select-option,
u need to
check not <select-option>[] is initial.