Help need in code

Hi all,
Good morning all
PROCESS BEFORE OUTPUT.
module no_lines.------1
MODULE STATUS_9100.
  loop at itab  with control
          table_control cursor table_control-current_line.
   module get_data.----
2
  endloop.
1)data li_lines type i.
describe table itab lines li_lines.
table_control-lines = table_control-lines + 20.
2)
zabc-matnr = itab-matnr.
zbac-maktx = itab-maktx.
I when i first go into the screen 9100 my
table_control-top_line =1
table_control-current_line = 1.
when i fill the data in the table control which can upto 12 records and hit enter then
table_control-top_line =1
table_control-current_line = 1.
the current_line goes from 1 to 12.
when i drag the the vertical bar then
table_control-top_line =2
table_control-current_line = 2.
the current_line goes from 2 to 13
now my internal table has 12 records ,but since the current_line is initially 2 the data from second record of internal table itab is moved into table control.
now my table control has 11 starting with the second record of internal table and an empty row at the bottom.
I am losing the first record.
I need all the records with an empty rows at the bottom

hi,
You need to call the FM SCROLLING_IN_TABLE for scrolling. You need to call it in the tc_table_user_command of the screen. Capture the ok_code and call the FM accordingly.
    call function 'SCROLLING_IN_TABLE'
         exporting
              entry_act             = tc_table-top_line
              entry_from            = 1
              entry_to              = tc_table-lines
              last_page_full        = 'X'
              loops                 = v_tc_table_lines
              ok_code               = 'P+' "This is for scrolling down
              overlapping           = 'X'
         importing
              entry_new             = l_tc_new_top_line
         exceptions
              NO_ENTRY_OR_PAGE_ACT  = 01
              NO_ENTRY_TO           = 02
              NO_OK_CODE_OR_PAGE_GO = 03
              others                = 0.
You can call this FM in a form with ok_code as parameter to handle all page up(P-), page down(P), first page(P--) and last page(P+)
This will give the new top line and retain the data (ie first record)in the internal table.
Hope this solves the issue.
Regards,
Richa.
Message was edited by: Richa Singh

