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

Validating the fields in Dialog Programming

Former Member
0 Likes
1,268

Hi,

I created one dialog programming in that 2 input field and one result field i used.When the user click on the Push Button without entering the value on the input Field, One Warning Message should display. Like "Enter Number1 and Number2".

Please Guide Me.

Thanks & Regards.

Dhanush.S.T

8 REPLIES 8
Read only

Former Member
0 Likes
1,026

Hi,

In Process after input do the validations like the following.

Module PAI.

if sy-ucomm = 'Enter'.

if input1 is intial and inpu2 is initial.

Message E00 with 'Enter Number1 and Number2'.

endif.

Edmodule.

Hope this solve ur problem.

Read only

0 Likes
1,026

Hi,

After Validation the input fields are displaying in Disable mode. How to make visible mode.

Please Guide Me.

Regards,

Dhanush.S.T

Read only

0 Likes
1,026

Hi,

Put all those fields in

CHAIN.

FIELD : INPUT1,

INPUT2.

MODULE PAI.

ENDCHAIN.

even if error is encountered chain --endchain will preserve the input fields to input again....

<REMOVED BY MODERATOR>

Regards,

ABAPer 007...

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 5:33 PM

Read only

0 Likes
1,026

Hi,

My Requirement is I have to make my..

Input Fields as visible in Runtime.

After displaying the Error MEssage..

InputField1 = visible

inputField2 = visible.

Please Tell me the Syntax.

Regards,

Dhanush.S.T

Read only

0 Likes
1,026

Description: There are many ways to validate fields that are created on a dynpro of a dialog screen program. Whether this is to validate a single field of multiple fields at the same time below is a few examples of how this can be coded into a PAI module of the dynpro flow logic.*Validating a single field on a dynpro screen via a PAI module call

FIELD scr_field-ebeln

MODULE validate_screen_field "ABAP code for validation contained in PAI module

ON INPUT.

*Validating multiple field on a dynpro screen via a PAI module call

CHAIN.

FIELD: scr_field-ebeln, scr_field-ebelp.

MODULE validate_screen_fields. "ABAP code for validation contained in PAI module

ENDCHAIN.

*Validating a dynpro screen field via a direct ABAP table selection

FIELD scr_field-ebeln

SELECT *

FROM ekko

WHERE ebeln = scr_field-ebeln

INTO ekko

WHENEVER NOT FOUND SEND ERRORMESSAGE 001

WITH ' Document Number '

ON INPUT.

Read only

0 Likes
1,026

Hi,

make it as an information message instead of error(type E).

Message I000(zmsg) with 'Enter Number1 and Number2'.

rgds,

bharat.

Read only

Former Member
0 Likes
1,026

Hi Dhanush,

In Process after input do the validations like the following.

Module PAI.

if sy-ucomm = 'Enter'.

if input1 is intial and inpu2 is initial.

Message I00 with 'Enter Number1 and Number2'.( use information insted of error )

endif.

Edmodule.

<REMOVED BY MODERATOR>

Regards,

Ganesh.

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 5:34 PM

Read only

Former Member
0 Likes
1,026

Hi,

After PAI, use this module.

FIELD: input1,inpu2

MODULE validate_both_numbers.

and in the program, define this module as follows.

MODULE validate_both_numbers INPUT.

IF input1 IS INITIAL OR input2 IS INITIAL.

MESSAGE ' Enter both the numbers' TYPE 'E'.

ENDIF.

ENDMODULE.