Table control resolution

Hi all,
how to clear the problem of table control resolution.
bye.

Hi Pavan,
Check this code :-
data: lws_cnt type char2,
lws_field type char15.
LOOP AT i_invoicing_plan INTO wa_invoicing_plan.
lws_cnt = sy-tabix.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lws_cnt
IMPORTING
output = lws_cnt .
CONCATENATE 'FPLT-AFDAT(' lws_cnt ')' INTO lws_field.
CONCATENATE wa_invoicing_plan-date+6(2)
wa_invoicing_plan-date+4(2)
wa_invoicing_plan-date+0(4) INTO lws_date
SEPARATED BY '.'.
PERFORM bdc_field USING lws_field lws_date.
CONCATENATE 'FPLT-FPROZ(' lws_cnt ')' INTO lws_field.
lws_perct = wa_invoicing_plan-percentage.
CONDENSE lws_perct.
PERFORM bdc_field USING lws_field lws_perct.
ENDLOOP.
While calling the transaction give like this:
DATA: opt TYPE ctu_params.
opt-dismode = 'N'.
opt-updmode = 'A'.
opt-defsize = 'X'.
CALL TRANSACTION tcode
USING i_bdcdata OPTIONS FROM opt MESSAGES INTO i_messages.
LOOP AT i_messages.
ENDLOOP.
<b>Reward points if helpful</b>
Thanks,
Sachin

