ABAP-CODE Forum
September 08, 2010, 07:42:44 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: ABAP-CODE Forum installed on 12/17/2007!
Home
Help
Search
Login
Register
 
ABAP-CODE Forum
>
SAP ABAP
>
General ABAP Programming
>
Loop within Loop
Pages: [
1
]
« previous
next »
Print
Author
Topic: Loop within Loop (Read 424 times)
dukester
Newbie
Karma: +0/-0
Posts: 1
Loop within Loop
«
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
Loop within Loop
«
on:
January 27, 2010, 06:04:55 AM »
Logged
Ignatius
Administrator
Newbie
Karma: +101/-0
Posts: 8
Re: Loop within Loop
«
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
answer this topic
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SAP ABAP
-----------------------------
=> General ABAP Programming
=> ABAP Forms
=> ABAP Extensions (User Exits, BADI's, Enhancements)
=> ABAP Objects
Loading...