Similar Messages

  • HELP needed with code

    I got 2 ports on UDP, one incoming and one outgoing.
    I’m looking for a way to sort out incoming and outgoing data on each port.
    Like if I got two sensors incoming, I want to have unique ID on each, and data.
    XX  XXXX
    ID  DATA
    Is there any good or preferred way to mange this?

    945077 wrote:
    Hi,
    i've made a psql script for my application in apex ,You might get a better answer asking this in the Apex forum, depending on what it is you need help with.
    What are you trying to do? "scripts" are used in SQL*PLUS, TOAD, and other development tools for ad-hoc executions. Apex is an environment for generating web pages, although it can use scripts for its own SQL environment.
    Are you trying to get the student, subjects, and grades to display them on a page? The easiest way to do that is to create a report region using the SQL and list them directly to the page.
    You can convert the script to a function or procedure and use it to generate the list in Apex.
    Oh, last time I looked htp.p() was slightly faster than htp.print(). Its been a long time since I checked and its possible they are the same now. Less typing anyway :)

  • Flash pros help needed with code

    I have been given task and dont know where to start.
    I need to produce a small quiz that sends the selected values to an asp.net application form there populates the database with the values chosen.
    Ive been told this is the best way to send values from flash to a database.
    Can anyone help in how id even go about this?
    below is a work flow of what i need to do.
    thanks,

    if all your radio buttons have the same group name (say gn), you can use:
    var sendLV:LoadVars=new LoadVars();
    var receiveLV:LoadVars=new LoadVars();
    receiveLV.onData=function(src){
    // do whatever
    sendLV.data=gn.selection.data;  // assuming your radio buttons have data assigned
    etc
    sendLV.sendAndReceive("submit.aspx",receiveLV,"POST");  // assuming your asp si expecting posted variables.

  • Urgent help needed in code

    Hi
    iam copying data to table control from ztable.
    say i copied into my table control 20 rows.
    sayy i have my 18 row material field incorrect, i have an error message.
    for some reason my loop in PAI does looping for only first 11 rows.
    After the 11 row, it comes out from loop.
    i can see only 11 rows in my table control  for the remaiinig rows , i have to drag the vertical scroller and then my loop starts from say 5 to 16(11+5),its then i get the error message
    I need to show all the error things even though i don't scroll the vertical bar.
    LOOP AT Itab.
       CHAIN.
       field itab-matnr MODULE MATNR_9001.
       field itab-lgort MODULE lGORT_9001.
         endchain.
        MODULE  materialdesc_9001.
        MODULE tablecontrol_MODIFY." ON CHAIN-REQUEST.
       FIELD  Itab-SELECT
         MODULE Tablecontrol_MARK." ON REQUEST.
    ENDLOOP. ****comes cout after every 11 loops even thought my itab has 20 records
         MODULE CNT_ACCT_USER_COMMAND.
    Thanks
    swathi

    Hi
    The number of rows can be displayed in the table control depends on how many rows you have designed by screen painter.
    If you have designed N rows, the table control can display only N rows, if you have loaded more than N rows and you need to do a validation for all rows at the same time you have to do a new loop out of loop of PAI.
    PROCES PAI.
      LOOP AT ITAB.
      ENDLOOP.
      MODULE VALIDATION.
      MODULE VALIDATION.
           LOOP AT ITAB.
    --------> Here do the validation     
           ENDLOOP.
      ENDMODULE.
    Max

  • HELP: Need SQL code for bulk move

    I am using Oracle 11.2, there are two tables tb_base, tb_hist as following:
    tb_base (id number(5), tag varchar2(16), setTs timestamp(6));
    tb_hist(id number(5), histTs timestamp(6), setTs timestamp(6), tag varchar2(16));
    tb_base 1, 'adsf', 2012/12/20
    1, 'bbb', 2012/12/08
    1, 'ccc', 2012/12/30
    2, 'aaa', 2012/11/29
    2, 'vvv', 2012/11/28
    All I need is to move non-latest record with the same id from tb_base to tb_hist as followings:
    tb_base 1, 'ccc', 2012/12/30
    2, 'aaa', 2012/12/29
    tb_hist 1, 'adsf', 2012/12/20, 2012/12/20
    1, 'bbb', 2012/12/08, 2012/12/08
    2, 'vvv', 2012/11/28, 2012/11/28
    Any suggestion on the SQL to complete this task?
    Thanks

    Copy the historical records to TB_HIST:
    INSERT INTO tb_hist
    (id
    ,histts
    ,setts
    ,tag)
    SELECT id,
           setts,
           setts,
           tag
    FROM   tb_base a
    WHERE EXISTS (SELECT 1
                  FROM  (SELECT id,
                                MAX(setts) OVER (PARTITION BY id) max_setts
                         FROM   tb_base) b
                  WHERE  b.id         = a.id
                  AND    b.max_setts != a.setts)Delete the historical records from TB_BASE:
    DELETE tb_base a
    WHERE EXISTS (SELECT 1
                  FROM  (SELECT id,
                                MAX(setts) OVER (PARTITION BY id) max_setts
                         FROM   tb_base) b
                  WHERE  b.id         = a.id
                  AND    b.max_setts != a.setts)

  • ABAP Code Help needed in DSO

    Hi All,
    My requirement is below :
    In my DSO I have the data as below
    doc number     item     con type     Agreement
    100     10     adc     1234
              efg     5678
              hij      ' '
    200     20     adc     1234
              efg     ' '
              hij      5678
    Now I have created a New Info object named flag. So now I am doing a self myself data mart where i need to write my routine to set data in the flag.
    The data should be like
    doc number     item     con type     Agreement   Flag
    100     10     adc     1234               X
              efg     5678               X
              hij      ' '                     X
    200     20     adc     1234               X
              efg     ' '                    X
              hij      5678              X
    Note:- even if agreement is blank for hij we need to put X since agreement is available for the remaining two condition types.
    Please can any one help with the code.and also please let meknow whether we shold write it in start routine or end routine
    Thanks In advance
    Sree

    Hi Rookie ,
    If i write the code below
    DATA: ITAB TYPE TABLE OF tys_TG_1,
               ITAB_WA TYPE tys_TG_1.
    MOVE RESULT_PACKAGE[] TO ITAB[].
    LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
       IF <RESULT_FIELDS>-AGREEMENT IS NOT INITIAL.
            <RESULT_FIELDS>-FLAG = 'X'.
       ELSE.
            LOOP AT ITAB INTO ITAB_WA WHERE AGREEMENT IS NOT INITIAL AND
                                    DOC_NO = <RESULT_FIELDS>-DOC_NO AND
                                    ITM_NO = <RESULT_FIELDS>-DOC_NO.
                 <RESULT_FIELDS>-FLAG = 'X'.
                  EXIT.
            ENDLOOP.
       ENDIF.
    ENDLOOP.
    My requirement doesnt match
    My requirement is below
    doc number    item     con type        Agreement
    100                 10           adc            1234
                                         efg             5678
                                          hij                ' '
    200                  20          adc             ' '
                                         efg               ' '
                                          hij                ' '
    Expected result is
    doc number    item     con type        Agreement    flag
    100                 10           adc            1234                x
                                         efg             5678                 x
                                          hij                ' '                     x
    200                  20          adc             ' '                     ' '  
                                         efg               ' '                    ' '
                                          hij                ' '                     ' '
    regards
    Sree

  • File missing (file\BCD error code 0Xc0000034 help need for work!

    file missing (file\BCD  error code 0Xc0000034 help need for work!    what can i do?
    have an p 2000 notebook pc

     Hi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
    What is the model or product number of your notebook? What version of Windows is installed?
    Guide to finding your product number
    Which Windows operating system am I running?
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Need help in transcation code ime0

    I need help in transaction code ime0. I mean to say what is this TCode doing? What different Drill-down program means? Where I can use this report?
    Regards,
    Subhasish

    Hi
    Please check the link for help
    <a href="http://help.sap.com/saphelp_47x200/helpdata/EN/5c/8db33f555411d189660000e829fbbd/frameset.htm">CA - Drilldown Reporting</a>
    Hope it helps
    Anirban

  • I have old MacBook running OS 10.6.8 I was told in Apple Genius Bar that I need a code from apple support to upgrade to 10.7.   Apple support will not help because I am have their support plan.  Can some one help?

    I have old MacBook running OS 10.6.8 I was told in Apple Genius Bar that I need a code from apple support to upgrade to 10.7.   Apple support will not help because I am have their support plan.  Can some one help?

    hi Samberl
    thanks a lot for the fast reply.
    I was dragging folders from main folders on the laptop-desktop  onto the external drive icon - to copy them across....
    Your suggestion sounds very promising -  I didn't know about 'cloning'.
    Yes the idea is to backup the laptop -    I thought I would just move it all now, new - and then keep saving/dragging physically   across to the new drive myself each day or two...
    Would this be the sizeof the internal hard drive = c.500 gb  ?   =   under the HD icon on desktop is written  : 
    " 499.76gb , 311.5 gb free  " 
    I can erase and start agin on the new external drive - so this plan is to make two partititions, rather than the one at present, and make one of them 500 gb ?
    I have found CCC [carbon copy cloner] googling - looks good.
    When CCC site says it backs up  the hard drive - would this  mean all my files  [over 100 gb] that are mostly  in folders on the desktop, plus the others in itunes, iphotos etc found in the HD icon,  would all copy across successfully [wherever they are in the computer ]  ?
    thanks again, hope you can clarify these things and then I will go for it. 
    It would be great and amazing if this 'lack of permission' message doesn't show up in the process of doing this ccc transfer - hopeful!
    Julie

  • I need help with this code error "unreachable statement"

    the error_
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errors
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    public class Tools//tool class
    private int numberOfToolItems;
    private ToolItems[] toolArray = new ToolItems[10];
    public Tools()//array of tool
    numberOfToolItems = 0;
    for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
    toolArray[i] = new ToolItems();
    }//end for loop
    }//end of array of tools
    public int search(int id)//search mehtod
    int index = 0;
    while (index < numberOfToolItems)//while and if loop search
    if(toolArray[index].getID() == id)
    return index;
    else
    index ++;
    }//en while and if loop
    return -1;
    }//end search method
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0;
    int index;
    index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    }//end delete method
    public void display()//display method
    for(int i = 0; i < numberOfToolItems; i++)
    //toolArray.display(g,y,x);
    }//end display method
    public String getRecord(int i)//get record method
    // return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
    }//end getrecod
    }//end class
    Edited by: ladsoftware on Oct 9, 2009 6:08 AM
    Edited by: ladsoftware on Oct 9, 2009 6:09 AM
    Edited by: ladsoftware on Oct 9, 2009 6:10 AM
    Edited by: ladsoftware on Oct 9, 2009 6:11 AM

    ladsoftware wrote:
    Subject: Re: I need help with this code error "unreachable statement"
    F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
    int index;
    ^
    F:\Java\Projects\Tools.java:71: missing return statement
    }//end delete method
    ^
    F:\Java\Projects\Tools.java:86: missing return statement
    }//end getrecod
    ^
    3 errorsThe compiler is telling you exactly what the problems are:
    public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
    if(numberOfToolItems >= toolArray.length)
    return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
    int index;
    index = search(id);  //< -----------------------------------------------------------------------------------------------------------------HERE
    if (index == -1)
    toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
    numberInStock ++;
    return 1;
    }//end if index
    }//end if toolitem array
    return -1;
    }//end insert method
    public int delete(/*int id*/)//delete method
    // <<== HERE where is the return statement?
    }//end delete method
    public String getRecord(int i)//get record method
    // return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
    }//end getrecod
    }//end class

  • I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • Help,just  entered registration code for quicktime pro,help needed

    Help,just  entered registration code for quicktime pro,help needed,cant seem to see the quicktime pro screen i saw on internet with all the edit and extra things at the top,i dont understand this,any help,Dave

    I hope this helps http://support.apple.com/kb/ht2240 good tips on your prob here..good luck

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

  • I need help with my code..

    hi guys. as the subject says I need help with my code
    the Q for my code is :
    write a program that reads a positive integer x and calculates and prints a floating point number y if :
    y = 1 ? 1/2 + 1/3 - ? + 1/x
    and this is my code
       This program that reads a positive integer x and calculates
       and prints a floating point number y if :
                 y = 1 - 1/2 + 1/3 - ? + 1/x
       import java.util.Scanner; // program uses class Scanner
        class Sh7q2
           // main method begins execution of Java application
           public static void main( String args[] )
          // create Scanner to obtain input from command window
             Scanner input = new Scanner( System.in );
             int i = 1; // i is to control the loop
             int n = 2; // n is suppose to control the number sign
             int x; // a positive integer entered by the user
             int m;
             System.out.println("Enter a positive integer");
             x = input.nextInt();
             do
                m = (int) Math.pow( -1, n)/i;
                System.out.println(m);
                   n++;
                   i++;
             while ( m >= 1/x );
          } // end method main
       } // end class Sh7q2 when I compile it there is no error
    but in the run it tells me to enter a positive integer
    suppose i entered 5
    then the result is 1...
    can anyone tell me what's wrong with my code

       This program that reads a positive integer x and calculates
       and prints a floating point number y if :
                 y = 1 - 1/2 + 1/3 - ? + 1/x
       import java.util.Scanner; // program uses class Scanner
        class Sh7q2
           // main method begins execution of Java application
           public static void main( String args[] )
          // create Scanner to obtain input from command window
             Scanner input = new Scanner( System.in );
             int i = 1; // i is to control the loop
             int n = 1; // n is suppose to control the number sign
             int x; // a positive integer entered by the user
             double m;
             int a = 1;
             double sum = 0;
             System.out.println("Enter a positive integer");
             x = input.nextInt();
             for ( i = 1; a <= x; i++)
                m =  Math.pow( -1, n+1)/i;
                sum  = sum + m;
                n++;
                a++;
             System.out.print("y = " + sum);
          } // end method main
       } // end class Sh7q2is it right :S

  • Help Needed with HTML code for Image Positioning

    Hi All,
    Need a little help with some code for positioning images.
    I initially used the following:
    This is fine, but the border automatically puts a black border around the photo - how do I change it to white? Is there a way to set margins too, to prevent the text butting up against the photo?
    I also used the following code with success:
    <style type="text/css"
    img
    float:right;
    border:2px solid white;
    margin: 0px 0px 15px 20px
    </style>
    This code works, however the problem with it is it is not individual to just one photo - it moved all my photos and on that page, I wanted one photo floated to left and another to the right.
    If I use this code, how can I make it photo specific, so that it only affects the placement, margins and borders of one photo?
    Any help would be great.
    Thanks

    CSS question, not iWeb question. Regardless, use inline CSS styling for the image. You can also wrap the image in its own tag and declare an id or simply declare an id for the img tag, then set the style for the id_name:
    <style type="text/css"
    img#id_name
    float:right;
    border:2px solid white;
    margin: 0px 0px 15px 20px
    </style>
    If you want to control the style of more than one image on a page but not all then use a class instead of an id.
    the border automatically puts a black border around the photo - how do I change it to white? Is there a way to set margins too, to prevent the text butting up against the photo?
    I believe you have discovered a solution for this according to your CSS code. You have set the border to white by looking at the code and adjusting it appropriately. Your margin is declared in the CSS also, adjust the pixels appropriately.
    Read up some more on CSS to educate yourself further. I suggest w3schools.com or a CSS forum instead of the iWeb forum if you have CSS questions. It's kind of like if you drive your auto to the supermarket so you decide to go to the supermarket and ask everyone in the produce section to help when you have car problems. All the supermarket does is provide a place to park your auto. If you have car problems then ask a mechanic. iWeb (and most of its users) doesn't specialize in code, it simply provides an area for you to place it. Granted you might get lucky and find a mechanic in the produce section of the supermarket, but you're more likely to find a specialist at an auto swap meet (or CSS coding forum)!

