How to refer to a particular field in Table Control.

Hi,
        How can we refer to a particular field in a table control like 5th row 6th column. The actual requirement of mine is, i have a column with listbox. For each row i need to have different values for the list box. So i need to refer to that particular field in the column and assign the list values. Please kindly help.
Regards,
Vinay.

hi,
TABLE CONTROL -
http://www.geekinterview.com/Interview-Questions/SAP-R-3
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
Eg of table Control:
http://members.aol.com/_ht_a/skarkada/sap/table_control/
table_control.htm
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/adee2396f711d1b46b0000e8a52bed/frameset.htm
Regards,
Laxmi

Similar Messages

  • How to make  a particular field in table control invisible?

    i have a field in my table control but im not able to make it invisible
    im using the following code
    PBO
    LOOP AT itab_ctrl INTO wa2_ctrl WITH CONTROL ztabctrl
        CURSOR Ztabctrl-current_line.
        MODULE modify_scrn_100.
      ENDLOOP.
    module modify_scrn_100.
    LOOP AT SCREEN.
       IF SCREEN-NAME = 'WA_CTRL-ZITEM'.
          SCREEN-INVISIBLE = 1.
          MODIFY SCREEN.
       ENDIF.
         ENDLOOP.
    endmodule
    ...here WA_CTRL-ZITEM is my table control field name
    ...even if i make invisible = 1 or 0 the field is not getting invisible

    Hi,
    Check the Demo Program <b>RSDEMO02</b>.here you can have option to make the column invisible.
    also check these..
    How to Hide a entire column in a Table Control?
    Hiding table control columns along with header
    Hiding of Table control
    Regards
    Vijay

  • How make display only the amount field in table control(infotype 0008)

    Dear Freinds,
    have to make display only the amount field (Q0008-bet01) on table control in infotype 0008 , could you tell me how to make it display only.
    i have tried the below coding it is not working in PBO & PAI of the user exit
    ZXPADU01 and ZXPADU02. For the table control is there any othe method??
           loop at screen.
               screen-name  = 'WA_P0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    i have tried like this as well
           loop at screen.
               screen-name  = 'Q0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    in the both the above methods it is not working. Could any one plese suggest me how to make display only the amount field in infotype 0008.
    regards
    syamla

    Dear Freinds,
    have to make display only the amount field (Q0008-bet01) on table control in infotype 0008 , could you tell me how to make it display only.
    i have tried the below coding it is not working in PBO & PAI of the user exit
    ZXPADU01 and ZXPADU02. For the table control is there any othe method??
           loop at screen.
               screen-name  = 'WA_P0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    i have tried like this as well
           loop at screen.
               screen-name  = 'Q0008-BET01'.
              screen-input = 0.
              screen-output = 1.
              modify screen.
          endloop.
    in the both the above methods it is not working. Could any one plese suggest me how to make display only the amount field in infotype 0008.
    regards
    syamla

  • How to know no of selected fields in Table Control in at the first iteratio

    Hi ABAP Gurus,
    I have developed screen with Table control. At one particular scenario, I need to
    display an error message if all the displayed records are not selected. So I need to know the No of selected fields on the Table control in the very first iteration of the Loop in PAI event. Is there any Function Module/Method or any other way to Achieve this. 
    Thanks in Advance..
    Regards,
    Vishwanath

    You can simply count them, but looping the table and checking the "select" flag.
    data: records type i.
    data: counter type i.
    clear counter.
    Loop at itab where sel = 'X'.
    counter = counter + 1.
    endloop.
    describe table itab lines records.
    if records <> counter.
    message e001(00) with 'Not all records were selected'.
    endif.
    Regards,
    Rich Heilman

  • How to send value into current field in table control ABAP

    Hi every one,
    Im from VietNam and I dont know much about SAP ABAP. Im find out more about it.
    I have a problem.
    I made a table control with a big internal table at input, it about more than 100 field.
    I can set cursor to the field that I want to send value to.
    And I want to know any way to send value to that field without use the table control's structure.

    Hi Nabheet,
    Chk this thread, it will be useful to u.
    Matchcode Dinamic colum in ALV grid control objects
    ***Reward Points if useful
    Regards
    Gokul

  • How to prvide f4 help  for the particular field in table control

    hi all,
    my requirement is iam having one i/p field in screen 100.name of the field is sales order number. i just want to keep f4 help for this field only.when i click F4 on this field it has to show all the sales order numbers from vbak table.
    anybody can send me the code please.
    thanks,
    maheedhar.t

    Hi,
       In POV Modlue u write
       Filed (ur field name ) module get_values.
    In that get_values module u declare an itab according to ur requirement and get the values into internal table using select query .After u get the values in select query u call a function popup_with_table_display in which u pass the itab along with the starting and postion , width and height of the popup window .Hope this will help u
    Regards,
    Shafi

  • To Disble the Field in Table Control after clicking Save button

    Hi,
    I have a requirement as follows. i need to disable one field in the table control after clicking save button. i tried with SCREEN elements but it disabling whole the table control but i need to disable that particular one record only in the table control. i found Structure CXTAB_COLUMN in documentaion. it has the properties like invisible. can any body tell how can we disble that particular field in table control only for the one record. and how can we use CXTAB_COLUMN.
    Thanks in advance.

    hi,
    do like this...
    in USER_COMMAND_1000 module of PAI,
    MODULE user_command_1000 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          fl = 1.
          GET CURSOR LINE lin.
      ENDCASE.
    ENDMODULE.                 " user_command_1000  INPUT
    and make on module disable in Loop Endloop in PBO.
    and write like this...
    MODULE disable OUTPUT.
      LOOP AT SCREEN.
        IF tab1-current_line = lin AND fl = 1.
          screen-input = 0.
        ELSEIF tab1-current_line < lin.
          screen-input = 0.
        ELSE.
          screen-input = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.                 " disable  OUTPUT
    here fl and lin both are type i.....
    and there will b one module in PBO
    MODULE tab1_change_tc_attr.
    in that put if condition....
    MODULE tab1_change_tc_attr OUTPUT.
      IF sy-ucomm <> '' AND sy-ucomm <> 'SAVE'.
        DESCRIBE TABLE itab LINES tab1-lines.
      ENDIF.
    ENDMODULE.                    "TAB1_CHANGE_TC_ATTR OUTPUT
    ur problem will solve...
    reward if usefull....
    Edited by: Dhwani shah on Jan 2, 2008 1:17 PM

  • How can we disable a particular field in BI,BCS Report in Portal

    Hi Friends,
    I have one doubt in Portal.
    How can we disable a particular field in BI,BCS Report in Portal depending up on user.
    For Exam: In Our Application can we divided in to 3 Categories. Managerial, Regional and Supervisor.
    Manager having all authorizations. So here I donu2019t have any problem.
    When Regional Manager logs in portal Depending up on that Regional Plant number will be in Disable mode.
    EX: India Regional Manager logs in portal Plant number Files == IND123 Like in BI Report
           UK Regional Manager logs in portal Plant number Files == UK154   Like in BI Report
    When Supervisor logs in portal Depending up on that Regional Plant number will be in Disable mode and also Company Code also in disable mode
    EX: India Supervisor logs in portal Plant number Files == IND123 Like in BI Report and also Company code input file is ABC is in Disable mode
        In India Another Supervisor logs in portal
    India Supervisor logs in portal Plant number Files == IND123 Like in BI Report and also Company code input file is ASD is in Disable mode
           UK Supervisor logs in portal Plant number Files == UK154   Like in BI Report and also Company code input file is XYZ is in Disable mode
    This is my Req; How can we do there. Could you help me.
    Give me these Ans:
    1. Is it Feasible in portal.
    2. Depending upon user we can disable particular filed in Portal.
    3. Can we find out who is login in Portal. by Using BI System. in WDJ We can Find out Like IUSER Code Same as BI Developer also Find it. Is it Possible or not.
    Regards
    Vijay Kalluri

    no

  • How to disable fields in Table control???

    Hi
    How to disable fields in Table control??? I want to disable particular row in table control when enter datas are correct.lets take as example ME41 or ME51 table control.
    Can anyone tell how to do disable in this table control
    Points will be rewarded if its helpful.
    Thanks
    senthil

    If you want to disable the row then you can use
    in pbo module create a module in side loop,
    loop at itab with control tc.
    module change_screen.
    endloop.
    in module,,,,,
    loop at screen.
    if condition.
    screen-input = 0.
    modify screen.
    endif.
    endloop.
    Regards
    Vijay

  • How to add a field and table control to BP transaction.

    Hi,
    I have a requirement to add a field and table control to the 'Control data' tab of the Transaction BP.
    Can some on please help me if having a solution and with any relavant documents.
    Thanks in advance.
    Raj & Khader.

    Also explore with EEWB tcode.
    Refer this threads
    Re: EEWB
    Created New fields in Business Activity with EEWB
    Cheers
    Manohar

  • How to create Search Help for a field in Table control !!

    Hello Friends,
                  I like to know - How to create Search Help for a field in Table control. Is it possible, if it is please share ur knowledge, I wud be happy if U provide some source code example for this.
    Thanks,
    Senthil

    Check the sample code:
    *&  Include           ZSRO_MPRN_SEARCH                                 *
    MODULE PSTLZ_F4 INPUT
    MODULE pstlz_f4 INPUT.
    reading post code
      DATA: stepl TYPE systepl,
            stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode  = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s005(zspa) WITH ws_postcode .
      ENDIF.
    ENDMODULE.                    "PSTLZ_F4 INPUT
    MODULE MPRN_F4 INPUT
    MODULE mprn_f4 INPUT.
    reading post code
    DATA: stepl TYPE systepl,
           stepl_index TYPE systepl.
      CLEAR: stepl, stepl_index.
      CLEAR:   lt_returntab,lt_dynpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dynpfields,i_mprn1.
      lt_dynpfields-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields-stepl     = stepl.
      APPEND lt_dynpfields. CLEAR lt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = c_x
          determine_loop_index = c_x
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields INDEX 1.
      ENDIF.
      ws_outcode = lt_dynpfields-fieldvalue.
      stepl_index = lt_dynpfields-stepl.
      REPLACE '*' WITH ' ' INTO lt_dynpfields-fieldvalue.
      IF NOT lt_dynpfields-fieldvalue IS INITIAL.
        MOVE lt_dynpfields-fieldvalue TO ws_outcode.
        ws_len = STRLEN( lt_dynpfields-fieldvalue ).
        IF ws_len GE 7.
          ws_len = ws_len - 3.
         ws_icode = ws_code+ws_len(3).
          lt_dynpfields-fieldvalue = lt_dynpfields-fieldvalue+0(ws_len).
          CONCATENATE lt_dynpfields-fieldvalue '%'
              INTO ws_outcode.
          CONDENSE lt_dynpfields-fieldvalue.
       REPLACE ws_icode WITH ' ' INTO lt_dynpfields-fieldvalue.
        ELSE.
          CONCATENATE lt_dynpfields-fieldvalue+0(4) '%'
            INTO ws_outcode.
        ENDIF.
       ws_ocode = ws_code+0(3).
      ENDIF.
    reading MPRN
      CLEAR:   lt_returntab,lt_dnpfields,i_mprn1.
      REFRESH: lt_returntab,lt_dnpfields,i_mprn1.
      lt_dnpfields-fieldname = 'I_MPRN-MPRN'.
      lt_dnpfields-stepl     = stepl_index.
      APPEND lt_dnpfields. CLEAR lt_dnpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = lt_dnpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dnpfields INDEX 1.
      ENDIF.
    MPRN blank and Post code exist
      IF lt_dnpfields-fieldvalue IS INITIAL.
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode.
        ELSE.
    MPRN blank and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1.
        ENDIF.
      ELSE.
    MPRN exist and Post code exist
        IF NOT lt_dynpfields-fieldvalue IS INITIAL.
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE outcode LIKE ws_outcode AND
                       mprn EQ lt_dnpfields-fieldvalue.
        ELSE.
    MPRN exist and Post code blank
          SELECT mprn ser_num sub_bud bud_name del_pt_alias
                 bud_num dep_street prin_street dbl_dep_street
                 dep_locty post_town county outcode incode
                 lg_site_ind file_date FROM zspa_mprn INTO
                 CORRESPONDING FIELDS OF TABLE i_mprn1
                 WHERE mprn EQ lt_dnpfields-fieldvalue.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'MPRN'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select MPRN'
          value_org       = 'S'
        TABLES
          value_tab       = i_mprn1 "lt_mprn
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        READ TABLE i_mprn1 WITH KEY mprn = lt_returntab-fieldval.
        IF sy-subrc EQ 0.
    Updating MPRN
          MOVE i_mprn1-mprn TO i_mprn-mprn.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-MPRN'.
          ws_dynpfld-fieldvalue = i_mprn1-mprn .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         ws_dynpfld-stepl  = mprn-current_line.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Updating post code
          CONCATENATE i_mprn1-outcode  i_mprn1-incode
                        INTO ws_postcode
                             SEPARATED BY space.
          MOVE ws_postcode TO i_mprn-post_code.
          CLEAR   : i_dnpfld,
                    ws_dynpfld.
          REFRESH : i_dnpfld.
          ws_dyname   = 'ZSRO_MASTER_DATA'.
          ws_dynumb   = '0301'.
          ws_dynpfld-fieldname  ='I_MPRN-POST_CODE'.
          ws_dynpfld-fieldvalue = ws_postcode .
          ws_dynpfld-stepl      = stepl_index.
          APPEND ws_dynpfld TO i_dnpfld.
    **code changed by laxman 10.08.2005
         break gblap0.
         ws_dynpfld-stepl  = mprn-current_line.
         LOOP AT i_mprn.
           MOVE i_mprn1-mprn TO i_mprn-mprn.
           MOVE ws_postcode TO i_mprn-post_code.
           MODIFY i_mprn INDEX
                    mprn-current_line." transporting MPRN POST_CODE.
         ENDLOOP.
    **code changed by laxman 10.08.2005
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname               = ws_dyname
              dynumb               = ws_dynumb
            TABLES
              dynpfields           = i_dnpfld
            EXCEPTIONS
              invalid_abapworkarea = 1
              invalid_dynprofield  = 2
              invalid_dynproname   = 3
              invalid_dynpronummer = 4
              invalid_request      = 5
              no_fielddescription  = 6
              undefind_error       = 7
              OTHERS               = 8.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ELSEIF sy-subrc EQ 2.
        MESSAGE s006(zspa) WITH i_mprn1-mprn .
      ENDIF.
    ENDMODULE.                    "MPRN_F4 INPUT
    MODULE GNTC_F4 INPUT
    MODULE gntc_f4 INPUT.
      DATA: BEGIN OF lt_gntc OCCURS 0,
              gntc LIKE iflot-zzgntc,
            END OF lt_gntc.
      CLEAR:   lt_returntab, lt_gntc.
      REFRESH: lt_returntab, lt_gntc.
      lt_gntc-gntc = 'DM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      lt_gntc-gntc = 'NDM'.
      APPEND lt_gntc. CLEAR lt_gntc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZZGNTC'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          window_title    = 'Select Gas Nomination Type Code'
          value_org       = 'S'
        TABLES
          value_tab       = lt_gntc
          return_tab      = lt_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc EQ 0.
        READ TABLE lt_returntab INDEX 1.
        i_mprn-dm_ndm = lt_returntab-fieldval.
      ENDIF.
    ENDMODULE.                    "GNTC_F4 INPUT
    *&      Module  mprn1_f4  INPUT
          text
    MODULE mprn1_f4 INPUT.
      DATA: lt_f4          TYPE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_returntab1  LIKE ddshretval OCCURS 0 WITH HEADER LINE,
            lt_dynpfields1 LIKE dynpread OCCURS 0 WITH HEADER LINE,
            lt_dnpfields1  LIKE dynpread OCCURS 0 WITH HEADER LINE.
      DATA: stepl1 TYPE systepl,
            stepl_index1 TYPE systepl.
      DATA : i_dnpfld1      LIKE dynpread OCCURS 0 WITH HEADER LINE,
             ws_dyname1     LIKE d020s-prog,
             ws_dynumb1     LIKE d020s-dnum,
             ws_dynpfld1    LIKE dynpread.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
             lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
             stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-POST_CODE'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-MPRN'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " mprn1_f4  INPUT
    *&      Module  pstlz1_f4  INPUT
          text
    MODULE pstlz1_f4 INPUT.
      CLEAR: i_dnpfld1,  ws_dyname1, ws_dynumb1, ws_dynpfld1,
              lt_f4, lt_returntab1,lt_dynpfields1, lt_f4,
              stepl1, stepl_index1.
      REFRESH: i_dnpfld1, lt_returntab1,lt_dynpfields1, lt_f4.
    To Determine Steploop Index
      lt_dynpfields1-fieldname = 'I_MPRN-MPRN'.
      lt_dynpfields1-stepl     = stepl1.
      APPEND lt_dynpfields1. CLEAR lt_dynpfields1.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
          determine_loop_index = 'X'
        TABLES
          dynpfields           = lt_dynpfields1
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc EQ 0.
        READ TABLE lt_dynpfields1 INDEX 1.
      ENDIF.
      stepl_index1 = lt_dynpfields1-stepl.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname           = 'IFLOT'
          fieldname         = 'I_MPRN-POST_CODE'
          searchhelp        = 'ZS_MPRN_PC'
          dynpprog          = sy-repid
          dynpnr            = sy-dynnr
        TABLES
          return_tab        = lt_f4
        EXCEPTIONS
          field_not_found   = 1
          no_help_for_field = 2
          inconsistent_help = 3
          no_values_found   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Update tablecontrol
      READ TABLE lt_f4 WITH KEY fieldname = 'ZZPSTLZ'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-post_code.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-POST_CODE'.
        ws_dynpfld1-fieldvalue = i_mprn-post_code.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
      CLEAR  : i_dnpfld1, ws_dynpfld1.
      REFRESH: i_dnpfld1.
      READ TABLE lt_f4 WITH KEY fieldname = 'MPRN'.
      IF sy-subrc = 0.
        MOVE lt_f4-fieldval TO i_mprn-mprn.
        ws_dyname1   = 'ZSRO_MASTER_DATA'.
        ws_dynumb1   = '0301'.
        ws_dynpfld1-fieldname  ='I_MPRN-MPRN'.
        ws_dynpfld1-fieldvalue = i_mprn-mprn.
        ws_dynpfld1-stepl      = stepl_index1.
        APPEND ws_dynpfld1 TO i_dnpfld1.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = ws_dyname1
            dynumb               = ws_dynumb1
          TABLES
            dynpfields           = i_dnpfld1
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " pstlz1_f4  INPUT
    Regards,
    Prakash.

  • How to delete and refresh the contents of table control..

    how to delete particular row in table control .consider we r having three rows i wish to delete the third row.while on debugging the third row gets deleted successfully.but that is displayed in table control.then how to refresh the table control...

    hi,
    try like this....
    USER_COMMAND of PAI
    MODULE user_command_9000 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'DEL'.
          GET CURSOR LINE lin_no.
          f1 = 1.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    and in Module in which u fetching data in PBO, write like
    MODULE get_data OUTPUT.
      IF f1 <> 1.
        SELECT kunnr name1
        INTO CORRESPONDING FIELDS OF TABLE mytab
        FROM kna1.
      ENDIF.
      IF f1 = 1.
        DELETE mytab INDEX lin_no.
        FREE lin_no.
        FREE f1.
      ENDIF.
    ENDMODULE.                 " get_data  OUTPUT
    reward if useful...

  • How to find the current line in the table control in module pool ?

    How to find the current line in the table control in module pool ?
    This is an urgent requirement? please do help me.

    refer to this example
    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<b> flights-current_line.</b>
    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.

  • How to get sum of quantity column in table control

    Hi, expert ,
    Someone can guide me how to get som of qty column in table control ?
    I created a screen with a table control  and has a  qty quantity field .
    I want to show total of qty  in a  field .
    my code like this ...
    PROCESS AFTER INPUT.
      LOOP AT I_tab.
        CHAIN.
           FIELD I_tab-COUNTQTY MODULE  caculate_total_qty .
        endchain.
        MODULE UPDATE_TOTAL_QTY  .
      ENDLOOP.
    but, when I Back to the previous screen
    It's caculate again so I always get wrong Total quantity .
    anyone can help me ...

    Hi , Dhina
    I have another question .
    I use internal table data in table control to update  database table .
    The data in the db will be change ,
    but each record I want to delete in table control , it's still exist in database .
    my code is
    WHEN 'SAVE'
         MODIFY YDSGBT53 FROM TABLE I_YDSGBT53 .
         COMMIT WORK .
      END CASE
    How  to fix my code and let it can change and delete data in database  ?
    or
    when I delete record  in table control I must to delete data in the database too .
    Edited by: TitusFang on Jun 16, 2011 3:21 AM

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

Maybe you are looking for