Skip to Content
avatar image
Former Member

need logic

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 08, 2007 at 12:22 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 11:55 AM

    Hi,

    Write this code,

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

    Thanks.

    Reward If Helpful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 11:58 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 08, 2007 at 11:58 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 12:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded