Application Development 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: 

Dialog Programming

Former Member
0 Kudos
89

Hello folks,

Here is my requirement.

If field1 is '01' then gray out field2 and field3 else if field1 is '02' then edit the fields field2 and field3 for the user to enter some values.

I had coded the logic in PBO for the above requirement.

Now if the field1 is '02' then field2 and field3 can not be empty.

For this I am giving an error message coded in PAI.

My problem here is when the error message is displayed the fields field2 and field3 are grayed out. But I want those 2 fields to be displayed for input even after the error message. I will post the logic in my next message.

Thanks,

Naren

1 ACCEPTED SOLUTION

Former Member
0 Kudos
62

Use ON CHAIN INPUT for the 3 fields.

8 REPLIES 8

Former Member
0 Kudos
62

PBO logic

-


if vbap-zv_wc_product = '02'.

loop at screen.

case screen-name.

when 'VBAP-ZV_NC_RCODE'.

screen-input = '1'.

modify screen.

when 'VBAP-ZZV_NC_RCODE_DET'.

screen-input = '1'.

modify screen.

when others.

  • do nothing

endcase.

endloop.

else.

*disable the fields if the waived charged product is not equal to '02'

loop at screen.

case screen-name.

when 'VBAP-ZV_NC_RCODE'.

screen-input = '0'.

modify screen.

when 'VBAP-ZZV_NC_RCODE_DET'.

screen-input = '0'.

modify screen.

when others.

  • do nothing

endcase.

endloop.

endif.

endif.

PAI logic

-


*NCR code and NCR detail should not empty when the charge product

*is equal to 02

if vbap-zv_wc_product = '02' and

VBAP-ZV_NC_RCODE is initial and

VBAP-ZZV_NC_RCODE_DET is initial.

message e206(zsd).

endif.

Former Member
0 Kudos
62

use on-input event for field2 and field3. this will make the field2 and 3 turn on in turns. an example code will be like this.

FIELD field2 MODULE chk_field2 ON INPUT.

FIELD field3 MODULE chk_field3 ON INPUT.

0 Kudos
62

Hello Arpit,

Thanks for the reply.

But I already coded that for field1. I dont think I need to do that for field2 and field3.

(I tried ur logic...but it didn't worked)

Is there any other way we can get that done.

Thanks,

Naren

0 Kudos
62

I'm thinking that you must CHAIN these fields together. Do some F1 help on the keyword CHAIN. You use this in the PBO of the screen flow logic.

Regards,

Rich Heilman

Former Member
0 Kudos
63

Use ON CHAIN INPUT for the 3 fields.

0 Kudos
62

Hello,

Very grateful for the responses.

1. I had those three fields in chain and endchain.

module check_fields on chain-input.

I tried it using in PAI and PBO both.

In PAI is doesn't work. But in PBO the problem is when ever the error message is triggered a pop uo window comes up with an EXIT button it. and when we click EXIT it exits the screen which should not happen.

I am still trying various methods.

Thanks,

Naren

0 Kudos
62

Let me bring down my requirement a bit now.

When I give an error message in PBO why an error window with EXIT button is coming up.

I dont want that to happen. I want my error message to be displayed on the status bar.

This will solve my problem. Any ideas are most welcome.

Thanks,

Naren

0 Kudos
62

One thing, you should be doing your validation in the PAI not the PBO. Use the CHAIN ENDCHAIN and the modules which do the validation in the PAI.

Please remember to award points for helpful answers. Thanks.

Regards,

Rich Heilman