Similar Messages

  • Table control resolution in BDC

    Hi
    All
    I have one doubt regarding table control resolution in BDC .I know how to handle table control like if i have 5 rows in my TABLE CONTROL.I write the logic according to this rows and if more than 5 rows are there in my flat file i extend the atble control.But this logic will fail in some other system if more than 5 rows are there in that syatem. But I have read from  some where that we can use ctu_params structure and if we pass default size as 'x' then it automatically take cares in every sysem.But my doubt is while writing the code initially how can  we write ie i mean how many rows i have to mention initially in my logic .
    Please tell me the answer to this question if you have already face this type of problem.
    Thanks and regards
    Venkateswar

    Hi,
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    check these...
    http://www.abaplearning.com/index.php?option=com_fireboard&Itemid=2&func=view&id=11&catid=8
    BDC - standard screen resolution required?
    https://forums.sdn.sap.com/click.jspa?searchID=739193&messageID=823953
    Regards,
    Omkaram.

  • Screen Resolution in table control bdc

    Hi ,
    Im working on bdc table control using call transaction method for vk11 and mek1.While uploading data for vk11 for the first time it is taking all the records of the input file and if i do the same for the second time by changing the amount value it is taking only 24 records .(i.e if the input file contains only 24 records it wil update else if it has 25 records or more it not updating even single record and it is showing error " No batch input data for screen sapmv13A ..)...this issue is with the production server......................whereas in development and quality servers there is no problem....................
    what migh be the problem and how to solve it?
    can anyone plz help me on this

    if its a problem in screen resolution then while recording through SHDB mark the check box default size
    or
    to make the bdc execute in standard screen size check the code below
    data x_ctuparams type ctu_params.
    x_ctuparams-defsize = 'X'. " This would freeze the resolution in any system
    x_ctuparams-dismode = 'N'.
    x_ctuparams-updmode = 'S'.
    call transaction <TCODE> using it_bdcdata options from x_ctuparams.
    So whatever is the screen size of the users front-end, the BDC will execute in standard screen size

  • How to create screen resolution in bdc table control

    hi gurus
    can anyone suggest me
    how to create screen resolution in bdc table control
    thanks&regards
    mark.

    Hi ,
    Using CTU_PARAMS table for screen resolution .
    For this sample code.
    This is for Transation  FB60.
    report ZZFB60
           no standard page heading line-size 255.
    tables t100.
    PARAMETERS : p_file1  like  rlgrap-filename,
                 p_doctyp like  RF05A-BUSCS,
                 p_invdat like  INVFO-BLDAT,
                 p_posdat like  INVFO-BUDAT.
    CONSTANTS  :  C_TRANS_FB60(4) VALUE 'FB60'.
    *Parameter string for runtime of CALL TRANSACTION
    data : l_option type ctu_params,
           l_subrc type sysubrc.
    DATA :  l_mstring(150).
    data      accnt type char17.
    data       : day   type char2,
                 month type char2,
                 year  type char4,
                 date1 type char10,
                 date2 type char10.
    data      :  cnt(2) TYPE n,
                 cnt1 type i,
                 fld(25) TYPE c.
    data : begin of excel occurs 0,
            fieldname(255) type c,
           end of excel.
    DATA:BEGIN OF it_mess OCCURS 0,
             msgtyp(5),
             lms(200),
              msgv1(50),
         END OF it_mess.
    data: begin of t_record occurs 0,
             BUKRS(004),
            ACCNT(017),
            XBLNR(016),
            WRBTR1(016),
            WAERS(005),
            SECCO(004) ,
            SGTXT(050),
            HKONT(010),
            WRBTR2(017),
            MWSKZ(002),
            GSBER(004),
            KOSTL(010),
         end of t_record.
    *Internal Table for Header Data
    DATA :  BEGIN OF t_head OCCURS 0,
            BUKRS(004),      "Company Code
            ACCNT(017),      "Account or Vendor
            XBLNR(016),      "Reference
            WRBTR1(017),     "Amount in document currency
            WAERS(005),      "Currency
            SECCO(004),      "Section Code
            SGTXT(050),      "Text
            END OF t_head.
    *Internal table for Item Data
    DATA :  BEGIN OF t_item OCCURS 0,
            ACCNT(017),      "Account
            HKONT(010),     "GL Account
            WRBTR2(017),    "Line item Amount in document currency
            MWSKZ(002),     "Tax Code
            GSBER(004),     " Business Area
            KOSTL(010),     "Cost centre
            END OF t_item.
    DATA: IT_BDCDATA      LIKE  BDCDATA OCCURS 0 WITH HEADER LINE,
          IT_BDC_MESSAGES LIKE  BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    *include bdcrecx1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      PERFORM  file_selection.
      PERFORM  data_upload.
      PERFORM  table_control.
    start-of-selection.
    l_option-defsize = 'X'.
    l_option-dismode = 'A'.
    l_option-updmode = 'S'.
    day = p_invdat+6(2).
    month = p_invdat+4(2).
    year =  p_invdat+0(4).
    concatenate day month year into date1 SEPARATED BY '.'.
    day = p_posdat+6(2).
    month = p_posdat+4(2).
    year =  p_posdat+0(4).
    concatenate day month year into date2 SEPARATED BY '.'.
    *perform open_group.
    loop at t_head.
    CLEAR    IT_BDCDATA.
    REFRESH  IT_BDCDATA.
    perform bdc_dynpro      using   'SAPLACHD'         '1000'.
    perform bdc_field       using   'BDC_OKCODE'        '=ENTR'.
    perform bdc_field       using   'BKPF-BUKRS'        t_head-bukrs.
    perform bdc_dynpro      using   'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    perform bdc_field       using   'RF05A-BUSCS'       p_doctyp.
    perform bdc_field       using   'INVFO-ACCNT'       t_head-accnt.
    perform bdc_field       using   'INVFO-BLDAT'       date1.
    perform bdc_field       using   'INVFO-BUDAT'       date2.
    perform bdc_field       using   'INVFO-XBLNR'       t_head-xblnr.
    perform bdc_field       using   'INVFO-WRBTR'       t_head-wrbtr1.
    perform bdc_field       using   'INVFO-WAERS'       t_head-waers.
    perform bdc_field       using   'INVFO-SECCO'       t_head-secco.
    perform bdc_field       using   'INVFO-SGTXT'       t_head-sgtxt.
    cnt = 1.
    cnt1 = 1.
    loop at t_item where accnt = t_head-accnt.
    *if cnt > 4.
    *cnt = 4.
    *endif.
    if cnt1 gt 1.
    CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    perform bdc_field      using   fld                   'X'.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    endif.
    perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    perform bdc_field       using   'BDC_OKCODE'        '/00'.
    CONCATENATE 'ACGL_ITEM-HKONT(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-hkont.
    CONCATENATE 'ACGL_ITEM-WRBTR(' cnt ')' INTO fld.
    perform bdc_field  using       fld                t_item-wrbtr2.
    CONCATENATE 'ACGL_ITEM-MWSKZ(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-mwskz.
    CONCATENATE 'ACGL_ITEM-GSBER(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-gsber.
    CONCATENATE 'ACGL_ITEM-KOSTL(' cnt ')' INTO fld.
    perform bdc_field       using  fld                t_item-kostl.
    perform bdc_field      using  'BDC_CURSOR'  fld.
    *CONCATENATE 'ACGL_ITEM-MARKSP(' cnt ')' INTO fld.
    *perform bdc_field      using   fld                   'X'.
    cnt1 = cnt1 + 1.
    *cnt = cnt + 1.
    *if cnt > 1.
    *perform bdc_dynpro      using 'SAPMF05A'          '1100'.
    *perform bdc_field       using 'BDC_OKCODE'        '=0005'.
    **perform bdc_field       using 'BDC_OKCODE'        '=0006'.
    *endif.
    endloop.
    perform bdc_dynpro      using 'SAPMF05A' '1100'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BS'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    *perform bdc_transaction using 'FB60'.
    CALL TRANSACTION C_TRANS_FB60 USING IT_BDCDATA  options from l_option
                                 MESSAGES INTO IT_BDC_MESSAGES.
    perform error.
    perform errordownload.
    endloop.
    *perform close_group.
    *Form  data_upload
    FORM data_upload .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME              =  p_file1
       FILETYPE              = 'DAT'
      TABLES
        DATA_TAB             =  t_record.
    ENDFORM.                    " data_upload
    *Form  file_selection
    FORM file_selection .
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  =  syst-cprog
          dynpro_number =  syst-dynnr
          field_name    = 'p_file1'
        IMPORTING
          file_name     =  p_file1.
    ENDFORM.                    " file_selection
    Form  BDC_DYNPRO
    FORM BDC_DYNPRO using program dynpro.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND  IT_BDCDATA.
    endform.
    *Form  BDC_FIELD
    FORM  bdc_field using fnam fval.
      CLEAR  IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND  IT_BDCDATA.
    ENDFORM.
    Table Control
    FORM table_control .
      LOOP AT t_record.
        ON CHANGE OF t_record-accnt.
          MOVE-CORRESPONDING t_record TO t_head.
          APPEND t_head.
        ENDON.
      loop at t_head.
             t_item-accnt   =  t_head-accnt.
             t_item-hkont   =  t_record-hkont.
             t_item-wrbtr2  =  t_record-wrbtr2 .
             t_item-mwskz   =  t_record-mwskz .
             t_item-gsber   =  t_record-gsber .
             t_item-kostl   =  t_record-kostl.
        APPEND t_item.
    endloop.
         If t_record-level = 'H'.
             t_head-bukrs   =  t_record-text1.
             t_head-accnt   =  t_record-text2.
             t_head-xblnr   =  t_record-text3.
             t_head-wrbtr1  =  t_record-text4.
             t_head-waers   =  t_record-text5.
             t_head-secco   =  t_record-text6.
             t_head-sgtxt   =  t_record-text7.
          APPEND t_head.
         else.
            t_item-accnt   =  t_head-accnt.
            t_item-hkont   =  t_record-text1.
            t_item-wrbtr2  =  t_record-text2.
            t_item-mwskz   =  t_record-text3.
            t_item-gsber   =  t_record-text4.
            t_item-kostl   =  t_record-text5.
         APPEND t_item.
         endif.
      ENDLOOP.
    ENDFORM.
    FORM error .
      LOOP AT IT_BDC_MESSAGES.
        IF IT_BDC_MESSAGES-msgtyp = 'E'.
       SELECT single  * FROM t100  WHERE
                                    sprsl = it_BDC_MESSAGES-msgspra
                                    AND   arbgb = IT_BDC_MESSAGES-msgid
                                    AND   msgnr = IT_BDC_MESSAGES-msgnr.
          IF sy-subrc = 0.
            l_mstring = t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&2' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&3' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&4' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv1 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv2 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv3 INTO l_mstring.
              REPLACE '&' WITH IT_BDC_MESSAGES-msgv4 INTO l_mstring.
            ENDIF.
            CONDENSE l_mstring.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ELSE.
            it_mess-msgtyp = IT_BDC_MESSAGES-msgtyp.
            it_mess-lms = l_mstring.
            it_mess-msgv1 = IT_BDC_MESSAGES-msgv1.
            APPEND it_mess.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    form errordownload.
    *down the internal table to excel file.
    call function 'EXCEL_OLE_STANDARD_DAT'
               EXPORTING
                    file_name                 = 'c:/Error.xls'
               TABLES
                    data_tab                  = it_mess
                    fieldnames                = excel
               EXCEPTIONS
                    file_not_exist            = 1
                    filename_expected         = 2
                    communication_error       = 3
                    ole_object_method_error   = 4
                    ole_object_property_error = 5
                    invalid_filename          = 6
                    invalid_pivot_fields      = 7
                    download_problem          = 8
                    others                    = 9.
    endform.
    Reward if useful
    Regards,
    Narasimha
    Edited by: narasimha marella on May 13, 2008 12:12 PM

  • Screen resolution problem in table control

    when i was transfering data in BDC using table control,i got screen resolution problem.
    how to rectify the problem?

    Hi,
    Check this coding.
    WA_CTU_PARAMS type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronous update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM WA_CTU_PARAMS
    MESSAGES INTO it_mesg.
    Default size will play good role in terms of resolution. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resolution. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • BDC: Table Control Screen Resolution

    Hi Abapers,
    1.In BDC while handling table control , how to handle screen resolution , that means in some systems i can see 5 item entries , in some systems i can see 10 item entries how to handle this , can u  send the Code relating this.
    With Regards
    Bhaskar Rao.M

    hi
    The numeber of lines of table control for BDC depend on screen resolution, but It can't be managed by program.
    So the better solution is to create a bdc doesn't depend on resolution.
    It can do that using always the first two lines of table control.
    When you start the simulation, first record has to be placed in first line of tc and the second in second one.
    Before placing the third record, it needs to place the second record to the top and so the third record can be placed in the second line.
    Before placing the next record, it needs to place the third record to the top and so the fourth record can be placed in the second line and so.
    In this way your BDC'll use alwways the first two lines of tc and your program won't depend on resolution.
    The problem is the transaction you need to simulate by BDC has to have a scroll functionality to allow to place the last record was elaborated to the top of tc, so the second line of tc can always be used to place the new record.
    If there isn't this functionality, it's better to use a BAPI instead of BDC.
    check these two
    BDC - standard screen resolution required?
    https://forums.sdn.sap.com/click.jspa?searchID=739193&messageID=823953
    reward points if found helpful

  • Is Table Control's default size is 13 always in all resolutions?

    Hi Experts,
    Pls. let me clarify that, " Is Table Control is always possess the DEFAULT # of records as 13? Is it SAP's  standard feature? or Is it purely depends on the machine (windows) resolution? Particularly, am interested in BDC scenarios?
    Is any body is hving the SAP Documentation, about the above specific issue?
    thanq.
    Message was edited by:
            Srikhar

    If you use below code for your VA42 ,then table controls number columns will not vary from pc to pc :
    data: f_option type ctu_params,
    f_option-updmode = 'S'.
    f_option-defsize = 'X'.
    f_option-dismode = 'N'.
    call transaction 'VA42' using bdcdata options from f_option messages into bdcerror.
    I know your requirement ,screen resolution will not solve your problem
    Check the below link :
    http://web.mit.edu/sapr3/dev/newdevstand.html
    http://web.mit.edu/ist/org/admincomputing/dev/abapstds/current/devstand8.html
    Thanks
    Seshu

  • Screen Resolution Table Control

    Dear All,
    I have some questions in Module pool and BDC.
    1. how to handle Table Control in module pool programming as it's displaying lines in a table control differs from one system to other.
    2. How to handle the same situation while uploading the data in table control in BDC.
    Kindly let me know.
    Many Thanks,
    Ranjan

    Hi,
    It's opening for me.It is available in SDN download Technical Samples ABAP library.
    Here is the code.
    In the flow logic of the screen 9000, write the following code.
    PROCESS BEFORE OUTPUT.
      MODULE set_status.
      MODULE get_t_ctrl_lines.
      LOOP AT i_makt WITH CONTROL t_ctrl CURSOR t_ctrl-current_line.
    * Dynamic screen modifications
        MODULE set_screen_fields.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT i_makt.
        FIELD i_makt-pick MODULE check.
        FIELD i_makt-zmatnr MODULE zmatnr .
      ENDLOOP.
      MODULE user_command_9000.
    In the program, write the following code.
    PROGRAM SAPMZTC MESSAGE-ID zz.
    * Tables Declaration
    TABLES: zzz_makt.
    * Internal table Declaration
    DATA : i_makt TYPE STANDARD TABLE OF zzz_makt WITH HEADER LINE.
    * Table control Declaration
    CONTROLS: t_ctrl TYPE TABLEVIEW USING SCREEN '9000'.
    * Variable Declaration
    DATA : flg,           "Flag to set the change mode
           ln TYPE i.     "No. of records
    *&      Module  get_T_CTRL_lines  OUTPUT
    *  Populating data
    MODULE get_t_ctrl_lines OUTPUT.
      SELECT zmatnr zmaktx
             INTO CORRESPONDING FIELDS OF TABLE i_makt
             FROM zzz_makt.
      DESCRIBE TABLE i_makt LINES ln.
    * To make the vertical scroll bar to come on runtime
      t_ctrl-lines = ln + 100.
    ENDMODULE.                 " get_T_CTRL_lines  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    * Triggering event according to the user command
    MODULE user_command_9000 INPUT.
      DATA :lv_fcode LIKE sy-ucomm,    "Function Code
            lv_answer(1) type c.       "Storing the answer
      lv_fcode = sy-ucomm.
      CASE lv_fcode.
        WHEN 'CHANGE'.
    * Setting the flag to make the table control in editable mode[excluding
    * primary key].
          flg = 'Y'.
        WHEN 'DELETE'.
    * Setting the flag to make the table control in editable mode after
    * deleting the selected line
          flg = 'Y'.
    * Confirmation of delete
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
             TITLEBAR       = 'Confirm'
             text_question  = 'Are you sure to delete from database?'
             TEXT_BUTTON_1  = 'Yes'(001)
             TEXT_BUTTON_2  = 'No'(002)
            IMPORTING
             ANSWER         =  lv_answer.
          if lv_answer eq '1'.
    * Updating the database table from the internal table
            UPDATE zzz_makt FROM TABLE i_makt.
    * Deleting the selected row from the internal table
            DELETE i_makt WHERE pick = 'X'.
    * Deleting the selected row from the database table
            DELETE FROM zzz_makt WHERE pick = 'X'.
            MESSAGE s005 WITH 'Deleted Successfully'.
          ENDIF.
        WHEN 'SAVE'.
    * Inserting new record or updating existing record in database table
    * from the internal table
          MODIFY zzz_makt FROM TABLE i_makt.
          MESSAGE s005 WITH 'Saved Successfully'.
        WHEN 'BACK'.
          SET SCREEN '0'.
        WHEN 'EXIT' OR 'CANCEL'.
    * Leaving the program
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  set_screen_fields  OUTPUT
    * Setting the screen fields
    MODULE set_screen_fields OUTPUT.
      LOOP AT SCREEN.
        IF flg IS INITIAL.
          screen-input = 0.
        ELSEIF ( flg EQ 'Y' ).
          IF ( ( screen-name = 'I_MAKT-ZMAKTX'
                 OR screen-name = 'I_MAKT-CHECK1' )
                AND t_ctrl-current_line LE ln ) .
    * Making the screen fields as editable
            screen-input = 1.
          ELSEIF ( ( screen-name = 'I_MAKT-ZMATNR' )
                     AND t_ctrl-current_line LE ln ).
    * Making the screen field as uneditable
            screen-input = 0.
          ENDIF.
        ENDIF.
    * Modifying the screen after making changes
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.                 " set_screen_fields  OUTPUT
    *&      Module  zmatnr  INPUT
    * Appending records to the internal table
    MODULE zmatnr INPUT.
      MODIFY i_makt INDEX t_ctrl-current_line.
      IF t_ctrl-current_line GT ln.
        READ TABLE i_makt WITH KEY zmatnr = i_makt-zmatnr.
        IF sy-subrc NE 0.
    * Inserting record if it does not exist in database
          APPEND i_makt.
        ELSE.
         MESSAGE i005 WITH 'Material Number' i_makt-zmatnr 'already exists'.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " zmatnr  INPUT
    *&      Module  set_status  OUTPUT
    * Setting the GUI status
    MODULE set_status OUTPUT.
      SET PF-STATUS 'ZSTATUS'.
      SET TITLEBAR  'ZTITLE'.
    ENDMODULE.                 " set_status  OUTPUT
    *&      Module  CHECK  INPUT
    * Modify the internal table using the current line in table control
    MODULE check INPUT.
      MODIFY i_makt INDEX t_ctrl-current_line.
    ENDMODULE.                 " CHECK  INPUT

  • How to get the Number of lines displayed in  table control in bdc

    Hi,
    when we write a  bdc for a standard transaction, if we encounter a table control, we fill the values for each record like field(01), and the second record field(02) .......and so on..
    if only 3 records are displayed in the screen and if we have 5 records to be filled in the table control, how to write the logic for that?
    how to track of how many lines are getting displayed in the table control .. again it depends on the screen resolution i think..
    useful answers will be rewarded
    shekhar

    Hi,
    Here is the solution code for this :-
    data for controlling paging on screen 0102 
    DATA: W_MAXLINES(2) TYPE N, 
    W_NEXT_LINE(3) TYPE N, 
    W_PAGE(1), "y = page forward, n otherwise 
    W_SCRLEN(2) TYPE I, 
    W_SCRLINE(2) TYPE I. 
    DATA: BEGIN OF W_HDR. 
    INCLUDE STRUCTURE D020S. 
    DATA: END OF W_HDR. 
    DATA: BEGIN OF W_FLD OCCURS 100. 
    INCLUDE STRUCTURE D021S. 
    DATA: END OF W_FLD. 
    DATA: BEGIN OF W_LOG OCCURS 20. 
    INCLUDE STRUCTURE D022S. 
    DATA: END OF W_LOG. 
    DATA: BEGIN OF W_MC OCCURS 20. 
    INCLUDE STRUCTURE D023S. 
    DATA: END OF W_MC. 
    DATA: BEGIN OF W_DYNPRONAME, 
    PROGRAM(8) VALUE 'SAPMM60X', 
    DYNPRO(4) VALUE '0102', 
    END OF W_DYNPRONAME. 
    FORM GET_MAX_LINES. 
    set w_maxlines to the number of var-loop occurrences on the screen so 
    that we know when to page forward on screen 0102 
    also initialise w_next_line to zero for GET_NEXT_LINE 
    this subroutine caters for all cases - including screens without loops 
    CLEAR: W_MAXLINES, 
    W_NEXT_LINE. 
    IMPORT DYNPRO W_HDR 
    W_FLD 
    W_LOG 
    W_MC 
    ID W_DYNPRONAME. 
    LOOP AT W_FLD WHERE LTYP EQ 'L'. 
    MOVE W_FLD-LINE TO W_SCRLINE. "first var-loop line 
    MOVE W_FLD-LBLK TO W_SCRLEN. "depth of loop block 
    EXIT. 
    ENDLOOP. 
    IF SY-SUBRC EQ 0 
    AND W_SCRLEN NE 0. 
    sy-srows = total no of lines on screen 
    w_scrline = actual first line of loop so that 
    w_scrline - 1 = number of heading lines (before loop) 
    4 = no of lines at top of screen - command line, pushbuttons, 2 ulines 
    3 = no of lines after loop - uline & Page count 
    w_scrlen = no of lines in loop block 
    w_maxlines = sy-srows - ( wscrline - 1 ) - 4 - 3 
    and then 1 less but not sure why! 
    W_MAXLINES = SY-SROWS - W_SCRLINE - 1 - 4 - 3. 
    W_MAXLINES = W_MAXLINES - 1.
    W_MAXLINES = W_MAXLINES DIV W_SCRLEN. 
    ELSE. 
    MOVE 99 TO W_MAXLINES. "this required if no screen loop 
    ENDIF. 
    ENDFORM. 
    FORM GET_NEXT_LINE. 
    set w_page if page forward is required 
    W_NEXT_LINE = W_NEXT_LINE + 1. 
    IF W_NEXT_LINE GT W_MAXLINES. 
    W_NEXT_LINE = 1. 
    W_PAGE = 'Y'. 
    ELSE. 
    W_PAGE = 'N'. 
    ENDIF. 
    ENDFORM. 
    Hope it helps.
    reward if helpful.
    Regards,
    Sipra

  • How do I identify OK Code in table control in BDC (scroll up/down)?

    Hi. I have read a lot of very good posts and articles here in the forums about how to work with table controls when writing a BDC program. Unfortunately I haven't found any that address the specific issue that I'm having.
    I'm writing a program to update the line items of a Parked Document using transaction FBV2. I want to be able to insert a row at the end of the previously existing rows regardless of how many there are and I can't seem to figure out the correct OK Codes to scroll up or down, or page up or down within the table control so I can guarantee that I will get to the next available row.
    For example. I have a Parked Document with 13 line items. I would like to insert the new line item as row 14. I know that 10 rows will be displayed at run time on this screen according to my settings in the BDC call and want to scroll down 1 time and then enter the new data on the 4th line on the new set of rows.
    Does anyone have any experience with this, or can someone point me in the right direction where I might find this information?
    Thanks in advance,
    Andy

    Hi
    In my system I can't run that trx, anyway there's any ok-code for the scrolling, you can have only the okcode for the page up/down buttons.
    So you should try to understand how many rows a page can have, so if a page have 10 rows per page and you need to change the row 22, it means you have to simulate to press the page down twice and change the second row of third page.
    If you run your BDC by CALL TRANSACTION u should use the option OPTIONS FROM opt, here you indicate to use the standard size of the dynpro. In this way the size of table control is not screen resolution dependent.
    TABLES CTU_PARAMS.
    CTU_PARAMS-DEFSIZE = 'X'.
    CALL TRANSACTION 'FBV1'  USING ITAB
                                                OPTIONS FROM CTU_PARAMS.
    Max

  • How to handle Table control in BDC

    How to handle Table control in BDC

    HI,
    Table Control in BDC
    HI,
    Refer the link:
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    The concept is easy: it has to indicate the index of the table control in the field name, so if you have to populate the first record of table control:
    BDC-FIELDNAME = <FIELDNAME>(01).
    If you fill the second row:
    BDC-FIELDNAME = <FIELDNAME>(02).
    and so....
    Now the problem is usually on how many records you have to load, because u can fill only the rows of table control available in the screen, If you have more records than it can be displayed yuo have to simulate the command to go next page.
    The number of recod can be displayed can depend on pc resolution and many program haven't command to go to next page (in this case it could be impossible create a BDC program9.
    A way to create a bdc program resolution indipendent is to work on the first and second row.
    - Place the first hit in the first row of bdc;
    - Place the second insert in the second row of bdc;
    - Place the last hit to the top of table control;
    - Place the next hit in the second row;
    - Place the last hit to the top of table control;
    - Place the next hit in the second row;
    - .... and so
    For more info: Search in SDN with TABLE CONTROL IN BDC.
    Will get a lot of related links.
    <b>Reward points if this Helps.
    Manish</b>

  • Regarding table control in BDC

    Hi,
    How can we handle table control in BDC,If i have the transaction like
    1>having scroll bar
    2>having InsertButton for the tablle control
    3>Even though if we have scroll bar or Insert button(+) , is there any limit for the number of rows in table control
    or can we insert as many records as we want?
       If there is limit how can we identify ,what is the limit of table control.
    4>How can we know for table control ,how many records are inserted for each scroll down or Insert button.
       i think it varies accroding to the resolution.How can we handle this
    Thanks

    Hi Rama Krishna,
    While recording the scroll bar will not be recorded.
    There is no limit for the number of records,depends on configuration
    say suppose the visible lines are 16 then after pressing the new-page then again 16 lines will be available which includes one of the previous lines.
    the logic can be as
    loop at it_tab.(say 100 records are there)
    steps to be executed for table control.
    I hope u know hw to capture the line no into v_no.
    if v_no = 16.(visible lines)
    step for new-page.
    endif,
    endloop.
    Example :
       IF V_COUNT = '13'.                                   "Counter reached visible lines
                PERFORM BDC_FIELD       USING 'BDC_OKCODE'           " For New Document Number
                                               '=FDPE'.
                V_COUNT = 1.
    Hope this will be helpful.

  • Table Controll

    Hi, Experts,
    I am working on table control and have good idea on it. but there is one problem. I need help from you.
    how can I check no. of visible lines in table control. It varries as per resolution of screen.
    suppose I have given 12 lines on screen for resolution 800X600, it increases  when resolution change as 1024X768.
    Please help me.
    With warm regards
    Rajiv singh.

    Hi,
    Check the below link.
    http://www.sapfans.com/sapfans/repos/comelite.htm
    Regards,
    Maha

  • 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

  • Handling Table controls in BDC

    Hi Team,
                   While handling Table controls in BDC(Call transaction), how do u ensure your code works Globally.
    As screen Resolution may vary from system to system and
    While building the logic we cannot fix the number of rows
    is 14 or XXX.
    After certain number of rows the logic should be done in such a way it should be  scrolled down.
    Please let me know Regarding this.
    Thanks.
    BestRegards,
    S.Anilkumar

    HI Anil,
    You can use "CTU_PARAMS-DEFSIZE = 'X'" for fixing the screen resolution
    You shuld use OK_CODE for scrolling is "P+".
    if you need scroll after some records just use SY-TABIX .

Maybe you are looking for

  • STO - outbound delivery partially do PGI in warehouse

    Based on the STO, we are creating outbound delivery,  most of the outbound delivery has nearly more than  200 line items, out of 200,  nearly 120 line items TO created and  confirmed, now the user wants to save PGI for only  confirmed 120 line item,

  • User exit idoc_output_invoic

    Hi all! Im using the fm IDOC_OUTUT_INVOIC to create idocs. I need the user exit when the idoc is already created. I have found ZXEDFU02 but its called for every insertion of a segment. I need the user exit final. Thank you in advance!

  • ESS FI-TV workflow

    Hi all, I'm using the Business Package for Employee Self-Service (mySAP ERP) 1.0 on Enterprise Portal. I can´t find a way to activate FI-TV workflows. Can anyone help me? Best regards, Luis Cruz

  • Help:  How to get rid of the default None from Radio buttons?

    Hi, I searched the forum and found a work around for inputSelect. It seemed it does not work for Radio buttons, i.e., inputSelectGroup with multiple=false. Please anyone help us to get rid of the none choice for gender among female and male. Thank yo

  • Why can't I access my personal Yahoo mail? It says "Bad Request"

    I have been using Camino 1.6.11 on my Mac G4 for several years, but now GMail is asking me to upgrade to Mozilla. Since I only have an OS 10.3.9, I could only download Firefox 2.0. Now I cannot access my Yahoo mail. This laptop is so old it is not wo