Getting values from the table control to the program

Hi Gurus,
i created a program for sales order creation to transfer order creation and to insert multiple values i defined my own selection screen by inserting table control before that the code executed succesfully but after inserting the table control it is not creating any documents
code before inserting table control:-
REPORT  zcl120_sales_n_delivery.
                  SALES DOCUMENT CREATION
PARAMETERS: p_auart TYPE auart OBLIGATORY.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
*ITEM
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
DATA DECLARATIONS.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
HEADER DATA
header-doc_type = p_auart.
headerx-doc_type = 'X'.
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
item-material = p_matnr.
item-plant = p_plant.
item-target_qty = p_menge.
item-target_qu = 'ST'.
item-item_categ = p_itcat.
APPEND item.
itemx-updateflag = 'I'.
itemx-material = 'X'.
itemx-plant = 'X'.
itemx-target_qty = 'X'.
itemx-target_qu = 'X'.
itemx-item_categ = 'X'.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
  EXPORTING
    sales_header_in     = header
    sales_header_inx    = headerx
  IMPORTING
    salesdocument_ex    = v_vbeln
  TABLES
    return              = return
    sales_items_in      = item
    sales_items_inx     = itemx
    sales_schedules_in  = lt_schedules_in
    sales_schedules_inx = lt_schedules_inx
    sales_partners      = partner.
LOOP AT return WHERE type = 'E' OR type = 'A'.
  EXIT.
ENDLOOP.
IF sy-subrc = 0.
  WRITE / return-message.
  WRITE: / 'Error in creating document'.
ELSE.
  COMMIT WORK AND WAIT.
  WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
                  DELIVERY ORDER CREATION
*PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: BEGIN OF t_vbap OCCURS 0,
        vbeln LIKE vbap-vbeln,
        posnr LIKE vbap-posnr,
        kwmeng LIKE vbap-kwmeng,
        matnr  LIKE vbap-matnr,
        werks  LIKE vbap-werks,
      END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
      WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
      WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr kwmeng matnr werks
       INTO TABLE t_vbap
       FROM vbap
       WHERE vbeln = v_vbeln
LOOP AT t_vbap.
  t_request-document_numb = t_vbap-vbeln.
  t_request-document_item = t_vbap-posnr.
  t_request-quantity_sales_uom = t_vbap-kwmeng.
  t_request-id = 1.
  t_request-document_type = 'A'.
  t_request-delivery_date      = sy-datum.
  t_request-material = t_vbap-matnr.
  t_request-plant = t_vbap-werks.
  t_request-date = sy-datum.
  t_request-goods_issue_date = sy-datum.
  t_request-goods_issue_time = sy-uzeit.
  APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
  TABLES
    request      = t_request
    createditems = t_created
    return       = t_return.
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
  MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
READ TABLE t_created INDEX 1.
WRITE: /  'Delivery Number : ',
         t_created-document_numb.
                  CREATE TRANSFER ORDER
DATA: w_tanum TYPE ltak-tanum.
CALL FUNCTION 'L_TO_CREATE_DN'
  EXPORTING
    i_lgnum                          = '010'
    i_vbeln                          = t_created-document_numb
IMPORTING
   e_tanum                          = w_tanum
EXCEPTIONS
   foreign_lock                     = 1
   dn_completed                     = 2
   partial_delivery_forbidden       = 3
   xfeld_wrong                      = 4
   ldest_wrong                      = 5
   drukz_wrong                      = 6
   dn_wrong                         = 7
   squit_forbidden                  = 8
   no_to_created                    = 9
   teilk_wrong                      = 10
   update_without_commit            = 11
   no_authority                     = 12
   no_picking_allowed               = 13
   dn_hu_not_choosable              = 14
   input_error                      = 15
   OTHERS                           = 16
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK AND WAIT.
WRITE: / 'Transfer order number',
       w_tanum.
Code after inserting table control:-
REPORT  zcl120_sales_n_delivery.
                  SALES DOCUMENT CREATION
DATA: p_auart TYPE auart .
DATA: p_vkorg TYPE vkorg .
DATA: p_vtweg TYPE vtweg .
DATA: p_spart TYPE vtweg .
DATA: p_sold TYPE kunnr .
DATA: p_ship TYPE kunnr .
*ITEM
data:
begin of it_item occurs 0,
   p_matnr TYPE matnr,
   p_menge TYPE kwmeng,
   p_plant TYPE werks_d,
   p_itcat TYPE pstyv,
