Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

At selection screen

Former Member
0 Likes
745

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
710

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

7 REPLIES 7
Read only

rajeshkumar_kaveti
Participant
0 Likes
710

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

Read only

Former Member
0 Likes
710

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.

Read only

Former Member
0 Likes
710
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

Read only

Former Member
0 Likes
711

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

Read only

shishupalreddy
Active Contributor
0 Likes
710

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,

Read only

Former Member
0 Likes
710

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.

Read only

Former Member
0 Likes
710

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.