Issue On Table Control Validation

Hi All,
I Got One requirement that is  " Sales Employee Depo Tour Details ",
Requirement Is ---> IF One Sales Employee Updates Data Base Table Through  Table Control
Details Are :
Emp no: 1234, Depo City : Hyderabad, Starting Date : 25:01:2010 End Date:31:12:9999(Default Date If Emp Gives Blank)
And Then Saves His Tour Details.
Like That If Another Employee 2345 Wants To Update His  Depot tour In Same City Between Above Dates Error pop up Message Should Display With "  One Employee Already In This City Want to Change End date Of That Employee ".
If He Press " Yes "  Button Then That Record Display In Table Control In Change Mode After That
Emp:2345 Changes His End Date To 31:12:9999 To  some 31:12:2010 And Then He Updates The Employee 1234 Details,
Then He updates his tour Details Like
Emp no: 2345, Depot City : Hyderabad, Starting Date : 25:01:2011 End Date:31:12:2011.
so i done this validation in pai module through chain and enchain and up to pop up display i done the process of validation
but how to display existing record in table control via include .
Regards
Udaya Bhasker Bandi
Edited by: UDAY123 on Jul 19, 2010 9:10 AM

u have to add the
TRANSACTION 'COR2'   | [USING bdc_tab [bdc_options]] .
in wihich
OPTIONS FROM opt
DEFSIZE (Selection as to whether the screens of the called transaction are displayed in the standard screen size.) Values "X" (standard size), " " (current size).
also you have to handle the 'P+'.
* Structure to hold Parameter string for runtime of CALL TRANSACTION  *
DATA :
  fs_opt TYPE ctu_params.
*& Form SETTINGS
* This Subroutine sets the default size check box to 'X' & Mode as 'N' *
*  There are no interface parameters to be passed to this subroutine
FORM settings .
* Setting the Default size checkbox to 'X' and Mode as 'N'
  fs_opt-defsize = 'X'.
  FS_OPT-DISMODE = 'N'.
ENDFORM.                               " FORM RETRIEVE_SUBSECTION...
After filling your BDC Data.
CALL TRANSACTION 'COR2'  USING t_bdcdata
                           OPTIONS FROM fs_opt
                          MESSAGES INTO t_messages.
you can see the below example
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/bdcToUploadIT0585Data
Regards.