end of it_item.
DATA DECLARATIONS.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA:
  W_COUNTER TYPE I,
  IT_NUM(6) TYPE C value '000010',
  IT_LINE(4) TYPE C value '0001'.
  CALL SCREEN 100.
HEADER DATA
header-doc_type = p_auart.
headerx-doc_type = 'X'.
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
loop at it_item.
CLEAR ITEM.
item-material = it_item-p_matnr.
item-plant = it_item-p_plant.
item-target_qty = it_item-p_menge.
item-target_qu = 'ST'.
item-item_categ = it_item-p_itcat.
APPEND item.
W_COUNTER = W_COUNTER + 1.
endloop.
DO W_COUNTER TIMES.
itemx-updateflag = 'I'.
itemx-material = 'X'.
itemx-plant = 'X'.
itemx-target_qty = 'X'.
itemx-target_qu = 'X'.
itemx-item_categ = 'X'.
APPEND itemx.
ENDDO.
Fill schedule lines
LOOP AT IT_ITEM.
CLEAR lt_schedules_in.
lt_schedules_in-itm_number = IT_NUM.
lt_schedules_in-sched_line = IT_LINE.
lt_schedules_in-req_qty = IT_ITEM-p_menge.
APPEND lt_schedules_in.
IT_NUM = IT_NUM + 10.
IT_LINE = IT_LINE + 1.
ENDLOOP.
IT_NUM = '000010'.
IT_LINE = '0001'.
Fill schedule line flags
LOOP AT IT_ITEM.
CLEAR lt_schedules_inx.
lt_schedules_inx-itm_number = IT_NUM.
lt_schedules_inx-sched_line = IT_LINE.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
IT_NUM = IT_NUM + 10.
IT_LINE = IT_LINE + 1.
ENDLOOP.
Call the BAPI
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
  EXPORTING
    sales_header_in     = header
    sales_header_inx    = headerx
  IMPORTING
    salesdocument_ex    = v_vbeln
  TABLES
    return              = return
    sales_items_in      = item
    sales_items_inx     = itemx
    sales_schedules_in  = lt_schedules_in
    sales_schedules_inx = lt_schedules_inx
    sales_partners      = partner.
LOOP AT return WHERE type = 'E' OR type = 'A'.
  EXIT.
ENDLOOP.
IF sy-subrc = 0.
  WRITE / return-message.
  WRITE: / 'Error in creating document'.
ELSE.
  COMMIT WORK AND WAIT.
  WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
                  DELIVERY ORDER CREATION
*PARAMETERS: p_vbeln LIKE vbak-vbeln.
DATA: BEGIN OF t_vbap OCCURS 0,
        vbeln LIKE vbap-vbeln,
        posnr LIKE vbap-posnr,
        kwmeng LIKE vbap-kwmeng,
        matnr  LIKE vbap-matnr,
        werks  LIKE vbap-werks,
      END OF t_vbap.
DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
      WITH HEADER LINE.
DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
      WITH HEADER LINE.
DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
SELECT vbeln posnr kwmeng matnr werks
       INTO TABLE t_vbap
       FROM vbap
       WHERE vbeln = v_vbeln
LOOP AT t_vbap.
  t_request-document_numb = t_vbap-vbeln.
  t_request-document_item = t_vbap-posnr.
  t_request-quantity_sales_uom = t_vbap-kwmeng.
  t_request-id = 1.
  t_request-document_type = 'A'.
  t_request-delivery_date      = sy-datum.
  t_request-material = t_vbap-matnr.
  t_request-plant = t_vbap-werks.
  t_request-date = sy-datum.
  t_request-goods_issue_date = sy-datum.
  t_request-goods_issue_time = sy-uzeit.
  APPEND t_request.
ENDLOOP.
CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
  TABLES
    request      = t_request
    createditems = t_created
    return       = t_return.
READ TABLE t_return WITH KEY type = 'E'.
IF sy-subrc = 0.
  MESSAGE e208(00) WITH 'Delivery creation error'.
