Input Check in Table Control

A table control is created in screen painter and an internal table was used to store particular data in ABAP program.
Information were entered into the table through ABAP program(insert value into internal table). The input check generated by data dictionary do not work due to data not inserted from screen field. How can I solved the problem?
Do I need to manually program the input check using module as following:
FIELD f Module m.
But how can I make the whole row ready for input and with cursor on particular column just like what was done with normal data dictionary input check?
Message class 00 number 058 with text
Entry & & & does not exist in &4 - check your entry
can be used for compute the message.

What are those conditions that will trigger the input check for my situation?
I can only do that for those fields with check table.
Here are what I had done:
<b>Flow Logic</b>
      field EBAN-EKGRP MODULE CHECK_EKGRP.  " Purchasing Group
<b>Module code</b>
MODULE CHECK_EKGRP INPUT.
TABLES:  T024.
  CHECK:  EBAN-EKGRP IS NOT INITIAL.
  SELECT SINGLE * FROM T024 WHERE EKGRP = EBAN-EKGRP.
  IF SY-SUBRC NE 0.
    MESSAGE E058(00) WITH EBAN-EKGRP '' '' 'T024'.
  ENDIF.
ENDMODULE.                 " CHECK_EKGRP  INPUT
However, this is not applicable for those without check table.
Please help. Points will be awarded for helpful answers.