Similar Messages

  • Urgent: Table control validation of defaulted values

    Hi All,
    I have 5 fields in my table control. I have provided a button on the screen, if the user clicks that button, one of the fields( checkbox) is set as 'X'.
    Now , I want to validate the value in this field.
    The issue I have is that it is not going into the CHAIN ENCHAIN module logic to do the validation, if the value is updated through the button, but it performs validation if I update the field manually.
    Please advice.
    Thanks.
    K K

    Try this in the PAI process of screen:
    LOOP AT itab.
        CHAIN.
            FIELD: ...
            MODULE CHECK_MODIFIED ON CHAIN-INPUT.
        ENDCHAIN.                                           
    ENDLOOP.
    Oherwise,you can add the check logic into the flow logic of the button,if the value is not valid,block it.
    Edited by: Liang Zhang on May 28, 2008 4:34 AM

  • Table control Validation

    I have worked in CT04 transaction. In that if we specify the character type (Eg . Characetr Foramt) & enter the number of characetrs as 3 means in value tab it wont allow as to enter value greater than 3. It wont show any error message but it restrict the cursor(the cursor wont move at all)
    I want to do this kind of validation in my table control.
    I debugged the program also But not able to get it.
    Main program is SAPLCTMV and screen number is 1200.
    The table control field is CAWN-ATWRT.
    Can any one help me to solve this problem.
    Thanks in advance.

    write the code on PAI of ur screen to popup a error message if some condition for a particular field of Table control fails as follows -
    PROCESS AFTER INPUT.
    LOOP AT ITAB2.                "ITAB2 is the table for table control.
        module read_table_control.
      ENDLOOP.
    module read_table_control input.
    if itab1-pernr eq '00000022'.
        message w000(000) with 'Enter other value than 22'.    "this is error message
    else.
        MODIFY itab2 FROM itab1 INDEX tabcontrl-current_line.
    endif.
    endmodule.                 " read_table_control  INPUT

  • Issue in table control scroll bar

    Hi experts,
    In Table control I used the following code,
    Refresh control 'TCDATA' from screen '200'.
    If i use this code i cant able to  scroll the data when the table control having multiple lines.
    Can any one suggest me?. what i need to do for this..
    Edited by: sai.bala on Sep 17, 2010 12:22 PM

    Hi ,
    try this...
    Refresh control 'TCDATA' from screen '200'.
    "write this statement below refresh table control
    * Describe lines of internal table to extend the table control Vertical
    * scroll bar
      DESCRIBE TABLE <tablename> LINES TCDATA-lines.
    prabhudas

  • Issue in table control

    Hi All
    I have a table control in which there are three columns. I need a dropdown list box in one of the columns but the problem is i dont want dropdown in all the cells of that column.
               col 1     col2        col3
    row1
    row2
    row3                              *****
    As illustrated above , I want dropdown list box only at place specified by *****. Can i achieve this somehow.
    Any pointers to this will be appreciated.
    Thanks.

    Hi,
    In tcode se51 --> table control select the field Row3(according to your example) and
    double click it.Then a attributes window will be displayed.
    In tht window there will be a field called Dropdown..Choose list box from it and also click on Program tab>possible entries..
    Award points if useful..

  • Strange issue with table control in dialog programming! Please help!

    Hello everyone:
                I have a table control on screen painter and I have atleast 10 rows on display when user calls the screen. If I have 15 columns then ofcourse user has to scroll down to see extra rows. I have line selection set to "single" for table control so that user can select only one row at a time. This works fine when user does not have to scroll to see extra rows. It is tough for me to explain i.e., if the table control displays 10 rows when the screen opens up then they can only select single row at a time (rows 1 -10). For example user selected row 7 and now they scroll down to see extra rows (for example 13) then it lets them select row 13 also even though I set line selection to "single" in the properties for table control! They should be able to select only one row at a time. Is this some limitation with table control in SAP? Please give me any information you have.
    Thanks.
    Mithun

    Hi,
    As you suspected, this is a limitation in the table control.  You need to take care of the single-selection functionality yourself except for the rows that are actually being displayed.  See [Note 588284|https://service.sap.com/sap/support/notes/588284] for the official SAP explanation.
    Regards,
    Jamie

  • Issue on table control

    In my modulepool program , i am unble to add new item in table control.
    in this program when add item first time , it is working fine . but when update  mode , it is not adding.
    please help on this.
    Moderator Message: Put a little more effort into framing your questions and do a little more R&D before posting here.
    Edited by: kishan P on Feb 25, 2011 5:45 PM

    u have to add the
    TRANSACTION 'COR2'   | [USING bdc_tab [bdc_options]] .
    in wihich
    OPTIONS FROM opt
    DEFSIZE (Selection as to whether the screens of the called transaction are displayed in the standard screen size.) Values "X" (standard size), " " (current size).
    also you have to handle the 'P+'.
    * Structure to hold Parameter string for runtime of CALL TRANSACTION  *
    DATA :
      fs_opt TYPE ctu_params.
    *& Form SETTINGS
    * This Subroutine sets the default size check box to 'X' & Mode as 'N' *
    *  There are no interface parameters to be passed to this subroutine
    FORM settings .
    * Setting the Default size checkbox to 'X' and Mode as 'N'
      fs_opt-defsize = 'X'.
      FS_OPT-DISMODE = 'N'.
    ENDFORM.                               " FORM RETRIEVE_SUBSECTION...
    After filling your BDC Data.
    CALL TRANSACTION 'COR2'  USING t_bdcdata
                               OPTIONS FROM fs_opt
                              MESSAGES INTO t_messages.
    you can see the below example
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/bdcToUploadIT0585Data
    Regards.

  • Update Issue in Table Control

    I Have created a maintenance view of a Ztable.
    In that  view i have added some valiations between the Chain - Endchain.
    In those validation i update a particular field of the same Ztable depending upon a certain creteria on the SAVE event.
    The issue that i am facing is that  when i SAVE the data for the first time the ztable field does not get  updated ...... but when i SAVE it for the second time it gets updated. So basically  i have to Press the SAVE Button twice for the field to be updated.
    Can any one suggest why the same is happenining and what  is the solution????
    Thanx in Advance
    Regards
    Dilip

    Hi,
    Go to SE11 - Utilities - Table Maintenance Generator
    Then go to Environment - Modification - Events
    There, you create a new entry. Use Table maintenance dialog event = 05. Put your code there. It will be called when saving new records.
    Hope this helps.
    Benedict

  • Table control scrolling issue

    hi,
          I am having a issue with table control scrolling. When i was passing less number of records (say 19 records becuase table control is having 19 lines) to table control in BDC call transaction, everything is working fine. after filling the 19 line items its not taking the next line item the page is not scrolling down. T.code is <b>GS02</b>. please suggest me. following is my code
    REPORT ZLOCK_WBS_ELEMENTS  MESSAGE-ID ZFI_RESTMT.
                           TYPES                                         *
    *types declaration for final internal table
    types: begin of ty_final,
             ryear       like zupi5a-ryear,  "Fiscal year
             rbukrs      like zupi5a-rbukrs, "Company code
             racct       like zupi5a-racct,  "Account number
             rzzps_posid like zupi5a-rzzps_posid, "WBS element
             rzzmtit     like zupi5a-rzzmtit, "MPM title
             rzzmfor     like zupi5a-rzzmfor, "MPM format
             rzzmatnr    like zupi5a-rzzmatnr, "Material number
             rzzcou      like zupi5a-rzzcou, "Country
             rzzfow      like zupi5a-rzzfow,  "Financial owner
             rzzoow      like zupi5a-rzzoow,  "Operational owner
             rzzcon      like zupi5a-rzzcon,  "Licensee Contract
             rzzloc      like zupi5a-rzzloc, "Licensor Contract
             kostl       like zupi5a-kostl,  "Cost center
             zzfam       like zupi5a-zzfam,  "Fame Number
             zzfor       like zupi5a-zzfor,  "Format
             zzprd       like zupi5a-zzprd,  "Product Line
             zzwin       like zupi5a-zzwin,  "Window group
             zzwig       like zupi5a-zzwig,  "Window
             rtcur       like zupi5a-rtcur,  "Currency Key
             tsl         like zupi5a-tsl,  "Amount Transaction currency
             hsl         like zupi5a-hsl,  "Amount Co. code currency
             ksl         like zupi5a-ksl,  "Amount Group currency
             msl         like zupi5a-msl,  "Quantity
           end of ty_final.
    Data
    data:  j_final2      type standard table of ty_final,
           v_final2      type standard table of ty_final.
    data:  wa_final2     type ty_final.
    data:  bdcdata like bdcdata occurs 0 with header line,
           messtab like bdcmsgcoll occurs 0 with header line.
    data :begin of i_values occurs 0.
            include structure setvalues.
    data :end of i_values.
    data: v_counter(3) type n value '0',
          v_from    like rgsbl-from,
          V_FROM(30) TYPE C,
          v_setname like zfi_setid_cc-setid,
          v_setid like sethier-setid,
          n type i,
          l type i,
          k type i value '1',
          p_rbukrs like zupi5a-rbukrs.
    import p_rbukrs from memory id 'bukrsid'.
    import i_final2 to j_final2 from memory id 'table'.
    To eliminate duplicate WBS elements to be stored into the sets
    v_final2 = j_final2.
    sort v_final2 by rzzps_posid.
    delete adjacent duplicates from v_final2 comparing rzzps_posid.
    select single setid into v_setname
           from zfi_setid_cc
           where rbukrs EQ p_rbukrs.
    IF sy-subrc <> 0.
      MESSAGE E005.
    ENDIF.
    *write 'ZFIRESTATEMENT' to v_setname.
    call function 'G_SET_GET_ID_FROM_NAME'
         EXPORTING
              shortname = v_setname
         IMPORTING
              new_setid = v_setid.
    call function 'G_SET_TREE_IMPORT'
         EXPORTING
              client     = sy-mandt
              langu      = sy-langu
              setid      = v_setid
         TABLES
              set_values = i_values.
    describe table i_values lines n.
    describe table v_final2 lines l.
    write n to v_counter.
    clear bdcdata.
    refresh bdcdata.
    perform bdc_dynpro      using 'SAPMGSBM' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RGSBM-SHORTNAME'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    *perform bdc_field       using 'RGSBM-SHORTNAME'
                                 'ZFIRESTATEMENT'.
    perform bdc_field       using 'RGSBM-SHORTNAME'
                                  v_setname.
    loop at v_final2 into wa_final2.
       v_counter = v_counter + 1.
      perform bdc_dynpro      using 'SAPMGSBM' '0115'.
      concatenate 'RGSBL-FROM(' v_counter ')' into v_from.
      perform bdc_field     using 'BDC_CURSOR'
                                  v_from.
      perform bdc_field     using 'BDC_OKCODE'
                                  '/00'.
      perform bdc_field     using 'RGSBS-TITLE'
                                  'FI Restatement-WBS locking'.
      perform bdc_field     using v_from
                                   wa_final2-rzzps_posid.
    endloop.
    perform bdc_dynpro      using 'SAPMGSBM' '0115'.
    perform bdc_field       using 'BDC_CURSOR'
                                  v_from.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SAVE'.
    perform bdc_field       using 'RGSBS-TITLE'
                                  'FI Restatement-WBS locking'.
    perform bdc_dynpro      using 'SAPMGSBM' '0105'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBACK'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RGSBM-SHORTNAME'.
    call transaction 'GS02'
      using bdcdata
      mode 'A'
      update 'S'
      messages into messtab.
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.
           Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> ' '.
        clear bdcdata.
        bdcdata-fnam = fnam.
        bdcdata-fval = fval.
        append bdcdata.
      endif.
    endform.
    this is working fine when they r less than 19 line items. please suggest me with the logic when it is more than 19 line items.

    Hi,
    Just try to increase the table control lines before display.
    v_counter = n + 10.

  • ISSUE IN THE TABLE CONTROL

    HAI FRIENDS,
    I HAVE DISPLAYED THE VALUES IN THE TABLE CONTROL
    I HAVE DEFINED 'CHECK'  FOR  SELECTING  THE FIELDS OF TABLE CONTROL
    THE ISSUE STARTS HERE
    WHEN I CHECK TOP FIELDS OF TABLE CONTROL
    THEN SCROLLED  VERTICALLY, THE TABLE CONTROL TO SELECT I.E CHECK THE
    BOTTOM FIELDS OF TABLE CONTROL.
    THE TOP FIELDS WATEVER  CHECK  WHERE CHECKS DISPAPEARS FOR TOP FIELDS  .
    BY THIS  I UNABLE TO SELECT THE FIELDS OF TABLE.
    PLZ HELP ME URGENTLY NEEDED.
    MY MONDAY I NEEDED

    You use an internal table for values in table control..
    One of the fields( very first field) in that itab is used for check - uncheck..
    u have make it 'X' when u click any row...
    I think this might be the problem in ur case.. when u scroll PAI starts... in that PAI check the value of check box for that particular field...
    Regards
    Prax

  • Issue with number of lines in Table control for an web transaction in ITS

    Hi,
    We have acustom web transaction ZC03 where we have used table controls. Recently a kernal patch has been installed and after that the number of lines appearing in table control has got changed. Earlier table control was coming with 5 lines and presently its coming with 3 lines. Can you please help me to fix the issue.
    The  code used in HTML template for table controi is given below:
    `SAP_DynproLayerBegin(005,013,067,006)`
      `SAP_TableControl("TC_TIME1")`
        `SAP_DynproLayerEnd()`
    I have tried other alternatives like  `SAP_DynproTableControl("TC_TIME1")`, `D_TableControl("TC_TIME1') but did n't get any fruitful result also.
    Thanks and Regards,
    Ranadev

    What where the precise Kernel updates? What where you on and what did you upgrade too?
    Did you apply any BASIS Support Pack corrections during the Kernel upgrade?
    If you applied a new BASIS support pack - check the following WIKI:
    [How to check the publishing Date of an Internet Service|http://wiki.sdn.sap.com/wiki/x/OYG8BQ ]
    if you need to republish - use the following WIKI:
    [How to activate, publish and test ITS services in the integrated ITS?|http://wiki.sdn.sap.com/wiki/x/kmE ]
    Regards,
    Oisin

  • Table Control Issue

    Hi all,
              I had a issue where in when I display some records in the table control, it is showing the records and the rest of the records are going into grey mode.
    For example, Iam getting 3 records into the table control.  From the fourth line of the table control, it is displaying the grey color.( I mean disable mode).
    I have a requirement where the end user must have the facility to enter the records manually also.    
    So, How to make the grids of the table control in such a way we can enter some data manually along with the imported data.
    Please let me get some ideas.
    thanks and regards
    Murali Krishna Tatoju

    Hi Murali,
    I have the following logic in the PBO and it works fine,
    DATA: tab_fill TYPE i,
            calc_fill TYPE i,
            add_fill type i,
            no_lines_add type i.
      CLEAR: tab_fill, calc_fill, add_fill, no_lines_add.
    *check the current line number and the data filled.
      DESCRIBE TABLE g_tc_rate_card_itab LINES tab_fill.{color:red} "g_tc_rate_card_itab----> internal table{color}
      IF tab_fill GE 7.
        calc_fill = tab_fill MOD 7.   {color:red}" Initial 7 rows are available in the table for input u can change this as per you requirement or the no. of rows initially available in your screen{color}
        IF calc_fill = 0.
         add_fill = tab_fill / 7.
         add_fill = add_fill + 1.
         no_lines_add = 7 * add_fill.
          tc_rate_card-lines  =  no_lines_add.  {color; red}" tc_rate_card ----> Table control name{color}
        ENDIF.
      ENDIF.
    By this way you can get rid of the ADD button since as soon as the 7th row is filled with data it adds up more 7 rows in the table control which are read for input.
    Regards,
    Abhijit G. Borakr

  • 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

  • Issue in vertical scroolbar on the table control

    Hi All,
    I am not able to get the vertical scrollbar on the table control iuf line items increase in number. Please help me in solving the issue.
    Thanks
    K Sharma

    Hi,
    In se38
    CONTROLS: TCTRL_PHONELIST TYPE TABLEVIEW USING SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
       DESCRIBE TABLE itab_PHONELIST LINES LIN.
      TCTRL_PHONELIST-lines = LIN.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE EXTRACT_USERDATA INPUT.
       lines = sy-loopc.
    ENDMODULE.                 " EXTRACT_USERDATA  INPUT
    In se51
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
    PROCESS AFTER INPUT.
      LOOP AT ITAB_PHONELIST .
                  MODULE EXTRACT_USERDATA.
      ENDLOOP.

  • How can we do the validation for non visible records in table control.

    Hi Experts,
      I have a table control which displays list of material details. I have a button to upload the material details from excel file to table control directly. I have to validate all the customers which are exist in the table. But my item (Material) table control displays only 5 rows i.e only 5 entries are visible in module pool screen. The validation is done for 5 records only in PAI event, but i need to do validation for rest of the records too (Which are not visible on items table), if validation fails then needs to display error message.
      How can we do the validation for non visible records in table control.
    Regards,
    Bujji

    Hi,
    try validating material before displaying it in table control...'
    Rgds/Abhhi

Maybe you are looking for

  • Hp pavillion a1324n - blue screen error

    After an extended shut off period (say overnight), when I start up my desktop it goes through the process and starts up fine but within a minute it shuts off and either it restarts and and then works fine for the rest of the day (even if I shut it of

  • How to save A4 size page as PDF format

    I want A4 size page in pdf format

  • Airbook never ends to reboot after update

    after the latest Yosemete update, the Airbook restarted and the white apple on black screen shows the progress bar half the way full and there it stacks and nothing happens ever since. I force restarted the airbook by holding the start button and it

  • Cenvat Forecast error : j1i6

    Dear experts , When i run the t code j1i6 , i get the following error Default Condition Type not defined for Tax Procedure TAXINN further analysis : Diagnosis     Default condition type not defined for tax prcedure Procedure     Maintain table j_1ita

  • Report Paper Size

    I'm having trouble setting up a report that will be printed on custom sized paper. The page setup will not let me set a portrait format where the page is wider than tall. In this application, the page is 4" wide and 2.5" tall, a tag for parts in inve