Disable / enable table control field at runtime

hi ,
i am working on a custom transaction in which i have a table control...depending on a table value i have to disable an input field inside the table control...
i know in a normal field we use
loop at screen.
if screen- name = 'XXX' or screen-group = 'XXX'
screen-output = 0.
endif.
but inside a table control field how to modify it.
Regards
Harish Ramakrishnan

All you need to do is put some code in a module of your PBO.     This will change the cell attribute of a single row.
PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABLECONTROL 'I_INTRCON'
* MODULE I_INTRCON_CHANGE_TC_ATTR.
* MODULE I_INTRCON_CHANGE_COL_ATTR.
  LOOP AT   I_INTR
       WITH CONTROL I_INTRCON
       CURSOR I_INTRCON-CURRENT_LINE.
<b>    MODULE I_INTRCON_CHANGE_FIELD_ATTR.</b>
  ENDLOOP.
  MODULE SET_CURSOR_FIELD.
  MODULE STATUS_0200.
module i_intrcon_change_field_attr output.                                                                               
modify i_intr index i_intrcon-current_line.                                                                               
if i_intr-check = 'X'.                                    
    loop at screen.                                         
      if screen-name = 'I_INTR-RCVQTY'.                     
        screen-input = '1'.                                 
      endif.                                                
      modify screen.                                        
    endloop.                                                
  endif.                                                                               
endmodule.                                                  
Regards,
RIch Heilman

