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

Similar Messages

  • 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

  • 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

  • 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.

  • 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......!

  • 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.

  • Copy selected lines in the table control

    Hi friends,
    I Have a screen 200 in which i have a button COPY and table control.
    In my table control i have 6 lines of data.
    now my requirement is when i select any lines  ie :  let us say i ahve selected 1 , 3 , 5 lines of my table control and when i click on the button COPY of that screen. i need those 3 selected lines 1 , 3 , 5 to be copied again in the table control
    example  :
    line 1         selected
    line2
    line3          selected
    line4
    line5          selected .
    line6
    now my table control should be
    line1
    line2
    line3
    line4
    line5
    line6
    line1
    line3
    line5
    How can i do that
    Regards
    Priyanka.

    I have similar issue...i need help how to accomplish automatic addition on every line.  example (see below)
    this is how it looks right now
    DATE    EMPLOYEE       DEPT JOB     LOT     OPER#     LX_HRS     OP_SETUP     LX_TYPE     COMPLETE
    2/23/2009     M.Paquiao   NB         1960     001     10             1.50                14.00                     S                      NO
    2/24/2009                                                      1.00             14.00                  S                        NO
    2/25/2009                                                      4.50                14.00                  S                    NO
    2/27/2009                                                      3.00             14.00                  S                        NO
    2/28/2009                                                      1.50             14.00                  R                       YES
    3/1/2009                                                      2.00             14.00                  R                  YES
    this what I need it to do when I meant automatic addition of each line:
    DATE   EMPLOYEE     DEPT     JOB     LOT     OPER#     LX_HRS     OP_SETUP     LX_TYPE     COMPLETE
    2/23/2009     M.Paquiao      NB        1960     001     10             1.50        14.00               S         NO
    2/24/2009                                                      2.50             14.00                  S             NO
    2/25/2009                                                      7.00        14.00                  S             NO
    2/27/2009                                                      10.00     14.00               S             NO
    2/28/2009                                                      11.50     14.00               R             YES
    3/1/2009                                                      13.50     14.00               R             YES
    As you can see everything is the same but on column LX_HRS, the first example one is not doing anything addition but on the second example is now doing addition.  This additions were done manually, how can I tell crystal to add each line, in the example above, the
    first example                                              second example: (addition is involved)
    date                lx_hrs                                  date                  lx_hrs
    2/23/09           1.50                                     2/23/09              1.50
    2/24/09           1.00                                     2/24/09              2.50 (sum of : 1.50 + 1.00 was added)
    2/25/09           4.50                                     2/25/09              7.00 (sum of 2.50 (on date 2/24/09 &  4.50 from date 2/25/09 of the first example).

  • Copy more lines in the Table Control

    Hi ,
    I have created a table control in one of my mod pool programs,
    I have to paste lines from Excel (for instance) to this table control, but it copies only to the lines in the table control which I see in the screen. if I have more lines to copy than the lines which I see in the screen, it doesn't copy it.
    plz help me in this regard.......
    Thanx
    SHOAIB REHMAN

    Hi, Shoaib
    I think you have to Program for this in Special Button like in Select-Option's (EXTENSION) Button Window you have an Button Upload from Clipboard (Shift + F12) just left side of the Cancel button.
    For Copy data from Clipboard Check the Bellow Sample Code. (Copy data and Run the Bellow Code)
    TYPES:  BEGIN OF ty_char256,
            line TYPE c LENGTH 256,
            END OF ty_char256.
    DATA: it_data TYPE STANDARD TABLE OF ty_char256,
          wa_data LIKE LINE OF it_data,
          length TYPE i.
    CALL METHOD cl_gui_frontend_services=>clipboard_import
      IMPORTING
        data                 = it_data[]
        length               = length
      EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
        not_supported_by_gui = 3
        OTHERS               = 4.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_data INTO wa_data.
      write: wa_data-line.
    ENDLOOP.
    Please Reply if any Confusion.
    Thanks and Regards,
    Faisal

  • FI- Line Item Extraction- BWOM_SETTINGS- Control Table Entries

    Gurus,
    I am working on FI- Line item extraction in the sand box. I have all my DS's in Nodes not connected. I transfereed the application component hierarchy in SBIW. Now I went to check on the basic settings before activating the DS's for FI line item- in the control table, BWOM_SETTINGS, I could not find any parameters- lowlimit, safety, there are only 2 parameters-OBJSELSICO-'X', and OBLIGODELT- ' '.
    We can enter the param values manually and transfer global settings to BI. Could we do the same for fields too. Could we enter them manually?
    Why does my control table doesn't have the fields for std line item extraction- lowlim, safety, timbor, overla. My plug- ins are good. I have all the plug ins. I can see them in dev box but not sand box. Why?

    Hi Ram,
    I think Time stamp will set in this table when we run first delta or init in BI system.
    So activate the data source and replicate the same BI system. develop data model for this data source and run the init for this data source.
    then you will be able to find time stamp for this data source.
    FI-Line item data-Delta.
    0FI_GL_4 delta functionality?????
    Regards,
    Venkatesh

  • How To delete the Chosen line from the Table Control

    Hi Friends,
      i am new to Module Pool Programming , i developed a Table Control in input mode and i am getting data also into that table control. my requirement is that i want to delete the current chosen line from that table control. please help me out.

    HI
    GOOD
    GO THROUGH THIS REPORT
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
    lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    DESCRIBE TABLE itab LINES lines.
    flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
          ENDIF.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
    ENDLOOP.
          ENDIF.
    ENDCASE.
    ENDMODULE.
    CHANGE THE CODE AS PER THIS LIGIC.
    THANKS
    MRUTYUN

  • How do I execute some code when a line of a table control is selected?

    Hi,
    I would like to execute some code when a line of a table control is selected.  At the moment I have to select one or multiple rows and then press enter, this forces a screen refresh and my code is executed but I would like the code to be executed as soon as any line is selected.
    I've done something like this using ALV grids and object orientated code but is there a way of doing this in a normal non-OO table control?
    Thanks in advance.
    Gill

    Hi,
    U need to declare a char1 field for marking (mark field).  This will reflect with value 'X' in your tcontrol internal table for all the selected rows. 
    Now u need to handle the okcode for enter in your PAI.
    There u need to loop through the table for all marked fields.
    There after u can do what ever u want.
    Venkat.

  • Line item text field from MIGO are not copied into FI line item text field

    Hi all on SCN, please, I need a help.
    It was created as required by the user a field status group with the text field required.
    This field status group was assigned to some accounts, in order to make my unit tests.
    u2003
    In development envirionment was made some tests directly in FI area, and it works properly.
    u2003
    But the user made a test using MIGO transaction, choosing in this transaction an account that he changed its field status variant to the one created in development environment, that make the text fiels required. So, to start, he donu2019t fill the text item of MIGO, and a message error appear stating that he needs to enter values in this field.
    After fill in the text fiels, he can save his work.
    u2003
    But the FI document generated donu2019t receive the line item text typed in MIGO, but receives the values on Reference document and Document Header text entered in the header of MIGO, what is missing, donu2019t is automatically copied MIGO text line items to FI documents line Items, does there is some additional configuration missing?
    Hope someone help me with this issues.
    Thanks in advanced!

    Hi,
    Material document will get updated in reference field in FI by default.  If for any reason, want to get this updated in text field, you need to define a subsititution in GGB1.
    Best Regards,
    Madhu

  • 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

  • Bapi to copy the PO line item below the existing PO line item

    Hi All,
    I am new to work on BAPI, Can any one help me out,
    Requirement is to copy the PO line item below the existing PO line item (Replicate the line item for returns purpose) . So is there any bapi to do this task.
    Thanks in Advance
    Pallavi
    Moderator Message: Please employ the SAP procedures to identify the right BADIs and Exits and help yourself.
    Edited by: kishan P on Nov 16, 2010 1:56 PM

    Hi,
    What i think is you should use two BAPI one is BAPI_PO_GET_DETAIL to fetch existing details of line items and then BAPI_PO_CHANGE to create s second one.
    Nabheet

  • How to handle the single line selection in table control

    Hi All,
       I am facing a problem in the table control of modulepool program.
       I have line selection as "Single" in the table control attributes. But when i am selecting a line in the table control as long as it is in the same page,the line selection is single but when i am selecting the line in the next page,the previous selection is not deselected. So I am seeing two selection for "Single line selector" attribute.
       Could any one help me solve this problem?
    Thanks & Regards,
    S.Lakshmi

    Hi Lakshmi,
    Just Go to Table control , click on it , you can see the attributes screen , there you can see option for
    <b>Line selection</b>
    none
    multiple selection
    single selection
    check the radio button single selection.
    that will solve your problem..
    regards
    vijay

Maybe you are looking for

  • Playing real instruments

    When I connect my electric guitar to my MBP via the input jack on the left hand side I cannot hear the amp simulation until after recording and only during playback. In other words, I have to imagine what the guitar sounds like while playing and hope

  • Open Items List- Missing Items

    Dear all, In the open items list there is an option in drop down for missing items. When we select the option some items and its details get listed. What is the information being communicated by this selection? Thanks in advance

  • Rename the file name of a Vault (not the Vault name)

    I have a Maxtor Sahred Storage Plus and I am now planning to use it for backing up Aperture. Yes, I now that Aperture is not made for back up on a network, but it should be possible according to this thread: http://discussions.apple.com/thread.jspa?m

  • In BO v5.1.7 , Is there a way that we can find out the number of users

    BO Version : 5.1.7 Hi There, I am new to Business Objects and I am having a task to complete. I need to find out how many users are using the Business Objects in our older version. I understand in BOBJ XI there is a provision in CMC to execute a quer

  • How does one search the Store for IOS 4.21 only apps?

    Hi, I have FOUR iPod touch 2nd gens, with a max OS of IOS 4.21.   How do I search the Store for apps that will actually work on these devices? Thanks!