0

Hi all I have select query

select single number_range_int 
from BBPC_PROC_TYPE into lv_num_range 
where process_type = 'SHC'.

select single fromnumber tonumber 
from nriv into (lv_num_from,lv_num_to) 
where object = 'REQREQ' 
and NRRANGENR = lv_num_range.

before select-options I want to display message to user "Please enter shopping-cart range" lv_num_from(which I am getting from above select query) to lv_num_to (which I am getting from above select query)

How I can achieve this. Please help.

Thanks and Regards, Pari

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
pari
  • 31
  • 1
  • 5
  • Why would you want to do that? Standard behavior is to present the user with an input field and validate the data after entry. Knowledgeable users will know about the valid ranges anyway... – vwegert Nov 28 '16 at 20:51
  • 1
    @vwegert I want to avoid validation on select-option and user might don't know what is number range maintained for sc so I want to achieve this is it possible? please help. Thanks in advance. – pari Nov 28 '16 at 20:56

2 Answers2

2

I got the answer.Following is my code.

INCLUDE zsrmi_declarations1.
DATA : lv_shc TYPE crmd_orderadm_h-object_id .
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-111.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(79) lv_text.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS : s_shc FOR lv_shc .
SELECTION-SCREEN END OF BLOCK a1.

INITIALIZATION.
  SELECT SINGLE number_range_int FROM bbpc_proc_type INTO lv_num_range WHERE process_type = 'SHC'.
  SELECT SINGLE fromnumber tonumber FROM nriv INTO (lv_num_from,lv_num_to) WHERE object = 'REQREQ' AND nrrangenr = lv_num_range.

  lv_text = text-222.
  REPLACE '&1' IN lv_text WITH lv_num_from.
  REPLACE '&2' IN lv_text WITH lv_num_to.
pari
  • 31
  • 1
  • 5
0

You can achieve this using SELECTION-SCREEN - LINE, for more details and an example see the SAP help.

Gert Beukema
  • 2,510
  • 1
  • 17
  • 18