Maybe you are looking for

  • AirPlay and Windows 8

    I have 3 Window PCs (all Windows 7) that are working great with 2 Apple TVs using Airplay.   I have a fourth PC (using Windows 8) which is not working with Airplay and the 2 Apple TVs. Does anyone have any suggestions as to why?

  • Internal Table to CSV

    Hi Experts , How can I convert my data in internal table to CSV ? I am in SAP CRM 4.0. In R/3 I saw FM for converting into CSV format which is SAP_CONVERT_TO_CSV_FORMAT but its not available in CRM 4.0. Is there any FM available in CRM 4.0. Please he

  • Authorization issues after generating PFCG profile using CRMD_UI_ROLE_PREPA

    Dear expert We create a navigation bar profile and a business role. Then, we generated a PFCG profile for this business role to gather all the authorization object required to meet the functionality provided in this business role. For that, we used t

  • Oracle XBRL Extension Ready for Download

    Oracle XBRL Extension Ready for Download URL: http://www.liberidu.com/blog/?p=2608 The new ready to download Oracle XBRL Extension is a "no cost option" on top of the latest Oracle Database 11.2.0.2.0 release. With this added functionality you will g

  • OPEN IN NEW TAB isn't working consistently

    Running FF 3.6.13 on W7 - Clean install on new machine. Ad Block Plus is the only add on for FF and the only other application that affects running applications is Avast AV Free version. Sometimes when I choose to right click and open in a new Tab, t