Download to excel using GUI_DOWNLOAD : Date format

Hi Gurus,
I am downloading the data from an internal table to excel file using FM gui_download. The date field in my internal table is in the format MM-DD-YYYY (stored as Char 10 field). But when it downloads to excel, the date format changes to MM/DD/YYYY. I want to keep original format of MM-DD-YYYY in excel.
Please help, sure points for helpful answers.
should i use FM gui_download only, or is there some Other useful FM.
Regards,
Abhishek

Hi,
Check the code below:
v_date = sy-datum.
IF v_date CA '/'.
  REPLACE '/' WITH '-' INTO v_date.
ENDIF.
Regards
Kannaiah

Similar Messages

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • GUI_DOWNLOAD Date format

    Hi,
    I am downloading an internal table to excel through GUI_DOWNLOAD function module, internal table  contains a date field and it's getting downloaded in "YYYYMMDD" format. Whereas if we use WS_DOWNLOAD it's getting downloaded with date separator (based on user settings) i.e. slash, dot and etc. Is GUI_DOWNLOAD has this shortcoming?
    Regards,
    Balaji Viswanath.

    IF u want the same formate as in the database upload the file in 'DBF' format.

  • ALV downloaded to EXCEL -using standard button-how to modify the EXCEL ???

    hey guys,
      i have developed an ALV (with dynamic itnernal table,with HTML top of page,using FMs)
    Now ,i ahd problems with downlaod to excel(which i partly overcame by using &XXL fcode button instead of other 'donwload to excel button' )..
    now the data is downloading to excel fne..
    but i need to customise the EXCEL with HEADING (with bold letters in colour).. and also adding a line in ALV COLOUMN HEADINGS part of EXCEL...

    Hi,
    Kindly go through the below link to download a file in Excel format from ALV,
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Note:  In the function module ->GUI_DOWNLOAD
    You have to give Field Separator as 'X'.
    Hope it helps You.
    Regards
    Mansi

  • Download Arabic text using GUI_DOWNLOAD

    Hi Experts,
    I am using GUI_DOWNLOAD to download the contents of an internal table to a local text (.txt) file. The internal table contain Arabic characters also. The Arabic characters appear as # in the downloaded text file.
    Please help to resolve this issue.
    Points will be rewarded for helful answers.

    Hi ,
    Try File type as  'DAT' , i guess it will solve your problem , Let me know if its not solved.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = 'C:/TEST.XLS'
    FILETYPE = 'DAT'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = ITAB "internal table
    Regards,
    Saravana.S

  • Download to Excel returning no data in the excel sheet

    Hi All,
                I have used UI elements guide to create Download to Excel link in my application. I wrote following code in wdDoInit()
    IWDResource resource = WDResourceFactory.createResource(new
    byte[<number of bytes>], "<name of the file>",
    WDWebResourceType.<type of the file>);
    wdContext.currentUiResourceElement().setResource(resource);
    But when I click on the link in the application, I am getting the downloaded file without records.  However I am getting a character conversion window showing option to which unicode convertion i need to convert to display data.
    Looks like I am missing some things. Please help me .
    Thanks
    Uday
    Edited by: Uday Kumar Kanike on Mar 9, 2012 6:51 AM

    Hi Uday,
    Refer the below blog:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0cc41cb-9576-2b10-99a6-ab90ef28c73b?QuickLink=index&overridelayout=true&33779917806370
    Hope this will be helpful to you.
    Regards,
    Jithin

  • Download to Excel using pkg by Denes

    I've had success using the package that Denes created for non-Interactive Reports, but now I have issue downloading to Excel when I create a SQL Report, with the option to Enable Search = Yes. When I download the report, it only appears to show columns that aren't searchable, or at least those columns that don't have a value for the column attribute for "Highlight Words." The report was created through a wizard, so APEX automatically created the items and processes to enable searching for values within the report. When I remove the item specified for Highlight Words (e.g. &P60_REPORT_SEARCH), the column then shows up in the downloaded file. I did not find any logic in the Export_Excel_Pkg where it might exclude such columns. Any ideas?

    The issue appears to be resolved. In the EXCEL_REPORT_PKG.PRINT_REPORT_HEADER proc there is a cursor with a condition specifiying: include_in_export = 'Yes'. Strangely, even though in APEX I can see that the column attribute Include in Export = Yes, the values for these report columns in the APEX_APPLICATION_PAGE_RPT_COLS view for the INCLUDE_IN_EXPORT column was NULL. I had to again click on "Apply Changes" and it set the column value in the table to 'Yes' where before it was NULL.

  • How to use US date format on schedule?

    When schedule a recurring instance and I'm prompted for the Start and End dates, they are formatted in the European date format.
    How can I have it default to and always use the US date format?

    This fix from R2 seems to work with XI 3.0 as well:
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui/main.do?iv_mode=003&iv_sapnotes_number=1196530
    Here are the steps:
    Open the Last Login for User report in InfoView which requires the change.
    Add a new variable in the Web Intelligence report.
    Use the following function in the formula for the new variable. The function uses central time as an example:
    RelativeDate([GMT format timestamp];0.25)
    For example, if it is required to change to central time, use 0.25 as there is a six-hour difference between it and Greenwich Mean Time (6/24 GMT = 0.25).
    Use this variable in the report to return the correct local time.
    Only problem is you have to edit each auditor report and change and create another variable for any object with a "date" data type.

  • BC4J Query by example for dates uses wrong date format

    When querying by example on date fields, I get the following nested exceptions:
    oracle.jbo.SQLStmtException: JBO-27121: SQL error during statement execution.
    JBO-26044: Error while getting estimated row count for view object
    and
    java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string.
    It would seem to be caused by the following clause added to the end of the entity object's query:
    "QRSLT WHERE ( ( (DATE_FIELD = TO_DATE('23/12/2003', 'yyyy-mm-dd')) ) )"
    which causes problems as our entity objects use a 'dd/MM/yyyy' date format.
    Is there a way we can make the query by example use the same date format as the rest of our app?

    I‘m not an expert on this but I see nobody is replying so this might help you. I've been having problems with dates as well and I‘m pretty sure that the attached formatter isn't used in find mode. That is because the java date class (can't remember which one) used by the BC4J has the format yyyy-mm-dd. I don't now if it is possible to change it but I got around the problem by writing my own domain. You can take a look at Toystore demo, by Steve Muench, that uses a custom date domain, ExpirationDate (see the code below). It is mapped to a VARCHAR column in the database but it is possible to map it to a DATE column.
    I have been watching the postings with questions about dates and I have noticed that a lot of people have problems with this but I haven’t seen an answer yet.
    package toystore.model.datatypes.common;
    import java.io.Serializable;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import oracle.jbo.Transaction;
    import oracle.jbo.domain.DataCreationException;
    import oracle.jbo.domain.DomainInterface;
    import oracle.jbo.domain.DomainOwnerInterface;
    // --- File generated by Oracle Business Components for Java.
    * This custom datatype implements an immutable domain class that
    * maps to a VARCHAR column containing values like '10/2004' representing
    * expiration dates of credit cards. We could have chosen to implement
    * this as a domain that stores itself in a DATE column instead of a
    * VARCHAR column, but since the Java Pet Store demo schema stored the
    * information in a VARCHAR column, we decided to illustrate how to
    * accommodate that case using domains.
    public class ExpirationDate implements DomainInterface, Serializable {
    private Date mDate;
    private String mDateAsString;
    protected ExpirationDate() {
    mDate = new Date();
    convertDateToStringFormat();
    * Return the value of the expiration date as a java.util.Date
    public Date getDateValue() {
    return mDate;
    * Allow expiration date to be constructed from two
    * strings representing month and year
    public ExpirationDate(String monthVal, String yearVal) {
    this(monthVal+'/'+yearVal);
    public ExpirationDate(String val) {
    validate(val);
    convertDateToStringFormat();
    * The getData() method must return the type of object that JDBC will
    * see for storage in the database. Since we want this ExpirationDate
    * datatype to map to a VARCHAR column in the database, we return the
    * string format of the date
    public Object getData() {
    return mDateAsString;
    * <b>Internal:</b> <em>Applications should not use this method.</em>
    public void setContext(DomainOwnerInterface owner, Transaction trans, Object obj) {
    * Performs basic validation on strings that represent expiration dates
    * in the format of MM/YYYY. Note that in the process of testing whether
    * the string represents a valid month and year, we end up setting
    * the private member variable mDate with the date value, so if the
    * validate() method does not throw an exception, the mDate will be setup.
    protected void validate(String val) {
    if (val != null) {
    if (val.length() != 7 ||
    val.charAt(2) != '/' ||
    !isAllDigitsExceptSlashAtPositionTwo(val) ||
    !isValidMonthAndYear(val)) {
    throw new DataCreationException(ErrorMessages.class,
    ErrorMessages.INVALID_EXPRDATE,
    null,null);
    * Returns true if all digits except position 2 (zero-based) are digits
    private boolean isAllDigitsExceptSlashAtPositionTwo(String val) {
    for (int z=0, max = val.length(); z < max; z++) {
    if (z != 2 && !Character.isDigit(val.charAt(z))) {
    return false;
    return true;
    * Returns true if the val string, assumed to be in "MM/YYYY" format
    * is a valid month and year value, setting the mDate member variable
    * if they are valid.
    private boolean isValidMonthAndYear(String val) {
    try {
    int month = Integer.parseInt(val.substring(0,2));
    int year = Integer.parseInt(val.substring(3));
    Calendar c = Calendar.getInstance();
    c.setLenient(false);
    c.set(year,month-1,1); // Month is zero-based !
    mDate = c.getTime();
    catch (IllegalArgumentException i) {
    return false;
    return true;
    public String toString() {
    return mDateAsString;
    * Convert mDate to String format
    private void convertDateToStringFormat() {
    if (mDate != null) {
    SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
    mDateAsString = sdf.format(mDate);
    * Return true if the expiration date is in the future
    public boolean isFutureDate() {
    return mDate.compareTo(new Date())> 0;
    * Compare the Expiration Dates by comparing their respective
    * getData() values
    public boolean equals(Object obj) {
    if (obj instanceof DomainInterface) {
    Object thisData = getData();
    if (thisData != null) {
    return thisData.equals(((DomainInterface)obj).getData());
    return ((DomainInterface)obj).getData() == null;
    return false;

  • Download to Excel using METHODS

    I want to change the Worksheet name which in default being created as Sheet1/ Sheet2/ Sheet3 on creation of Excel file while downloading using Objects.
    How should I change the name of Sheet1/ Sheet2/ Sheet3 to my requirement. Attached the coding part. Please help me out in finding the place where I should rename it using which statement.
    FORM excel_download.
      gv_step = 'Starting Excel'.
      CREATE OBJECT gw_excel 'EXCEL.APPLICATION'.
      PERFORM xls_error_hdl.
      SET PROPERTY OF gw_excel 'VISIBLE' = 0.
      GET PROPERTY OF gw_excel 'WORKBOOKS' = gw_wbooks.
      CALL METHOD OF gw_wbooks 'Add'.
    *Create Excel Sheet
      CALL METHOD OF gw_excel 'Worksheets' = gw_worksheet
        EXPORTING
          #1 = 1.
      CALL METHOD OF gw_wbooks 'Activate'.
      SET PROPERTY OF gw_wbooks 'Name' = 'Sheet1'.
      CALL METHOD OF gw_wbooks 'OPEN' = gw_wbooks
        EXPORTING
          #1 = gv_fname.
      CALL METHOD OF gw_wbooks 'Activate' .
    *Download to Worksheet 1.
      GET PROPERTY OF gw_excel 'Worksheets' = gw_worksheet
      exporting #1 = 'Sheet1'.      "S4M1MR
    exporting #1 = 'Appd_Sites'.   "S4M1MR
      PERFORM xls_error_hdl.
      CALL METHOD OF gw_worksheet 'Activate' .
      gv_step = 'Adding data to Excel'.
      gv_row  = 0.
      LOOP AT gi_yps_down_tab1 INTO gw_yps_grid2.
        CLEAR gw_yps_common-anln1.
        gv_row = gv_row + 1.
        gv_col = 2.
        DO 4 TIMES.
          ASSIGN COMPONENT sy-index OF STRUCTURE gw_yps_grid2 TO <comp>.
          PERFORM fill_cell USING gv_row gv_col  <comp>.
          gv_col = gv_col + 1.
        ENDDO.
      ENDLOOP.
    *Download to Worksheet 2.
      GET PROPERTY OF gw_excel 'Worksheets' = gw_worksheet
      exporting #1 = 'Sheet2'.
    exporting #1 = 'Appd Sites'.   "S4M1MR
      PERFORM xls_error_hdl.
      CALL METHOD OF gw_worksheet 'Activate' .
      gv_step = 'Adding data to Excel'.
      gv_row  = 0.
    LOOP AT gi_yps_down_tab2 INTO gw_yps_common.
      LOOP AT gi_yps_down_tab2 INTO gw_exclusion.
        PERFORM conversion.
      ENDLOOP.
    *Download to Worksheet 3.
      GET PROPERTY OF gw_excel 'Worksheets' = gw_worksheet
      exporting #1 = 'Sheet3'.
      PERFORM xls_error_hdl.
      CALL METHOD OF gw_worksheet 'Activate' .
      gv_step = 'Adding data to Excel'.
      gv_row  = 0.
    LOOP AT gi_yps_down_tab3 INTO gw_yps_common.
      LOOP AT gi_yps_down_tab3 INTO gw_exclusion.
        PERFORM conversion.
      ENDLOOP.
    *Download to Worksheet 4.
      CALL METHOD OF gw_excel 'Sheets' = gw_worksheet.
    Add new workbook (create a file)
      CALL METHOD OF gw_worksheet 'Add'.
      FREE OBJECT gw_worksheet.
      GET PROPERTY OF gw_excel 'Worksheets' = gw_worksheet
      exporting #1 = 'Sheet4'.
      PERFORM xls_error_hdl.
      CALL METHOD OF gw_worksheet 'Activate' .
      gv_step = 'Adding data to Excel'.
      gv_row  = 0.
    LOOP AT gi_yps_down_tab4 INTO gw_yps_common.
      LOOP AT gi_yps_down_tab4 INTO gw_exclusion.
        PERFORM conversion.
      ENDLOOP.
    To Save the Book after downloading.
      PERFORM save_excel.
    ENDFORM.                    " EXCEL_DOWNLOAD
    Thanks in advance

    hi,
    chk a sample pgm.
    *&  Include           YHCON9051INCL                                    *
    *   SUBROUTINES                                                       *
    *&      Form  F_CHECK_LOCAL_FILE_EXIST
    *       CHECK WETHER LOCAL FILE EXIST
    *      -->P_FILE LOCAL FILE NAME
    FORM f_check_local_file_exist  USING    p_file.
      DATA: loc_filename TYPE string,
            loc_flag     TYPE abap_bool.
      loc_filename = p_file.
      IF loc_filename Eq ' '.
        MESSAGE e053(8i) .
      ENDIF.
      CALL METHOD cl_gui_frontend_services=>file_exist
        EXPORTING
          file                 = loc_filename
        RECEIVING
          result               = loc_flag
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          wrong_parameter      = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
      IF sy-subrc NE wl_yes.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF loc_flag NE wl_true.
        MESSAGE e000(8i) WITH text-020 p_file.
      ENDIF.
    ENDFORM.                    " F_CHECK_LOCAL_FILE_EXIST
    *&      Form  F_UPLOAD_DATA_FROM_LOCAL_FILE
    *       GET DATA FROM EXCEL FILE AND CONVERT TO SAP FORMAT
    *      -->P_FILE LOCAL FILE NAME
    FORM f_upload_data_from_local_file  USING    p_file.
      DATA: loc_filename TYPE rlgrap-filename,
            int_raw      TYPE truxs_t_text_data.
      loc_filename = p_file.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_field_seperator    = 'X'
          i_line_header        = 'X'
          i_tab_raw_data       = int_raw
          i_filename           = loc_filename
        TABLES
          i_tab_converted_data = int_content_lfile
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc NE wl_yes.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR : int_record , int_content_lfile ,int_record[].
      LOOP AT int_content_lfile.
    * Moving the records to the Internal table for process
        int_record-adm_area = int_content_lfile-adm_area .
        int_record-dsrd_loc = int_content_lfile-dsrd_loc.
        int_record-fl_ind   = int_content_lfile-fl_ind.
        int_record-loc_loc  = int_content_lfile-loc_loc.
        int_record-loc_desc = int_content_lfile-loc_desc .
        APPEND int_record.
        CLEAR  int_record.
      ENDLOOP.
    ENDFORM.                    " F_UPLOAD_DATA_FROM_LOCAL_FILE
    *&      Form  GET_FILE_OPEN_DIALOG
    *      F4 TO FETCH THE FILE
    FORM get_file_open_dialog .
      DATA: lint_filetable TYPE filetable,
            ls_filetable   TYPE file_table,
            li_count TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
           window_title            = 'Please select the file'
           default_extension       = '*.XLS'
    *      DEFAULT_FILENAME        =
    *      FILE_FILTER             =
    *      INITIAL_DIRECTORY       =
           multiselection          = ''
    *      WITH_ENCODING           =
         CHANGING
           file_table              = lint_filetable
           rc                      = li_count
    *      USER_ACTION             =
    *      FILE_ENCODING           =
         EXCEPTIONS
           file_open_dialog_failed = 1
           cntl_error              = 2
           error_no_gui            = 3
           not_supported_by_gui    = 4
           OTHERS                  = 5.
      IF sy-subrc <> 0.
      ELSE.
        READ TABLE lint_filetable INDEX 1 INTO ls_filetable.
        IF sy-subrc EQ wl_yes.
          p_lcl = ls_filetable-filename.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_FILE_OPEN_DIALOG
    *&      Form  F_UPLOAD_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f_upload_data .
    * To move the data to Internal table fields.
      PERFORM data_transfer.
    ENDFORM.                    " F_UPLOAD_DATA
    *&      Form  F_UPDATE_TABLE
    *       ZTABLE UPDATION
    FORM f_update_table .
      DATA:   wl_sess          TYPE c,
              loc_wf_loc_desc  TYPE  zhofs_loc_desc.
      REFRESH : int_caltrscc, int_caltrerr .
      LOOP AT int_record.
    ** Moving the data as desired for the Z -table updation
    *  PERFORM MOVE_DATA.
        MOVE :
           int_record-adm_area        TO   loc_wf_loc_desc-adm_area  ,
           int_record-dsrd_loc        TO   loc_wf_loc_desc-dsrd_loc ,
           int_record-fl_ind          TO   loc_wf_loc_desc-fl_ind    ,
           int_record-loc_loc         TO   loc_wf_loc_desc-loc_loc   ,
           int_record-loc_desc        TO   loc_wf_loc_desc-loc_desc .
    * Inserting the data to the Table ZHOFS_LOT_TABLE
        INSERT zhofs_loc_desc FROM loc_wf_loc_desc .
        IF sy-subrc EQ wl_yes.
    *     Entry Inserted Correctly
          wf_suc = wf_suc + 1.
          int_caltrscc-adm_area   =  int_record-adm_area .
          int_caltrscc-dsrd_loc   =  int_record-dsrd_loc.
          int_caltrscc-fl_ind     =  int_record-fl_ind.
          int_caltrscc-loc_loc    =  int_record-loc_loc.
          int_caltrscc-reason  =  text-007.
          APPEND int_caltrscc.
          CLEAR  int_caltrscc.
        ELSE.
    *     Entry Not Inserted
          wf_err = wf_err + 1.
          int_caltrerr-adm_area   =  int_record-adm_area .
          int_caltrerr-dsrd_loc   =  int_record-dsrd_loc.
          int_caltrerr-fl_ind     =  int_record-fl_ind.
          int_caltrerr-loc_loc    =  int_record-loc_loc.
          int_caltrerr-reason  =  text-006.
          APPEND int_caltrerr.
          CLEAR  int_caltrerr.
        ENDIF.
        CLEAR :  loc_wf_loc_desc-loc_desc,int_record .
      ENDLOOP.
    ENDFORM.                    " F_UPDATE_TABLE
    *&      Form  DATA_TRANSFER
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM data_transfer .
      DATA : loc_int_loc_desc TYPE TABLE OF zhofs_loc_desc WITH HEADER LINE.
      CLEAR: int_record.
      LOOP AT int_record.
        wf_rec =  wf_rec + 1.
    *  To Check Whether an already any records exists
        SELECT *
        FROM zhofs_loc_desc
        INTO TABLE loc_int_loc_desc
        WHERE
          adm_area = int_record-adm_area AND
          dsrd_loc  = int_record-dsrd_loc AND
          loc_loc = int_record-loc_loc.
        IF sy-subrc EQ wl_yes.
    *     The entry already exist in the Table
          int_error-adm_area   =  int_record-adm_area.
          int_error-dsrd_loc   =  int_record-dsrd_loc.
          int_error-fl_ind      = int_record-fl_ind .
          int_error-loc_loc  = int_record-loc_loc.
          int_error-message =  text-005.
          APPEND int_error.
          CLEAR : int_error.
          wf_err_rec = wf_err_rec + 1.
          CONTINUE.
        ELSE.
          wf_cor_rec = wf_cor_rec + 1 .
        ENDIF.
        CLEAR: int_record.
      ENDLOOP.
      CLEAR: int_record .
      LOOP AT int_error.
        READ TABLE int_record
        WITH KEY
             adm_area = int_error-adm_area
             dsrd_loc = int_error-dsrd_loc
             loc_loc  = int_error-loc_loc .
        IF sy-subrc EQ wl_yes.
    *     Delete the duplicate entries
          DELETE int_record
          WHERE
           adm_area = int_error-adm_area AND
           dsrd_loc    = int_error-dsrd_loc AND
           fl_ind = int_error-fl_ind AND
           loc_loc = int_error-loc_loc .
        ENDIF.
        CLEAR int_error.
      ENDLOOP.
    ENDFORM.                    " DATA_TRANSFER
    *&      Form  f_check_data
    *       Check DATA
    FORM f_check_data .
    *ERROR FULL DATA
      IF wf_err_rec GT 0.
        WRITE:/060(1)   sy-vline, text-000 COLOR 6,sy-vline.
        LOOP AT int_error.
          FORMAT RESET.
          FORMAT COLOR  6 .
          WRITE:/001(1)   sy-vline,
                 002(3)   int_error-adm_area ,
                 005(1)   sy-vline  CENTERED ,
                 006(4)   int_error-dsrd_loc ,
                 010(1)   sy-vline  CENTERED ,
                 011(1)    int_error-fl_ind  ,
                 012(1)   sy-vline  CENTERED,
                 013(4)   int_error-loc_loc  ,
                 017(1)   sy-vline  CENTERED ,
                 018(25)  int_error-message  ,
                 043(1)   sy-vline  CENTERED .
          FORMAT COLOR OFF .
        ENDLOOP.
        WRITE:/001(25)  text-002,wf_err_rec.
        WRITE:/001(25)  text-003,wf_rec .
      ENDIF.
    *SUCCESSFULL DATA
      IF wf_cor_rec GT 0.
        WRITE:/060(1)   sy-vline, text-001 COLOR 1 ,sy-vline.
        LOOP AT int_record.
          FORMAT RESET.
          FORMAT COLOR 1 ON .
          WRITE:/001(1)   sy-vline,
                 002(3)   int_record-adm_area ,
                 005(1)   sy-vline  CENTERED ,
                 006(4)   int_record-dsrd_loc ,
                 010(1)   sy-vline  CENTERED ,
                 011(1)   int_record-fl_ind  ,
                 012(1)   sy-vline  CENTERED,
                 013(4)   int_record-loc_loc  ,
                 017(1)   sy-vline  CENTERED ,
                 018(25)  'PROPER ENTRY' ,
                043(1)   sy-vline  CENTERED .
          FORMAT COLOR OFF .
        ENDLOOP.
        WRITE:/001(25)  text-002,wf_cor_rec .
        WRITE:/001(25)  text-003,wf_rec .
      ENDIF.
    ENDFORM.                    " f_check_data
    *&      Form  f_check_db_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f_check_db_data .
    *ERROR FULL DATA - WHILE INSERTING TO TABLE
      IF wf_err GT 0.
        WRITE:/060(1)   sy-vline,text-004 COLOR 6,sy-vline.
        LOOP AT  int_caltrerr.
          FORMAT RESET.
          FORMAT COLOR  6 .
          WRITE:/001(1)   sy-vline,
                 002(3)    int_caltrerr-adm_area ,
                 005(1)   sy-vline  CENTERED ,
                 006(4)    int_caltrerr-dsrd_loc ,
                 010(1)   sy-vline  CENTERED ,
                 011(1)    int_caltrerr-fl_ind  ,
                 012(1)   sy-vline  CENTERED,
                 013(4)    int_caltrerr-loc_loc  ,
                 017(1)   sy-vline  CENTERED ,
                 018(25)   int_caltrerr-reason  ,
                 043(1)   sy-vline  CENTERED .
          FORMAT COLOR OFF .
        ENDLOOP.
        WRITE:/001(25)  text-002,wf_err.
        WRITE:/001(25)  text-003,wf_rec .
      ENDIF.
    *    ERROR BY DUPLICATION
      IF wf_err_rec GT 0.
        WRITE:/060(1)   sy-vline,text-000 COLOR 6,sy-vline.
        LOOP AT int_error.
          FORMAT RESET.
          FORMAT COLOR  6 .
          WRITE:/001(1)   sy-vline,
                 002(3)   int_error-adm_area ,
                 005(1)   sy-vline  CENTERED ,
                 006(4)   int_error-dsrd_loc ,
                 010(1)   sy-vline  CENTERED ,
                 011(1)    int_error-fl_ind  ,
                 012(1)   sy-vline  CENTERED,
                 013(4)   int_error-loc_loc  ,
                 017(1)   sy-vline  CENTERED ,
                 018(25)  int_error-message  ,
                 043(1)   sy-vline  CENTERED .
          FORMAT COLOR OFF .
        ENDLOOP.
        WRITE:/001(25)  text-002,wf_err_rec.
        WRITE:/001(25)  text-003,wf_rec .
      ENDIF.
    *SUCCESSFULL DATA
      IF wf_suc GT 0.
        WRITE:/060(1)   sy-vline,text-001 COLOR 1 ,sy-vline.
        LOOP AT int_caltrscc.
          FORMAT RESET.
          FORMAT COLOR 1 ON .
          WRITE:/001(1)   sy-vline,
                 002(3)   int_caltrscc-adm_area ,
                 005(1)   sy-vline  CENTERED ,
                 006(4)  int_caltrscc-dsrd_loc ,
                 010(1)   sy-vline  CENTERED ,
                 011(1)   int_caltrscc-fl_ind  ,
                 012(1)   sy-vline  CENTERED,
                 013(4)   int_caltrscc-loc_loc  ,
                 017(1)   sy-vline  CENTERED ,
                 018(25)  int_caltrscc-reason ,
                043(1)   sy-vline  CENTERED .
          FORMAT COLOR OFF .
        ENDLOOP.
        WRITE:/001(25)  text-002,wf_cor_rec .
        WRITE:/001(25)  text-003,wf_rec .
      ENDIF.
    ENDFORM.                    " f_check_db_data
    rgds
    Anver
    if hlped pls mark points

  • Export to Excel using a single format file as a template

    Can I use a single PDF file with form fields as a template to export several other similar PDF files (without fields) to excel?
    I scanned in several report files with the same table format but different data values and wanted to export this data into excel.

    Not possible.

  • Downloading in excel from sqvi report format in the background

    Dear All,
    We have developed couple of report using SQVI format for couple of reports. Now for those reports my client wants to download them in excel sheet and attach to the email, when email is triggered automatically to the specified email id's. This is urgent issue which need to be given b this week end. Thanking everyone in advance for your replies.
    Regards
    V. Srinivasa Ranganath

    Hi,
    Get the report name in selection screen of SQVI, something like AQ30SYSTQV000002MARA==========.
    Create a new job in SM36 with a step with this report
    In this job add a SPOOL Destination with defined email or list of emails
    When job is executed the spool will be automatically sent to the mailing list. If email attachments configuration is to generate an attachment in html format, that html can be saved from Outlook to local disk and opened in excel, as many html files.
    If you want something more professional you'll need to create a program in ABAP that actually does the same as the SQVI but creates a file in excel format, using abap2xlsx probably, and then sends it to the distribution list.
    Most excel functions in SAP requires the Excel in the frontend computer, so they cannot work in background or in the server side. abap2xlsx is useful in this cases.
    Regards,
    Edgar

  • Download to Excel using on Classical ALV List..

    Hi Experts,
    I want to Display data in ALV using REUSE_ALV_GRID_DISPLAY.
    I already did it.
    But on the ALV screen I have to disable all Push Buttons, and enable only one push button to Down Load to Excel Sheet.
    Can any give clear solution for this?
    Regards,
    Kumar
    Edited by: ABAP on Jun 1, 2010 1:26 PM

    Hi.
    I found class cl_salv_table (there are other ones). They handle ALV display in a much easier way that the REUSE function modules. It is worth trying. After I started using them I do not want to see REUSE* again. Here a code sample. The three last lines are actually the ones doing all the work for you.
    *& Report  MYALV
    REPORT  myalv.
    PARAMETERS: tab TYPE dd02t-tabname VALUE CHECK.
    DATA: gr_itab TYPE REF TO data,
          go_alv TYPE REF TO cl_salv_table.
    FIELD-SYMBOLS <go_itab> TYPE ANY TABLE.
    START-OF-SELECTION.
      CREATE DATA gr_itab TYPE TABLE OF (tab).
      ASSIGN gr_itab->* TO <go_itab>.
      SELECT * UP TO 100 ROWS FROM (tab) INTO TABLE <go_itab>.
      cl_salv_table=>factory( IMPORTING r_salv_table = go_alv
                              CHANGING  t_table      = <go_itab> ).
      go_alv->display( ).

  • Using different date format in Data tags

    What steps do I have to take to use dd/mm/yyyy as a format instead of yyyy-mm-dd?
    This goes for all data tags, data retrieval and manipulation.

    Steve Meunch posted a HOWTO: on this very topic. The address is http://technet.oracle.com:89/ubb/Forum2/HTML/006581.html.
    This should get you on your way.
    Remember that you can search OTN for specific topics including HOWTO topics. These topics are posted by developers, product managers, and others.
    I hope this helps,
    Gary

  • How to use the date format for the given req.?

    I have a requirement which should fetch the datas given by user. The user parameter is the date. The date will fetch the amount of the customer code for that particular month based on the date upto given by the user of that financial year.
    If the user parameter is given as 200703(YYYYMM) it should fetch the datas of the financial year from 200604(YYYYMM) to 200703(YYYYMM). The logic is the user parameter year should fetch the datas of previous year till the user given date and the month should be also do the same. Please do the needfull oracle experts.
    Regards,
    Mark

    As i am new to oracle i need help from you experts, The year and the month as seperate columns both as different data type as number and varchar2. There is no date column in the table.
    Table GTemp:
    DIVISION_CODE NUMBER(2)
    GL_CODE NUMBER(6)
    FINANCIAL_YEAR NUMBER(4)
    FINANCIAL_MONTH VARCHAR2(2)
    Query that i have used:
    SELECT ALL GTEMP.FINANCIAL_YEAR, GTEMP.FINANCIAL_MONTH, GTEMP.GL_CODE
    FROM GTEMP
    WHERE financial_year between 2007 - 1 and 2007
    and financial_month in ('4',' 12')
    and division_code = 11
    order by financial_month
    I know this will not fetch from the date the user parameter enters however is there any other options. Please help me out morgan...

Maybe you are looking for

  • Is it possible to create a timestamp with an accuracy of 1ms?

    I want to acquire data with PCI-6023 and write them with a precise timestamp to a file. Is it possible to create a timestamp with an accuracy of 1ms? Maybe somebody can tell me experiences with logging data over a time periode up to 24 hours (and tim

  • Itunes in order, but ipod not

            I have an album in my itunes library with 20 songs in it. I placed them all in the order i like and selected 1 of 20, 2 of 20 and so forth! But when i sync my ipod, all the tracks are all mixed up. Is there a way to have them in the order i h

  • How can I replicate the IOS 6 mail function in IOS 7.1

    for my work I load 50 or more mail a day. these mails are only relevant on the receiving day. My pc arranges the management of the mail with the mailserver. On my iphone  the mails pile up. In IOS 6 I could use the top 50 mail function, this function

  • Problem in "Upload" FM

    hi when i try to use UPLOAD FM i got the below error... " Function module UPLOAD is obsolete - do not use " can any one tell me y i got this error and what happens if i use this FM ? Regards Smitha

  • Add new elements to Standard Task description of INVOICE in PFTC

    Hello friends i would kindly ask for help as i am a WF beginner learning on fly. There is a standard task 40008005 SRM_IV_APPR1 with text and fields (Description) displayed: "You are responsible for the approval of &BOR_OBJECT.DOCUMENTTYPENAME& Numbe