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

error message and set cursor field in subscreen

Former Member
0 Likes
1,938

hey ,

i have a program with main screen 500 and many subscreens 501,502 and so own .

when i want to validate wrong input in a field and set message type 'E' in the PAI of the subscreen the program

raise the message and exit from the program .

if i try to put the message in the PBO of the subscreen it dosn't exit but after the message the program dosn't flow to

command SET CURSOR FIELD that i wrote after the message .

how can i solve this ?

is there somthing that i'm missing in the basic code flow of the program ?

( screen 500 PBO - PAI -> SUBSCREEN 50x PBO - PAI )

best regards

ASA

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,082

Hi Asa Moked,

Once you issue type E message the system stop there itself and will not process further.

So in PAI you need to validate your fields within FIELD fname MODULE module_name.

In PAI

FIELD f1 MODULE validate.

in Program.
" For more info Please take F1 Help on CHAIN ENDCHAIN key Word
module validate.
if f1 is not initial.
"Validate here
message 'Please enter correct Value' TYPE 'E'" Now this field is again Editable
endif.
endmodule.

Cheerz

Ram

hey ,

i have a program with main screen 500 and many subscreens 501,502 and so own .

when i want to validate wrong input in a field and set message type 'E' in the PAI of the subscreen the program

raise the message and exit from the program .

if i try to put the message in the PBO of the subscreen it dosn't exit but after the message the program dosn't flow to

command SET CURSOR FIELD that i wrote after the message .

how can i solve this ?

is there somthing that i'm missing in the basic code flow of the program ?

( screen 500 PBO - PAI -> SUBSCREEN 50x PBO - PAI )

best regards

ASA

4 REPLIES 4
Read only

Former Member
0 Likes
1,083

Hi Asa Moked,

Once you issue type E message the system stop there itself and will not process further.

So in PAI you need to validate your fields within FIELD fname MODULE module_name.

In PAI

FIELD f1 MODULE validate.

in Program.
" For more info Please take F1 Help on CHAIN ENDCHAIN key Word
module validate.
if f1 is not initial.
"Validate here
message 'Please enter correct Value' TYPE 'E'" Now this field is again Editable
endif.
endmodule.

Cheerz

Ram

Read only

0 Likes
1,082

hello and thanks for the answer

let me clarify my problem :

i want to issue a message ( type e or i ) only if some fields are null and the user pressed on SAVE .

when i'm in the tab-strip and writing error message in :

PAI :

chain.

field XXX

field YYY

module issue_warning_message on chain-request.

endchain.

in module issue_warning_message : if XXX is initial --> message type E --> set cursor field XXX.

here i get the message and cursor is set.

when i try to post the message in without chain or any events :

module user_command_tab502 .

the message is issued and it exit the program if the type is e and if type message is I the cursor is not set .

please advice

ASA

Read only

Former Member
0 Likes
1,082

Can you try to validate the input field using Chain and Endchain like below.

PROCESS AFTER INPUT.

  • Validate the period range (it should not be > 12 months)

CHAIN.

FIELD:zpprs_period-zperiod_from, zpprs_period-zperiod_to.

MODULE check_period_range.

ENDCHAIN.

Read only

Former Member
0 Likes
1,082

post the mesage as type I in the PBO

of every subscreen