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

Validations on Dialogur programming

Former Member
0 Likes
917

Hi all

I called a screen in Report program.

I designed a screen 100. In that i have taken 2 radiobuttons one is check1 and another is check 2. if once click the check1 radio button and corresponding input fields are name1 name2 and one checkbox ticked are entered then press EXECUTE push button it will start processing.

same as above for check2 radio button also.

Here my problem is when i check the any radiobutton it starts processing without giving any other input values.

i don't know how to validate inputs in dialogue programming. i had writting PAI code in report only by specifying the relevent MODULE.

could you please explain in brief??

i would appreciate an earlier reply?

Regards

Prabhu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

Hi prabhakar,

you can do validation using chain and endchain,

and field fieldname module module name.

Check these examples...

for input check in flow logic.

<b>demo_dynpro_value_select </b>

for input checks in program

<b>demo_dynpro_field_chain</b>

for automatic field checks

<b>demo_dynpro_automatic_checks</b>

Regards

vijay

7 REPLIES 7
Read only

Former Member
0 Likes
871

Hi prabhakar,

you can do validation using chain and endchain,

and field fieldname module module name.

Check these examples...

for input check in flow logic.

<b>demo_dynpro_value_select </b>

for input checks in program

<b>demo_dynpro_field_chain</b>

for automatic field checks

<b>demo_dynpro_automatic_checks</b>

Regards

vijay

Read only

0 Likes
870

Thanks Vijay,

could you please tell me how to validate fields in CHAIN and ENDCHAIN. and can we validate checkboxes, radiobuttons in CHAIN and ENDCHAIN statements

Regards

Prabhakar

Read only

Former Member
0 Likes
870

Hi,

I am confused a little, you are saying you have a REPORT PROGRAM. And then you say you have a Screen 100. So you have created a EXECUTABLE PROGRAM and added screens to it.

In whichever screen you have fields, you will have PROCESS BEFORE OUTPUT (PBO) and PROCESS AFTER INPUT (PAI). You will get the values entered by the user on the screen in PAI.

You can do the validations there.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
870

Hi,

CHAIN

IF CHECKBOX = 'X'.

DO processing

ELSE

MESSAGE E000(00) with 'Please check the CHECK BOX'.

ENDIF

ENDCHAIN.

Regards,

Ravi

Read only

Former Member
0 Likes
870

Hi,

You cannot perform input checks in PAI modules of programs until you have transported the contents of the input fields to the ABAP program. You can then use logical expressions to check the values that the user entered.

<b>Checking Single Fields</b>

If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:

FIELD <f> MODULE <mod>.

the corresponding input field on the current screen (and only this field) is made ready for input again, allowing the user to enter a new value. If the field is only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.

<b>Checking a Set of Fields</b>

If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:

CHAIN.

FIELD: <f1>, <f 2>,...

MODULE <mod1>.

FIELD: <g1>, <g 2>,...

MODULE <mod2>.

...

ENDCHAIN.

all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.

Regards,

Sameena

Read only

Former Member
0 Likes
870

Hi

For doing this you have to code your logic in PBO and PAI of that screen

You can arrange all your radiobuttons, I/P boxes as well as checkboxes (with modif id) on screen 100

you can make invisible name1, name2 and checkbox using loop at screen and modify screen in PBO module and than in the PAI of screen.. you can make your i/p boxes as well as chek box visible using loop at screen and modify screen depending on the selected radio button (case statement). You can validate your entries also in PAI.

I hope this is what you want to do.

Read only

Former Member
0 Likes
870

Hello Prabhu,

Simply make your name1 & name2 fields as mandatory/obligatory, if they are always supposed to have a value before executing any further.

Hope this helps..

Regards,

Nagaraju Chidurupalli.