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

need logic for selection screen validation

Former Member
0 Likes
869

hi frnds,

my selection screen consist of two parameters - billing doc (VBRK-VBELN) and sales doc (VBAK-VBELN).

i want to give validation to my selection screen.

all the billing doc starts with 9******** and sales doc 1*******. if user enters 1**** in bill

doc it should give a message and if user enters 9******* in sales doc instead of 1*******

it also should throw a msg.

how to code this....

thnx daniel

Edited by: Julius Bussche on Aug 14, 2008 11:00 AM

8 REPLIES 8
Read only

Former Member
0 Likes
849

at start-of-selection


if pa_vbeln_billing(1) NE '9'.
  message I901.
endif. 
if pa_vbeln_sales(1) NE '1'.
  message I902.
endif. 

Edited by: Florian Kemmer on Aug 14, 2008 12:11 PM

Read only

Former Member
0 Likes
849

if p_billing_doc(1) eq 1.

message e......

endif.

if p_sales_doc(1) eq 9.

message e......

endif.

Read only

Former Member
0 Likes
849

hi daniel

chk this code

if p_billing+0(1) NE '9'.

message.

endif.

if p_sales+0(1) NE '1'.

message .

endif.

hope it will help you

Regards

deva

Read only

Former Member
0 Likes
849

Hi,

parameters : s_billing for.......,

s_sales for............

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = s_billing

IMPORTING

OUTPUT = s_billing.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = s_sales

IMPORTING

OUTPUT = s_sales.

if s_billing0(1) = '1' or s_sales-0(1) = '9'.

message

endif.

REgards,

Dhan

Edited by: Dhan W on Aug 14, 2008 12:38 PM

Read only

Former Member
0 Likes
848

hi,

try this...

at selection-screen on field <p_sales>

if p_sales(1) ne '1'.

message e001.

endif.

at selection-screen on field <p_billing>

if p_billing(1) ne '9'.

message e002.

endif

regards

padma

Read only

Former Member
0 Likes
848

hi,

AT SELECTION-SCREEN ON p_b_vbeln.

  • Validate billing doc on selection screen

IF p_b_vbeln+(1) EQ '1'.

MESSAGE .

ENDIF.

AT SELECTION-SCREEN ON p_s_vbeln.

  • Validate sales doc on selection screen

IF p_s_vbeln+(1) EQ '9'.

MESSAGE .

ENDIF.

Read only

Former Member
0 Likes
848

hi,

you can code the following:

if the selection screen parameters are s_billing and s_sales then,

if s_billinf+0(1) NE '9'.

error message.

else.

if s_sales+0(1) NE '1'.

error message.

endif.

endif.

Hope its useful.

Thnaks,

Rashmi.

Read only

Former Member
0 Likes
848

Please use meaningfull subject titles and follow-up on your unresolved threads.

The other rules are [here!|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]!