Skip to Content
author's profile photo Former Member
Former Member

problem in IF and ENDIF.

Hi Experts,

I have a problem in the IF AND IF loops, since my program I find a string based on the grid, what's happening is in the pop up if i type the string which is in the first grid, at the first click of find itself it finds the string.

But if i type the string which is in the second grid, I have press the continue button in the pop up twice and then only it finds it.

Samething vice-versa for other grids, 3 times for 3rd grid 4 times for 4th grid.

Here is my code.

FORM search.

DATA: search TYPE sy-subrc.

PERFORM find USING grid1

itab1

CHANGING search.

IF search NE 0.

PERFORM find USING grid2

itab2

CHANGING search.

IF search NE 0.

PERFORM find USING grid3

itab3

CHANGING search.

IF search NE 0.

PERFORM find USING grid4

itab4

CHANGING search.

ENDIF.

ENDIF.

ENDIF.

ENDFORM.

Can anyone please tell me what could be the problem?

Thanks in advance.

Prabs.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2005 at 08:10 PM

    Well, it looks as if you're calling the popup in form 'find' rather than before the first call to it.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2005 at 08:16 PM

    Hi

    Where are you calling your popup? In FORM FIND?

    Max

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.