Application Development 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: 

At selection screen

Former Member
0 Kudos

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

Former Member
0 Kudos

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

rajeshkumar_kaveti
Participant
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos
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

Former Member
0 Kudos

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

shishupalreddy
Active Contributor
0 Kudos

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,

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.