ENDIF.
COMMIT WORK.
READ TABLE t_created INDEX 1.
WRITE: /  'Delivery Number : ',
         t_created-document_numb.
                  CREATE TRANSFER ORDER
DATA: w_tanum TYPE ltak-tanum.
CALL FUNCTION 'L_TO_CREATE_DN'
  EXPORTING
    i_lgnum                          = '010'
    i_vbeln                          = t_created-document_numb
IMPORTING
   e_tanum                          = w_tanum
EXCEPTIONS
   foreign_lock                     = 1
   dn_completed                     = 2
   partial_delivery_forbidden       = 3
   xfeld_wrong                      = 4
   ldest_wrong                      = 5
   drukz_wrong                      = 6
   dn_wrong                         = 7
   squit_forbidden                  = 8
   no_to_created                    = 9
   teilk_wrong                      = 10
   update_without_commit            = 11
   no_authority                     = 12
   no_picking_allowed               = 13
   dn_hu_not_choosable              = 14
   input_error                      = 15
   OTHERS                           = 16
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK AND WAIT.
WRITE: / 'Transfer order number',
       w_tanum.
*&SPWIZARD: DECLARATION OF TABLECONTROL 'TAB_CON1' ITSELF
CONTROLS: TAB_CON1 TYPE TABLEVIEW USING SCREEN 0100.
*&SPWIZARD: OUTPUT MODULE FOR TC 'TAB_CON1'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
MODULE TAB_CON1_CHANGE_TC_ATTR OUTPUT.
  DESCRIBE TABLE IT_ITEM LINES TAB_CON1-lines.
ENDMODULE.
*&      Module  STATUS_0100  OUTPUT
      text
module STATUS_0100 output.
   SET PF-STATUS 'MENU'.
SET TITLEBAR 'xxx'.
endmodule.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
module USER_COMMAND_0100 input.
IF SY-UCOMM EQ 'START'.
LEAVE to screen 0 .
ENDIF.
endmodule.                 " USER_COMMAND_0100  INPUT
*&      Module  APPEND_IT_ITEM  INPUT
      text
module APPEND_IT_ITEM input.
APPEND IT_ITEM.
CLEAR IT_ITEM.
endmodule.                 " APPEND_IT_ITEM  INPUT
plz help me where the error is

Hi,
Do same as suggested by Ramesh. Add one user command button after clicking that do the looping and call new screen.
Ashven.

