Can I put Read inside loop?

Hi Folks
Can I put Read inside loop?
Performance wise is it acceptable?
Regards,
Sreeram

Hi
there is no problem to put READ statement inside the LOOP
its a better way to put
to avoid SELECT in a LOOP
see this example
i had used that in my program
in the performance point of view it is a good method
LOOP AT IT_SOBID INTO WA_SOBID." where otype eq s_otype and objid eq s_objid.
    READ TABLE IT_HRP1026 WITH KEY OBJID = WA_SOBID-SOBID OTYPE = WA_SOBID-SCLAS INTO WA_HRP1026.
    IF SY-SUBRC EQ 0.
      READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
      WA_OUTPUT-OBJID = WA_HRP1026-OBJID.
      WA_OUTPUT-BEGDA = WA_SOBID-BEGDA.
      WA_OUTPUT-ENDDA = WA_SOBID-ENDDA.
      WA_OUTPUT-AEDTM = WA_HRP1026-AEDTM.
      WA_OUTPUT-UNAME = WA_HRP1026-UNAME.
      WA_OUTPUT-STEXT = WA_HRP1000-STEXT.
      READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
      WA_OUTPUT-CANCRT = WA_REASON-CANCRT.
      CLEAR WA_REASON-CANCRT.
      READ TABLE IT_LOCATION1 WITH KEY OBJID = WA_HRP1026-OBJID INTO WA_LOCATION1..
      READ TABLE IT_LSTEXT WITH KEY OBJID = WA_LOCATION1-SOBID OTYPE = 'F' INTO WA_LSTEXT.
             WA_OUTPUT-LSTEXT = WA_LSTEXT-LSTEXT.
             CLEAR WA_LSTEXT-LSTEXT.
      APPEND WA_OUTPUT TO IT_OUTPUT.
      CLEAR WA_OUTPUT.
      CLEAR WA_OUTPUT-CANCRT.
    ENDIF.
  ENDLOOP.
<b>Reward if usefull</b>

