Coloring in Table control

Hi All,
I have a requirement to show alternate rows of table control with alternate colors.
Please help on this.
Thanks in advance.
Suri

hi suresh,
Welcome to SDN forum
check these links
Re: Cell color
Smartforms: Background Color in tables
ALV : color one cell
Reward with points if it is helpful
Cheers
Alfred

Similar Messages

  • How can i change the color of table control'  lines?

    Such as the subject. Thanks in advance!

    Hi,
    Please check,
    TABLE CONTROL LINES COLOR CHANGE
    color rows in table control
    Regards,
    Hema.
    Reward points if it is useful.

  • How to set colors to table control?

    Hi all,
    can we set colors to tables columns and rows?? How can we acieve this? Any help please
    Thanks,
    Madhan.

    Hi All
    thanks for your replies..
    data tab type IF_main_view=>Elements_segment.
      data line type IF_main_view=>Element_segment.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      data wd_standard_cell type ref to cl_wd_table_standard_cell.
      data component like line of cl_abap_structdescr=>components.
      data wd_table_column type ref to cl_wd_table_column.
      node_info = lo_nd_segment->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
    if component-name = 'SEGMENT'.
      wd_standard_cell->set_cell_design( CL_WD_ABSTR_MASTER_TABLE_COL=>E_CELL_DESIGN-BADVALUE_MEDIUM ).
    endif.
    i am trying to set color for  some colomns, but i am not getting any colors??? anything wrong in this.. please help
    thanks,
    Madhan.

  • Display data in bold and red in color in side a table control cell

    Hi,
    I need to display data in side a Table Control cell with Bold and Red in color, can any body help me how to do it.
    Regards,
    Srinivas

    The gui does not support the coloring in table controls.  You can set the hightlight attribute, but this will only make the text blue in color. There is no way to make it any other color.
    Regards,
    Rich Heilman

  • Can Table Control alternate on line color?

    Is it possible to change line color on Table Control?  I would like the lines on the Table Control to alternate in color as to make it easier to read the data.  I tried using screen-intensifed but that changes the color on a column, I need to make every other row stand out.
    Thanks
    Edited by: Gary Morman on Mar 11, 2010 9:17 PM

    ALV Grid is editable if using the CL_GUI_ALV_GRID class.  See programs which start with BCALV_EDIT*
    Regards,
    Rich Heilman

  • How to get color in the final row of table view( table control)

    Hi,
    iam having a table control displayed with 10 records as output,in that i need to provide a color for the final row since it is total inorder to show difference from other records.
    Kindly advise me on this.
    Thanks & Regards,
    Nehru.

    Hi Nehru,
    Checkout [THIS|Re: set color for a particular row in table view] thread .
    [This |http://www.sapdesignguild.org/resources/htmlb_guidance/table.html#at] Might also help you.
    Regards,
    Anubhav
    Edited by: Anubhav Jain on Jan 4, 2009 7:34 AM

  • How to color the records in table control.

    Hi,
    I have created a table control in which i want to add colors to it.
    It is possible in reporting,but is it possible in table control.

    You can do it,
    Just follow the code,...
    In PBO...
    PROCESS BEFORE OUTPUT.
    MODULE STATUS.
    LOOP WITH CONTROL TABCTRL.
    MODULE MODIFY_100.
    ENDLOOP.
    MODULE MODIFY_100 OUTPUT.
    DATA wa_tabctrl TYPE cxtab_column .
    LOOP AT TABCTRL-COLS INTO WA_TABCTRL.
          IF WA_TABCTRL-INDEX =  '1'.       "1- Your Respective Field Column's index
            WA_TABCTRL-SCREEN-COLOR = '2'. "Give your colour
            MODIFY TABCTRL-COLS FROM WA_TABCTRL.
          ENDIF.
    ENDLOOP.
    ENDMODULE.

  • Color rows in table control

    Hi all,
    Does anyone know how I can color spesific lines in a table
    control?
    I've only been able to color columns.
    Thanx,
    Baruch.

    Hi
    Are you speaking about classical TABLE CONTROL? No ALV?
    In this case you should modify the attribute using the LOOP/ENDLOOP statament into LOOP/ENDLOOP of TC in PBO:
    PROCESS PBO.
    LOOP AT ...
       MODULE LOOP_SCREEN.
    ENDLOOP.
    PROCESS PAI.
    MODULE LOOP_SCREEN.
      IF ......
        LOOP AT SCREEN.
          SCREEN-INTENSIFIED = 1.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
    If you're speaking about ALV:
    In your OUTPUT TABLE you need add a new field to manage the color:
    DATA: BEGIN OT T_OUTPUT OCCURS 0,
            TCOLOR TYPE SLIS_T_SPECIALCOL_ALV,
          END   OF T_OUTPUT.
    It needs to specify the field name in layout structure:
    IS_LAYOUT-coltab_fieldname = 'TCOLOR'.
    So while you're appending the record into T_OUTPUT you fill the structure TCOLOR too.
    These is a table where you need all fields (so the cells of a row) you want to change the color.
    DATA: WA_COLOR TYPE SLIS_SPECIALCOL_ALV.
    T_OUPUT-FIELD = ...........
    REFRESH T_OUTPUT-TCOLOR.
    WA_COLOR-FIELDNAME = <field name>
    WA_COLOR-COLOR-COL = <color number>.
    APPEND WA_COLOR TO T_OUTPUT-TCOLOR.
    This way is ok for classical ALV, if you're using OO ALV the way is the same but change the structure you have to use:
    IS_LAYOUT-CTAB_FNAME = 'TCOLOR'.
    Where TCOLOR is like LVC_T_SCOL
    Max

  • Custom Color  required to table control in Standard transaction

    Hi Expers,
    I required to populate a table control row with custom color/s.  The table control is belongs to SAP Standard transaction MF50.
    Can you please suggest.
    Thanks,
    Prasad

    Hello Madhu,
    As indicated by u have have asked for the access key and have added a field. Where have u added this field. Secondly in which table are u going to update this material field once it starts getting displayed. Also have u put in code in ur PBO and PAI for the same. Please respond to the questions so that we can provide u with better option.

  • Table control data in color

    Hi Experts,
       My table control having 3 materils as below .
    MATNR      MTART    WERKS
    222             AA         1000
    333             BB          1108
    444             CC          1200
    Client requirement is to display material-333 in red font color, is it possible in table control?.
    Thanks in advance
    mahe

    Hi,
    in PBO
    " Go to Screen Painter attributes and set BRIGHT attribute but I am not sure this would give you BLUE color
    module status_100.
    loop at itab with control tc.
    endloop
    in Program
    module status_100.
    loop at screen.
    if screen-name = 'ITAB-MATNR'.
    SCREEN-COLOR = 1. " In Screen Table Control you only get Red Color not any other to the best of my knowledge
    MODIFY SCREEN.
    ENDIF.
    endloop
    endmodule
    Cheerz

  • TABLE CONTROL LINES COLOR CHANGE

    <i>Hi Friens.,
    I need small help ie.,
    Let us assume we have table control like this.,
    col1 |  col2  |  group |
    a1   |   b1   |  1
    a2   |   b2   |  1
    a3   |   b3   |  2
    a4   |   b4   |  2
    a5   |   b5   |  3
    a6   |   b6   |  3
    1) User need differentiation between groups to look and feel.,thats why I want to change the Line colors based on Group.,
    2) I am getting this one .,but I made case on Sy-stepl.,  while scrolling it is not showing correct .,
    3) Is there any good way to do this., like in ME21   CONDITIONS TAB at Item level</i>
    If any body have Idea., share with me.,
    <b>Thanks.,</b>
    <i><b>Surendher Reddy.Baddam</b></i>

    Re: TABLE CONTROL LINES COLOR CHANGE
    Posted: Nov 5, 2004 6:47 AM        Reply      E-mail this post 
    PBO >>>like thise.,
    LOOP AT itab WITH CONTROL tc4_400 CURSOR tc4_400-current_line.
    MODULE check_rej_hld_400.
    MODULE radio_checkbox_400.
    ENDLOOP.
    >>>
    MODULE radio_checkbox_400.
    DATA : l_stf TYPE i.
    DATA : l_hyd TYPE i,l_knr TYPE i.
    l_hyd = 1.
    LOOP AT SCREEN.
    IF screen-name = 'ITAB-BATCHNO'.
    IF itab-group = l_hyd. " this is group
    screen-intensified = 1.
    MODIFY SCREEN.
    ELSEIF
    screen-intensified = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ADD 2 TO l_hyd
    ENDMODULE.
    I made logic like this.,
    Thanks.,
    Surendher Reddy.Baddam

  • How can i Change Text Color in table

    How can i change the text color i table, the true becoming GREEN, and the text in Fals becoming RED.
    Someone can help me to resolve this problem with a sample, because when i run the program all text becoming green in (TRUE) and than when i chang it to the (fals) all becoming Red.
    Attachments:
    Color.vi ‏38 KB

    Modifying the properties of a control in a subVI do not modify the properties of a different control in the main VI. The data is the only thing passed back from the subVI. To modify the properties of the table in the main, you need to pass a reference to it to the subVI and modify it's properties. I've attached a modified llb that does what you want.
    Attachments:
    Main_color_Table_mod.llb ‏41 KB

  • Problem in the BDC Table Control for the T.Code VA01

    Hi,
      I faced probelm in the BDC of the VA01. In the Table Control
    the records are entered upto 12 line items. after 13th line item overwrites the first record. How to solve the Problem.
    Please help me.

    or use this
    Internal table definition *
    data : begin of bdcdata occurs 0.
            include structure bdcdata.
    data : end of bdcdata.
    data: begin of messtab occurs 0.
            include structure bdcmsgcoll.
    data: end of messtab.
    data: v_chr_opengrp type c,
          r_matnr like mara-matnr,                       "variable for material conversion
          r_werks like marc-werks,                       "variable for plant
          v_str_fname   type string.
    data: begin of count2,
          inrec(9) type n,                               " input I_MATERIAL count
          create(9) type n,                              " create count
          error(9) type n,                               " error count
          bdc(9) type n,                                 " count of BDC creates
          end of count2.
    types: begin of ty_source,
    partn_numb(10) type n ,"Customer Number 1
    ref(035),
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    material like vbap-matnr,
    reqqty(018),
    reqdate(010),
    end of ty_source,
    begin of ty_header ,
    partn_numb(10) ,"Customer Number 1
    ref(035),
    sales_org(4) , "Sales Organization
    distr_chan(2) , "Distribution Channel
    division(002), "DIVISION
    doc_type(4) , "Sales Document Type
    purch_no(020), "Purchase order
    end of ty_header,
    begin of ty_item,
    partn_numb(10) ,"Customer Number 1
    ref(035),
    material like vbap-matnr,
    reqqty(018),
    reqdate(010),
    end of ty_item.
    data : msg(240) type c, " Return Message
    e_rec(8) type c, " Error Records Counter
    rec_no(8) type c, " Records Number Indicator
    s_rec(8) type c, " Successful Records Counter
    t_rec(8) type c, " Total Records Counter
    v_matnr like mara-matnr.
    data: val(2) type n value 01.
    data : begin of bdc_itab occurs 0.
            include structure bdcdata.
    data : end of bdc_itab.
    data : t_source type standard table of ty_source   with header line,
    t_header type standard table of ty_header initial size 1,
    t_item type standard table of ty_item initial size 1,
    t_target type standard table of bdcdata initial size 1.
    data : w_source type ty_source,
    w_source1 type ty_source,
    w_header type ty_header,
    w_item type ty_item,
    w_target type bdcdata,
    count type i,
    count1 type n.
    Variable Declaration
    data: w_fname type string,
    fnam(20),
    date1(10),
    i(2) type n,
    v_count type i,
    v_group type apqi-groupid.
    *& selection screen
    selection-screen :begin of block bl1 with frame title  text-001.
    parameters : p_fname type rlgrap-filename,                         "Input file
                 p_update(1) default 'N',                              "Input for update mode
                 p_bdcgrp(12) default 'SD_ORDERS'.                     "Input for session name
    selection-screen end of block bl1.
    **&SELECTION SCREEN VALIDATIONS
    at selection-screen on value-request for p_fname.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          program_name  = 'ZMATERIAL'
          dynpro_number = '1000'
          field_name    = 'P_FNAME'
        changing
          file_name     = p_fname.
    *& Start of selection
    start-of-selection.
      if  p_fname is initial.
        message i016(rp) with 'Please enter a file name'.
        leave list-processing.
      else.
        move p_fname to  v_str_fname.
      endif.
      call function 'GUI_UPLOAD'
        exporting
          filetype                = 'ASC'
          filename                = v_str_fname
          has_field_separator     = 'X'
        tables
          data_tab                = t_source
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      sort t_source by ref partn_numb.
      loop at t_source into w_source.
        add 1 to count2-inrec.
        w_source1 = w_source.
       AT NEW PARTN_NUMB.  "10/31 KVB
        at new ref.
          w_header-doc_type = w_source1-doc_type..
          w_header-sales_org = w_source1-sales_org .            "'0001'
          w_header-distr_chan = w_source1-distr_chan.           "'01'
          w_header-division = w_source1-division.               " '01'
          w_header-purch_no = w_source1-purch_no.
          w_header-partn_numb = w_source1-partn_numb.
          w_header-ref = w_source1-ref.
          append w_header to t_header.
        endat.
        w_item-partn_numb = w_source1-partn_numb.
        w_item-material = w_source1-material.
        w_item-reqqty = w_source1-reqqty.
        w_item-ref = w_source1-ref.
        w_item-reqdate = w_source1-reqdate.
        append w_item to t_item.
        clear :w_item,w_header.
      endloop.
      loop at t_header into w_header.
        perform bdc_dynpro      using         'SAPMV45A'                  '0101'       .
        perform bdc_field       using         'BDC_CURSOR'                'VBAK-SPART'.
        perform bdc_field       using         'BDC_OKCODE'                '/00'.
        perform bdc_field       using         'VBAK-AUART'                w_header-doc_type.
        perform bdc_field       using         'VBAK-VKORG'                w_header-sales_org.
        perform bdc_field       using         'VBAK-VTWEG'                w_header-distr_chan.
        perform bdc_field       using         'VBAK-SPART'                w_header-division.
        perform bdc_dynpro      using         'SAPMV45A'                  '4001'     .
        perform bdc_field       using         'BDC_OKCODE'                '/00'.
        perform bdc_field       using         'BDC_CURSOR'               'VBKD-BSTKD'.
        perform bdc_field       using         'VBKD-BSTKD'                w_header-purch_no.
        perform bdc_field       using         'KUWEV-KUNNR'               w_header-partn_numb.
        i = 1.
        loop at t_item into w_item where partn_numb = w_header-partn_numb
                                         and ref = w_header-ref.
          at new partn_numb.
            clear count1.
            count = 0.
          endat.
          count = count + 1.
          if count gt 5.
            clear i.
            i = 2.
            perform bdc_dynpro      using 'SAPMV45A' '4001'      .
            perform bdc_field       using 'BDC_OKCODE' '=POAN'.
          endif.
          count1 = count1 + 1.
          concatenate 'VBAP-POSNR(' i ')' into fnam.
          perform bdc_field       using  fnam
                                        count1.
          concatenate 'RV45A-MABNR(' i ')' into fnam.
          perform bdc_field    using fnam                            w_item-material.
          concatenate 'RV45A-KWMENG(' i ')' into fnam.
          perform bdc_field       using  fnam                        w_item-reqqty..
          concatenate 'RV45A-ETDAT(' i ')' into fnam.
          perform bdc_field       using  fnam                         w_item-reqdate.
          concatenate 'VBKD-BSTKD_E(' i ')' into fnam.
          perform bdc_field       using  fnam                         w_item-ref.
          i = i + 1.
          clear:  w_item.
        endloop.
        clear w_header.
        perform bdc_dynpro      using 'SAPMV45A' '4001'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SICH'.
        perform post_transaction.
        refresh bdc_itab.
        clear   bdc_itab.
      endloop.
    *endloop.
    end-of-selection.
      perform finalization.
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdc_itab.
      bdc_itab-program  = program.
      bdc_itab-dynpro   = dynpro.
      bdc_itab-dynbegin = 'X'.
      append bdc_itab.
    endform.                    "bdc_dynpro
           Insert field                                                  *
    form bdc_field using fnam fval.
      if fval <> ''.
        clear bdc_itab.
        bdc_itab-fnam = fnam.
        bdc_itab-fval = fval.
        append bdc_itab.
      endif.
    endform.                    "bdc_field
    **&      Form  get_filename
          text
    -->  p1        text
    <--  p2        text
    *form get_filename .
    *call function 'WS_FILENAME_GET'
       exporting
         def_filename     = space
         def_path         = file
         mask             = ',.,..'
         mode             = 'N'
         title            = text-015
       importing
         filename         = file
       exceptions
         inv_winsys       = 1
         no_batch         = 2
         selection_cancel = 3
         selection_error  = 4
         others           = 5.
    *endform.                    " get_filename
    *&      Form  post_transaction
          text
    -->  p1        text
    <--  p2        text
    form post_transaction .
      refresh messtab.
      clear   messtab.
      call transaction  'VA01' using bdc_itab
                  mode   p_update
                update  'S'
              messages into messtab.
      read table messtab with key msgtyp = 'E'.
      if sy-subrc eq 0.
        perform process_error_messages.
        add 1 to count2-bdc.
        if v_chr_opengrp is initial.
          perform bdc_open_group.
        endif.
        call function 'BDC_INSERT'
          exporting
            tcode          = 'VA01'
          tables
            dynprotab      = bdc_itab
          exceptions
            internal_error = 1
            not_open       = 2
            queue_error    = 3
            tcode_invalid  = 4
            others         = 5.
        if sy-subrc <> 0.
          case sy-subrc.
            when 1.
              write: / 'Internal error'.
            when 2.
              write: / 'Not open error'.
            when 3.
              write: / 'queue error'.
            when 4.
              write: / 'tcode invalid error'.
            when others.
              write: / 'other error'.
          endcase.
        endif.
      else.
        add +1 to count2-create.
        format intensified off.
        format color col_normal.
        format color col_normal off.
      endif.
      clear   bdc_itab.
      refresh bdc_itab.
    endform.                    " post_transaction
    *&      Form  finalization
          text
    -->  p1        text
    <--  p2        text
    form finalization .
      if v_chr_opengrp = 'X'.
        call function 'BDC_CLOSE_GROUP'
          exceptions
            not_open    = 1
            queue_error = 2
            others      = 3.
      endif.
      get time.
      skip 2.
      write: / 'Time', sy-uzeit.
      skip.
      format color col_total on.
      write: / 'Total Records: ',           40 count2-inrec.
      write: / 'PERNR not of Emp Group 6 ', 40 count2-error.
      write: / 'Records Created: ',         40 count2-create.
      write: / 'BDC Create in group: ',     40 count2-bdc.
      if v_chr_opengrp = 'X'.
        skip 1.
        format intensified on.
        format color col_negative on.
        write: / 'PLEASE USE TRANSACTION "SM35" ',
                 'TO PROCESS THE GENERATED BDC SESSION ... ',
                 p_bdcgrp.
      endif.
    endform.                    " finalization
    *&      Form  bdc_open_group
          text
    -->  p1        text
    <--  p2        text
    form bdc_open_group .
      call function 'BDC_OPEN_GROUP'
        exporting
          client              = sy-mandt
          group               = p_bdcgrp
          holddate            = sy-datum
          keep                = 'X'
          user                = sy-uname
        exceptions
          client_invalid      = 1
          destination_invalid = 2
          group_invalid       = 3
          group_is_locked     = 4
          holddate_invalid    = 5
          internal_error      = 6
          queue_error         = 7
          running             = 8
          system_lock_error   = 9
          user_invalid        = 10
          others              = 11.
      if sy-subrc eq 0.
        v_chr_opengrp = 'X'.
      endif.
    endform.                    " bdc_open_group
    *&      Form  process_error_messages
          text
    -->  p1        text
    <--  p2        text
    form process_error_messages .
      data: begin of loc_aux_message.
              include structure message.
      data: end of loc_aux_message.
      data : msgno type sy-msgno.
      loop at messtab.
        move messtab-msgnr to msgno.
        call function 'WRITE_MESSAGE'
          exporting
            msgid  = messtab-msgid
            msgno  = msgno
            msgty  = messtab-msgtyp
            msgv1  = messtab-msgv1
            msgv2  = messtab-msgv2
            msgv3  = messtab-msgv3
            msgv4  = messtab-msgv4
          importing
            messg  = loc_aux_message
          exceptions
            others = 1.
        if sy-subrc eq 0.
          format color col_negative on.
          write: /10 loc_aux_message.
          format color col_negative off.
        else.
          format color col_negative on.
          write: /10 t_source-partn_numb.
          write: / 'Error creating message'.
          format color col_negative off.
          exit.
        endif.
      endloop.
    endform.                    " process_error_messages

  • Table Control in BDC

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

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

  • 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

Maybe you are looking for

  • Will not start in safe mode

    Using PB G4 15 in. Trackpad froze and then machine auto shut down. Restart failed. V boot failed. Pram boots all failed. Has reached apple screen once but froze and auto shut down again. Please help. Ps note sure which OS as can't power up to check.

  • Is this a bug on the n96

    hi when i send a sms if i select more then 35-40 contacts for it to be sent to it changes the sms to a mms instantly it dosent give me a choice it just automatically changes to mms this is without me writting txt or if txt has been written if the con

  • Email notification from workflow?

    Dear all, I am using EBS version is 11.5.8 and database version is 9.2.0.3. We are using workflow to send out email notification once the PO gets approve. Now, we are going to change SMTPServerName(email server IP) let say from '123.45.66.10' to '999

  • Locking down Win 8.1

    For security reasons, i need to investigate how to lock down windows 8.1 so that the user is restricted to the desktop only and only has access to a certain few applications. These PC's are in a domain and are used for either Accounting or POS. The s

  • Container layout webitem in WAD

    Hi , I want to display the navigation pane and Analysis item adjacent to each other in WAD like in the default display when we run the query in the web using query designer.Can i do this using  Container layout web item  if so how ? In the WAD i have