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

fielld validations

Former Member
0 Likes
247

hi to all

the following is written in flow logic can u pls explain this .

here in the screen 6 input fields are there.

PROCESS AFTER INPUT.

FIELD INPUT1 MODULE MODULE_1.

FIELD INPUT2 MODULE MODULE_2.

FIELD INPUT3 MODULE MODULE_3.

CHAIN.

FIELD INPUT4.

MODULE CHAIN_MODULE_1.

FIELD INPUT5.

FIELD INPUT6 MODULE CHAIN_MODULE_2.

ENDCHAIN.

MODULE EXECUTION.

program is as follows

DATA: ok_code TYPE sy-ucomm,

input1 TYPE i, input2 TYPE i, input3 TYPE i,

input4 TYPE i, input5 TYPE i, input6 TYPE i,

sum TYPE i.

CALL SCREEN 100.

MODULE init_screen_100 OUTPUT.

CLEAR: input1, input2, input3, input4, input5, input6.

SET PF-STATUS 'STATUS_100'.

ENDMODULE.

MODULE cancel INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE module_1 INPUT.

IF input1 < 50.

MESSAGE e888(sabapdocu) WITH text-001 '50' text-002.

ENDIF.

ENDMODULE.

MODULE module_2 INPUT.

IF input2 < 100.

MESSAGE e888(sabapdocu) WITH text-001 '100' text-002.

ENDIF.

ENDMODULE.

MODULE module_3 INPUT.

IF input3 < 150.

MESSAGE e888(sabapdocu) WITH text-001 '150' text-002.

ENDIF.

ENDMODULE.

MODULE chain_module_1 INPUT.

IF input4 < 10.

MESSAGE e888(sabapdocu) WITH text-003 '10' text-002.

ENDIF.

ENDMODULE.

MODULE chain_module_2 INPUT.

CLEAR sum.

sum = sum + : input4, input5, input6.

IF sum <= 100.

MESSAGE e888(sabapdocu) WITH text-004 '100' text-002.

ENDIF.

ENDMODULE.

MODULE execution INPUT.

MESSAGE i888(sabapdocu) WITH text-005.

ENDMODULE.

1 REPLY 1
Read only

Former Member
0 Likes
215

Hi Sunil,

Still you have not seen the rules and Regulations of SDN

It is a good practice in SDn to reward points for the useful answers

This is a sample Program for a Module Pool program giving the example of how to validate the fields in PAI.

There are some 6 input fields on the screen,

When you enter the values less than 50 in first input field a message is displayed.

Similarly in Second input field when a value less than 100 is entered a message is displayed similarly for field 3 it is less than 150.

in field 4 when a values less that 10 is entered displays a message

and lastly in the field 6 when the sum is less that or equal to 100 a message is displayed.

So this means that based on some input conditions you will trigger messages as per your requirement.

Reward Points if useful

regards

Anji