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: 

need logic

Former Member
0 Kudos

Hi,

I need a logic, see the below example to know the problem.

Ex: say i have 4 values like A,B,C,D

if any one of these 4 values doesn't appear on the screen i need to show a pop-up like "A(<b>this value varies depending on the sceen values i.e it may be A or B or C or D or (A&B) or( A&C) or (A&D) or (B&C) or (B&D) or (C&D</b>) ) is not Avilbale. do u want proceed?".

Can anyone help me in getting this.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Kudala

try it.

parameters: a(5), b(5), c(5), d(5).

if a = ''.

if b = ''.

write 'A&B'.

elseif c = ''.

write 'A&C'.

elseif d = ''.

write 'A&D'.

else.

write 'A'.

endif.

elseif b = ''.

if c = ''.

write 'B&C'.

elseif d = ''.

write 'B&D'.

else.

write 'B'.

endif.

elseif c = ''.

if d = ''.

write 'C&D'.

else.

write 'C'.

endif.

elseif d = ''.

write 'D'.

else.

WRITE 'OK'.

endif.

Regards,

Allan Cristian

5 REPLIES 5

Former Member
0 Kudos

Hi,

Write this code,

message ' do u want proceed' type 'i'.

Thanks.

Reward If Helpful.

Former Member
0 Kudos

It's far easier to make the fields mandatory or to use the AT SELECTION SCREEN event

former_member187452
Contributor
0 Kudos

Hi,

Check the internal table fields where the value is coming , eg

if itab-fieldname NE a and b and c and d.

then display message 'do you want to proceed ' type 'I'.

try this out,

Regards,

Bharat.

***Reward points if helpful

Former Member
0 Kudos

at selection-screen output.

if A ne ' ' .

if B ne ' ' or C ne ' ' or D ne ' ' .

Call function popup_to_confirm.

endif.

elseif B ne ' ' .

if A ne ' ' or C ne ' ' or D ne ' ' .

Call function popup_to_confirm.

endif.

elseif C ne ' ' .

if A ne ' ' or B ne ' ' or D ne ' ' .

Call function popup_to_confirm.

endif.

elseif D ne ' '.

if A ne ' ' or B ne ' ' or C ne ' ' .

Call function popup_to_confirm.

endif.

endif.

reward if useful.

Amit Singla

Former Member
0 Kudos

hi Kudala

try it.

parameters: a(5), b(5), c(5), d(5).

if a = ''.

if b = ''.

write 'A&B'.

elseif c = ''.

write 'A&C'.

elseif d = ''.

write 'A&D'.

else.

write 'A'.

endif.

elseif b = ''.

if c = ''.

write 'B&C'.

elseif d = ''.

write 'B&D'.

else.

write 'B'.

endif.

elseif c = ''.

if d = ''.

write 'C&D'.

else.

write 'C'.

endif.

elseif d = ''.

write 'D'.

else.

WRITE 'OK'.

endif.

Regards,

Allan Cristian