Similar Messages

  • Coding for giving 'find' functionality to a table control field

    hi.
    i want to give find functionality to a table control field.when ever i will select one field & i will enter 'find' icon  one modal screen  comes.when i will  enter one value of that field it will highlight that field in the table control.

    Hi,
    FIND <p> IN [SECTION OFFSET <off> LENGTH <len> OF] <text>
                [IGNORING CASE|RESPECTING CASE]
                [IN BYTE MODE|IN CHARACTER MODE]
                [MATCH OFFSET <o>] [MATCH LENGTH <l>].
    The system searches the field <text> for the pattern <p>. The SECTION OFFSET <off> LENGTH <len> OF addition tells the system to search only from the <off> position in the length <len>. IGNORING CASE or RESPECTING CASE (default) specifies whether the search is to be case-sensitive. In Unicode programs, you must specify whether the statement is a character or byte operation, using the IN BYTE MODE or IN CHARACTER MODE (default) additions. The MATCH OFFSET and MATCH LENGTH additions set the offset of the first occurrence and length of the search string in the fields <p> and <l>.
    Regards,
    Priya.

  • How do i display input values (POV) for a table control field

    Hi guyz !
    How do i display input values (POV) for a field in table control,
    i mean when user presses F4 on a table control field.
    Please help.
    Thanks
    jahan

    PROCESS ON VALUE-REQUEST( F4 ) statement  
    Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name.
    * Screen flow logic........
    PROCESS BEFORE OUTPUT.
    *MODULE PBO_MODULE.
    PROCESS AFTER INPUT.
    *MODULE PAI_MODULE.
    PROCESS ON VALUE-REQUEST. "F4
      FIELD EKPO-EBELP MODULE help_ekpo.
    MODULE help_ekpo INPUT.
    **Transport values to table dynpro/screen table control
      DATA: l_stepl LIKE  sy-stepl,
            l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          povstepl        = l_stepl
        EXCEPTIONS
          stepl_not_found = 0
          OTHERS          = 0.
      l_indx = tc_ekpotable-top_line + l_stepl - 1.
              "tc_ekpotable should already have been declared
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELN'.
      dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELP'.
      dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = 'SAPLZZ_EKKO'    "Program name
          dynumb     = '0100'           "Screen number
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 0.
    ENDMODULE.                 " help_ekpo  INPUT
    reward points  if it is usefull ..
    Girish

  • Set cursor in table control field

    I have developed module using table control have done validation for one field on Enter key press.In change mode if user changes value in table control field and presses Enter key then system is showing Error message on status bar and table control gets gray out.
    if user again hits Enter key then this error message clears and Table control is in Edit mode.
    Here I wan that Cursor should go to same filed from which error message occurred.
    I have written Get Cursor In PAI event and Set Cursor in PBO after Loop at table control. I tried Set cursor within Lop at Table control in PBO.
    But cursor is not coming on that field of table control.
    I have written set cursor as below:
    Set Cursor Field itab-fieldname Line lineno Offset offsetval.
    Here itab is internal table assigned to table control.
    Please let me know why cursor is not setting on particular field on table control.

    Hi Ganesh,
       A simpler way would be to include the fields of the table in a chain-endchain block.
    in PAI section.
    PROCESS AFTER INPUT.
      loop at IT_FINAL.
        chain.
          field WA_FINAL-JOBCARD.
          field WA_FINAL-MATIDTAG.
          field WA_FINAL-VORNR.
          field WA_FINAL-ARBPL.
          field WA_FINAL-ZZPULLCONTNRQTY.
          field WA_FINAL-NOOFTAGS.
          field WA_FINAL-ROUTE_TO.
       module validate.
        endchain.
      endloop.
    you can issue your error messages in the module validate.
    REgards,
    Ravi

  • Disable the table control

    Hi all,
    How to disable the table control. User cant enter anything to the table control. Code pls
    thks

    hi,
    in screen flow logic make new module disable....
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TAB1'
      MODULE tab1_change_tc_attr.
    *&SPWIZARD: MODULE TAB1_CHANGE_COL_ATTR.
      LOOP AT   itab
           INTO itab
           WITH CONTROL tab1
           CURSOR tab1-current_line.
        MODULE tab1_get_lines.
        MODULE disable.
    *&SPWIZARD:   MODULE TAB1_CHANGE_FIELD_ATTR
      ENDLOOP.
      MODULE status_1000.

  • Disable table control field

    Hi Experts,
                      I have create a module pool program where in there is a table control with some fields. I had a requirement where I need to disable all the tablecontrol fields when I click DISPLAY button. ( Display button ).
    loop at screen.
    if screen-group1 = 'GR'.
    if sy-ucomm = 'CHANGE'.
    screen-input = 1.
    else.
    screen-input = 0.      " when clicked DISPLAY button.
    endif.
    endif.
    endloop.
    My problem is only menge ( Quantity) field is not disabling.
    please provide your suggestions.
    Thanks and Regards
    Murali Krishna. T

    Hi Niraj,
               I tried with modify screen as you suggested. But no solution.
    Here one thing I need to make clear.  Here Iam using TabStrip. The tabstrip control exits in screen 320. For this I declared a subscreen in the screen 340. Here in 340, the table control is there.
    The push buttons DISPLAY and CHANGE are in screen 320. For these push buttons Iam writing the disable and enable functionality.
    I think, If Iam able to identify the tablecontrol field in screen 320, the problem will be solved.
    Screen Group ' GR ' is already used for another internal table for screen 320.
    Do I need to use another Screen Group for my table control?
    Also please make me clear about    the difference between      screen-group1
                                                                                    screen-group2
                                                                                    screen-group3
                                                                                    screen-group4
    Thanks and regards,
    Murali Krishna T

  • Runtime error while putting negative value in to table control field

    Hi Guys,
                  I am working on a Table Control which has Currency
    and quantity fields.In PBO when the program is trying put a
    negative value then It is going into a runtime error.
    The Error description is,
    Runtime errors         DYNPRO_FIELD_CONVERSION
                                                                                    Error analysis                                                                               
    The program flow was interrupted and could not be resumed.                                 
    Program "SAPMZDBPRJCTEDFIG" tried to display fields on screen 0100. However, an            
    error occurred while this data was being converted.                                                                               
    How to correct the error                                                                               
    A conversion error occurred while the program was trying to   display data on the screen.                                                                               
    The ABAP output field and the screen field may not have the   same format.                                                                               
    Some field types require more characters on the screen than                                
    in the ABAP program. For example, a date field on a screen needs                           
    two characters more than it would in the program. When attempting to                       
    display the date on the screen, an error will occur that triggers the                      
    error message.                                                                               
    Screen name.............. "SAPMZDBPRJCTEDFIG"                                
                  Screen number............ 0100                                               
                  Screen field............. "ZDB_PROJCTD_FIG-ZWORKDONE"                        
                  Error text............... "FX015: Sign lost."                                 Further data:                                                                               
    I have tried increase the screen field length to more than the ABAP program field length and the scrren field name is of data type which supports signed value.
    But still I am getting the error.the error is 'Sign is lost'.
    I would appreaciate if you can help me with this.
    Correct answer will be rewarded.
    Thank you in advance,
    Sanujit Acharya

    Check The Forum
    Re: PA-BN : "FX015: Sign lost." dump
    Kanagaraja L

  • How to Make a Table control Field Editable but input disabled

    Hi All,
        I got a requirement that in table control one column should be in edit mode (i.e. input enabled) but user should not be able to type anything in that field or column rather he can select the value from F4 help (or pick list) associated with that field or column. How to do this ? Please dont say make sceeen-input = 0 for that field.
    Experts please help me out...........
    Thankx in Advance
    Rizwan Ahmad Siddiqui

    Hi,
    I suggest you to go for a drop down instead of a search help.
    Regards,
    Charumathi.B

  • User defined F4 help on a table control field

    hi
               i m calling table maintenance view on click of a button on module pool screen . i have 1 column internal table which has the contents of help to be displayed on 1 of the fields in table control . how to code and where?
    i m using   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    for user defined F4 help . but where exactly to code i  dont knw.please help.
    thank you.
    Ajantha.

    Hi,
    Inthe Module Pool Program, By Default the PROCESS BEFORE OUTPUT and PROCESS AFTER INPUT, at the same way we need to write the POV ...
    As same as we need to write the POV enent manuvally, what you writen the Event will be work in the Report but that does not work in the Module pool Program you need to write PROCESS ON VALUE REQUEST
    write as PROCESS ON VALUE REQUEST then under this write the Function module to call the F4 for that field
    The Code should be like
    PROCESS ON VALUE-REQUEST.
      FIELD <f> MODULE <mod>. --> " Double click it and write the Function module for this then the F4 help will come for this Field
    Look at the below link
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm
    Regards
    Sudheer

  • Provide Tooltip to a table control field

    Hi there,
    can anyone suggest me how do I provide tooltip to a field in a table control created thru screen painter? the field is of char4 type and it displays an ICON depending upon the business logic.
    Regards,
    Deb.

    Hai,
       In screen painter
        1. Go to element list.
        2. Select the properties of that particular field.
        3. There you can find 'TooltipText' property select text.
        4. Here you can specify your text by two ways i.e, text element and value from variable.
       If you follow the above steps you will get the tool tip text for a field.
    Cheers,
    Umasankar

  • Adding F4 help in a table control field

    Hi,
    I Have a table control with records, i want to add an F4 functionality in one field. When you press f4 i want to bring a pop up screen for that field...please help

    Hi
    Hope it will help you.
    Reward if help.
    Check the below link.
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    THis is example to upload the Bank details of the Vendor which has the TC.
    REPORT zprataptable2
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    DATA : BEGIN OF itab OCCURS 0,
            i1 TYPE i,
            lifnr LIKE   rf02k-lifnr,
            bukrs LIKE   rf02k-bukrs,
            ekorg LIKE   rf02k-ekorg,
            ktokk LIKE   rf02k-ktokk,
            anred LIKE lfa1-anred,
            name1 LIKE lfa1-name1,
            sortl LIKE lfa1-sortl,
            land1 LIKE lfa1-land1,
            akont LIKE lfb1-akont,
            fdgrv LIKE lfb1-fdgrv,
             waers LIKE lfm1-waers,
            END OF itab.
    DATA : BEGIN OF jtab OCCURS 0,
            j1 TYPE i,
            banks LIKE lfbk-banks,
            bankl LIKE lfbk-bankl,
            bankn LIKE lfbk-bankn,
             END OF jtab.
    DATA : cnt(4) TYPE n.
    DATA : fdt(20) TYPE c.
    DATA : c TYPE i.
    INCLUDE bdcrecx1.
    START-OF-SELECTION.
      CALL FUNCTION 'WS_UPLOAD'
        EXPORTING
          filename = 'C:\first1.txt'
          filetype = 'DAT'
        TABLES
          data_tab = itab.
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                      = 'C:\second.txt'
         filetype                      = 'DAT'
        TABLES
          data_tab                      = jtab.
      LOOP AT itab.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-KTOKK'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF02K-LIFNR'
                                      itab-lifnr.
        PERFORM bdc_field       USING 'RF02K-BUKRS'
                                      itab-bukrs.
        PERFORM bdc_field       USING 'RF02K-EKORG'
                                       itab-ekorg.
        PERFORM bdc_field       USING 'RF02K-KTOKK'
                                       itab-ktokk.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0110'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'LFA1-LAND1'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'LFA1-ANRED'
                                      itab-anred.
        PERFORM bdc_field       USING 'LFA1-NAME1'
                                      itab-name1.
        PERFORM bdc_field       USING 'LFA1-SORTL'
                                      itab-sortl.
        PERFORM bdc_field       USING 'LFA1-LAND1'
                                      itab-land1.
        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-BANKN(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        cnt = 0.
        LOOP AT jtab WHERE j1 = itab-i1.
          cnt = cnt + 1.
          CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
          PERFORM bdc_field  USING fdt jtab-banks.
          CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
          PERFORM bdc_field USING fdt jtab-bankl.
          CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
          PERFORM bdc_field   USING fdt jtab-bankn.
          IF cnt = 5.
            cnt = 0.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKS(01)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=P+'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0130'.
            PERFORM bdc_field       USING 'BDC_CURSOR'
                                          'LFBK-BANKN(02)'.
            PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '=ENTR'.
          ENDIF.
        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'
                                      itab-akont.
        PERFORM bdc_field       USING 'LFB1-FDGRV'
                                      itab-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'
                                      itab-waers.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0320'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF02K-LIFNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
        PERFORM bdc_transaction USING 'XK01'.
      ENDLOOP.
      PERFORM close_group.
    Header file:
    1     63190      0001     0001     0001     mr     bal188     b     in     31000     a1     inr
    2     63191      0001     0001     0001     mr     bal189     b     in     31000     a1     inr
    TC file:
    1     in     sb     11000
    1     in     sb     12000
    1     in     sb     13000
    1     in     sb     14000
    1     in     sb     15000
    1     in     sb     16000
    1     in     sb     17000
    1     in     sb     18000
    1     in     sb     19000
    1     in     sb     20000
    1     in     sb     21000
    1     in     sb     22000
    2     in     sb     21000
    2     in     sb     22000
    REPORT zmm_pr_upload_mat
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Standard Include for Selection Screen
    INCLUDE bdcrecx1.
    Internal Table for Upload Data
    DATA: BEGIN OF i_pr OCCURS 0,
    Header Screen
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
           lpein(001),          " Category of Del Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
    Item Details
            matnr(018),           " Material No
            menge(017),           " Quantity
           badat(010),
           frgdt(010),
            preis(014),           " Valuation Price
           waers(005),           " Currency
           peinh(005),
           wepos(001),
           repos(001),
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
           bnfpo(005),
          END OF i_pr.
    Internal Table for header Data
    DATA: BEGIN OF it_header OCCURS 0,
            sno(3),               " SNo
            bsart(004),           " PR Type
            epstp(001),           " Item Category
            knttp(001),           " Account Assignment
            eeind(010),           " Delivery Date
            werks(004),           " Plant
            lgort(004),           " Storage Location
            ekgrp(003),           " Purchasing Group
            matkl(009),           " Material Group
            bednr(010),           " Tracking No
            afnam(012),            " Requisitioner
          END OF it_header.
    Internal Table for Item Data
    DATA: BEGIN OF it_item OCCURS 0,
            sno(3),               " SNo
            matnr(018),           " Material No
            menge(017),           " Quantity
            preis(014),           " Valuation Price
            sakto(010),           " GL Account
            kostl(010),           " Cost Center
          END OF it_item.
    Data Variables & Constants
    CONSTANTS : c_x             VALUE 'X'.  " Flag
    DATA : v_l(2),                          " Counter
           v_rowno(5),                      " Row No
           v_2(2),                          " Counter
           v_rows LIKE sy-srows,            " Rows in TC
           v_field(45).                     " String
    Parameters
    PARAMETERS: p_file LIKE ibipparms-path.  " Filename
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start of Selection
    START-OF-SELECTION.
    Open the BDC Session
      PERFORM open_group.
    Upload the File into internal Table
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = i_pr
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT i_pr BY sno.
      LOOP AT i_pr.
        MOVE-CORRESPONDING i_pr TO it_item.
        APPEND it_item.
        CLEAR it_item.
        AT END OF sno.
          READ TABLE i_pr INDEX sy-tabix.
          MOVE-CORRESPONDING i_pr TO it_header.
          APPEND it_header.
          CLEAR it_header.
        ENDAT.
      ENDLOOP.
      SORT it_header BY sno.
      SORT it_item BY sno.
      v_rows = sy-srows - 6.
    Upload the Data from Internal Table
      LOOP AT it_header.
    Header Data
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'EBAN-BEDNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'EBAN-BSART'
                                      it_header-bsart.
        PERFORM bdc_field       USING 'RM06B-EPSTP'
                                      it_header-epstp.
        PERFORM bdc_field       USING 'EBAN-KNTTP'
                                      it_header-knttp.
        PERFORM bdc_field       USING 'RM06B-EEIND'
                                      it_header-eeind.
       PERFORM bdc_field       USING 'RM06B-LPEIN'
                                     it_header-lpein.
        PERFORM bdc_field       USING 'EBAN-WERKS'
                                      it_header-werks.
        PERFORM bdc_field       USING 'EBAN-LGORT'
                                      it_header-lgort.
        PERFORM bdc_field       USING 'EBAN-EKGRP'
                                      it_header-ekgrp.
        PERFORM bdc_field       USING 'EBAN-MATKL'
                                      it_header-matkl.
        PERFORM bdc_field       USING 'EBAN-BEDNR'
                                      it_header-bednr.
        PERFORM bdc_field       USING 'EBAN-AFNAM'
                                      it_header-afnam.
    Item Details
        v_l = 0.
    To add no. of rows
        v_2 = 0 .
    As the screen is showing 13 rows defaulted to 130
        v_rowno = 130 .
        LOOP AT it_item WHERE sno = it_header-sno.
          v_l = v_l + 1.
          IF v_l = 14 .
            IF v_2 = 12 .
              v_2 = 12 .
              v_l = 2 .
    From second time onwards it is displaying 12 rows only
              v_rowno = v_rowno + 120 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ELSE.
    V_2 initialized to 12 for second screen purpose
              v_2 = 12 .
              v_l = 2 .
              PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
              PERFORM bdc_field       USING 'BDC_CURSOR'
                                            'RM06B-BNFPO'.
              PERFORM bdc_field       USING 'RM06B-BNFPO'
                                            v_rowno .
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                            '/00'.
              PERFORM bdc_field       USING 'BDC_OKCODE'
                                                '/00'.
            ENDIF.
          ENDIF.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          CLEAR v_field.
          CONCATENATE 'EBAN-MATNR(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-matnr.
          CLEAR v_field.
          CONCATENATE 'EBAN-MENGE(' v_l ')' INTO v_field.
          PERFORM bdc_field   USING v_field it_item-menge.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0102'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBAN-PREIS'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'EBAN-PREIS'
                                      it_item-preis.
          PERFORM bdc_dynpro      USING 'SAPMM06B' '0505'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'EBKN-SAKTO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'EBKN-SAKTO'
                                      it_item-sakto.
    Cost Center
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'COBL-KOSTL'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'COBL-KOSTL'
                                        it_item-kostl.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
        ENDLOOP.
        PERFORM bdc_dynpro      USING 'SAPMM06B' '0106'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RM06B-BNFPO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BU'.
    Call The Transaction
        PERFORM bdc_transaction USING 'ME51'.
      ENDLOOP.
    Close the BDC Session
      PERFORM close_group.

  • Get table control field length

    in table control i have a field with with char length 15  but i have to give a validation if lenght not equal to 6 giv error messgage with out changin the field length of table control
    i used    
                    DESCRIBE FIELD gi_pmpb_bchid-batchid LENGTH ln IN CHARACTER MODE.
                     IF ln <> 6.
                         MESSAGE e013(zc8isms).
                      ELSE.
    but here length is coming as 15 only even if i enter 6 digits in field on TC
    plz help

    DESCRIBE returns the attributes of a data object. Length operators, like STRLEN, on the other hand, return a length of the data content.
    if strlen( <mytable-fieldname> ) gt 6.
    etc...
    or lv_len = strlen( <mytable-fieldname> ).
    if lv_len (of type i) gt 6.
    etc...
    put this in code, press F1 on STRLEN for informative help on finding lengths, whether field or table.

  • Search help on table control field which imports info from same record

    Hi Team ABAP,
    i got a slight problem here and kinda dont know how to proceed.
    I got a DDIC structure containing fields KSCHL and NACHA.
    Additionally i got a customizing table based on kschl, where allowed NACHA´s per KSCHL get customized.
    Now i got a table control, containing records of type of above described structure.
    I created a search help for Field NACHA which actually uses KSCHL as importing since we just want to see those NACHA´s allowed for the given KSCHL.
    Search help itself works fine. I got problems in how to tell it which kschl to import.
    I have coded an routine in event PROCESSES ON VALUE REQUEST.
    There i could do DYNP_VALUES_READ or get my data right out of the itab on which the table control is based. i just got the problem that i dont have a clue how identify which search help of which table control line got clicked.
    having a first look i dont see any of SY fields changing using different lines. So i´m stuck. any Ideas?
    regards
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM

    Use FM [DYNP_GET_STEPL|http://www.sdn.sap.com/irj/scn/advancedsearch?query=dynp_get_stepl] "Current sy-stepl at Event POV", then use the returned povstepl value in DYNP_VALUES_READ (and DYNP_VALUES_UPDATE if required)
    Regards,
    Raymond

  • How to disable an I/O field at runtime of the screen

    Hi Guru's,
    Here's the scenario..I have to diable one I/O field in the screen at runtime. If I will click one radio button, one I/O field should be disalbed. How can I do that? Please help!! I'm doing a report program, do someone have an idea how to make this work?
    Any help will be appriciated
    Thanks and regards,
    Mackoy

    Hi Morris,
    Still got no answer..here's my code below..
    selection-screen begin of block scr01 with frame title text-001.
    *& select options
    select-options: ps_matnr for mara-matnr,            "Article
                          ps_date  for mkpf-budat obligatory. "Date
    selection-screen  end of block scr01.
    selection-screen begin of block scr02 with frame title text-002 no intervals.
    parameters:  Site radiobutton group rb1,
                       Article radiobutton group rb1.
    selection-screen end of block scr02.
    *& Events
    at selection-screen on radiobutton group rb1.
      if article = 'X'.
         loop at screen.
           if screen-name = 'PS_MATNR-LOW' and screen-name = 'PS_MATNR-HIGH'.
              SCREEN-INPUT = 0.
              screen-invisible = 0.
             MODIFY SCREEN.
           ENDIf.
         ENDLOOP.
         perform display_site.
    endif.
    thanks and regards,
    Mackoy

  • How to make screen field enable when table control gives an error

    Hi,
        I had a scneario like when table control data wrong then one parameter of the screen should be enabled for the input, i knew that screen-name will not work since it will have always table control fields only when table control gives an error.
    How to make the other parameter enable when table control throws an error.
    Regards,
    Jaya

    Hi Gobi,
         Thanks for your response, but issue is - how to make other screen fields enable when there was an error in the table control data.
    For table control - lets say we will use the code as i mentioned above.i am sure that we cant write the code for field enable in between loop & endloop.
    as you said if we right outside the loop-endloop, the module wont be triggered when table control throws an error, because that statement was not there in the loop-endloop.
    please let me know if you need any more information on the issue. I hope there is alternative for this in SAP.
    Thanks
    Jaya

Maybe you are looking for