New Line after every 900 lines in internal table

HI,
I have an internal table and that is sorted by company code. i.e it is grouped according to company code.
Now i want to check in particular groups of company code if the lines of internal table is > 900 or not.
And if it > 900 i have to insert new line.
How to do that?

Hi
Please check  the code..I think it will solve ur problem
TYPES : BEGIN OF x_data,
         name TYPE char10,
        END OF x_data.
data: i_data  TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
      wa_data TYPE x_data,
      counter TYPE n LENGTH 2 .
DO 5 TIMES.
CLEAR : wa_data.
  counter = counter + 1.
CONCATENATE 'subha' counter INTO wa_data-name.
APPEND wa_data to  i_data.
ENDDO.
CLEAR : counter,
        wa_data .
DESCRIBE TABLE i_data LINES counter.
IF counter > 4.
  counter = 5.
  wa_data-name = 'TEST'.
INSERT wa_data INTO i_data INDEX counter.
ENDIF.
CLEAR: wa_data.
LOOP at i_data INTO wa_data .
  WRITE : / wa_data-name.
ENDLOOP.
Use 900 instead  4 and 901 instead of 5.

Similar Messages

  • Need to draw line after the 2nd line item(Smart Forms)

    Dear Friends,
    I need to draw horizontal line after the 2nd line item  and 3rd line item in smart forms.How can i achive this.
    Plz help.
    Edited by: farook shaik on May 19, 2009 8:19 AM

    This is what you need to do:
    1> In the tables->details section define two line types LT1 and LT2.
    2> Come back to tables section pressing the table painter button.
    3> Select a line type for which you want to have an underline(say LT2).
         a] If the anchor cursor does not come click the draw lines and columns button( the pencil icon nutton)
         b] select the line type ( it will become black after selection. Press and hold down ctrl to select
             multiple cells.
         c] after selection click the lower 'frame button' ( which is right at the top of box and shading).
    4> Now goto data section where you have given your internal table name and work area.
         a] in the sort criteria put your field POSNR and check the Event on Sort end chk box.
         b] you will see an extra node under the main area of the table.
         c] Create a table line with the line type LT2 in the node.
         d]Also in the Main area add another table line with LT1 as the line type.
    5> If POSNR remains unchnged LT1 will be triggered.
    6> if Posnr changes then LT2 will be triggered with the underline.
    This will suffice your requirement.

  • I'm an avid Mac enthusiast who works in a creative field. However, I simply cannot afford a new Mac after my old one's internal hard drive failed. Can anyone recommend an affordable Mac option? I don't want to consider a non-Apple product.

    I'm an avid Mac enthusiast who works in a creative field. However, I simply cannot afford a new Mac after my old one's internal hard drive failed. Can anyone recommend an affordable Mac option? I don't want to consider a non-Apple product.

    Macs with a FireWire port will also boot happily from an External drive. You don't even need to open the MacBook.
    Some users buy a drive they would like to have as a future Internal drive, and also buy an external enclosure. They get the External set up the way they want it, then swap with the Internal drive.

  • How do I "space after" every other line?

    I am trying to set up a listing of names and dollars like this...
    name
    dollar amount
    name
    dollar amount
    name
    dollar amount
    name
    dollar amount
    After the dollar amount I need to it have a space of 0.625, I am creating this list as text which I have converted from a table. Right now I have to just click on the line a and manual hit the "space After" option to put the 0.625 spacing in there. Is there a way to do this all at once because there will be at least 300 names every time I do this? So i need to be able to have the spacing on every other line...
    Thanks,
    Sam

    I use a body text style with Space Before and have a Bullets_FirstLine style with space before. I have the Next Style of BulletsFirstLine as as Bullets, which does not have any Space Before. This means that I can automatically apply the styles to the bullets when either typing directly or, more frequenty by highlighting all the paragraphs to be bulleted and right clicking on BulletsFirstLine and selecting "Apply Style then Next Style". I cannot remember the exact wording - I don't have InDesign open at the moment.

  • Introduce blank line after every sub-total

    I want to add a blank line after each sub-total to improve readability. I thought CHAR(13) would do the trick. Do you have any ideas on how to accomplish this?
    Thanks,
    Dinesh.

    In Pivot Table, you can do duplicate layer on the column that you are subtotalling on. Then in the sum property of the duplicate column, specify label only. Hide the duplicate column.
    hth
    -Prakash

  • How to edit s.o. line after booking in Line Flow - Generic, Bill Only workflow?

    Hi!
    We are using Line Flow - Generic, Bill Only line workflow. Is it possible to edit s.o. lines after it has been booked? Is there any workaround for this?
    Thanks.

    Actually my question also applies to the other workflow, Line Flow - Generic-Bill Only with Inventory Interface... I am asking this for the possibility of manipulating the s.o. line's data like quantity or applying discount/surcharge to a already booked s.o. to be able to avoid creating rma for over-quantitied line, etc.
    I am looking at creating a custom line workflow and somehow altering Close - Line subprocess that it is only performed once a certain condition is met. I believe that subprocess is the one that is closing the line. If that is kept not closed, maybe we can find a workaround for this requirement...
    Thanks.

  • New page in smart form when displaying internal table data in table

    Hi ,
    My requirement in smartform is like
    I'm using the tables to display the internal table data in main window .
    based on SORTF field in the internal table ,when SORTF field value changes all the related to that SORTF value should be displayind in the new page.
    Please anybody tell me that , how to do this?
    Thanks
    Naveen

    Hi Navi,
        Try this Logic.
    1) Go to Smartform,
    2) Declare a flag variable w_flag type c
    3)Go to Main Window
       a) Go to table
       b) Create one more Table Line
       c) Create a CODE Line in that.
           write inside CODE  as Below:-
                 CLEAR: w_flag.
                 ON CHANGE OF w_final-sortf.
                   w_flag  = 'X'.
                  ENDON.
       d) Create one COMMAND Under CODE line created above.
           click on check Box "Go to New Page"  ( Page1 or Page2 or give as reqd ).
           click on conditions tabe of COMMAND
           write: w_flag = 'X'.
    Hope this will work
    Reward Points if Useful
    regards
    Avi.............

  • Create new page with every excel line

    Hi Everyone,
    I have a InDesign document linked up with a excel document. My question is: How do I make indesign create a new page every time a new excel line is added? I want to create an individuel page for every line.

    Or, you could create a paragraph style that has a Keep Option that specifies the paragraph start on next page and you can place the .csv or .txt file normally, using that paragraph style.

  • Safari breaks lines after every word when printing some web pages

    Most pages print fine, but there are a few where Safari totally mangles the formatting when trying to print.
    For example, this page on Microsoft's support website. It looks fine in Safari, but when I try and print it, all the content gets pushed to the left edge of the page, with each word appearing on a new line. This causes the content to take up 15 pages!
    I've tested this in Safari 7.1 in Mavericks, and Safari 8.0 in Yosemite. The results are identical in both versions.
    The same web page prints normally from Chrome or Firefox, and is only 3 pages long when printed.
    Note: Microsoft's website isn't the only place I've seen Safari do this, but it's the only example I have right now.

    This happens on three different Macs. Those Macs have no problem printing from other apps, including other browsers.
    Can you please try printing that web page on your Mac (with Safari), and letting me know what happens?
    Here's a link: http://support.microsoft.com/kb/2360509
    Just load that page, then try printing it.
    Note: You don't even need to actually print it. Just hit ⌘-P, and you'll see the bad formatting in the Print dialog box.

  • Disk utility finds new errors after every reboot

    My problem: every time I reboot my computer, disk utility shows minor corruption of the catalog, attributes, and free space maps on my internal drive. If I boot into the Recovery partition and use Disk Utility to repair the drive, the repair succeeds, and runnin Verify Disk shows a clean file system. But once I boot into the OS from the HD, shut down, and restart, a new set of disk errors appears. The errors are never exactly the same (in mismatch of clusters, for example) but are always off by a few percent.
    Things that may be related:
    This is a new (1-wk-old) MBP 17" (late 2011 model), which I bought to replace an older 15" MBP running OSX 10.6. I used Migration Assistant to move my data and apps from a Time Machine backup of the old laptop to the new laptop. I then made a Time Machine backup of the new laptop, replaced the factory HD with a Seagate Momentus 720GB, 7200 rpm drive, and used Time Machine to do a complete restore of OS and data onto the new drive. I later used Bootcamp assistant to create an NTFS partition (which doesn't ever show errors).
    Things I've already tried to fix the problem that haven't worked:
    --Repaired disk permissions as well as the disk structure.
    --Using the online recovery tool to do a complete reinstallation of Lion (preserving my data and apps, so not a clean install).
    --Using TechToolPro DVD to do a deeper analysis and repair of the disk's volume structure. The repair  succeeded, but the disk errors came right back.
    --Uninstall every utility or extension that might possibly affect the hard drive.
    --Disable all login items using the Accounts preferences pane.
    --Disabled Spotlight by moving the entire volume into the Private area in Spotlight preferences.
    --Reset the PRAM.
    --Reset the SMC.
    No joy from any of these. I haven't tried running fsck (is there any reason to?). I'd love to track down the program that is causing the disk corruption, but don't know how to do that.
    I would be most grateful for any suggestions on diagnosing and permanently fixing this problem, as it does seem to make my system unstable and prone to crashing.

    Thanks for responding. Yes, I should have mentioned that I used the TechToolPro boot DVD to do a thorough SMART scan on the drive as well as a full scan for bad sectors. No problems were found. I also did a long scan of the RAM to rule out memory errors.
    I did remove the new drive and replaced it, taking extra care to ensure the connector was seated properly. But the disk corruption/repair/corruption cycle still reoccured.
    I haven't put the factory drive back in to check whether the problem affects that (smaller, slower) drive as well. If it does, should I conclude that I have a H/W problem with, e.g. the drive controller chip or the drive cable in the laptop?
    I wonder if this might be related to another problem I'm seeing with the laptop, which is that the lid closure doesn't work--the OS isn't able to detect when the lid is closed. It looks like the wire to the sensor goes through the same cable bundle as the SATA cable. Perhaps there is a defect in that bundle or connector.
    I will try the factory disk. If the problem doesn't show up with that, then I guess I should focus again on the possibility of a defective HD. Is there some utility other than TechTool that would do an even more thorough check of the HD?

  • Firefox start like it has just installed (checks add-ones and open whats new tab) after every windows restart

    i installed the 6.0.2 recently i am not really like this it started to be annoying every time i start firefox after reboot it start checking add-ones capability and open what's new tab as if i just installed it

    i solved it by deleting user.js file it works fine now

  • How to fix the Draggable element at its new location after every drag

    Hi All,
    I was trying something new with implementing the "Drag & Drop" control in UI5 .
    The whole functionality involved putting all the items in the list and ,making them draggable.
    After the user drags and drops the item to a new location , it becomes fixed at the position , until its dragged again.
    This is the following piece of code that i was working on :
    $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-core');
      $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-widget');
      $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-mouse');
      $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-draggable');
      $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-sortable');
      $.sap.require('sap.ui.thirdparty.jqueryui.jquery-ui-droppable');
      var backlog = ["As a site visitor, I can read FAQs","As a site editor, I can maintain an FAQ section","As a site member, I can download the latest training material and methodology PDFs","As a visitor, I can download presentations, PDFs, etc. on Scrum that I can use"];
      backlog.sort();
      jQuery.sap.require("jquery.sap.strings"); //Load the plugin to use 'jQuery.sap.startsWithIgnoreCase'
    var oAdd_backlog = new sap.ui.commons.Button({text:"Add Backlog Item", tooltip:"Submit value",width:"160px"});
           var oHorizontal_Layout = new sap.ui.layout.HorizontalLayout("Layout1", {
            content: [oSearch, oAdd_backlog, oBacklog_status_filter ]
      //vertical layout
        // create a list box to show the backlog items
      //backlog list
      var backlog_list = new sap.ui.commons.ListBox("list1", {visibleItems:100, width : "60%"});
      // initialize the list
      updated_baklog_List(backlog_list);
      backlog_list.addStyleClass("list_css1");
    //drag and drop functionality
      var oOldOnAfterRender = backlog_list.onAfterRendering;
      backlog_list.onAfterRendering = function() {
      oOldOnAfterRender.apply(this);
      var $listBoxId = this.getId();
      $("#"+$listBoxId+"-list").sortable();
      //final layout
      var oVerticalLayout = new sap.ui.layout.VerticalLayout("Layout2", {
      content: [oHorizontal_Layout, backlog_list]
    Your inputs and new approaches are valuable to my research .

    You shouldn't have to do anything.
    Holdend is default and it ought to keep the value.
    I guess something else is happening which interferes.
    Are you stopping the animation?
    Starting another one ( which will effectively stop the first )?
    Or something.
    I did a very quick and dirty test changing a colour:
    <UserControl.Resources>
    <Storyboard x:Name="sb">
    <ColorAnimation
    Storyboard.TargetName="Button1BackgroundBrush"
    Storyboard.TargetProperty="Color"
    From="Red" To="Yellow" Duration="0:0:5"
    FillBehavior="HoldEnd"
    />
    </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
    <Button
    Content="This is a button">
    <Button.Background>
    <SolidColorBrush x:Name="Button1BackgroundBrush" Color="Red" />
    </Button.Background>
    </Button>
    </Grid>
    </UserControl>
    Code behind
    public MainPage()
    InitializeComponent();
    this.sb.Begin();
    It stays yellow.
    Hope that helps.
    Recent Technet articles:
    Property List Editing   ;  
    Dynamic XAML

  • "Welcome to your new phone" after every restart o...

    Everytime I shut down my N79 and start it again, I get this "Welcome to your new phone"-screen, asking if I would like to know about it's new features. Is it normal that this keeps coming up every time?

    Solved! It seems that I had to just walk through the wizard one time (formerly I just cancelled it ).
    It doesn't pop up anymore.

  • Internal table Memory Issue Exception TSV_TNEW_PAGE_ALLOC_FAILED

    Hi experts,
    I am working on a conversiojn programme. This programme is dealing with 4 input files.
    Each of these files is having more than 50,000 records. I am reading the corresponding application server files to fill
    the internal tables related to these files.
    The files are being read properly and internal tables are being filled.
    However when i try to assign any of these 4 internal tables to other temproray internal tables in programme(requirement)
    i get a dump  TSV_TNEW_PAGE_ALLOC_FAILED.
    The dump is related to memory issue.
    I think The memory available in the programme at this point is not sufficient for table assignment.
    Please suggest any alternatives where i can save any memory .
    Changig of basis setting is not an option.
    Regards,
    Abhishek Kokate

    Hi Kiran,
    I am not agree with you , I am agree with Hermann.
    While writting file you restrict the record max 5,000 to 10,000 records and process don't store the mutch data into internal table.
    After every used refresh the internal table, Declare table where necessary.
    But you can try to avoid the copy cost.
    Rgds
    Ravi Lanjewar

  • How to insert horizontal line dynamically after every line item in sapscrip

    Hi All,
    I have to insert a horizontal line  after every new item in sap script.
    How to do this .
    In some material there is2 line item or in other line item it ay be more .
    How to insert horizontal line dynamically after every line item
    Point will be rewarded
    Regards
    Niraj

    Hi Niraj,
    You can get your work done by keeping the horizontal line (&ULINE&) after all the item level fields, in this case once each item line is written you will get a horizontal line.
    In case you have different fields for the item lines which are optional (not printed every time) then you can have them in an IF....ENDIF condition and below the endif use a horizontal line.
    Some thing like this:
    /E ITEM_HEADER
    IL <TI>Item,,Material,,Description</>
    IP <TI>,,,,Quantity,,,,Price,,Price unit,,,,,,Value</>
    / &ULINE(71)&
    Let me know if this helps, else please describe your problem with an example.
    Luck.

Maybe you are looking for