Similar Messages

  • POPUP FM to get values from a table control?

    I know about the FM POPUP_GET_VALUES to get one or more values from a popup dialog box.  I would like to find a similar FM that allows getting values from a table control or something that allows entry of multiple lines of values.  Is there such a thing, or do I need to write my own?

    it depends on what values you want to enter, better write your own to have a control on the function.

  • Copy selected values from a table control into another table control

    hi there,
    as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.
    i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)
    i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?

    you're funny
    i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.
    here's my code, maybe you can tell me exactly were i have to change it:
    tc1 = upper table control
    tc2 = lower table control
    SCREEN 0100:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE get_nfo. --> gets data from the dictionary table
      MODULE tc1_change_tc_attr.
      LOOP AT   it_roles_tc1
           INTO wa_roles_tc1
           WITH CONTROL tc1
           CURSOR tc1-current_line.
      ENDLOOP.
      MODULE tc2_change_tc_attr.
      LOOP AT   it_roles_tc2
           INTO wa_roles_tc2l
           WITH CONTROL tc2
           CURSOR tc2-current_line.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT it_roles_tc1.
        CHAIN.
          FIELD wa_roles_tc1-agr_name.
          FIELD wa_roles_tc1-text.
        ENDCHAIN.
        FIELD wa_roles_tc1-mark
          MODULE tc1_mark ON REQUEST.
      ENDLOOP.
      LOOP AT it_roles_tc2.
        CHAIN.
          FIELD wa_roles_tc2-agr_name.
          FIELD wa_roles_tc2-text.
        ENDCHAIN.
        FIELD wa_roles_tc2-mark
          MODULE tc2_mark ON REQUEST.
      ENDLOOP.
      MODULE ok_code.
      MODULE user_command_0100.
    INCLUDE PAI:
    MODULE tc1_mark INPUT.
      IF tc1-line_sel_mode = 2
      AND wa_roles_tc1-mark = 'X'.
        LOOP AT it_roles_tc1 INTO g_tc1_wa2
          WHERE mark = 'X'.    -
    > big problem here is, that no entry has an 'X' there
          g_tc1_wa2-mark = ''.
          MODIFY it_roles_tc1
            FROM g_tc1_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc1
        FROM wa_roles_tc1
        INDEX tc1-current_line
        TRANSPORTING mark.
    ENDMODULE.                    "TC1_MARK INPUT
    MODULE tc2_mark INPUT.
      IF tc2-line_sel_mode = 2
      AND wa_roles_tc2-mark = 'X'.
        LOOP AT it_roles_tc2 INTO g_tc2_wa2
          WHERE mark = 'X'.             -
    > same here, it doesn't gets any data
          g_tc2_wa2-mark = ''.
          MODIFY it_roles_tc2
            FROM g_tc2_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc2
        FROM wa_roles_tc2
        INDEX tc2-current_line
        TRANSPORTING mark.
    ENDMODULE. 
    thx for anybody who can help with this!

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • Pressing on the Table Control locks the front panel in a certain state

    Hello everyone!
    I have following problem. I have a very simple state machine with two cases. In the Idle case there is an event structure receiving input from a Table Control. When pressing Run the Vi enters the Run state. To exit the RUn state I have a Finish button, but IF I during the running state press anything on the Table Control the entire front panel will lock. Disabling the Table Control in the running state doesn´t help in the same way it helped for Button 1 and 2. Any help would be appreciated. I have tried unsuccesfully with the Registering and Unregistering event functions.
    Attached is a simplified version of the problem. Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    Event lock problem.vi ‏22 KB

    Hi, RealBjörkis !
    I ran your VI and I saw a few problems, try to keep your controls outside the events structure, also do what said P@Anand previously.
    Here is your VI with some corrections. (Hope it fix the problem)
    Good Luck.
    Attachments:
    Event lock problem.vi ‏23 KB

  • Can retrieve value from one table, but not the other (exception thrown)

    Hi
    I hope some friendly soul can help me out here. I have a local Access database file. I am able to get a value from all tables except for one, which throws this error: "System.NullReferenceException:
    Object reference has not been specified to an object".
    The rather simple lines of code when working is this:
    Dim email As Object
    value = MyDataSet.Tables("Table")(0)(1).ToString
    Msgbox(email)
    However, when simply changing from "Table" to "AnotherTable", the exception is thrown. I
    have seriously no idea why. I've made sure the datatypes are the same and that the values are not NULL.
    What gives?

    Hello,
    Going with your last reply, you should be accessing data via the strong typed classes that get generated.
    Example using Microsoft Northwind database accessing the customers table in a MS-Access database. Note the check for Rows, we could even go farther if we are questioning issue with the data via try-catch statements writing errors to the IDE Output window.
    I would highly recommend never referencing rows without first checking if there are rows and secondly never reference columns by ordinal index, always use the column name. One example with ordinal positioning, suppose someone did SomeDataTable.Columns("SomeColName").SetOrdinal(3)
    and you expect the ordinal position to be 1 ? things will crash-n-burn. Food for thought :-)
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CustomersTableAdapter.Fill(Me.MainDataSet.Customers)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If MainDataSet.Customers.Rows IsNot Nothing Then
    Dim FirstCompanyName As String = MainDataSet.Customers.FirstOrDefault.CompanyName
    MessageBox.Show(FirstCompanyName)
    Else
    MessageBox.Show("No rows in customer table")
    End If
    End Sub
    End Class
    In this case we get the first record from below in Button1 Click
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How to freeze the selection column in the table control of the module pool.

    hi ,
    in my module pool there is a row selection field  <b>w/selcolumn</b> of the table control called as mark.
    how to freeze the selection column where there is no record in the table control row.
    or in other words where wa is initial.
    thanks
    ekta

    Hi all,
    in the PBO of the screen the following code is written.
    say the selection column is MARK and is declared in the data as well.
    thanks
    ekta
    *************************C O D E **************************************************
    MODULE disp_tabctrl1 OUTPUT.
      IF flag_c = 1.
        READ TABLE it_create_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
      ELSE.
        READ TABLE it_material_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
        IF sy-subrc = 0.
          IF ok_code_0101 = '&SEL1'.
            mark = 'X'.
          ELSEIF ok_code_0101 = '&DSEL'.
            mark = ' '.
          ENDIF.
        ELSE.
          LOOP AT SCREEN.
            IF screen-name = 'MARK'.
              screen-input = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      index_t = tab_ctrl1-top_line.
      index_d = tab_ctrl1-top_line + n.
    ENDMODULE.                 " DISP_TABCTRL1  OUTPUT

  • Can't not display the table control in the report

    Hello frnds,
    I m create a module pool pgm using saptechnical  'Demo on using Table Control', 
    execute a report bush buttons are displayed but
    can't Dispaly the table ctrl in the report using screen paiter
    any help me, plz.
    Thanks in advance.

    Hi Kumar,
    Check thsi Program demo_sel_screen_with_tabstrip.
    and also a program on Subscreens in ABAPDOCU
    You need to combine both then only this is possible in Report PRograms
    Cheerz
    Ram

  • How to move the selected rows from a  table control in dialog programming

    hiiiiiiii Every1
    I have to update some fields for a slected row in table control on click of a button and save it in database.
    Regards
    Sachin Dhingra

    see below example, I have added INSERT option after DELETE option, you can use same table or you can use differnt table by populating into that table and insert into the db table. If you want to use same internal table then use below code
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    insert into table from itab.
    ENDLOOP.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA cols LIKE LINE OF flights-cols.
    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 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'.
    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.
    WHEN 'INSERT'.
    READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT itab INTO demo_conn WHERE mark = 'X'.
    itab1 = itab.
    modify itab1.
    ENDLOOP.
    ENDIF.
    if not itab1 is initial.
    INSERT dbtab FROM TABLE itab1.
    endif.
    ENDCASE.
    ENDMODULE.

  • How to get values from Hash Table

    Hi all,
    I have a hash table "lovResults" craeted with following code -
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    Hashtable lovResults = pageContext.getLovResultsFromSession(lovInputSourceId);
    values which I can see through SOP are - ******Value of lovResults is{roleid=1000, domainFV=CREATIVE, Role=Account Director}
    How can I get the domain value "domainFV=CREATIVE" from hash table in a variable because I have to set this vaue in another field.
    Please help me ASAP
    Thanks
    Amit

    Hi Amit ,
    Since you are successfully printing the values using sop's , please try this code
    Capture the value in controller .
    if(oapagecontext.getParameter("domainFV") != null)
    String formvalue= oapagecontext.getParameter("domainFV") // ensure hashtable id is correct
    Keerthi
    Edited by: keerthioaf on Nov 26, 2012 8:46 PM

  • How to get values from RT table

    Hello friends ,
    I want to get earned basic from RT table  T-code - pc00_m40_clstr
    how to get that values for wage types
    gaurav

    Hi Gaurav,
    The Function Module u2018 PYXX_READ_PAYROLL_RESULT u2019 generically reads a complete payroll result, that is for all country versions, from file PCL2 or from the buffer. In doing so, the payroll result is transferred to the PAYROLL_RESULT parameter. In the calling system, this must be classified as a complex structure according to the 'PAYxx_RESULT' dictionary structure. u2018 xx u2018 is the ISO code for the country. Now the payroll result is in the parameter FS_PAY99_RESULT. In this parameter the RT table is considered and the required values are moved into a internal table (say  T_RT).
    Regards,
    Swapna.

  • Getting values from a table without any type

    Hi,
    I am having problem accessing the values of a table which does not have a type. When we go and check the type of the table, it is not mentioned.
    While debugging we found that the type of this particular table is deep structure. I tried using ASSIGN COMPONENT using field symbols, but reference is not getting assigned. The sy-subrc becomes 4.
    Is there any way to access the data in this table?
    Regards,
    Rishav

    It is actually a function module which is having this table in the TABLE declaration.
    Table Name : T_OUTTAB
    Long text :
    Interne Tabelle beliebiger Struktur, die die in Listenform auszugebenden Daten enthält.
    Diese Tabelle kann mehr Felder beinhalten als letztlich für die Listausgabe (Anzeigefelder u. Feldvorrat) relevant sind.
    Nur die im Feldkatalog und ggbf. in der Layoutstruktur genannten Felder werden für die Listausgabe herangezogen. Weitere Felder der internen Tabelle werden ignoriert.
    Im Feldkatalog kann dann über die Ausprägung des Feldes FIELDCAT-NO_OUT entschieden werden, ob ein Feld direkt auf der Liste ausgegeben wird oder ob dieses Feld zunächst in den Feldvorrat gestellt wird.
    Aus diesem Feldvorrat kann der Benutzer interaktiv die Anzeigefelder der Liste erweitern (und umgekehrt Anzeigefelder ausblenden).
    Wird die interne Tabelle im aufrufenden Programm ohne Kopfzeile definiert, so ist auf dem Listenkörper keine F1-Unterstützung möglich.

  • Getting values from a table and concatenate them

    Hi All,
    I think somebody out there should be able to help me.
    I have a list of contract numbers the user has to type in.
    I've created a table where user can add as many rows as needed. Each row is a contract number.
    Once completed, I have to concatenate all of the contract numbers, separated with commas, so that I can send them to a floating field within a text box.
    It should look like this.
    .....1234, 2345, 3456 and 5678 (assuming these four values were keyed in by the user in the table form)
    Anybody can help me explaining how to concatenate the values and put them into the floating field?
    Thanks in advance.
    Rafael

    You can concatinate them easily but getting them into a floating field on the same form will be an issue. The floating field can only be filled when th eform is rendered and data is placed on the form. Floating fields are not interactive...so after the data load they are turned into text....they are not even fields anymore.

  • Trying to  get values from a table in apex item.. form.. not sucessfulll

    I have a form and have 3 fields.. .i need the value to be fetched from some other table... at the start...
    Note if the values are present in the fields it donot need to be fetched...
    Now how can i accomplish this..
    I tried using ...onload event.. but data is not visible in the required field..
    I tried dynaic item.. for even on page load ..it does fire..But i will like it to fire only one time..
    Does any one have any idea how can this be accomplished
    In oracle forms we will have done ..soemting like when new form instance trigger - select name into :mname from table where empno = :xyz;
    How do we accomplish this in apex..any info will be usefull..
    Thanks
    Paul j

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • How to update values in the table control at  Cat2 transaction,

    Hi,
    i am working on cat2 transaction, here
    i am using the exit_saplcats_006 and updating values at catsdb table, but i want to display this values at the table control in the cat2 transaction.
       can any one provide me solution for this same.
    Regards

    Hi Suresh
      this is actual requirement
    in the CAT2.
    1. Add a new column for WBS description and derive the value as per the FS
    2. Retrieve project number and description and update in the column specified
    3. When a service order is selected it should do the same for 2.
    4. Finally repeat for the worklist view (which is the section above)
       here i am able to display values at data entry area
    for service order and network but not worklist area ?
        updation is not coming, can u plz go throw it..
    Thanks
    Chinna

