Additional fields in excel sheet in bid

Hi,
I have to add some additional fields in excel sheet by using the badi
BBP_BID_EVAL_DISPLAY.
if any one already came across please provide some sample code .
Thanks
Ram

hi
just refer to the link below
http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
regards
ravish
<b>plz dont forget to reward points if helpful</b>

Similar Messages

  • Issue in displaying DATE field in Excel sheet

    Hi All,
    Kindly help me with the below issue:
    A report program when exexuted fetches the data's from database tables and populates in to an itab and the same is then moved to a itab which is declared like this:
    DATA: BEGIN OF t_downd OCCURS 0,
            line(4096) TYPE c,
          END OF t_downd.
    This T_DOWND will have all the obtained records and the same is used to pass the entries to GUI_DOWNLOAD function module inorder to save the excel sheet in '.csv' format to the desktop.
    The issue is the user wants the 'DATE' field to be displayed in 'DD-MM-YYYY' format in the excel sheet. So I have fetched the date based on the position(fdpos) and used the concatenate statement separated by '-'. Now when I run the program, some dates are not getting displayed in 'DD-MM-YYYY' format and some dates are getting displayed correctly as per the requirement.
    While debugging also, I could find the date value in T_DOWND in the 'DD-MM-YYYY' format only. Not sure where it is actually getting changed and why.
    Can some one please provide a soultion for this.
    Thanks,
    Deepa

    Hi Soumya,
    Thanks for the reply!
    I declared a constant in the below format for the quotes:
    constants : c_quotes type c value ''''. (i have put 4 quotes)
    Now i have concatenated the above quotes to my date value.
    But the output in the excel sheet is now getting displayed like this '30-02-2011
    All the dates are getting displayed in the correct expected format, but the only issue is we are getting an extra quotes in front of the date.
    Can you please suggest why this is happening.
    Thanks,
    Deepa
    Edited by: Deeparani.D on Jan 9, 2012 11:53 AM
    Edited by: Deeparani.D on Jan 9, 2012 11:54 AM

  • Uploading field from excel sheet only of length 4 into SAP Table

    Dear Friend,
    I want to upload fields like Compny Code & Business Area of length 4 characters into SAP Tables. But in the excel sheet at some places Co Code & Business Area of length less than 4 characters is maintained which I want to ignore ie. those items should not be updated into the tables.
    Plz guide me how this can b done, what code I shuld write for this.
    Thanks,
    Nishu

    Hi Nishu,
      There is no way you can validate the fields and their lengths before you ipload them into internal tables.
    First you should upload them and then loop the intrenal table to delete such records.
    loop at itab.
    if strlen(itab-comp_code) < 4.
    delete itab index sy-tabix.
    endif.
    endloop.
    Regards,
    Ravi

  • Add dynamic fields to excel sheet

    i need to o/p the data onto a excel sheet.But some of the fields are added at runtime.ie some of the fields cannot be known until runtime,For ex. for every bill_no there may exist one or more materials which r known at runtime and these if exist has to be added to the excel sheet on one line(one row).kindly let me know the procedure.Bill no is given in selection screen for data selection.

    i need to o/p the data onto a excel sheet.But some of the fields are added at runtime.ie some of the fields cannot be known until runtime,For ex. for every bill_no there may exist one or more materials which r known at runtime and these if exist has to be added to the excel sheet on one line(one row).kindly let me know the procedure.Bill no is given in selection screen for data selection.

  • Downloading the multiple columns(Multiple fields) into excel sheet in OLE

    HI friends,
                    I am using OLE method to download 3 internal tables data into 3 worksheeets in one excel file. i am able to create 3 worksheets.but i am getting the whole data merged into one column(A column) where as i want 5 columns in one sheet if i have 5 database table fields.can anybody check my code and propose the solution for this.
      INCLUDE ole2incl.
      DATA: w_cell1 TYPE ole2_object,
            w_cell2 TYPE ole2_object.
    *--- Ole data Declarations
      DATA: h_excel TYPE ole2_object,     "Excel object
            h_mapl TYPE ole2_object,      "list of workbooks
            h_map TYPE ole2_object,       "workbook
            h_zl TYPE ole2_object,        "cell
            h_f TYPE ole2_object,         "font
            gs_interior TYPE ole2_object, "Pattern
            worksheet TYPE ole2_object,
            h_cell TYPE ole2_object,
            h_cell1 TYPE ole2_object,
            range TYPE ole2_object,
            h_sheet2 TYPE ole2_object,
            h_sheet3 TYPE ole2_object,
            gs_font TYPE ole2_object,
            flg_stop(1) TYPE c.
      DATA gv_sheet_name(20) TYPE c .
    * start Excel IF h_excel-header = space OR h_excel-handle = -1.
      CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    *--- get list of workbooks, initially empty
      CALL METHOD OF h_excel 'Workbooks' = h_mapl.
      SET PROPERTY OF h_excel 'Visible' = 1.
      CALL METHOD OF h_mapl 'Add' = h_map.
      gv_sheet_name = 'SM37'.
      GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
      SET PROPERTY OF worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
      CALL METHOD OF h_excel 'Cells' = w_cell1
           EXPORTING #1 = 1
                     #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
           EXPORTING #1 = 1
                     #2 = 50.
      CALL METHOD OF h_excel 'Range' = h_cell
           EXPORTING #1 = w_cell1
                     #2 = w_cell2.
      GET PROPERTY OF h_cell 'Font' = gs_font.
      SET PROPERTY OF gs_font 'Bold' = 1 .
      DATA l_rc TYPE i.
      DATA : y_file TYPE string.
       y_file = x_file.
      CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
          data = tab_sm37[]
      CHANGING
           rc = l_rc
       EXCEPTIONS
            cntl_error = 1
            error_no_gui = 2
         not_supported_by_gui = 3
            OTHERS = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
          #1 = 1
          #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1
      #2 = 1.
      CALL METHOD OF h_excel 'Range' = range
           EXPORTING
                #1 = w_cell1
               #2 = w_cell2.
      CALL METHOD OF range 'Select'.
      CALL METHOD OF worksheet 'Paste'.
      gv_sheet_name = 'ST22'.
      GET PROPERTY OF h_excel 'Sheets' = h_sheet2 .
      CALL METHOD OF h_sheet2 'Add' = h_map.
      SET PROPERTY OF h_map 'Name' = gv_sheet_name .
      GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
      CALL METHOD OF h_excel 'Cells' = w_cell1
           EXPORTING
                #1 = 1
                #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
                 #1 = 1
                 #2 = 50.
      CALL METHOD OF h_excel 'Range' = h_cell
            EXPORTING
                 #1 = w_cell1
                #2 = w_cell2.
      GET PROPERTY OF h_cell 'Font' = gs_font .
      SET PROPERTY OF gs_font 'Bold' = 1 .
      CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
          data = tab_sm37[]
      CHANGING
           rc = l_rc
       EXCEPTIONS
            cntl_error = 1
            error_no_gui = 2
         not_supported_by_gui = 3
            OTHERS = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
            EXPORTING
                #1 = 1
                #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
             EXPORTING
               #1 = 1
               #2 = 1.
      CALL METHOD OF h_excel 'Range' = range
             EXPORTING
                #1 = w_cell1
                #2 = w_cell2.
      CALL METHOD OF range 'Select'.
      CALL METHOD OF worksheet 'Paste'.
      gv_sheet_name = 'WE02'.
      GET PROPERTY OF h_excel 'Sheets' = h_sheet3 .
      CALL METHOD OF h_sheet3 'Add' = h_map.
      SET PROPERTY OF h_map 'Name' = gv_sheet_name .
      GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
      CALL METHOD OF h_excel 'Cells' = w_cell1
               EXPORTING
                     #1 = 1
                     #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
            EXPORTING
               #1 = 1.
      CALL METHOD OF h_excel 'Range' = h_cell
              EXPORTING
                  #1 = w_cell1
                 #2 = w_cell2.
      GET PROPERTY OF h_cell 'Font' = gs_font.
      SET PROPERTY OF gs_font 'Bold' = 1 .
    CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
          data = tab_sm37[]
      CHANGING
           rc = l_rc
       EXCEPTIONS
            cntl_error = 1
            error_no_gui = 2
         not_supported_by_gui = 3
            OTHERS = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
              EXPORTING
                  #1 = 1
                  #2 = 1.
      CALL METHOD OF h_excel 'Cells' = w_cell2
              EXPORTING
                   #1 = 1
                   #2 = 1.
      CALL METHOD OF h_excel 'Range' = range
              EXPORTING
                   #1 = w_cell1
                   #2 = w_cell2.
      CALL METHOD OF range 'Select'.
      CALL METHOD OF worksheet 'Paste'.
    *--- disconnect from Excel
      FREE OBJECT h_zl.
      FREE OBJECT h_mapl.
      FREE OBJECT h_map.
      FREE OBJECT h_excel.
    thanks in advance.
    Edited by: MAHESH MUMAR on Feb 27, 2009 2:58 PM

    try this code
    INCLUDE ole2incl.
    DATA: w_cell1 TYPE ole2_object,
    w_cell2 TYPE ole2_object.
    DATA: h_excel TYPE ole2_object, "Excel object
          h_mapl  TYPE ole2_object, "list of workbooks
          h_map   TYPE ole2_object, "workbook
          h_zl    TYPE ole2_object, "cell
          h_f     TYPE ole2_object, "font
          gs_interior TYPE ole2_object, "Pattern
          worksheet TYPE ole2_object,
          h_cell   TYPE ole2_object,
          h_cell1   TYPE ole2_object,
          range     TYPE ole2_object,
          h_sheet2  TYPE ole2_object,
          h_sheet3  TYPE ole2_object,
          gs_font    TYPE ole2_object,
          flg_stop(1) TYPE c.
    DATA gv_sheet_name(20) TYPE c .
    * start Excel IF h_excel-header = space OR h_excel-handle = -1.
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    *--- get list of workbooks, initially empty
    CALL METHOD OF h_excel 'Workbooks' = h_mapl.
    SET PROPERTY OF h_excel 'Visible' = 1.
    CALL METHOD OF h_mapl 'Add' = h_map.
    gv_sheet_name = 'SM37'.
    GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
    SET PROPERTY OF worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING #1 = 1
      #2 = 50.
    CALL METHOD OF h_excel 'Range' = h_cell
      EXPORTING #1 = w_cell1
      #2 = w_cell2.
    GET PROPERTY OF h_cell 'Font' = gs_font.
    SET PROPERTY OF gs_font 'Bold' = 1 .
    DATA l_rc TYPE i.
    DATA : y_file TYPE string.
    y_file = x_file.
    CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
        data                 = tab_sm37
      CHANGING
        rc                   = l_rc
      EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
        not_supported_by_gui = 3
        OTHERS               = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Range' = range
      EXPORTING
      #1 = w_cell1
      #2 = w_cell2.
    CALL METHOD OF range 'Select'.
    CALL METHOD OF worksheet 'Paste'.
    gv_sheet_name = 'ST22'.
    GET PROPERTY OF h_excel 'Sheets' = h_sheet2 .
    CALL METHOD OF h_sheet2 'Add' = h_map.
    SET PROPERTY OF h_map 'Name' = gv_sheet_name .
    GET PROPERTY OF h_excel 'ACTIVESHEET' = gv_sheet_name.
    *--Formatting the area of additional data 1 and doing the BOLD
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1
      #2 = 50.
    CALL METHOD OF h_excel 'Range' = h_cell
      EXPORTING
      #1 = w_cell1
      #2 = w_cell2.
    GET PROPERTY OF h_cell 'Font' = gs_font .
    SET PROPERTY OF gs_font 'Bold' = 1 .
    CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
        data                 = tab_sm37[]
      CHANGING
        rc                   = l_rc
      EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
        not_supported_by_gui = 3
        OTHERS               = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Range' = range
      EXPORTING
      #1 = w_cell1
      #2 = w_cell2.
    CALL METHOD OF range 'Select'.
    CALL METHOD OF worksheet 'Paste'.
    gv_sheet_name = 'WE02'.
    GET PROPERTY OF h_excel 'Sheets' = h_sheet3 .
    CALL METHOD OF h_sheet3 'Add' = h_map.
    SET PROPERTY OF h_map 'Name' = gv_sheet_name .
    GET PROPERTY OF h_excel 'ACTIVESHEET' = gv_sheet_name.
    *--Formatting the area of additional data 1 and doing the BOLD
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1.
    CALL METHOD OF h_excel 'Range' = h_cell
      EXPORTING
      #1 = w_cell1
      #2 = w_cell2.
    GET PROPERTY OF h_cell 'Font' = gs_font.
    SET PROPERTY OF gs_font 'Bold' = 1 .
    CALL METHOD cl_gui_frontend_services=>clipboard_export
      IMPORTING
        data                 = tab_sm37[]
      CHANGING
        rc                   = l_rc
      EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
        not_supported_by_gui = 3
        OTHERS               = 4.
    CALL METHOD OF h_excel 'Cells' = w_cell1
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Cells' = w_cell2
      EXPORTING
      #1 = 1
      #2 = 1.
    CALL METHOD OF h_excel 'Range' = range
      EXPORTING
      #1 = w_cell1
      #2 = w_cell2.
    CALL METHOD OF range 'Select'.
    CALL METHOD OF worksheet 'Paste'.
    free object h_zl.
    FREE OBJECT h_mapl.
    FREE OBJECT h_map.
    FREE OBJECT h_excel.

  • Download Alv into excel sheet according to variant fields

    Hi All,
    I have more than 100 fields in the ALV report, now i want to download the report according to the fields are choosen in the variant. I am getting all the fields in excel sheet but i need some fileds that is selected in the variant.
    Thanks in advance.
    Rudhir

    use your own excel button and program this steps:

    * Get the frontend fieldcatalog
    CALL METHOD go_grid->get_frontend_fieldcatalog
    IMPORTING
    et_fieldcatalog = lt_fieldcat.
    DELETE lt_fieldcat WHERE no_out EQ 'X'.

    *create dynamic table with the frontend fieldcatalog
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = lt_fieldcat
    IMPORTING
    ep_table = lt_data
    EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS = 2.
    IF sy-subrc EQ 0.
    ASSIGN lt_data->* TO <lt_table>.
    ENDIF.
    3° Fill the dynamic table
    4° export to excel using
    CALL FUNCTION 'XXL_SIMPLE_API'
    TABLES
    col_text = xmplt_v1
    data = <lt_table>
    online_text = xmplt_o1
    print_text = xmplt_p1
    EXCEPTIONS
    dim_mismatch_data = 1
    file_open_error       =2
    file_write_error      = 3
    inv_winsys            =4
    inv_xxl                   =5
    OTHERS                = 6.
    Check the complete example here

  • Changing layout into excel sheet.

    Hi experts's,
    In a ALV report (not OOP's concept) i want to display changing layout fields in EXCEL sheet. please send if you have sample program.
    please suggest how to solve this problem.
    Thanks and regard
    pavan.

    Hi experts's,
    In a ALV report (not OOP's concept) i want to display changing layout fields in EXCEL sheet. please send if you have sample program.
    please suggest how to solve this problem.
    Thanks and regard
    pavan.

  • Alv and excel sheet out put.

    hi friends,
    now i am working on sales and purchase order report. For this i have created three radio button on selection screen one for sales 2nd for purchase and 3rd for both. when i click sales radio button it is going to display only sales data in ALV out put list as well as in EXCEL sheet.
    problem:-
    Some layout fileds (out put fields) i am storing in VARIENT and when i have passed this VARIANT in a SELECTION-SCREEN so here the output is ok for me, and i am unable to display these same fields in EXCEL sheet for this Please could u tell that how we do this. please send the logic for this.
    thands and regards.
    sagi.

    Hi Amol,
    you are not getting me ...
    see your itab will have all the fields irrespective of variant used. so you can directly use itab to download.
    i guess you are using alv tool bar option to download.
    but i am telling to use your own button to download the report using your own button with GUI_DOWNLOAD Fm.
    for this you pass your ITAB and and then give the file name then this will save all the fields to excel file.
    Regards
    vijay

  • Additional field in report S_ALR_87011990 - Asset History Sheet

    Hi
    This is with reference to report S_ALR_87011990 - Asset History Sheet .
    I want to add quantity, location etc in this report.
    can anybody guide me how to add these additional field in this report as in configuration no such option available.
    Regards
    DD

    Hi,
    this is decribed explicitely and detailed in the WIKI entry Include additional fields in Standard Fixed Asset ALV reports.
    That´s much faster then enhancing the report. Further more you would still operate on a standard report, not a copy based on the standard report.
    Regards,
    Markus

  • Field seperator in excel sheet.

    Hi experts,
                  I am using GUI_DOWNLOAD to populate fields from internal table into excel sheet. I need to seperate the fields with ~ symbol. How should i do this?

    Hi,
        Just uncomment the Export parameter write_field_seperator with ' ' blanck space, in GUI_DOWNLOAD FM.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                  =
          filename                      = pbk
      FILETYPE                      = 'ASC'
      APPEND                        = ' '
    write_field_separator         = '  '
      HEADER                        = '00'
      TRUNC_TRAILING_BLANKS         = ' '
      WRITE_LF                      = 'X'
      COL_SELECT                    = ' '
    The data in each field will be in each cell of the Excel sheet.
    Regards
    Krishna

  • Field length shows more in excel sheet which is sent via email

    I am sending excel sheet through email. I have data in internal table which i move to the email internal table and data is been sent via email using a excel sheet.
    Now, when I open the excel sheet, i see that all fields get displayed but the last field is shown as too much length meaning field length is 15 chars but in excel sheet it shows as almost 40 - 50 chars.

    Decalre one more field in your internal table ,which should be last field.
    and do not pass header for this field and just pass the empty value to this field.
    if not use this FM : EXCEL_OLE_STANDARD_DAT
    Reward Points if it is helpful
    Thanks
    Seshu

  • Can we make the excel sheet fields are ready only after downloding

    Hi ALL
              I have the probelm in the project that when i downlaod the data into excel sheet in that sheet 2 fields should be read only,ie client can't edit those fields.
    can any one tel me how can do this one
    Thnaks
    Lokesh.V

    Hi,
    Could u explain the problem in some more brief ie., how u r downloaded the data ie., through open hub infospoke or just saved as a local file.
    Regards
    Ramakrishna Kamurthy

  • Field names are not getting into excel sheet while download

    Hi All,
    I am using gui_download fm to download internal table data to excel sheet.
    have passed fieldnames parameter also.
    defined each column with char type and length of those descriptions also.
    but while downloading only first column description is getting.
    Please help me.
    Thanks in advance.
    Regards,
    eswar

    hi,
    check this sample code.
    DATA : BEGIN OF it_join_fields OCCURS 0,
             field_name(20),
             END OF it_join_fields.
    CLEAR it_join_fields.
      it_join_fields-field_name = 'pernr'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'empname'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'new_joinee'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'begda'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'fath_name'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'gbdat'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'gesch'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
      it_join_fields-field_name = 'usrid_long'.
      APPEND it_join_fields.
      CLEAR it_join_fields.
    it_join_fields-field_name = 'werks'.
      APPEND it_join_fields.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
      BIN_FILESIZE                    =
          filename                        = file_name
          filetype                        = 'ASC'
          append                          = 'X'
          write_field_separator           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
        TABLES
          data_tab                        = it_join_det_new
          fieldnames                      = it_join_fields
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • CAT2 Time sheet additional field length

    Hi All
    I have added  additional fields in include CI_CATSDB in that fields one fields is reference field in that I have taken field length 60 Char but in the input it is taking length only 35 Char.
    So if any one has come across this issue please help me because I have to enter reference that have more length.
    Thanks and regards
    Balbir

    hi
    in the catsdb table it will accept the length as 60 , but in the screen fld in the structure , it does not allow more than 35 chars, it is a limitation.
    Regards
    Sameer

  • Unable to download the data perfectly into excel sheet

    Hi Frnds,
    when i am trying to download the data from the output of a report into excel, some of the records(line items/rows) are getting stored in one of column of the excel sheet. Fog eg: my report outputs 500 line items. In excel after 100 rows the next 5-10 records/rows are storing in one column. so at the end of excel sheet i may not find total 500 records/line items.
    Plz suggest me how to handle this.
    Thnks,
    Pavan

    *& Report  ZETA_EXCEL_DOWNLOAD_CLIPBOARD                               *
    report  zeta_excel_download_clipboard           .
    include ole2incl.
    data:  w_cell1     type ole2_object,
           w_cell2     type ole2_object.
    *--- Ole data Declarations
    data: h_excel     type ole2_object,        " Excel object
          h_mapl      type ole2_object,        " list of workbooks
          h_map       type ole2_object,        " workbook
          h_zl        type ole2_object,        " cell
          h_f         type ole2_object,        " font
          gs_interior type ole2_object,        " Pattern
          worksheet   type ole2_object,
          h_cell      type ole2_object,
          h_cell1     type ole2_object,
          range       type ole2_object,
          h_sheet2    type ole2_object,
          h_sheet3    type ole2_object,
          gs_font     type ole2_object,
          flg_stop(1) type c.
              Internal table Declaration
    data: begin of t_excel occurs 0,
    vkorg(20) type c, "Sales Org
    vbtyp(20) type c, "Document Category
    auart(20) type c, "Document Type
    ernam(20) type c, "Created By
    vbeln(20) type c, "Document Number
    posnr(20) type c, "Item Number
    erdat(20) type c, "Created Date
    vdatu(20) type c, "Header Requested Delivery Date
    reqdat(20) type c, "Request date
    condat(20) type c, "Confirm date
    lifsk(20) type c, "Header Block
    txt30(30) type c, "Order User Status Description
    lifsp(20) type c, "Line Block
    dispo(20) type c, "MRP Controller
    dsnam(20) type c, "MRP Controller Description
    vmsta(20) type c, "Material Sales Status
    kunnr(20) type c, "Sold To
    cname(35) type c, "Sold To Name
    regio(20) type c, "State
    cufd(10) type c, "CUD
    bstnk(20) type c, "PO#
    bsark(20) type c, "Ordering Method
    matnr(20) type c, "Material
    maktx(35) type c, "Material Description
    t200(20) type c, "T200
    vtext(20) type c, "T200 Description
    matkl(20) type c, "Material Group
    zzbomind(7) type c, "BOM Indicator
    ostat(20) type c, "Order Status
    cmgst(20) type c, "CRD
    inco1(20) type c, "Incoterms
    oqty(20) type c, "Order Quantity
    pqty(20) type c, "Open Quantity
    unit(20) type c, "UOM
    onet(20) type c, "Order Value
    pnet(20) type c, "Open Value
    curr(20) type c, "Currency key
    so_bezei like tvkbt-bezei,"Sales Office
    sg_bezei like tvgrt-bezei,"Sales Group
    bname(20) type c, "Ordering Party
    contact(20) type c, "Contact Name
    telf1(20) type c, "Contact telf1
    reqqty(20) type c, "Item Request qty
    reqval(20) type c, "Item Request value
    conqty(20) type c, "Item Confirm qty
    conval(20) type c, "Item Confirm value
    zzrev(02) type c, "Revenue recognition acceptance
    bezei(20) type c, "Revenue recognition text
    vgbel(20) type c, "Reference Order for RETURNS
    0008text(255) type c, "Internal Order Comment Text
    end of t_excel.
    data: t_excel_bckord like t_excel occurs 0 with header line,
          t_excel_bcklog like t_excel occurs 0 with header line,
          t_excel_blkord like t_excel occurs 0 with header line.
      types: data1(1500) type c,
             ty          type table of data1.
      data:  it          type ty with header line,
    it_2          type ty with header line,
    it_3          type ty with header line,
             rec         type sy-tfill,
             deli(1)     type c,
             l_amt(18)   type c.
    data: begin of hex,
             tab type x,
            end of hex.
      field-symbols: <fs>      .
      constants cns_09(2) type n value 09.
      assign deli to <fs> type 'X'.
      hex-tab = cns_09.
      <fs> = hex-tab.
    data gv_sheet_name(20) type c .
    M A C R O Declaration
    define ole_check_error.
      if &1 ne 0.
        message e001(zz) with &1.
        exit.
      endif.
    end-of-definition.
    t_excel_bckord-vkorg = 'ABC'.
    t_excel_bckord-vbtyp = 'DEF'.
    t_excel_bckord-auart = 'GHI'.
    t_excel_bckord-ernam = 'JKL'.
    t_excel_bckord-vbeln = 'MNO'.
    t_excel_bckord-0008text = 'XYZ'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC1'.
    t_excel_bckord-vbtyp = 'DEF1'.
    t_excel_bckord-auart = 'GHI1'.
    t_excel_bckord-ernam = 'JKL1'.
    t_excel_bckord-vbeln = 'MNO1'.
    t_excel_bckord-0008text = 'XYZ1'.
    append t_excel_bckord.
    t_excel_bckord-vkorg = 'ABC2'.
    t_excel_bckord-vbtyp = 'DEF2'.
    t_excel_bckord-auart = 'GHI2'.
    t_excel_bckord-ernam = 'JKL2'.
    t_excel_bckord-vbeln = 'MNO2'.
    t_excel_bckord-0008text = 'XYZ2'.
    append t_excel_bckord.
    t_excel_bcklog-vkorg = 'ABC'.
    t_excel_bcklog-vbtyp = 'DEF'.
    t_excel_bcklog-auart = 'GHI'.
    t_excel_bcklog-ernam = 'JKL'.
    t_excel_bcklog-vbeln = 'MNO'.
    t_excel_bcklog-0008text = 'XYZ'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC1'.
    t_excel_bcklog-vbtyp = 'DEF1'.
    t_excel_bcklog-auart = 'GHI1'.
    t_excel_bcklog-ernam = 'JKL1'.
    t_excel_bcklog-vbeln = 'MNO1'.
    t_excel_bcklog-0008text = 'XYZ1'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC2'.
    t_excel_bcklog-vbtyp = 'DEF2'.
    t_excel_bcklog-auart = 'GHI2'.
    t_excel_bcklog-ernam = 'JKL2'.
    t_excel_bcklog-vbeln = 'MNO2'.
    t_excel_bcklog-0008text = 'XYZ2'.
    append t_excel_bcklog.
    t_excel_bcklog-vkorg = 'ABC3'.
    t_excel_bcklog-vbtyp = 'DEF3'..
    t_excel_bcklog-auart = 'GHI3'.
    t_excel_bcklog-ernam = 'JKL3'.
    t_excel_bcklog-vbeln = 'MNO3'.
    t_excel_bcklog-0008text = 'XYZ3'.
    append t_excel_bcklog.
    t_excel_blkord-vkorg = 'ABC'.
    t_excel_blkord-vbtyp = 'DEF'.
    t_excel_blkord-auart = 'GHI'.
    t_excel_blkord-ernam = 'JKL'.
    t_excel_blkord-vbeln = 'MNO'.
    t_excel_blkord-0008text = 'XYZ'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC1'.
    t_excel_blkord-vbtyp = 'DEF1'.
    t_excel_blkord-auart = 'GHI1'.
    t_excel_blkord-ernam = 'JKL1'.
    t_excel_blkord-vbeln = 'MNO1'.
    t_excel_blkord-0008text = 'XYZ1'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC2'.
    t_excel_blkord-vbtyp = 'DEF2'.
    t_excel_blkord-auart = 'GHI2'.
    t_excel_blkord-ernam = 'JKL2'.
    t_excel_blkord-vbeln = 'MNO2'.
    t_excel_blkord-0008text = 'XYZ2'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC3'.
    t_excel_blkord-vbtyp = 'DEF3'..
    t_excel_blkord-auart = 'GHI3'.
    t_excel_blkord-ernam = 'JKL3'.
    t_excel_blkord-vbeln = 'MNO3'.
    t_excel_blkord-0008text = 'XYZ3'.
    append t_excel_blkord.
    t_excel_blkord-vkorg = 'ABC4'.
    t_excel_blkord-vbtyp = 'DEF4'..
    t_excel_blkord-auart = 'GHI4'.
    t_excel_blkord-ernam = 'JKL4'.
    t_excel_blkord-vbeln = 'MNO4'.
    t_excel_blkord-0008text = 'XYZ4'.
    append t_excel_blkord.
    loop at t_excel_bckord.
    concatenate
    t_excel_bckord-vkorg
    t_excel_bckord-vbtyp
    t_excel_bckord-auart
    t_excel_bckord-ernam
    t_excel_bckord-vbeln
    t_excel_bckord-posnr
    t_excel_bckord-erdat
    t_excel_bckord-vdatu
    t_excel_bckord-reqdat
    t_excel_bckord-condat
    t_excel_bckord-lifsk
    t_excel_bckord-txt30
    t_excel_bckord-lifsp
    t_excel_bckord-dispo
    t_excel_bckord-dsnam
    t_excel_bckord-vmsta
    t_excel_bckord-kunnr
    t_excel_bckord-cname
    t_excel_bckord-regio
    t_excel_bckord-cufd
    t_excel_bckord-bstnk
    t_excel_bckord-bsark
    t_excel_bckord-matnr
    t_excel_bckord-maktx
    t_excel_bckord-t200
    t_excel_bckord-vtext
    t_excel_bckord-matkl
    t_excel_bckord-zzbomind
    t_excel_bckord-ostat
    t_excel_bckord-cmgst
    t_excel_bckord-inco1
    t_excel_bckord-oqty
    t_excel_bckord-pqty
    t_excel_bckord-unit
    t_excel_bckord-onet
    t_excel_bckord-pnet
    t_excel_bckord-curr
    t_excel_bckord-so_bezei
    t_excel_bckord-sg_bezei
    t_excel_bckord-bname
    t_excel_bckord-contact
    t_excel_bckord-telf1
    t_excel_bckord-reqqty
    t_excel_bckord-reqval
    t_excel_bckord-conqty
    t_excel_bckord-conval
    t_excel_bckord-zzrev
    t_excel_bckord-bezei
    t_excel_bckord-vgbel
    t_excel_bckord-0008text
    into it
    separated by deli.
    append it.
        clear it.
    endloop.
    loop at t_excel_bcklog.
    concatenate
    t_excel_bcklog-vkorg
    t_excel_bcklog-vbtyp
    t_excel_bcklog-auart
    t_excel_bcklog-ernam
    t_excel_bcklog-vbeln
    t_excel_bcklog-posnr
    t_excel_bcklog-erdat
    t_excel_bcklog-vdatu
    t_excel_bcklog-reqdat
    t_excel_bcklog-condat
    t_excel_bcklog-lifsk
    t_excel_bcklog-txt30
    t_excel_bcklog-lifsp
    t_excel_bcklog-dispo
    t_excel_bcklog-dsnam
    t_excel_bcklog-vmsta
    t_excel_bcklog-kunnr
    t_excel_bcklog-cname
    t_excel_bcklog-regio
    t_excel_bcklog-cufd
    t_excel_bcklog-bstnk
    t_excel_bcklog-bsark
    t_excel_bcklog-matnr
    t_excel_bcklog-maktx
    t_excel_bcklog-t200
    t_excel_bcklog-vtext
    t_excel_bcklog-matkl
    t_excel_bcklog-zzbomind
    t_excel_bcklog-ostat
    t_excel_bcklog-cmgst
    t_excel_bcklog-inco1
    t_excel_bcklog-oqty
    t_excel_bcklog-pqty
    t_excel_bcklog-unit
    t_excel_bcklog-onet
    t_excel_bcklog-pnet
    t_excel_bcklog-curr
    t_excel_bcklog-so_bezei
    t_excel_bcklog-sg_bezei
    t_excel_bcklog-bname
    t_excel_bcklog-contact
    t_excel_bcklog-telf1
    t_excel_bcklog-reqqty
    t_excel_bcklog-reqval
    t_excel_bcklog-conqty
    t_excel_bcklog-conval
    t_excel_bcklog-zzrev
    t_excel_bcklog-bezei
    t_excel_bcklog-vgbel
    t_excel_bcklog-0008text
    into it_2
    separated by deli.
    append it_2.
        clear it_2.
    endloop.
    loop at t_excel_blkord.
    concatenate
    t_excel_blkord-vkorg
    t_excel_blkord-vbtyp
    t_excel_blkord-auart
    t_excel_blkord-ernam
    t_excel_blkord-vbeln
    t_excel_blkord-posnr
    t_excel_blkord-erdat
    t_excel_blkord-vdatu
    t_excel_blkord-reqdat
    t_excel_blkord-condat
    t_excel_blkord-lifsk
    t_excel_blkord-txt30
    t_excel_blkord-lifsp
    t_excel_blkord-dispo
    t_excel_blkord-dsnam
    t_excel_blkord-vmsta
    t_excel_blkord-kunnr
    t_excel_blkord-cname
    t_excel_blkord-regio
    t_excel_blkord-cufd
    t_excel_blkord-bstnk
    t_excel_blkord-bsark
    t_excel_blkord-matnr
    t_excel_blkord-maktx
    t_excel_blkord-t200
    t_excel_blkord-vtext
    t_excel_blkord-matkl
    t_excel_blkord-zzbomind
    t_excel_blkord-ostat
    t_excel_blkord-cmgst
    t_excel_blkord-inco1
    t_excel_blkord-oqty
    t_excel_blkord-pqty
    t_excel_blkord-unit
    t_excel_blkord-onet
    t_excel_blkord-pnet
    t_excel_blkord-curr
    t_excel_blkord-so_bezei
    t_excel_blkord-sg_bezei
    t_excel_blkord-bname
    t_excel_blkord-contact
    t_excel_blkord-telf1
    t_excel_blkord-reqqty
    t_excel_blkord-reqval
    t_excel_blkord-conqty
    t_excel_blkord-conval
    t_excel_blkord-zzrev
    t_excel_blkord-bezei
    t_excel_blkord-vgbel
    t_excel_blkord-0008text
    into it_3
    separated by deli.
    append it_3.
        clear it_3.
    endloop.
      if h_excel-header = space or h_excel-handle = -1.
    start Excel
        create object h_excel 'EXCEL.APPLICATION'.
      endif.
    PERFORM err_hdl.
    *--- get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
    PERFORM err_hdl.
      set property of h_excel 'Visible' = 1.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
    PERFORM err_hdl.
    *GV_SHEET_NAME = '1st SHEET'.
    gv_sheet_name = 'Back Orders'.
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    set property of worksheet 'Name' = gv_sheet_name .
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    *CALL METHOD OF gs_cells 'Select' .
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
            data l_rc type i.
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    PERFORM err_hdl.
    CALL METHOD OF h_excel 'QUIT'.
    *GV_SHEET_NAME = '2ND SHEET'.
    gv_sheet_name = 'Backlog'.
    get property of h_excel 'Sheets' = h_sheet2 .
      call method of h_sheet2 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_2[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *GV_SHEET_NAME = '3rd SHEET'.
    gv_sheet_name = 'Blocked Orders'.
    get property of h_excel 'Sheets' = h_sheet3 .
      call method of h_sheet3 'Add' = h_map.
    set property of h_map 'Name' = gv_sheet_name .
      get property of  h_excel 'ACTIVESHEET' = worksheet.
    *--Formatting the area of additional data 1 and doing the BOLD
    call method of h_excel 'Cells' = w_cell1
    exporting
    #1 = 1
    #2 = 1.
    call method of h_excel 'Cells' = w_cell2
    exporting
    #1 = 1
    #2 = 50.
    call method of h_excel 'Range' = h_cell
    exporting
    #1 = w_cell1
    #2 = w_cell2.
    get property of h_cell 'Font' = gs_font .
    set property of gs_font 'Bold' = 1 .
      call method cl_gui_frontend_services=>clipboard_export
        importing
          data                 = it_3[]
        changing
          rc                   = l_rc
        exceptions
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          others               = 4.
      call method of h_excel 'Cells' = w_cell1
        exporting
          #1 = 1
          #2 = 1.
      call method of h_excel 'Cells' = w_cell2
        exporting
          #1 = 1
          #2 = 1.
    PERFORM err_hdl.
       call method of h_excel 'Range' = range
        exporting
          #1 = w_cell1
          #2 = w_cell2.
      call method of range 'Select'.
    PERFORM err_hdl.
      call method of worksheet 'Paste'.
    *--- disconnect from Excel
      free object h_zl.
      free object h_mapl.
      free object h_map.
      free object h_excel.

Maybe you are looking for