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

need logic

Former Member
0 Likes
912

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
Read only

Former Member
0 Likes
883

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
883

Hi,

Write this code,

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

Thanks.

Reward If Helpful.

Read only

Former Member
0 Likes
883

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

Read only

Former Member
0 Likes
883

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

Read only

Former Member
0 Likes
883

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

Read only

Former Member
0 Likes
884

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