Similar Messages

  • Issue with input field in table control

    Hi,
    I have an issue with field acgl_item-rstgr in the table control.
    I have created a screen program with a table control.
    In the control i have added a dictionary field as acgl_item-rstgr.
    When i execute, do f4 on the input field, select a value and press enter, then it is showing me
    error as 'Entry 'val' does not exist in T053R (check entry). Its really weird to understand this. I have selected the value
    from f4 and even then it says this. Its working for all other columns, but not working only for RSTGR.
    Plz help me on this regard.
    Code is like this.
    TYPES : BEGIN OF ty_rstgr,
              rstgr TYPE RSTGR,
             END OF ty_rstgr.
    TABLES : ACGL_ITEM.
    DATA : it_rstgr TYPE TABLE OF ty_rstgr.
    DATA : wa_rstgr TYPE  ty_rstgr.
    CONTROLS : table TYPE TABLEVIEW USING SCREEN 100.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT it_rstgr INTO wa_rstgr WITH CONTROL TABLE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
      LOOP AT it_rstgr.
      ENDLOOP.
    Thanks,

    Hi Navitha,
    Its Check Table concepts for the error u stated. Please check wht the Search help ur using...Because for this field there is no search help at value table level...Use search help that hold all master data or create a custom search field in SE11 level or in program level.
    Cheers,
    Naveen

  • Closing INDIVIDUAL lines for input in a table control

    Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.

    Hi,
    >
    Neil Gardiner wrote:
    > Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    >
    > My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    >
    > For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.
    Refer:-
    it_zekpo is my internal table w/o header line,
    wa_zekpo is work area.
    Name of input/output fields on screen are:-
    wa_zekpo-field1,
    wa_zekpo-field2, and so on...
    Add a field as flag(1) type c in the internal table and work area
    And keep a name of SELCOL in the attributes of table control as wa_zekpo-flag
    Take the group1 for all textboxes as 'ABC' in the table control
    Try using code:-
    At screen logic:
    PROCESS BEFORE OUTPUT.
    *  MODULE status_8003.
      LOOP WITH CONTROL po_tb.
        MODULE read_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
    *  MODULE user_command_8003.
      LOOP WITH CONTROL po_tb.
        MODULE modify_data.
      ENDLOOP.
    In PBO
    *&      Module  READ_DATA  OUTPUT
    MODULE read_data OUTPUT.
      READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
      data : line_count type i.
      describe it_zekpo
      lines line_count.
      po_tb-lines = line_count + 10.
      "to increase the number of lines in table control dynamically
      if sy-ucomm = 'DELETE'. "<--when user click delete button
        if wa-zekpo-flag = 'X'. "<--if record selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 0. "disable
              screen-active = 0.
            endloop.
            modify screen.
          endif.
        else. "<--if record not selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 1. "enable
              screen-active = 1.
            endloop.
            modify screen.
          endif.
        endif.
      endif.
    ENDMODULE.                 " READ_DATA  OUTPUT
    In PAI
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
      "this will insert a new line
      "and will modify the contents of existing line
    ENDMODULE.                 " MODIFY_DATA  INPUT
    Hope this helps you.
    Let mw know if you have any doubts.
    Regards,
    Tarun

  • Setting column to input enabled in table control at run time

    Hi friends,
                  I have one table control in that all columns are
    set as display only field or ( output only).
                Now, when I press enter key one column should be
    enabled as input field. HOW TO DO THAT?
    my coading.
    loop at ztblctrl-cols into s_cols.
             if s_cols-screen-name = 'ZGATEPASS-MENGE'.
                s_cols-screen-input  = 1.
                s_cols-screen-output = 1.
                s_cols-screen-invisible = 0.
                s_cols-screen-active = 1.
                s_cols-screen-required = 1.
                move s_screen to s_cols-screen.
                modify ztblctrl-cols from s_cols.
            endif.
        endloop.
    Regards,
    s.senthil kumar

    Hi Kumar,
    Hope your code is in PBO.
    See the below 2 links and you will come to know where you are going wrong.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
    http://sap.niraj.tripod.com/id29.html
    Reward points for helpful answers.
    Regards,
    hari

  • Dynamicaly setting SCREEN-INPUT field in TABLE CONTROL

    hai guys,
    in my table control i have REFNUM field and some other fields.
    now my task is,
    in every row,i have to enable the REFNUM field of table control for editing only if REFNUM is blank.
    else i shud disable it.(when REFNUM is filled).
    all other fields should be always disabled.
    (right now,i am just able to either totaly enable the entire REFNUM coloumn or or totaly disable it for editing,irrespective of the values it is holding.)
    shravan ramidi

    is this not possible?
    can some one confirm it..

  • Editing one row at a time in a table control

    Good day all
    I need your urgent assistance with the problem below:
    At first time load, the table control needs to allow input on the first line only, validation will then be done through clicking a “check” button.  After the check has been done, table control needs to open up the second row for input and grey out the first one. This sequence needs to follow every time a check has been performed.
    After the check has been done, table control needs to show the previously entered data on the first line but grey it out, and open up only the second row for input.
    The table control has been created using a wizard with an internal table and I am working on dialog/screen programming. The table control has been created as an output control but it needs to perform as both and output and input control.
    I have made changes to the “MODULE tc_create_ph2_get_lines OUTPUT.” Which is created by the wizard as follows:
    The module is in the PBO Section.
    IF it_tab is initial.                                                                 "it_tab being the internal table that stores the data from the table control                        
         DESCRIBE TABLE it_tab LINES lv_num.
               LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> 1.
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ELSE.
    tc_create_ph2-current_line = lv_num + 1.
         LOOP AT SCREEN.
           IF tc_create_ph2-current_line <> lv_num + 1 .
             screen-input = 0.
             MODIFY SCREEN.
           ENDIF.
         ENDLOOP.
       ENDIF.
      Your assistance will be highly appreciated.

    Hi Dineo,
    This module would make all line non editable except the last line, which will be open for input.
    LOOP AT IT_ST INTO WA_ST WITH CONTROL MATERIAL CURSOR
    MATERIAL-CURRENT_LINE.
        module mod_screen.
       ENDLOOP.
    module MOD_SCREEN output.
       data : tc_lines type n.
       describe table it_st LINES tc_lines.
    *  loop at screen.
         if material-current_line le tc_lines.
          loop at screen.
           screen-input = 0.
           modify screen.
           endloop.
          endif.
    endmodule.
    When checking and saving data, after saving data delete all lines of tc internal table except the last added row, if you want only the last record to appear in the table.

  • How to control the display of table control

    hi,
    If I dont find any entry in the internal table to be displayed in table control then I should not display the blank table in the screen.
    I tried using if not itab[] is initial in PBO but there(PBO) 'if' is not recognised and it gives syntax error.
    Even if I tried to put the code of table control 'loop at itab[] into wa_tab contrl....'this part in a module and there to put the If condition it gives error to put where after wa_tab.
    Thanks,
    mohan

    hi,
    As i told i had put the if part in the module but then it is the error with syntax check of table control as shown below
    PBO
    module pbo_100.
    loop at itab into wa with contril Tc cursor tc-lines.
    endloop
    pai
    module pai_100
    but here if i create a new module in PBO say module check_table and put the code for table control as
    if not itab is initial
    loop at itab into wa with contril Tc cursor tc-lines.
    endloop
    endif.
    then here error comed with syntax of loop at itab into wa has to be 'where' condition.
    So the problem is i dont want to display the table control in 1st but after some input on the screen then only the table control is to be displayed .
    Let me know if this is clear.
    thanks,
    mohan

  • Error while trying to change the Column description in Table Control

    Hi,
    I have created a table control using the wizard in Module Pool.
    When i try to change the column description of the table control or adjust any other element which is already available on the screen and not in table control. It gives me an error
    Unable to transfer data. End Program?
    Any help would be appreciated.
    Thanks
    Sarves S V K

    Hi.,
    Check these  [Table Control Change Column Description|Add new columns in table control in custom screen program;
    and  [Add Columns in Table Control|Re: Table control columns]
    else  delete and create Table control Again..!!
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Empty Rows in Table Control

    m having table control on my screen......but if its rows remain empty, it dsntnot allow me to do any work on it....i.e. till it remain empty i cant press button on screen.....can any one help me

    Hi,
        there may some validation in PAI in chain ... endchain
        on screen fields try to modify the logic
         as
        loop at itab.
         chain .
          module validate.
         endchain   
        endloop.    
        module validate.
        if not itab is initial.
         do validataion
        endif.  
    or check in table control field properties
    whether <b>required property </b> is checked .
    If yes uncheck the property
    Regards
    amole

  • List box for table control

    Hi,
    I need a list box for an input field in table control.
    In brief. I have 5 fields in table control out of which i have to enter values manually for 1 field and for 1 field i need a list box or drop down and then when i press enter the remaining fields should be populated.
    i got the code working but now they need the drop down list for the second input field.
    If anybody could provide with the code it would be real helpful and  iwas confused whether i need to write code in pov or some where else.
    the field for which i need list box is taken from dictionary .
    any help would be geatly appreciated.
    suchitra

    Refer this link:
    table control Drop down list
    Regards,
    ravi

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

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

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

  • 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

  • Comparing screen input in program in module pool programming(table control)

    Experts,
    I am a newbie in ABAP. I am working dialog programming where I am replicating PR creation. I am asking user to enter item number, material number and plant. I am validating material number and plant using chain and endchain. This validation is working fine and it throws error message if user enters invalid input. I am able to see corresponding details (corresponding details like unit of measure, delivery date and short text etc. if values entered are correct.) when user clicks on ADD button. Now I have one problem. If user enters same item number twice it should throw error message. I am not able to figure out how it should be done. I thought to set flag = 'X' after user enters item number.
    I am using table control. The validation part for material number(matnr) and plant (werks) work fine. I am getting problem while checking entered item number to check duplication.
    User should not enter the same item number again.
    In my structure i have defined a variable called checkflag(1) type c. and i am doing it now following way. Right now my checkflag code is commented.
    Following is my snippet for the same.
    Please let me know your ideas/suggestions and advices.
    DATA : counter TYPE i,
             itmno1 TYPE i.
      SELECT SINGLE matnr
           FROM mara INTO matno WHERE matnr = it_pr-matnr.
      SELECT SINGLE werks
             FROM t001w INTO plant WHERE werks = it_pr-werks.
      SELECT SINGLE matnr werks
             FROM marc INTO (matno,plant)
        WHERE matnr = it_pr-matnr AND werks = it_pr-werks.
      itmno1 = it_pr-bnfpo.
      IF ok_code = 'ADD'.
        IF it_pr-matnr <> matno OR it_pr-werks <> plant AND it_pr-bnfpo = ''.
          MESSAGE 'Not a Valid material number or plant. Please enter valid values.' TYPE 'E'.
        ELSEIF it_pr-matnr = matno AND it_pr-werks = plant AND it_pr-bnfpo <> ''.
          SELECT SINGLE maktx FROM makt INTO stext WHERE matnr = it_pr-matnr.
          SELECT SINGLE meins FROM mara INTO tmeins WHERE matnr = it_pr-matnr.
          SELECT SINGLE lpein FROM eban INTO tlpein WHERE matnr = it_pr-matnr.
    *      if it_pr-bnfpo = itmno1.
    *        it_pr-checkflag = 'X'.
    *      endif.
          READ TABLE it_pr WITH TABLE KEY
          checkflag = it_pr-checkflag
          bnfpo = it_pr-bnfpo
          maktx = it_pr-maktx
          matnr = it_pr-matnr
          eindt = it_pr-eindt
          meins = it_pr-meins
          werks = it_pr-werks
          lpein = it_pr-lpein.
    *      if it_pr-checkflag = 'X'.
    *          message 'Please enter another item number.' TYPE 'E'.
    *          endif.
          IF sy-subrc <> 0.
            it_pr-bnfpo = itmno1.
            it_pr-maktx = stext.
            it_pr-lpein = tlpein.
            it_pr-meins = tmeins.
            APPEND it_pr.
          ENDIF.
          IF sy-subrc = 0.
            MESSAGE 'Please enter another item number.' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.

    Indeed thank you very much @medha24 and @gargi sarkar.
    If I use current-line, I will have to skip first entry as first entry should be appended. Then only I would be able to compare it with newly entered value. I will have to use loop end loop within the PAI. I have already written this code in the validation PAI  itself.
    I am not getting how I should use loop endloop effectively so that control will go to the next iteration effectively. Right now with this code, I am getting partial success if I enter item number in bulk (more than one item number as input at same time). later, even though I enter correct values I get error message as it doesn't find next entry in the table. It only appends first records only. Therefore, I am looking to enter first entry without any check and later entries should be compared and appended. I would appreciate your ideas/suggestions.
    Thank you.
    Best reagrds.

  • Can set the cursor in next line when user inputted one record?table control

    For Dnypro Table control
    I just know when data check error, we can set the cursor to the error field of current line.
    Now user hope that after they inputted the data of one record, he enter the [ENTER], the cursor can be set to the next new line's first field.
    I tried to use such as
    [SET CURSOR FIELD 'WA_XXXX-XXXXX' LINES 5.].
    But if no any error , the cursor will be automatically setted to the field which setted at Cursor position in Dnypro's attribution
    Can it be realized?
    Thanks.

    try to use same procedure as when you program page down:
      DATA: ITAB_LINES LIKE SY-TABIX,
            FIRST_LINE LIKE SY-TABIX,
            J LIKE SY-TABIX.
      GET CURSOR FIELD CURSOR_FIELD.       "to see what Loop is selected
      DESCRIBE TABLE IRE05 LINES ITAB_LINES.
      RE05-LINES = ITAB_LINES.
        WHEN 'P+'.
    FIRST_LINE = RE05-TOP_LINE + LOOPLINE_IRE05.
    ->      FIRST_LINE = RE05-TOP_LINE + 1.
          J = RE05-LINES - LOOPLINE_IRE05 + 1.
          IF J LE 0.
            J = 1.
          ENDIF.
          IF FIRST_LINE LE J.
            RE05-TOP_LINE = FIRST_LINE.
          ELSE.
            RE05-TOP_LINE = J.
          ENDIF.
    Edited by: Andreas Mann on Feb 28, 2008 11:46 AM

  • Table control lines cannot be controlled in Batch Input session ?

    I am using a program which creates Batch Input sessions for the transaction FCHR (Online cashed checks) . The second screen is that of a table control where the check number is entered.
         I observed that while doing SHDB, if we tick the default size then changing the desktop resolution has no effect on the number of lines in table control - we see 14 lines in both cases.However, when the batch input session is processed, the number of table control lines varies according to the resoution(9 lines for 800600 and approx 15 for 1024768). Selecting the 'Dynpro standard size' option while processing the session has no effect.
      I know call transaction with 'default' parameter in optparam will take care of this problem. But I want to know whether Batch Input Session is known to have a problem with different resolutions.

    HI..
    i had the same problem once.... i dealt in the following way
    while entering values in table control
    1) enter value in the first line
    2) look for button on application toolbar using which you can increment line
    3) you will not find difference for first line but you will find it when you insert second line and go for next line.
    4) now for every increment you will get table conrol as (02) if you are going for recording.
    this will surely solve all issue related to table control as it solved for me
    regards
    Edited by: Mohit Kumar on Feb 19, 2009 12:04 PM

Maybe you are looking for