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: 

Adding Selection Screen in Screen - URGENT

Former Member
0 Kudos

Hi All,

Could someone help me define a select option field in my screen?

Thanks..

3 REPLIES 3

Former Member
0 Kudos

hi tin,

the following code may help you

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.

SELECT-OPTIONS:

s_vkorg FOR vbak-vkorg OBLIGATORY, " Sales Org.

s_auart FOR vbak-auart, " Sales order Type

s_vbeln FOR vbak-vbeln, " Sales Order Number

s_erdat FOR vbak-erdat NO-EXTENSION," Order create Date

s_ernam FOR vbak-ernam matchcode object

user_addr. " Created by

PARAMETERS : p_run TYPE BAPIVBRKTESTRUN-TESTRUN. " Test mode

SELECTION-SCREEN END OF BLOCK b1.

reward points if found helpful

0 Kudos

hi that would be useful if i am just using the selection screen. but i need to define it inside my screen painter..

Former Member
0 Kudos

first define a field in your screen painter through the transcation se51 the field i have created u named it as zg8_ekko-ebeln. now you can use this field as selection screen and if you want ranges there is also an option provided in the screen painter itself and the validation for this field can be done as in the code provided below you can define any number of fields in the same way.

select single ebeln into zg8_ekko from zg8_ekko where

ebeln = zg8_ekko-ebeln.

if sy-subrc = 0.

message 'the purchase order no: already exists' type 'E'.

else.

leave to screen 200.

endif.