Table control related...

Hi,
My question is - how can I develop table control having three columns with only one column editable?

Hi,
write module in PBO as below
*&      Module  FIELD_STATUS_9012  OUTPUT
      text
module FIELD_STATUS_9012 output.
  LOOP AT SCREEN.
    CASE screen-name.
The following are the screen field names
      WHEN 'WA_LC_BG_ACCT-BELNR' OR
           'WA_LC_BG_ACCT-WRBTR' OR
           'WA_LC_BG_ACCT-ZFBDT' OR
           'WA_LC_BG_ACCT-PYDATE' OR
           'WA_LC_BG_ACCT-BCHARG' OR
           'WA_LC_BG_ACCT-INTRST'.
          screen-input = 0.
          MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.
endmodule.                 " FIELD_STATUS_9012  OUTPUT
Regards,
Raju.

Similar Messages

  • Table Control Related Problem

    Hi,
    I have created table control displaying fields from ztable and now i have created user defined structure containing the same table as structure and one more field is added as MARK for capturing row. Now the problem is when i select one row on table control and scroll down to select another row and again if i scroll up to select another row , its not showing the previous row selected Please provide me solution
    Please follow the code for reference.
    On screen 0600.
    PROCESS BEFORE OUTPUT.
      MODULE status_0600.
      MODULE fetch_data.
      MODULE vertical_scroll2.
      LOOP AT it_vnd INTO fl_vnd WITH CONTROL tbl_2.
        MODULE display_fetched_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0600.
      LOOP AT it_vnd.
        FIELD fl_vnd-mark
        MODULE move_records ON INPUT.
      ENDLOOP.
      MODULE create_records.
      MODULE change_delete.
    In TOP INCLUDE
    TYPES:   BEGIN OF zthird.
            INCLUDE STRUCTURE zfmmvndrcert.
    TYPES:    mark TYPE c LENGTH 1.
    TYPES:   END OF zthird.
    CONTROLS :  tbl_2 TYPE TABLEVIEW USING SCREEN 0600.
    DATA :         it_vnd TYPE  TABLE OF zthird,
                       it_evnd TYPE TABLE OF zthird,
                       it_strd TYPE TABLE OF zthird,
                       fl_vnd  TYPE zthird.
    PROCESS BEFORE OUT.
    MODULE status_0600 OUTPUT.
      DATA l_code TYPE TABLE OF sy-ucomm.
      APPEND 'SAVE' TO l_code.
      SET PF-STATUS 'ZVNDR' EXCLUDING l_code.
      SET TITLEBAR 'ZVND'.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    MODULE fetch_data OUTPUT.
    SOME  DATA FETCHING LOGIC IS THERE BUT NOT INCLUDED
      SORT it_vnd BY lifnr cert_number cert_type DESCENDING.
      LOOP AT it_strd INTO fl_vnd.
        fl_vnd-mark = c_x.
        MODIFY it_vnd FROM fl_vnd TRANSPORTING mark WHERE lifnr       = fl_vnd-lifnr
                                                    AND   cert_number = fl_vnd-cert_number
                                                    AND   cert_type   = fl_vnd-cert_type.
        CLEAR fl_vnd.
      ENDLOOP.
      DESCRIBE TABLE it_vnd LINES v_ln.
    ENDMODULE.                 " fetch_data  OUTPUT
    module vertical_scroll2 output.
    describe table it_vnd
    lines v_lines.
    tbl_2-lines = v_lines + 2.
    endmodule.                 " vertical_scroll2  OUTPUT
    MODULE display_fetched_data OUTPUT.
        MOVE-CORRESPONDING fl_vnd TO zfmmvndrcert.
        CLEAR fl_vnd.
    ENDMODULE.                 " display_fetched_data  OUTPUT
    PROCESS AFTER INPUT.
    MODULE move_records INPUT.
      IF v_fl EQ space.
        REFRESH : it_evnd,it_strd.
        v_fl = c_x.
      ENDIF.
      MOVE-CORRESPONDING zfmmvndrcert TO fl_vnd.
      fl_vnd-mark = c_x.
      MODIFY it_vnd FROM fl_vnd TRANSPORTING mark WHERE lifnr = fl_vnd-lifnr.
      APPEND fl_vnd to it_strd.
      APPEND fl_vnd TO it_evnd.
      CLEAR fl_vnd.
    DESCRIBE TABLE it_evnd
    lines v_ln.
    ENDMODULE.                 " move_records  INPUT
    Please provide me solution.
    Thanks ...
    PARAG
    Edited by: Matt on Jan 14, 2009 2:02 PM added  tag

    Ok. So you want to select multiple rows.
    For this, add one single char field say SEL in your internal table for table control i.e it_vnd.
    Then on your screen layout, table control properties add the field into w/SelName field (IT_VND-SEL).
    Now when you select records in the table control, the field SEL will have value X.
    Check if the above solution works.
    regards,
    Jinson

  • Module pool question -table control related

    Hi All,
    I have table control with field mark some input enabled fields in it Now the problem is  when i change the content of one row and select that row then control goes to modue in PAI which is called on ON REQUEST but the changed vaule is not capturing in it only slected row with previous content come in that module . Can u suggest some solution or neccessary setting to be done in attribute of tabe control?
    If possible provide code for it
    Thanks
    Parag

    Hi,
       Please go through the following code below to solve your issue.
    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.

  • Problem related to display column's full length as default in table control

    Hi Experts,
    I have a screen in report program. In that a table control has been designed.
    Now the issue is that when report program has been executed and the table control screen is called on a particular action then the table columns full length is not visible as default however when i checked the screen layout the default and visible length of colum header and column field is as per required.
    For example  - We have a Period field with default length as 6 and visible length as 15. Its column header is Period with both default length as 15 and visible length as 15.
    The period field has an internal table field reference and its format is NUMC.
    While column header Period is Text field created of type CHAR.
    Please suggest. Any help or inputs will be highly appreciated.
    Thanks,
    Akash

    Hi
    set cursor field 'WA_CODFOD-C_NOTE_NO' line mline.
    The value of MLINE can be from 1 and N, where N is the number of the lines shown in the table control, so if your table control can display 5 line, MLINE will be from 1 to 5.
    Now you need to create the link between the line of the table control and the line of internal table, the rule is:
    Internal Table Line = <table control>-TOP_LINE + <table control line> - 1.
    Max

  • Table Control[Accept Input Only] - "ENTER" Key

    Hi Folks,
    I'm reviving this unanswered thread in relation to table control: when the user press enter, all the values entered disappear.
    [url]Re: Table control (Enter key)[url]
    I have a table control that accepts "ONLY" input, meaning to say, there will be no pre-loading of data in the PBO, so it will loop through the table control itself instead of looping from an internal table.
    Issue: Whenever I press "ENTER" in any column/row of my table control, ALL the values I entered disappear.
    PBO:
    PROCESS BEFORE OUTPUT.
      MODULE CLEAR_OKCODE.
      MODULE LOAD_TABLECTRL.
      LOOP WITH CONTROL TC_DATA.
        MODULE READ_DATA.
      ENDLOOP.
    module READ_DATA output.
      READ TABLE T_DATA INTO WA_DATA INDEX TC_DATA-current_line.
      data : line_count type i.
      "to increase the number of lines in table control dynamically
      describe TABLE t_data lines line_count.
      TC_DATA-lines = line_count + 10.
    endmodule. 
    PAI:
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL TC_DATA.
        MODULE MODIFY_DATA.
      ENDLOOP.
    module MODIFY_DATA input.
    WHEN 'CREATE'.
      "subroutines are here, etc.
    WHEN 'DELETE'.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    endmodule.
    In my ABAP Debug, the value of SY-UCOMM is BLANK whenever I press Enter.
    Thanks.

    Hi
    Your code seems to be rght only the MODIFY statament is useless:
    module READ_DATA output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        ZQID_CHECK-WERKS = WA_ID_CHECK-WERKS.
        ZQID_CHECK-MATNR = WA_ID_CHECK-MATNR.
        ZQID_CHECK-LICHA = WA_ID_CHECK-LICHA.
        ZQID_CHECK-LIFNR = WA_ID_CHECK-LIFNR.
      ELSE.
        CLEAR ZQID_CHECK.
      ENDIF.
    endmodule.
    Now before LOOP of PBO try to set the lines of table control to be display, I've created this report on my system and it works fine:
    .CONTROLS T_CTRL TYPE TABLEVIEW USING SCREEN 100.
    DATA: BEGIN OF ITAB OCCURS 0,
              WERKS LIKE MARC-WERKS,
              MATNR LIKE MARC-MATNR,
              LIFNR LIKE LFA1-LIFNR,
          END   OF ITAB.
    DATA: WA LIKE ITAB.
    START-OF-SELECTION.
      DO 4 TIMES.
        ITAB-WERKS = '5010'.
        ITAB-MATNR = '1234567890'.
        ITAB-LIFNR = '0000000001'.
        APPEND ITAB.
      ENDDO.
      CALL SCREEN 100.
    PROCESS BEFORE OUTPUT.
      MODULE SET_T_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE READ_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
        MODULE MODIFY_DATA.
      ENDLOOP.
    MODULE SET_T_CTRL OUTPUT.
      DESCRIBE TABLE ITAB LINES T_CTRL-LINES.
    ENDMODULE.                 " SET_T_CTRL  OUTPUT 
    MODULE READ_DATA OUTPUT.
      READ TABLE ITAB INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC = 0.
        MOVE-CORRESPONDING ITAB TO WA.
      ELSE.
        CLEAR WA.
      ENDIF.
    ENDMODULE.                 " READ_DATA  OUTPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY ITAB FROM WA INDEX T_CTRL-CURRENT_LINE.
      IF SY-SUBRC NE 0.
        CHECK NOT WA IS INITIAL.
        APPEND WA TO ITAB.
      ENDIF.
    ENDMODULE.                 " MODIFY_DATA  INPUT

  • How to implement F4 help in table control

    Hi all,
    I am working on a table control in a module pool program. I have three fields in table control , material no. , material description and quantity. my requirement is , in table control , i need to provide the F4 help for material no. and material description, in a way, if i select material no. using F4, the corresponding material description field would be entered automatically in the table control field.
    Pls suggest me on this , if possible pls give me code or logic to do this.
    Thanks
    Saravan
    Moderator message: please don't post the identical question again after the first attempt was locked for good reasons. Search for available information before asking.
    Edited by: Thomas Zloch on Mar 3, 2011 11:54 AM

    Hi Saravana,
    Please search in SCN before posting. You will find many threads related to this question. The basic logic is you have to get the selected row of table control  using DYNP_GET_STEPL function in your POV. Then using function DYNP_VALUES_READ read the material and create the description to be displayed. You have use function F4IF_INT_TABLE_VALUE_REQUEST to display search help.

  • How to add a column in table control

    Hi ,
       Can any one tell me how to add a column in table control? My requirement is to add two columns ( custom fields ) into table control ( It is a standard program). I have added the column in the table and also in the table control. But when I am running the standard program, The newly added column is not there. But I have added in the perticular screen. Change is not reflected.
       Can anyone help me on this please.
    Thanks in advance.
    Regards,
    Lakshmi.

    Hi,
    Ensure the following :
    1. After adjusting the database, you`ll have to use the database utility and activate the table.
    2. If you have changed the standard screen, in tcode se80 -- right click on the program and click activate all. This activates all objects related to that program.
    Now execute the program.
    Reward if helpful.
    Regards

  • Get selected row in a table control

    What is the best approach to get a selected row, all fields, in a table control?  I see this done in various transactions in MM but do not see how to do this in documentation.
    Thanks

    in the screen flow logic you need something like this:
      LOOP AT t_partner.
           MODULE get_selected_line.
          MODULE process_partner.
      ENDLOOP.
    PAI module get_selected_line :
    MODULE get_selected_line INPUT.
    only get cursor position once....as it's constant within each loop
      IF sy-stepl EQ 1.
        CLEAR wv_cursor_0120.
        GET CURSOR LINE wv_cursor_0120.
        IF wv_cursor_0120 = 0.
          wv_cursor_0120 = 1.
        ENDIF.
    convert the relative line of the screen to the actual line number in the table
        wv_absolute_line = wv_cursor_0120 + tc_partner-top_line - 1.
      ENDIF.
    ENDMODULE.                 " GET_SELECTED_LINE  INPUT
    module process_partner needs to be something like this:
    MODULE process_partner INPUT.
    only process the selected line
    CHECK sy-stepl = wv_cursor_0120.
    CASE ok_code.
    endcase.
    endmodule.

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • Table control : Need to change Single field as non editable

    Hi Experts,
                    Plz help me out. In a table control there r 7 fields and only one field is editable. When i change the status of a record as delete in tat table control, only the deleted record (all fields)should become non-editable. Is it possible? Pls suggest.
    Regards,
    J. Sriram.

    Hi,
    In PBO of your screen
    you should be using a step loop like this :
    CONTROLS control1 TYPE TABLEVIEW USING SCREEN 100.
    LOOP AT itab WITH CONTROL control1.
    ENDLOOP.
    Where the control1 is the tableview control defined in your program
    and placed on your screen.
    Put a second loop on screen inside this loop ant set the related attribute :
    LOOP AT itab WITH CONTROL control1.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'COLUMN1'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDLOOP.
    So you can set cells editable or non-editable
    and you can filter it which record & which field..

  • Table Control in BDC

    Hai Experts,
    i have problem with table control in bdc, can any tell me wat exact code for table control in bdc,n plz give flat file for this prm or any related
    HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
    DUMMY(100) TYPE C,
    END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
    LIFNR(10) TYPE C,
    BUKRS(4) TYPE C,
    EKORG(4) TYPE C,
    KTOKK(4) TYPE C,
    NAME1(30) TYPE C,
    SORTL(10) TYPE C,
    LAND1(3) TYPE C,
    SPRAS(2) TYPE C,
    AKONT(6) TYPE C,
    FDGRV(2) TYPE C,
    WAERS(3) TYPE C,
    END OF IT_XK01,
    BEGIN OF IT_BANK OCCURS 0,
    BANKS(3) TYPE C,
    BANKL(10) TYPE C,
    BANKN(10) TYPE C,
    KOINH(30) TYPE C,
    LIFNR(10) TYPE C,
    END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    FILENAME = 'C:\VENDOR.TXT'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = IT_DUMMY.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
    ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
    ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro using 'SAPMF02K' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-REF_LIFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    IT_XK01-LIFNR.
    perform bdc_field using 'RF02K-BUKRS'
    IT_XK01-BUKRS.
    perform bdc_field using 'RF02K-EKORG'
    IT_XK01-EKORG.
    perform bdc_field using 'RF02K-KTOKK'
    IT_XK01-KTOKK.
    perform bdc_dynpro using 'SAPMF02K' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-TELX1'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFA1-NAME1'
    IT_XK01-NAME1.
    perform bdc_field using 'LFA1-SORTL'
    IT_XK01-SORTL.
    perform bdc_field using 'LFA1-LAND1'
    IT_XK01-LAND1.
    perform bdc_field using 'LFA1-SPRAS'
    IT_XK01-SPRAS.
    perform bdc_dynpro using 'SAPMF02K' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-KUNNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-KOINH(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    DATA : FNAM(20) TYPE C,
    IDX TYPE C.
    MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
    CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKS.
    CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKL.
    CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKN.
    CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-KOINH.
    IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPMF02K' '0210'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-FDGRV'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFB1-AKONT'
    IT_XK01-AKONT.
    perform bdc_field using 'LFB1-FDGRV'
    IT_XK01-FDGRV.
    perform bdc_dynpro using 'SAPMF02K' '0215'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-ZTERM'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0220'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB5-MAHNA'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0310'.
    perform bdc_field using 'BDC_CURSOR'
    'LFM1-WAERS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFM1-WAERS'
    IT_XK01-WAERS.
    perform bdc_dynpro using 'SAPMF02K' '0320'.
    perform bdc_field using 'BDC_CURSOR'
    'WYT3-PARVW(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
    MODE 'A'
    UPDATE 'S'
    MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-PROGRAM = PROG.
    IT_BDCDATA-DYNPRO = SCR.
    IT_BDCDATA-DYNBEGIN = 'X'.
    APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-FNAM = FNAM.
    IT_BDCDATA-FVAL = FVAL.
    APPEND IT_BDCDATA.
    ENDFORM

    Hi Rajesh,
                   I will send a sample code 4 ur problem check it once.And also i will attach a FLAT FILE at the end of program check it once.Plz copy the below code and execute it ok...
    *& Report  YBDC_MB1C_HEADER_ITEM_CALLTRA                               *
    *&  DEVELOPER  : KIRAN KUMAR.G                                         *
    *&  PURPOSE    : UPLOAD DATA(T.CODE = MB1C) INTO DATABASE(CALL TRANS)  *
    *&  CREATION DT: 5/12/2007                                             *
    *&  REQUEST    : ERPK900035                                            *
    REPORT  YBDC_MB1C_HEADER_ITEM_CALLTRA.
    Global BDC And Message Structures
    DATA: gt_bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE,
          gt_msgtab  LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    Global Variables For File Path And Messages
    DATA: gv_infile TYPE string, "For Path Selection
          gv_msg    TYPE string. "For Message Printing
    For Elimination Of Illegal Screens
    DATA: opt TYPE ctu_params.
    Global Variables
    DATA: gv_num(2)    TYPE n,
          gv_matnr(20),
          gv_erfmg(20).
          gv_num = 1.
    Internal Table
    DATA: BEGIN OF gt_data OCCURS 0,
           f1(20),
           f2(20),
           f3(20),
           f4(20),
           f5(20),
           f6(20),
           f7(20),
           f8(20),
           f9(20),
        END OF gt_data.
    Selection Criteria
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_file LIKE rlgrap-filename,
                p_mode.
    SELECTION-SCREEN : END OF BLOCK b1.
    Selection Path
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM selection_path.
    START-OF-SELECTION.
      opt-nobinpt = 'X'.
      opt-defsize = 'X'.
      opt-updmode = 'A'.
    Upload the data
      PERFORM upload_data.
    END-OF-SELECTION.
    Populate Data Into BDCDATA Structure
      PERFORM populate_data.
    *&      Form  selection_path
          text
    -->  p1        text
    <--  p2        text
    FORM selection_path .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
      FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_file.
      gv_infile = p_file.
    ENDFORM.                    " selection_path
    *&      Form  upload_data
          text
    -->  p1        text
    <--  p2        text
    FORM upload_data .
      REFRESH : gt_data.
      CLEAR   : gt_data.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = gv_infile
         filetype                      = 'ASC'
         has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          data_tab                      = gt_data
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " upload_data
    *&      Form  Populate_data
          text
    -->  p1        text
    <--  p2        text
    FORM populate_data .
      LOOP AT gt_data.
    *Header Information
        IF gt_data-f1 = 'H'.
          PERFORM firstscreen.
          CLEAR gt_data.
        ENDIF.
    *Item Information
        IF gt_data-f1 = 'I'.
          PERFORM secondscreen.
    *Save data and call the Call Transaction Method
          AT END OF f1.
            PERFORM save.
            CALL TRANSACTION 'MB1C' USING gt_bdcdata MODE p_mode
                                                    MESSAGES INTO gt_msgtab.
            PERFORM messages.
            REFRESH gt_bdcdata.
            CLEAR gv_num.    "USED IN CONCATENATE STEP
          ENDAT.
          gv_num = gv_num + 1.
        ENDIF.  "End of Item Data
      ENDLOOP.
    ENDFORM.                    " Populate_data
    *&      Form  firstscreen
          text
    -->  p1        text
    <--  p2        text
    FORM firstscreen .
      PERFORM bdc_dynpro      USING 'SAPMM07M' '0400'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'MKPF-BKTXT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      PERFORM bdc_field       USING 'MKPF-BLDAT'
                                     gt_data-f2.
      PERFORM bdc_field       USING 'MKPF-BUDAT'
                                     gt_data-f3.
      PERFORM bdc_field       USING 'MKPF-BKTXT'
                                     gt_data-f4.
      PERFORM bdc_field       USING 'RM07M-BWARTWA'
                                     gt_data-f5.
      PERFORM bdc_field       USING 'RM07M-WERKS'
                                     gt_data-f6.
      PERFORM bdc_field       USING 'RM07M-LGORT'
                                     gt_data-f7.
      PERFORM bdc_field       USING 'XFULL'
                                    'X'.
      PERFORM bdc_field       USING 'RM07M-WVERS2'
                                    'X'.
      PERFORM bdc_dynpro      USING 'SAPMM07M' '0421'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'MSEG-ERFMG(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BU'.
    ENDFORM.                    " firstscreen
    *&      Form  secondscreen
          text
    -->  p1        text
    <--  p2        text
    FORM secondscreen .
      CONCATENATE 'MSEG-MATNR(' gv_num ')' INTO gv_matnr.
      CONCATENATE 'MSEG-ERFMG(' gv_num ')' INTO gv_erfmg.
      PERFORM bdc_field       USING 'MSEGK-KUNNR'
                                     gt_data-f2.
      PERFORM bdc_field       USING  gv_matnr
                                     gt_data-f3.
      PERFORM bdc_field       USING  gv_erfmg
                                     gt_data-f4.
      PERFORM bdc_field       USING 'DKACB-FMORE'
                                    'X'.
    ENDFORM.                    " secondscreen
    *&      Form  save
          text
    -->  p1        text
    <--  p2        text
    FORM save .
      PERFORM bdc_field         USING 'BDC_OKCODE'
                                  '=BU'.
    ENDFORM.                    " save
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR gt_bdcdata.
      gt_bdcdata-program  = program.
      gt_bdcdata-dynpro   = dynpro.
      gt_bdcdata-dynbegin = 'X'.
      APPEND gt_bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR gt_bdcdata.
      gt_bdcdata-fnam = fnam.
      gt_bdcdata-fval = fval.
      APPEND gt_bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  messages
          text
    -->  p1        text
    <--  p2        text
    FORM messages .
      LOOP AT gt_msgtab.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = sy-msgid
            lang      = sy-langu
            no        = sy-msgno
            v1        = sy-msgv1
            v2        = sy-msgv2
            v3        = sy-msgv3
            v4        = sy-msgv4
          IMPORTING
            msg       = gv_msg
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        IF sy-tabix EQ 1.
          WRITE:/ 'Process Log' COLOR 3.
        ENDIF.
        WRITE:/ gv_msg.
      ENDLOOP.
      REFRESH : gt_msgtab.
      CLEAR   : gt_msgtab.
    ENDFORM.                    " messages
                 FLAT FILE
    *H     10012005     20022005     HEADER     451     1000     0001
    *I     1     100-300     5     
    *I     1     100-400     3
    *I     1     100-100     12
    *H     12012005     12022005     HEADER     451     1000     0001
    *I     2     100-200     4
               General Information(t.code= MB1C)
    *DOC DATE : 10.1.2005   POSTING DATE : 20.2.2005
    *HEADER TEXT : HEADER
    *MATERIAL TYPE :451  PLANT : 1000
    *STORAGE LOCATION : 0001
    *CUSTOMER :1
    *MATERIAL NO : 100-300
    *QUANTITY : 5
    *BUSINESS AREA : 0001
    Award points if helpful
    Kiran Kumar.G.A

  • How to transfer data in table control in bdc

    hi
    how to transfer data in table control in bdc . I need the theory regarding this
    bye

    Hi,
    just check in the forum , there is many threads available to ur questions.
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    You can even refer to these related threads
    bdc table control
    Re: table control in bdc
    table control in BDC
    Reward if helpful.
    Thanks
    Naveen khan

  • How to display data in Table control?

    Hi Experts,
    Can anyone please explain me how to display the data from two different tables(those two table is related with 1 field) into a single table control?
    For Example: T1 has fields (F1,F2) and
                         T2 has fields (F3,F4) --> here F3 is foreign key for F1
    I need to display the data F1,F2,F3,F4 into the table control.
    Can anyone explain me?
    Thanks in Advance,
    Regards,
    Raghu

    Hi,
    If F3 is foreign key for F1, then both fields will have same values.  Then why do you need to display both F1 and F3?  Either one of them is enough.  Try the following code.
    types: begin of t_table,
                 F1 type T1-F1,
                 F2 type T1-F2,
                 F4 type T2-F4,
              end of t_table.
    data: i_table type standard table of t_table with header line.
    select F1 F2 F4 into table i_table from T1 inner join T2 on T1F1 = T2F3.
    You should create three columns in the table control with names i_table-F1, i_table-F2, i_table-F3.
    After populating the internal table, refresh the control with the following statement.
    REFRESH CONTROL <NAME> FROM SCREEN <SCREEN_NO>.
    All the above statements should be in your PBO Module.
    Regards,
    Hema
    Message was edited by:
    Sorry, Declarations can be in the common include.  Select statement and refresh statement should be in PBO.
            Hema Nagarajan

  • How to provide F4 help for a field in table control

    Hi Friends,
    I have requirement like below.
    1.Create one custom transaction code with header and item information.
    2.In item level, we will be designed table control to enter/display the data.
    3.Table control’s first field will be material number and next DOT number (Material may have many DOT numbers) and so on.
    4.First user will enter material number in the table control’s first row’s first field and go to DOT number field.
    5.DOT number has drop down option. If user selects drop down box of DOT number, he gets all the DOT numbers available in database. User selects one DOT number and double clicks on it then it will be populated in DOT number field box.
    But for point number 5,  business wants like when ever user enters material number in table control first field then select DOT number’s drop down then they want to see the particular material’s DOT numbers only in the drop down list for selection. Not all DOT numbers available in data base. Same thing should happen for all item lines in table control.
    Please see below example. 
    Assume data base table has 10 DOT numbers. But material number has only 2 DOT numbers. When ever user enters material number in item level table control and selects DOT number’s drop down then it should show only 2 DOT numbers which are related to particular material number. Not all 10 DOT numbers.
    Could you please suggest me, how can we achieve this?

    Hello,
    Check this :-
    For POV
    Input Help in Dialog Modules
    You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
    Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_. The most important are:
    F4IF_FIELD_VALUE_REQUEST
    Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    F4IF_INT_TABLE_VALUE_REQUEST
    This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
    Input help in dialog modules
    REPORT DEMO_DYNPRO_F4_HELP_MODULE.
    TYPES: BEGIN OF VALUES,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    END OF VALUES.
    DATA: CARRIER(3) TYPE C,
    CONNECTION(4) TYPE C.
    DATA: PROGNAME LIKE SY-REPID,
    DYNNUM LIKE SY-DYNNR,
    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
    VALUES_TAB TYPE TABLE OF VALUES.
    CALL SCREEN 100.
    MODULE INIT OUTPUT.
    PROGNAME = SY-REPID.
    DYNNUM = SY-DYNNR.
    CLEAR: FIELD_VALUE, DYNPRO_VALUES.
    FIELD_VALUE-FIELDNAME = 'CARRIER'.
    APPEND FIELD_VALUE TO DYNPRO_VALUES.
    ENDMODULE.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE VALUE_CARRIER INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = 'DEMOF4HELP'
    FIELDNAME = 'CARRIER1'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CARRIER'.
    ENDMODULE.
    MODULE VALUE_CONNECTION INPUT.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = PROGNAME
    DYNUMB = DYNNUM
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = DYNPRO_VALUES.
    READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
    SELECT CARRID CONNID
    FROM SPFLI
    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
    WHERE CARRID = FIELD_VALUE-FIELDVALUE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'CONNID'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CONNECTION'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = VALUES_TAB.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    MODULE INIT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON VALUE-REQUEST.
    FIELD CARRIER MODULE VALUE_CARRIER.
    FIELD CONNECTION MODULE VALUE_CONNECTION.
    When the user chooses input help for the individual fields, the following is displayed:
    For the Airline field, the POV module VALUE_CARRIER is called. The function module F4IF_FIELD_VALUE_REQUEST displays the input help for the component CARRIER1 of the structure DEMOF4HELP from the ABAP Dictionary, namely the search help DEMOF4DE. The user’s selection is returned to the screen field CARRIER.
    For the Flight number field, the POV module VALUE_CONNECTION is called. The function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the user’s selection into the screen field CONNECTION.
    For POH------------
    Field Help
    There are three ways of displaying field help for screen elements:
    Data Element Documentation
    If you place a field on the screen in the Screen Painter by copying a ABAP Dictionary field, the corresponding data element documentation from the ABAP Dictionary is automatically displayed when the user chooses field help (as long as the help has not been overridden in the screen flow logic).
    For further information about creating data element documentation, refer to data elements.
    Data Element Supplement Documentation
    If the data element documentation is insufficient, you can expand it by writing a data element supplement
    Data element supplement documentation contains the heading Definition, as well as the following others:
    Use
    Procedure
    Examples
    Dependencies
    To create data element supplement documentation for a screen, choose Goto ® Documentation ® DE supplement doc. from the element list of the screen. A dialog box appears in which the system proposes a number as the identified for the data element supplement. You can then enter help texts for the above headings using the SAPscript editor.
    Data element supplement documentation created in this way is program- and screen-specific. Any data element supplement documentation created in the ABAP Dictionary with the same number is overridden by the screen-specific documentation. You can link existing data element supplement documentation created in the ABAP Dictionary with a screen field by using the table THLPF. To do this, crate a new row in THLPF containing the following data: Program name, screen name, field name, and number of the data element supplement documentation.
    To display data element supplement documentation, you must code the following screen flow logic in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> [MODULE <mod>] WITH <num>.
    After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
    If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
    You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.
    For further information about data element supplement documentation, refer to Data Element Supplements.
    Calling Help Texts from Dialog Modules
    If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be dependent on the user input.
    The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
    HELP_OBJECT_SHOW_FOR_FIELD
    This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
    HELP_OBJECT_SHOW
    Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
    For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
    Field help on screens.
    REPORT DEMO_DYNPRO_F1_HELP.
    DATA: TEXT(30),
    VAR(4),
    INT TYPE I,
    LINKS TYPE TABLE OF TLINE,
    FIELD3, FIELD4.
    TABLES DEMOF1HELP.
    TEXT = TEXT-001.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE F1_HELP_FIELD2 INPUT.
    INT = INT + 1.
    CASE INT.
    WHEN 1.
    VAR = '0100'.
    WHEN 2.
    VAR = '0200'.
    INT = 0.
    ENDCASE.
    ENDMODULE.
    MODULE F1_HELP_FIELD3 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = TEXT-002
    CALLED_FOR_TAB = 'DEMOF1HELP'
    CALLED_FOR_FIELD = 'FIELD1'.
    ENDMODULE.
    MODULE F1_HELP_FIELD4 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW'
    EXPORTING
    DOKCLASS = 'TX'
    DOKLANGU = SY-LANGU
    DOKNAME = 'DEMO_FOR_F1_HELP'
    DOKTITLE = TEXT-003
    TABLES
    LINKS = LINKS.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. It has the following layout:
    The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON HELP-REQUEST.
    FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
    FIELD FIELD3 MODULE F1_HELP_FIELD3.
    FIELD FIELD4 MODULE F1_HELP_FIELD4.
    The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
    The following field help is displayed:
    When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event.
    If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2.
    When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD.
    When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
    Regards,
    Deepu.K

Maybe you are looking for

  • How can i organize apps on one home page?

    I have four folders of apps sprawled across four home pages with all that space in between.     How can I move them all to the front home page?    Can't find this in the manual---is there a secret? Thanks for whatever help you can provide!  

  • I am new to Ipad-3, would like to know how to send an attachment in an e-mail

    How to attach documents in an e-mail using Ipad?

  • Loss of relationship between xmp and associated raw file.

    This is wierd. Please HELP! I have a folder in my LR Library where the relationship between the xmp files have lost the relationship to ALL the raw files that it "represents" in that single folder. All I see in my grid view are the thumbnails with th

  • Logic to update the table with IDOC numbers

    Hi all, I have an issue while I am running my interface. The IDOCs are getting generated and are displaying in WE02 successfully. But in my logic, I have a requirement to update these created IDOCs in a customized database table. This table has the I

  • Tax software for Mac???

    Hi, everyone. TurboTax offers software for Mac in all additions EXCEPT for "Business" for some unknown reason. In addition, H&R Block's software following exactly the same pattern. Does anyone know of Mac software that can handle a Business tax retur