Which system variable is reset at the exit of a loop of an internal table

which system variable is reset at the exit of a loop of an internal table
a)sy-loop b)sy-index c)sy-dbcnt d)sy-tabix

You might want to revist your threads from Friday, and award points and mark as "Answered" or "Solved".
Regards,
Rich Heilman

Similar Messages

  • To eliminate the duplicate entries while looping into final internal table

    Hi friends,
    IAam facing the follwoing problem.
    Get Shipment for the Delivery number
          SELECT tknum
                 vbeln
                 INTO TABLE lt_vttp
                 FROM vttp
                 FOR ALL ENTRIES IN lt_vbfa
                 WHERE vbeln = lt_vbfa-vbelv.
        IF sy-subrc EQ 0.
          SELECT vbeln kunnr
                 FROM likp
                 INTO TABLE lt_likp
                 FOR ALL ENTRIES IN lt_vttp
                 WHERE vbeln = lt_vttp-vbeln.
      endif.
    now iam my internal table lt_vttp i have following values
       shipment             delivery
          1000                  2000
          1000                 2001
    in my internal table lt_likp i have the follwoing values
          delivery              shipto
           2000                  ABC
           2001                  ABC
    now iam looping those values in a final internal table.
      LOOP AT lt_likp INTO ls_likp.
        CHECK sy-subrc EQ 0.
         READ TABLE lt_vttp INTO ls_vttp WITH KEY vbeln = ls_likp-vbeln BINARY SEARCH.
        CHECK sy-subrc EQ 0.
             SELECT SINGLE * FROM vttk INTO ls_vttk
                    WHERE tknum = ls_vttp-tknum.
                  CHECK sy-subrc EQ 0.
                APPEND ls_vttk TO lt_vttk.
       endloop.
    Now my problem is if the shipment is same and the shipto is same then need to eliminate the duplicate records.
            in internal table iam getting 2records with same shipment and shipto combination.
           but instead if both the shipment and shipto are same then i should elimate the duplicate entries.
    and for the same shipment if i have differnt shipto then i neeed those 2 value.
    can any body tell me how can i get that.
    Regards
    Priyanka.

    Hi Priyanka,
    In your code you are using seelct statement inside the loop which will affect the performance.
    So, declare a another internal table which contains your both shipment and shipto elements with other required fields, say the name is lt_new.
    sort lt_new by shipment shipto.
    delete adjacent duplicates from lt_new comparing shipment shipto.
    "then use for all entries to choose values from VTTK.
    Hope this helps you.
    Regards,
    Manoj Kumar P

  • What is the maximal line length of type any internal table

    Dear all,
    who can tell me what is the maximal line length of type any internal table.
    Thanks!

    There is no limit to the record length of an internal table.
    There is overall memory limit for every program (as setup by your basis). So, depending on the width of the ITAB, the number of records in ITAB is limited by the assigned memory.

  • Extracting the result of a query into a internal table

    Hi,
    Does anyone knows or have an idea how to extract the result of a query into a internal table, is there a function module or BAPI?
    Thanks in advance,
    CK

    So then normally I would use a statment like:
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_SALESORDER_GETLIST</b>");
    to call a particluar function, but I tried using
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_MDDATAPROVIDERBW_GETCATALOGS</b>");
    and it did not seem to work. I also tried -
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>MDDataProviderBW.GetCatalogs</b>");
    How do I format the function?
    Thanks
    Paul

  • Identifying the maximum length of a record in internal table

    Hi,
    Im using an internal table for a string for some requirement.
    Now, at later point of time i need to use for CHAR variable to copy the data from the above internal table.
    I need to identify the max length of the record stored in this internal table so that i can assign that much length to this CHAR variable.
    Is there any standard fm or any abap stmts.
    Thanks
    rohith

    You have to Loop the entire Itab to find the Maximum length of the record stored.
    Just like this:
    data: begin of itab occurs 0,
            v_str1 type string,
          end of itab.
    data: v_len type i.
    data: v_len1 type i.
    itab-v_str1 = 'mahesh sap abap'.
    append itab. clear itab.
    itab-v_str1 = 'mahesh'.
    append itab. clear itab.
    itab-v_str1 = 'mahesh sap'.
    append itab. clear itab.
    loop at itab.
      v_len = strlen( itab-v_str1 ).
      if v_len > v_len1.
        v_len1 = v_len.
      else.
        continue.
      endif.
      clear: v_len.
    endloop.
    write:/ 'Max Length', v_len1.

  • How can i know the number of lines in field-symbol internal table

    how can i know the number of lines in field-symbol internal table

    Hi,
    If your field symbol has been defined as an internal table :
    Use std describe as
    Data: l type i.
    describe <fs> lines l.
    'l' will contain the number of lines as needed.
    FYI
    The size of this storage area in a field symbols depends on the number of table lines which is not fixed, but determined dynamically at runtime.
    Regards,
    Amit

  • A utility program to send the content of a spool OR an internal table in

    Hello Guys,help me.
    A utility program to send the content of a spool / an internal table in various formats like HTML, PDF, TXT etc.
    can u explain wht is this completely
    Thank you
    Santhosh.

    Please check below links for better understanding of sending data from SAP to various formats...
    internal table to an XML file
    http://www.erpgenie.com/abap/code/abap27.htm
    Report Output to a PDF File
    http://www.erpgenie.com/abap/code/abap51.htm
    HTML EMail from ABAP
    http://www.erpgenie.com/abap/code/abap20.htm
    Spool from SAP to Acrobat format
    http://www.erpgenie.com/abap/pdf_creation.htm

  • When the integral function is placed inside a wait until next ms multiple is it reset at the beginning of each loop?

    When the integral function x(t) is placed inside a wait until next ms multiple while loop is the Integrator reset to zero every time the loop executes?

    Hi,
    the function works on a discrete amount of data. Hence every call to it replaces the values used first time around.
    I've attached an example in LabVIEW 7.0 that uses a pulse generation vi to allow the manipulation of the array sent into the integral object, and then it's easy to calculate what the integral of the data would be.
    Hope that helps
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer
    Attachments:
    integral.vi ‏39 KB

  • CC#1 resetting at the start of every loop - bug ???

    Make a 1 bars bas pattern, (internal or external synth with mod-wheel/CC#1 assigned to filter cut off) and loop it. On another track, same midi channel, i record a mod-wheel movement (filter sweep) more than 1 bar, say 4 bars, starting from 0 and moving to max. This is now a filter sweep with a length of 4 bars. Everytime the bas pattern repeat it self, (every 1 bar - because of the loop)the mod-wheel/CC#1 jumps back to zero, until it recieves the next mod-wheel info from the 4 bars sweep.
    I have to use "make loop into real copies or alias" to make it work.
    Is this a bug ?
    nice regards
    Henning Flintholm
    G5 dual 2.0   Mac OS X (10.4.8)  

    To prevent CC#1 resetting of internal instruments check the track parameter box 'No Reset'.
    Also, make sure that in Preferences > Audio > Reset the CC#1 box is NOT checked.
    For resetting external instruments see Preferences > MIDI > Reset Messages
    PPC G4   Mac OS X (10.4.8)   Logic 7.2.3

  • Problem in picking the system variable value in Calculation Script

    Hi All,
    We are using a Calculation Script to perform data export. And the target location where to crete the exported output file is given to the environment system variable.
    Now I am using this system variable in the calculation script as below:
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
    DataExportLevel "ALL";
    DataExportOverwriteFile ON;
    Fix ( &CurrMiles, &CurrProj, &CurrVer,"No Project","No Version")
    DATAEXPORT "File" " " $DEXPORTPATH;
    ENDFIX
    Here "DEXPORTPATH" is the system variable
    I am creating this system variable from the batch script and the system variable value varies at the runtime.
    This calculation script works fine for first time and it picks the correct value from the system variable.
    But the problem occurs from next execution of calc script. Even if i update the system variable with other value, it picks only the last execution system variable value and it performs execution.
    Eg: Suppose for first execution system variable value is "D:\Bkup\PMV.txt"
    The calc script works fine with this.
    For next execution, system variable value is changed to "D:\Time\temp.txt"
    Now the calc script picks the system variable value as "D:\Bkup\PMV.txt"
    and performs execution which is wrong.
    Please help me on this issue how to handle system variables in calc scripts.
    Thanks in advance
    Regards
    Swathi

    811829 wrote:
    Hi All,
    We are using a Calculation Script to perform data export. And the target location where to crete the exported output file is given to the environment system variable.
    Now I am using this system variable in the calculation script as below:
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
    DataExportLevel "ALL";
    DataExportOverwriteFile ON;
    Fix ( &CurrMiles, &CurrProj, &CurrVer,"No Project","No Version")
    DATAEXPORT "File" " " $DEXPORTPATH;
    ENDFIX
    Here "DEXPORTPATH" is the system variable
    I am creating this system variable from the batch script and the system variable value varies at the runtime.
    This calculation script works fine for first time and it picks the correct value from the system variable.
    But the problem occurs from next execution of calc script. Even if i update the system variable with other value, it picks only the last execution system variable value and it performs execution.
    Eg: Suppose for first execution system variable value is "D:\Bkup\PMV.txt"
    The calc script works fine with this.
    For next execution, system variable value is changed to "D:\Time\temp.txt"
    Now the calc script picks the system variable value as "D:\Bkup\PMV.txt"
    and performs execution which is wrong.
    Please help me on this issue how to handle system variables in calc scripts.
    Thanks in advance
    Regards
    SwathiAs of my knowledge system variables will not update immediately...you need to log off the session after changing the value.
    Update the system variable..
    Log off from the session..
    And Re-login with the same username ....and check...
    Regards,
    Prabhas

  • How to get the name of the exit in FM "EXIT_SAPLBSVA_001'

    Hello all,
    i need to get the name of the enhancment  for the function module 'EXIT_SAPLBSVA_001' as i need to use this userexit and in CMOD i need to write the enhancement  having this exit.
    please help soon.
    Regards
    geeta gupta

    Hello,
    Identify the program name of the Tcode for which u r trying to implemente the Exit and check the enhancements for the same wth SMOD tcode or CMOD
    Regards

  • Mac System Settings Keep Resetting After Restart from Boot Camp

    Not sure what to make of it but it's highly annoying. Most of the time when I restart my computer back into the Mac partition after I've been using Windows XP on BootCamp, most of my system settings are reset. The most obvious ones I run into are desktop background, Safari homepage, and the Spaces preferences, but there are others. Help. Thanks.

    Did that reset, then rebooted into BootCamp, then restarted into the Mac. Settings appear OK, but I will try it a few more times over the next couple days to be sure. I thought it odd that it does it much of the time, but not all the time.... If it stays this way I'll post this as answered in a few days. If not, then I'll let you know that, too! Thanks guys!

  • Which sy variable is initiated when web dynpro application call rfc of r/3

    Hi,
    My question is that when i pressed my web dynpro application button which called rfc at r/3 at that time which system variable will initiated.
    Regards,
    Gurprit

    Hi Gurprit,
      All variables of sys structure will be intiated.
    regards,
    Ganga.

  • My System preference are resetting to base everytime I restart.

    Not all, but many of my system preferences are resetting to the defaults every time I quit.
    Most specifically,
    1. in Keyboard I turn off all the system function key settings, then restart and they are back
    2. in Sound I adjust the right left balance and it resets to center. But it does keep my output choice
    3. in Mouse it keeps rechecking natural scroll.
    It's almost as if I want my mac the way if was pre mountain lion but it thinks it know better.
    Is there a corrupt prefferences file I can get rid of? Something I can reset?
    It's driving me crazy, and I was only barely sane before this happened.
    Thanks,
    Tom

    Back up all data. Don't continue unless you're sure you can restore from a backup, even if you're unable to log in.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Doubt in system variable.

    hi,
    i want to know what is system.record_status and value like changed,insert,new,query and where all it is used.
    what is differnce between system.record_status and get_record_property.

    Hi
    A system variable_ is an Oracle Forms variable that keeps track of an internal Oracle Forms state. You can reference the value of a system variable to control the way an application behaves.
    Oracle Forms maintains the values of system variables on a per form basis. That is, the values of all system variables correspond only to the current form.
    SYSTEM.BLOCK_STATUS_ represents the status of a Data block where the cursor is located,or the current data block during trigger processing.
    The value can be one of three character strings:
    CHANGED     Indicates that the block contains at least one Changed record.
    NEW     Indicates that the block contains only New records.
    QUERY     Indicates that the block contains only Valid records that have been
    retrieved from the database.Regards,
    Abdetu...
    Edited by: Abdetu on Jan 23, 2011 11:19 PM

Maybe you are looking for