‎2008 Aug 14 11:08 AM
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
‎2008 Aug 14 11:11 AM
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
‎2008 Aug 14 11:12 AM
if p_billing_doc(1) eq 1.
message e......
endif.
if p_sales_doc(1) eq 9.
message e......
endif.
‎2008 Aug 14 11:21 AM
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
‎2008 Aug 14 11:28 AM
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
‎2008 Aug 14 11:34 AM
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
‎2008 Aug 14 11:43 AM
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.
‎2008 Aug 14 11:45 AM
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.
‎2008 Aug 14 12:01 PM
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]!