How to pick the value of the line item in table control

My screen.
I have designed table control by referring internal table without using wizard.
I have placed button inside of that table control.
my requirement is by clicking the button it ll show the value of the line inside of the table control.
I have used "get cursor...".
But the problem is "it ll show only the cursor value of the front screen, if suppose i scroll the value of table control at the time also, it ll show the cursor value of the screen, it ll not show the exact value of the cursor inside of the table control.

Wrong Forum Anand......!

Similar Messages

  • How to transfer the contents of a line of a table control to second screen?

    Hi,
    I have a table control and I have entered some contents in one line of a table control .
    When i click on this line and then click on the detail button on the screen , it should take me to another screen and whatever I have entered in the table control should be transferred to the second screen .
    Please could anyone help me out with this .
    Regards,
    Sushanth H.S.

    Hi
    U need to get the index of the line of table control by command GET CURSOR:
    PROCESS PAI.
    LOOP AT ITAB.
       MODULE GET_CURSOR.
       MODULE MODIFY_ITAB.
    ENDLOOP.
    MODULE USER_COMMAND.
    Module to pick up the selected line:
    MODULE GET_CURSOR.
      GET CURSOR LINE VN_LINE.
    ENDMODULE.
    Module to transfer the data from table control to internal table:
    MODULE MODIFY_ITAB.
      ITAB-FIELD1 = <FIELD OF TABLE CONTROL>.
      MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.
    ENDMODULE.
    U should considere the variable line has the value of the index of the line of table control, so u need to calculate the number of the corresponding line of internal table:
    MODULE USER_COMMAND.
      CASE OK_CODE.
        WHEN 'DETAIL'.
    * Calculate the line of internal table:
           VN_LINE = <TABLE CONTROL>-TOP_LINE + VN_LINE - 1.
    * Read the data
           READ TABLE ITAB INDEX VN_LINE.
    * Transfer the data to the output structure of the new screen
           <STRUCTURE>-FIELD1 = ITAB-FIELD1.
    * Call the new screen
           SET SCREEN <NEW SCREEN>.
           LEAVE SCREEN.
    Max

  • Dynamically picking the line item of table control

    Hi all,
    Can u suggest me a way to dynamically picking the no of line item in the table control displayed.
    Regards,
    Ashutosh Kumar

    Hi Ashutosh,
    In BDC case, what you can do is use the "position button" instead of finding the number of lines on the table control.
    Or else you can use call transaction with 'Options addition'
    eg:
    Call transaction parameters
          clear gs_options.
    <b>      gs_options-defsize = 'X'. "Default size</b>
          gs_options-dismode = 'N'.
          gs_options-updmode = 'S'.
               call transaction 'VI02' using t_bdcdata
                                       "mode 'N'
                                     "update 'S'
                                     options from gs_options
                                   messages into t_messages.
    Please let us know why do you want to know the number of lines on the Table control.If the above answer doesn't satisfy you.
    Regards,
    Ravi

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • How to get First line item in Table control for BDC.

    Hi,
    I have a requirement while creating the return order from the reference Sales order for BOM.
    Once I compare the line items and delete the items not to be returned, I want to read the first line item which in fact is header, to make some changes.
    How to read  this as cursor points to the last line item.
    -B S B

    Hi Bsb,
    What is exactly unclear to you? =POPO will give a popup screen in which you can enter the order position number. This number will then be on the top of the table which means you can refer to it in BDC with "(01)".
    Regards,
    John.

  • WSo2 BDC to delete line item in table control

    Hi all,
    My requirement is to delete material from wso2 table control.
    The only way to delete a line item in this table control is to select the line in table control and delete it.
    The recording doesnt captures any selection of row.
    Any input on how to caputre particular row ??
    Please dont send me links to work with table control in bdc
    Regards
    Bhanu

    DaveL  wrote:
      I am not aware of any way to make the BDC delete the row, other than by running in 'A'-all mode and letting the user step through each screen and delete the rows that should be deleted.
    Well , if the user has to run it in "A" all screen mode why a BDC is required
    DaveL  wrote:
    Deleting them from the table control would obviously have no effect upon the database table though, would it....it would just hide a row from view in this particular table control
    Really ? Well it will delete it from database too i dont know what makes you think that it wont be deleted from database.
    Anways i have figured out how to capture row selection in BDC .
    Thanks for your reply it proves nothing i guess

  • Copy of a line item in table control

    Save Our Environment. Save Yourself.
    Hi All,
    Firstly, I have an invoice number on one screen 0050. When I enter one invoice number and ENTER, it'll take me to screen 0100 in which there is a table control having some 10 columns. This will be a display of the line items of that particular invoice number.
    Now, in these columns 2 will be editable and all the rest non-editable. Now, based on some condition, when the user tries to save these entries after inputting some values into those editable fields, I need to make a copy of the same line (means with all same values).
    Can somebody please tell me whether this is possible? I tried searching in SCN, but was not clear with some solutions.
    Thanks a lot.
    - I'm not an environmentalist.  I'm an Earth warrior.

    HI,
    You can use GET CURSOR LINE LINE_NO this will give you the sy-index so that you can read the itab like
    read table itab index line_no. This is one option and second is if you have row selector.
    read table itab with key mark = 'X'.
    If you want the Row contents befor the PAI triggers
    [Check this Thread|Table Control dynamic F4;
    Hope this is clear to you.
    Regards
    Ram

  • Setting line item of table control

    I need to allow the user to enter a line item number 10, 20, 30 ... and then the cursor is set to that line item in the table control

    Any one please.

  • How i can pass the value into 1 line

    Hi expert,
    how do i pass all the value for sales document flow item in one line?
    i'm using this function
    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'
        EXPORTING
          aufbereitung  = '2'
          belegtyp      = i_del-vbtyp
          comwa         = l_comwa
          nachfolger    = ' '
          vorgaenger    = 'X'
          v_stufen      = '50'
        TABLES
          vbfa_tab      = lt_vbfa
        EXCEPTIONS
          no_vbfa       = 1
          no_vbuk_found = 2
          OTHERS        = 3.
    so now lt_vbfa already got data line by line....
    line 1 : contract : 00010 : 1000000 : 19,000.00
    line 2 : order     : 00010 : 2000000 : 10000.00
    line 3 : delivery : 00010 : 3000000 : 10000.00
    how i can pass the value into 1 line?
    for example :
    contract  | line     | amount     | Order     | line     | amount    | delivery   | line     | amount     |
    1000000 | 00010| 19,000.00 | 2000000 |00010 | 10000.00 | 3000000 | 00010 | 10000.00 |
    Edited by: anuar jusoh on Aug 17, 2009 4:02 AM

    Hi,
    What is requirement for passing the data in a single line ? Do you finally need to append the same in the internal table and pass it in the module ?
    You can create an internal table of type 1000 character and can loop the existing internal table. Then you can append the Work area in a single line and can finally append it to the table.
    DATA : ITAB type standard table of char1000.
    Loop at <existing table>.
    concatenate table work area wa_char100 into Itab_char_1000.
    endloop.
    APPEND itab_char_1000 into itab.
    Hope this helps.
    Thanks,
    Samantak.

  • How to get all the values in the Select-option.

    Hi,
    I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week)  in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
    My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
    Regards,
    Anbu.

    Hello,
    I will prefer Max's solution. But just for the sake of this req.
    i need to get 200923, 200924,200925, 200926
    i am proposing my soln:
    DATA: V_WEEK TYPE RSCALWEEK.
    SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
    AT SELECTION-SCREEN.
      DATA:
      V_COUNT TYPE I,
      V_ADD   TYPE I,
      RT_WEEK TYPE RANGE OF RSCALWEEK,
      RS_WEEK LIKE LINE OF RT_WEEK.
      V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
      DO V_COUNT TIMES.
        RS_WEEK-SIGN = 'I'.
        RS_WEEK-OPTION = 'EQ'.
        RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
        APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
        CLEAR RS_WEEK.
        V_ADD = V_ADD + 1.
      ENDDO.
    @Max: I was stupid enough not to think of your solution. Need to leave office
    Cheers,
    Suhas

  • How to get the values of the objects inside an object??

    Hi,
    I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
    I suppose reflection is needed here, but I can’t figure out how to get the values of the objects inside an object...
    private void handleIt(String attributeName, Object attributeValue) {
         boolean isPrimitiveOrNull = ((null == attributeValue) ||
              (attributeValue.getClass().isPrimitive()));                                         
         if (isPrimitiveOrNull) {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
         } else {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
              Field[] fields = attributeValue.getClass().getDeclaredFields();
              int lim = fields.length;
              String name;
              Object value = null;
              for (int i = 0; i < lim; i++) {
                   name = fields.getName();
                   //LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
                   value = fields[i].get(obj); //I don´t know what 'obj' should be??
                   handleIt(name, value);
              sb.append("}");               
    Any suggestions will be greatly appreciated...

    I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
    This is the resultant code. But I think it isn’t accurate in calculating the real size of objects being got using reflexion.
    Do you or somebody have any more suggestions?
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectOutputStream;
    import java.lang.reflect.Field;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SessionMeasurer extends HttpServlet {
         private static final long serialVersionUID = 1470488362727841992L;
         private StringBuilder sb = new StringBuilder();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void performTask(HttpServletRequest request, HttpServletResponse response) {
              HttpSession     session = request.getSession(false);     
              String attributeName = "";
              Object attributeValue = null;
              for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
                   attributeName = (String)attributeNames.nextElement();
                   attributeValue = session.getAttribute(attributeName);
                   handleIt(attributeName, attributeValue);               
              System.out.println(sb.toString());
         private void handleIt(String attributeName, Object attributeValue) {           
              if (attributeValue != null) {          
                   boolean isPrimitive = attributeValue.getClass().isPrimitive();
                   if (isPrimitive) {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
                   } else {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
                        Field[] fields = attributeValue.getClass().getDeclaredFields();
                        String name;
                        Object value = null;
                        int lim = fields.length;
                        for (int i = 0; i < lim; i++) {
                             name = fields.getName();                                                                                                         
                             if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
                                  try {
                                       value = fields[i].get(attributeValue);
                                  } catch(Exception e) {
                                       //PENDIENTE: Tratamiento excepción
                                  handleIt(name, value);
                        sb.append("}");               
         private int sizeOf(Object obj) {
              //Valid only for Serializables
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              ObjectOutputStream oos = null;     
              byte[] bytes = null;               
              try {          
                   oos = new ObjectOutputStream(baos);
                   oos.writeObject(obj);
                   bytes = baos.toByteArray();
              } catch(Exception e) {               
                   //PENDIENTE: Tratamiento excepción
              } finally {
                   if (oos != null) {
                        try {
                             oos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
                   if (baos != null) {
                        try {
                             baos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
              int size = -1;
              if (bytes != null) {
                   size = bytes.length;
              return size;          

  • How do I change the value of the Order By field in an MP3 file?

    good day Guys,
    I'm new here in the forum and I have a question that is "breaking" the order of my songs and my head too ...
    How do I change the value of the Order By field in an MP3 file?
    for example, in the photo below, the song "The Bad Touch" is coming BEFORE the song "A Little Respect", this happens because of the Name field to Order ...
    My "problem" is in the photo below, the "tab" Order, iTunes will not let me erase what is written in the "Sort As" ...
    I've been "collecting" several songs over SEVERAL years
    I'm currently with more than 1,500 songs on HD and several backups on DVDs and external hard drives and I think, download it again, will be a "little" laborious and boring
    I DON'T WANT to be filling the tags of songs (name, singer, CD, year, etc.)
    I have used the program Mp3tag to remove the music tags
    I've tried to download the song again and go through Mp3tag program as if it were a new song
    I've changed the music access permissions, folder and even entire hard drive (my Windows has only one user)
    I've tried to catch the song again, from a previous backup
    I've tried to create a copy of the file at iTunes own
    I've tried to create a new music file in a music recording program
    NOTHING of what I did above resolved
    -> I'm using Windows 7 64-bit Ultimate
    -> I'm using iTunes 12.1.1.4 for 64-bit Windows
    -> My iPad is the third generation (a little old, I know) with Wi-Fi and 3G, but it has served me VERY WELL
    -> The iPad is updated with iOS 8.1.3 and is not unlocked
    I'm sorry for the GIANT post, but well, I think I could explain as much as possible and for my English, too bad, by the way, I'm from Brazil and I'm using Google translator
    Hugs and await answers,
    Paulo Ricardo

    hello turingtest2,
    my language is Brazilian Portuguese (there are some little differences between Brazilian Portuguese and the Portuguese of Portugal, but nothing that interferes with the script)
    at this time, I'm managing songs manually, I don't know if this will interfere with the execution of a script or command
    as I picked up this iPad recently, I still don't understand how to set up the iTunes Music Library and the person who gave me, told me it was easier to put the songs manually
    as you said, in my iTunes, 95% of the songs are with ALL the blank fields, including the Name to Sort field, only songs that begin with a/an/the standing with the Name to Sort field filled with name of the song, without the a/the
    I do not know what to do...
    I want to learn to ride the iTunes Music Library, that my work is less
    you know any site that teaches create/manage my iTunes Music Library?
    this site/forum may be in English, no problem
    thanks for all your help and the help of others who responded to my request

  • How to get the value in the XML tag?

    hi all,
    i am new to JAXP. i tried the sample program provided in the following link. it just counts the number of tags in the XML file. XML file name is given as command line argument.
    Now, if i want to display the value in the XML tag( say <NAME>xxx</NAME> in this tag i want to display the value 'xxx' ), what has to be done?
    how can i achieve this?
    please help...
    link of the sample program:
    http://xml.apache.org/~edwingo/jaxp-ri-1.2.0-fcs/samples/SAXLocalNameCount/SAXLocalNameCount.java
    thx in advance,
    -Soni.

    implement this method the same way you have startElement...
    public void characters(char[] ch,
                           int start,
                           int length)
                    throws SAXException

  • Modifying the value of the line selected

    Hi Experts,
    Iam writing a ALV report , In which the basic list displays the values some thing like this
    MateriaNumber   Quantity
    10                      50
    Now my requirement is when when i click on this line i need to change the quantity , and the changed quantity needs to reflected in the secondary list
    I know how to use modify current line ,but i guess it is used only for simple list and not for ALV
    Can any one help me out with this
    Thanks a Lot in Advance...

    Hi,
    1) use event HOTSPOT_CLICK of cl_gui_alv_grid
    2) when user clicks, in your handle_htospot_click method change the value in the list and refresh it with REFRESH_TABLE_DISPLAY
    3) then when ALV has already new value, in the same handling method implement your logic with detailed list and display it
    or
    3) write another method which will use DATA_CHANGED_FINISHED event and after refreshing the list use this method (will be called after data in alv has changed) and provide your detailed list.
    That's it
    M.

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

Maybe you are looking for