Maybe you are looking for

  • SSO for JDeveloper application -- how?

    Hello, I am developing a servlet with JDeveloper & Struts, and I am curious whether it is possible to configure SSO and JDeveloper so that when I DEBUG the project and the embedded OC4J server starts, my application gets protected by the Single-Sign-

  • How do i resize a pdf

    Can anyone help me resize a pdf? I signed up for the monthly plan for adobe but i cannot resize an already existing pdf. Please it's urgent would really appreciate a quick answer if anyone knowns.

  • Pkcs11 and Sign Problem

    hi: i have a usbkey and use it do the sign work with the PKCS11 . the programme is below: import java.lang.*; import java.security.*; import java.security.cert.*; import sun.misc.BASE64Encoder; import javax.crypto.spec.SecretKeySpec; import java.util

  • Adobe form not showing negative sign before amount

    Hi Experts, We are having a strange problem. Our developers displaying negative amount in my adobe output. Its working fine in our development system. But for the similar set of data in testing system, negative sign before the amount is not coming. T

  • /SOMO/GET_TIMEZONE rfc invocation issue

    Hi Reiner, I have an issue with invoking the rfc '/SOMO/GET_TIMEZONE'. this works fine using se37. When i build the proxy client. 1> the wsdl description defines a method Somo_Get_Timezone 2> the proxy class [.cs] does not create the method to implem