ABAP-CODE Forum
September 08, 2010, 07:42:44 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: ABAP-CODE Forum installed on 12/17/2007!
 
   Home   Help Search Login Register  

 

Pages: [1]
  Print  
Author Topic: Loop within Loop  (Read 424 times)
dukester
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« on: January 27, 2010, 06:04:55 AM »

Hi
I'm new to ABAP. I'm creating a report to show changes to Org Unit objectID or text within a specified period. I've created a loop of IT0001, and within that loop I want to loop at P1000 to check for text changes for the specified period. This is what I have so far, but I'm not sure it's right:
LOOP AT p1000 WHERE begda LE p0001-endda
                    AND endda GE p0001-begda.
      IF p1000-stext NE int_output-orgname.
      ENDIF.
ENDLOOP.
Any assistance would be appreciated. If you need to see the entire code, I can provide.
Thanks.
Dukester
Logged
ABAP-CODE Forum
« on: January 27, 2010, 06:04:55 AM »

 Logged
Ignatius
Administrator
Newbie
*****

Karma: +101/-0
Posts: 8



View Profile WWW Email
« Reply #1 on: January 28, 2010, 01:13:20 PM »

Dukester,

I don't understand completely what you are trying to do. You have not added code between the IF... ENDIF instruction, so the program will do nothing there... I guess you are planning to do that?

I suppose that int_output is the structure that holds the it0001 loop, right? Maybe instead of the IF inside the loop you can add it as a condition in the WHERE statement.

You should consider that if the tables you are looping are too big, the program will run for a long time.

If you can give me more details maybe I will try to give some more help.

Ignatius

Logged

Ignatius
Administrator
HelenJames
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: July 28, 2010, 01:55:32 PM »

Something alike was discussed on the Yahoo! Answers last week, i can share a link if you want some
Logged
ABAP-CODE Forum
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.565 seconds with 20 queries.