Similar Messages

  • Can we put subroutines within loops?

    q]     Can we put subroutines within loops?- i mean not the PERFORM Statement  but the FORMENDFORM statement

    Hi
    If your question means .. calling Performs within Loops ?
    Then its possible..
    LOOP.
    PERFORM P1. ( THIS IS OK )
    ENDLOOP.
    But this is not correct..
    LOOP.
    FORM P1.
    ENDFORM.
    ENDLOOP.
    Thanks
    Hope it Helps.
    Praveen

  • How can I put files inside an empty .zip file with Mac OS X?

    Hi all,
    I'm learning to produce epub files (i.e., ebooks). I'm told by tutorials that I need to zip several files together, but I must start from a specific file and put that file first into the .zip archive… then the others.
    I can't find ways to put files one after another inside a .zip archive using Mac. Anyone can help?
    Thanks in advance,
    lux

    Donald Palmer wrote:
    Create a folder.
    select file to zip.
    right click on file.
    choose compress.
    put resulting file in newly created folder.
    No, first file must stay uncompressed until the final zipping occurs.
    I found the answer by browsing around. There is a nice AppleScript called ePub Zip (http://www.mobileread.com/forums/showthread.php?t=55681) that just works.
    I read around that it can be done via Terminal with two commands:
    +zip -X0 "full path to new epub file" mimetype+
    and
    +zip -rDX9 "full path to new epub file" * -x "*.DS_Store" -x mimetype+
    I didn't check it though.
    Thanks for the support,
    lux

  • How to put pictures inside the table in Pages for IPad?

    How can I put pictures inside the table in Pages for IPad? I can do that in Pages in my macbook, but I can't in IPad.

    It would appear that unless you are working from a document that already had section breaks (or the equivilent) ,you can't. I have some files in pages that began as MS Word documents with multiple sections that allow that by tapping on the footer (or header) and making the change. Files created in Pages (or from other sources but without section beaks) do not.

  • Hello, I have an iPad Mini WiFi Cellular white 16Gb and I puted my sim inside it but, I cant read the text message that I recieve in the Sim. What can i do? And I can't put the sim in a cellphone coz it doesn't recognize it. Please help me! Thank you.

    Hello, I have an iPad Mini WiFi Cellular white 16Gb and I puted my sim inside it but, I cant read the text message that I recieve in the Sim. What can i do? And I can't put the sim in a cellphone coz it doesn't recognize it. Please help me! Thank you.

    iPads do not do SMS.

  • Can I put a READ function in a TRUE/FALSE case structure?

    Hi,
    I have a vi that operates as controller for a mechanical system of motors.  There are several sensors of various types, that provide input to the vi, including encoders, whose period is being measured.  The attached vi is the encoder period measuring part. It measures 15 periods and tells me the average of the 15 with each loop iteration.
    In my application, the encoder period measurement is not needed unless the vi knows that ALL THE OTHER sensors in the hardware configuration are measuring values within the desired range.  For example, Sensors A, B and C should all measure between 5-10.  If they are all showing values between 5-10, then, we want the encoder value to read and display.  If only one of the sensors, say A, is measuring 12, then, we don't want the period value to READ or be subsequently processed.  So, it is easy to set up the sensors A, B, C, to give a TRUE or FALSE based on whether they are within range or not, and if all 3 are TRUE, then, that value can easily be passed to the case structure that holds my READ function for the period.  Is this a good way to do this?  The goal is to eliminate unnecessary execution time that the period READ function would consume, as well as all subsequent calculations that are performed on the period value collected.  The period data is of no use if any one of the other sensors is not in the correct range.
    If any one of the other sensors is out of range, we want to skip the encoder READ step altogether.  So, it is easy to structure a BOOLEAN in my vi as shown in the attachment.  If I do it this way, will it throw an error, or just skip the READ until the BOOLEAN is true again?  Is there a better way to prevent the READ from happening if one of my other sensor values is not within the correct range?
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    forum JUly 18.vi ‏26 KB

    Sure, you can put a Read inside a case structure. For your application, just check that your sensors are all within range (Comparisons palette), then AND the T/F's and use the result of that for your case structure. (If you are already doing the in-range check, I can't see it here because you have 5 subVIs that I cannot open here.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • How many itens can I put inside a JComboBox or JList?

    How many itens can I put inside a JComboBox or JList?
    Thanks
    Renato de Melo

    Lots. I have put 10,000 in one, for example. !!! ComboBox with 10,000 items how did you solved
    scrolling slow down problem in ComboBox.
    I'm trying for weeks to speed up JComboBox
    what I did was
    1) I've created custom model with sorted
    items and I'm using binarySearch for getting and setting
    items in model this greatly improved performance
    2) I'm using setPrototypeDisplayValue(Object obj)
    function
    but still scrolling with arrow keys and PgUp,PgDown
    is too slow especialy in the end of the list.
    Any ideas ?

  • I have created 2 websites one is in english and the other in russian how can i link these 2 so that on each page you can choose to read the page in russian or english??? like how do i put the two language flag toggles?

    like how do i put the two language flag toggles such that you can choose to read the site in russian or english?

    On each of the English pages add a Russian flag and link that flag to the Russian equivalent page with the Inspector/Link/Hyperlind pane.
    On each of the Russian pages add a US or British flag and link that flag to the equivalent English page.
    OT

  • How can I put a time delay between specific events in a while loop?

    How can I put a time delay between specific events within the same while loop? I'm already using the "wait" command to control the overall loop iteration speed. But I want to time the individual events as well.

    Hi Jesse,
    You can use a flat sequence. In each box you can put your individual events and attached wait.
    Don't forget to reduce your total loop time of the time you added in the individual sequences.
    Doc-Doc
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • How can I put a video in my Ipad from my pc? (I made this video with another Ipad, but if  send it with Imessage, the quality is worse, if i try to put this video in Itunes it don't read it)

    How can I put a video in my Ipad from my pc? (I made this video with another Ipad, but if  send it with Imessage, the quality is worse, if i try to put this video in Itunes it don't read it, if I try to put the video in Ipad like it is a normal pendrive i can't)

    Okay, I figured out that Windows has "AutoPlay" settings which can automatically download photos and videos from a newly connected device, such as an iPad Mini.  I think I could open it in Windows Explorer too that way but the auto download solved my problem.

  • Why I can't put signature in Adobe Acrobat Reader DC?

    Why I can't put signature in Adobe Acrobat Reader DC? I can use a picture as a signature in Adobe Reader XI, why Adobe Acrobat Reader DC doesn't have this option?

    I can find it when the language is english, but when I change the language to Chinese, it disappeared.

  • Hello! how can i put and read my words documents in the notes pad of my ipod nano 3trd generation?thanks to all.the notes

    hello! how can i put and read my words documents in the notes pad of my ipod nano 3trd generation?thanks to all.

    The Notes features of the 3G iPod Nano only supports TXT files and not Word Documents.  If you want to be able to read these word documents, you'll need to copy the text from each over to a text file.  See here for more information.
    iPod: Storing and reading notes
    Keep in mind that each txt file has a limit of 4096 characters.  See this article for more information as well.
    Long notes are truncated on your iPod
    B-rock

  • How can I put ebboks onto 2 different ereaders from he one computer....we have 2 adobe accounts, but I cant get books to go onto 2nd reader???

    Hi I have 2 ereaders, a sony  and a kobo... how can I put books onto both readers . I opened a seperate adobe account for the 2nd reader, but cant get books to work on it... HELP !!!!

    Ok first off, Graffiti LOVE your icon.  And you do make complete sense and as for try, I kinda figured that was the case.  One folder with all the files ARE in word, yet these are in PDF in another folder.  Why they were not all done in Word at the time I have NO clue.  I'm going to assume it was the IT guy's idea.
    I'm sitting here stressing b/c I can't find a way to do this and now I find out it's not a good idea to have ANYTHING in PDF as well as NOT being able to transfer to word with in reason and to make it look as it did.
    So what it boils down to is I will ultimately have to do it individual and convert on my own.  Pretty much make a new format in Word and transfer all the information one at a time, GREAT.  My 2nd week here at work and this is what I have to look forward to FOREVER lol
    I will, however, make me a format I can handle and easy to do, idiot proof as it were.
    I appreciate all of your information.  In the back of my mind, I knew the answer, but wanted to clarify before going to my supervisor (who has NO clue about computers or the fact some things can't be done.  more of why CAN'T I do it, you know) and see what I can do from there.
    The man purpose is to have continous access to that file instead of multiples b/c of the IT limiting PDF to 2 pages.  YAY for me
    Let's hope they hire an IT guy next week...lmao

  • In my country Cambodia hav alot of ipad iphone but can not read my language when it not yet jailbreak so it dificault for my country can U put my language for us? thanks for help us

    in my country Cambodia hav alot of ipad iphone but can not read my language when it not yet jailbreak so it dificault for my country can U put my language for us? thanks for help us

    go to setting>general>keyboard>language
    you can also go to keyboards and add a keyboard based on your language

  • Can you put the audio to work throughout the reading of the chapter? Today, when I change the page, the audio stops

    Can you put the audio to work throughout the reading of the chapter? Today,when I change the page, the audio stops

    The default action is as you've noted. Audio stops when navigation to another page,
    iBA doesn't offer a way to do differently, sorry.
    Ken

Maybe you are looking for

  • Adobe Acrobat 9 Pro Customizing and General help

    I'm trying to set-up Adobe 9 Pro so that when you select "Print" or "Print to PDF" that the application automatically defaults to a Specified location and a Specified name as (Date)+(Time).pdf.<br /><br />Currently it prompts you to specify the locat

  • How can I delete favourite collection in Ovi map 3...

    Hello Everybody, I have tried to search for delete function in Ovi Map 3.03 to delete the collection of my favourite. Unluckly, I can't find that function Anybody please help!

  • BAM: Data objects cannot be edited while they are in use.

    Hi all, When I try to edit the layout of an data object I'm getting the error: BAM-04003: Data objects cannot be edited while they are in use. I have the Active Viewer and Studio closed. How can I do this? Thank you in advance. Kind regards, CD Note:

  • Macbook pro 1.8 very hot

    I have macbook pro 1.8. Snow Leopard. While I'am charging battery and compiling the temperature gets very high. Especially on cpu. Whats weird the fans have ~3000rpm when temp on cpu is 100C and ~4200 when the temp is 120C. After some time macbook us

  • Carbon Copy Cloner from Older OS to Newer OS

    If I use Carbon Copy Cloner and clone my HDD for my Mac Book Pro which is currently running Snow Leopard, and copy it onto a computer with Mavericks, is there anything I have to do special? Will it replace Mavericks with Snow Leopard? Or will it just