Excel file header

hi all,
I need to convert internal table to excel file. I am using GUI-upload for that.
i used FILEDNAMES import parameter (undertables) to give file header but thats displays only single lineof header.
And i need to have a file header of 3 rows. please help me how can i get that.

hi,
1.
Try using the FM " SAP_CONVERT_TO_XLS_FORMAT "
This FM directly downloads the Internal Table data into the Excel File.
Sample Report
REPORT Z_R_TEST_FILE.
tables: vbak.
parameters: p_vkorg like vbak-vkorg,
p_file like rlgrap-filename default 'My Documents\TEST_SALE.xls'.
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
vkorg like vbak-vkorg,
end of itab.
start-of-selection.
select vbeln vkorg from vbak into table itab
where vkorg = p_vkorg.
CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
I_FILENAME = p_file
I_APPL_KEEP = ' '
TABLES
I_TAB_SAP_DATA = itab
CHANGING
I_TAB_CONVERTED_DATA =
EXCEPTIONS
CONVERSION_FAILED = 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.
write:/ 'Error while downloading'.
else.
write:/ 'Successful '.
ENDIF.
For headings to appear in the Excel file, APPEND the fieldname to the first line of the Internal Table and pass the table to the FM.
2. TYPES:
  BEGIN OF type_final,
    string(50) TYPE c,                 " String Value for Title
  END OF type_final.
data:
wa_final     TYPE type_final.     " Work Area to hold Title Data
Internal table to hold Title Data                                   *
DATA:
  i_final    TYPE STANDARD TABLE OF type_final.
FORM f400_dwnloadplantdata USING p_filepath TYPE any
                             p_table TYPE STANDARD TABLE.
  DATA:
      lw_file2 TYPE string .           " File Path
  lw_file2 = p_filepath.
*&      Form  header
This Subroutine gets data for displaying title                     *
There are no interface parameters to be passed to this subroutine. *
FORM header .
  wa_final-string = text-021.
  APPEND wa_final TO i_final.
  wa_final-string = text-022.
  APPEND wa_final TO i_final.
  wa_final-string = text-023.
  APPEND wa_final TO i_final.
  wa_final-string = text-024.
  APPEND wa_final TO i_final.
  wa_final-string = text-025.
  APPEND wa_final TO i_final.
  wa_final-string = text-026.
  APPEND wa_final TO i_final.
  wa_final-string = 'Sr.No'.
  APPEND wa_final TO i_final.
ENDFORM.                               " header
  CALL FUNCTION 'GUI_DOWNLOAD'
     EXPORTING
  BIN_FILESIZE                    = BIN_FILESIZE
       filename                        = lw_file2
       filetype                        = 'DBF'
  APPEND                          = ' '
    write_field_separator           = con_tab
  HEADER                          = '00'
  TRUNC_TRAILING_BLANKS           = 'X'
  WRITE_LF                        = 'X'
   COL_SELECT                      = 'X'
   COL_SELECT_MASK                 = w_col_sel
  DAT_MODE                        = ' '
  CONFIRM_OVERWRITE               = ' '
  NO_AUTH_CHECK                   = ' '
  CODEPAGE                        = ' '
  IGNORE_CERR                     = ABAP_TRUE
  REPLACEMENT                     = '#'
  WRITE_BOM                       = ' '
  TRUNC_TRAILING_BLANKS_EOL       = 'X'
  WK1_N_FORMAT                    = '0'
  WK1_N_SIZE                      = ' '
  WK1_T_FORMAT                    = ' '
  WK1_T_SIZE                      = ' '
IMPORTING
  FILELENGTH                      = FILELENGTH
     TABLES
       data_tab                        = i_output3
       fieldnames                      = i_final
     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           = 8
       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
  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-subrc EQ 0
ENDFORM.                               " f400_dwnloadplantdata
see i_final is a header table...where i have given header in text elements.& have passes in FM gui...
3.
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.
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.
it_join_det_new is ur internal table with data.
4. WS_EXCEL   FM.
Regards,
deepthi.

Similar Messages

  • Generating Excel file using PL/SQL

    Hi,
    I wanted to generate the excel file using the below pasted PL/SQL which I have downloaded from one of the tech sites. And as I have very limited knowledge about PL/SQL I really dont know how & where I should compile this below mentioned code and get the desired O/P?
    Please reply me ASAP if anybody can help me with this?
    Please see the below code and please help me to interpret the same.
    CREATE OR REPLACE PACKAGE gen_xl_xml IS
    -- Version 0.5
    -- Objective : The main objective OF this PACKAGE IS TO CREATE excel files from PL/SQL code
    -- Requirement : Excel version 2003 onwards support XML format.
    -- The procedures does have TO be called IN specific order at this moment.
    -- expected SEQUENCE AS OF now IS
    -- At first call create_file -> It creates a FILE WITH NAME that you pass AS parameter. This PROCEDURE writes the
    -- excel file header AND some basic requirments like default style.
    -- procedures 1. create_style , create_worksheet AND write_cell can be used IN ANY SEQUENCE AS many
    -- times AS you need.
    -- When done WITH writing TO FILE call the PROCEDURE close_file
    -- CLOSE FILE --> This will actually flush the data INTO the worksheet(s) one BY one and then close the file.
    -- What colors I can use ?
    -- red , blue , green, gray , YELLOW, BROWN , PINK . lightgray ,
    debug_flag BOOLEAN := TRUE ;
    PROCEDURE create_excel( p_directory IN VARCHAR2 DEFAULT NULL , p_file_name IN VARCHAR2 DEFAULT NULL ) ;
    PROCEDURE create_excel_apps ;
    PROCEDURE create_style( p_style_name IN VARCHAR2
    , p_fontname IN VARCHAR2 DEFAULT NULL
    , p_fontcolor IN VARCHAR2 DEFAULT 'Black'
    , p_fontsize IN NUMBER DEFAULT null
    , p_bold IN BOOLEAN DEFAULT FALSE
    , p_italic IN BOOLEAN DEFAULT FALSE
    , p_underline IN VARCHAR2 DEFAULT NULL
    , p_backcolor IN VARCHAR2 DEFAULT NULL );
    PROCEDURE close_file ;
    PROCEDURE create_worksheet( p_worksheet_name IN VARCHAR2 ) ;
    PROCEDURE write_cell_num(p_row NUMBER , p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN NUMBER , p_style IN VARCHAR2 DEFAULT NULL );
    PROCEDURE write_cell_char(p_row NUMBER, p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN VARCHAR2, p_style IN VARCHAR2 DEFAULT NULL );
    PROCEDURE write_cell_null(p_row NUMBER , p_column NUMBER , p_worksheet_name IN VARCHAR2, p_style IN VARCHAR2 );
    PROCEDURE set_row_height( p_row IN NUMBER , p_height IN NUMBER, p_worksheet IN VARCHAR2 ) ;
    PROCEDURE set_column_width( p_column IN NUMBER , p_width IN NUMBER , p_worksheet IN VARCHAR2 ) ;
    END ;
    -- Package : gen_xl_sml
    -- Version : 0.62
    CREATE OR REPLACE PACKAGE Body gen_xl_xml IS
    -- worksheets must be created before it could be passed AS parameter TO the write cell procedures
    l_file utl_FILE.file_type ;
    g_apps_env VARCHAR2(1) := 'U' ; -- unset at the start
    TYPE tbl_excel_data IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER ;
    g_excel_data tbl_excel_data ;
    g_null_data tbl_excel_data ;
    g_data_count NUMBER ;
    TYPE rec_styles IS record ( s VARCHAR2(30) , def VARCHAR2(2000) );
    TYPE tbl_style IS TABLE OF rec_styles INDEX BY BINARY_INTEGER ;
    g_styles tbl_style ;
    g_null_styles tbl_style ;
    g_style_count NUMBER := 0;
    TYPE rec_worksheets IS record ( w VARCHAR2(30) , whdr VARCHAR2(300), wftr VARCHAR2(2000) );
    TYPE tbl_worksheets IS TABLE OF rec_worksheets INDEX BY BINARY_INTEGER ;
    g_worksheets tbl_worksheets ;
    g_null_worksheets tbl_worksheets ;
    g_worksheets_count NUMBER := 0;
    TYPE rec_cell_data IS record ( r NUMBER , c NUMBER , v VARCHAR2(2000) ,s VARCHAR2(30) , w VARCHAR2(100), dt VARCHAR2(8) );
    TYPE tbl_cell_data IS TABLE OF rec_cell_data INDEX BY binary_INTEGER ;
    g_cells tbl_cell_data ;
    g_null_cells tbl_cell_data ;
    g_cell_count NUMBER := 0 ;
    TYPE rec_columns_data IS record( c NUMBER, wd NUMBER, w VARCHAR2(30) ) ;
    TYPE tbl_columns_data IS TABLE OF rec_columns_data Index BY BINARY_INTEGER ;
    g_columns tbl_columns_data ;
    g_null_columns tbl_columns_data ;
    g_column_count NUMBER ;
    TYPE rec_rows_data IS record( r NUMBER, ht NUMBER , w VARCHAR2(30) ) ;
    TYPE tbl_rows_data IS TABLE OF rec_rows_data Index BY BINARY_INTEGER ;
    g_rows tbl_ROWS_data ;
    g_null_rows tbl_rows_data ;
    g_ROW_count NUMBER ;
    PROCEDURE p ( p_string IN VARCHAR2) is
    begin
    IF debug_flag = TRUE THEN
    DBMS_OUTPUT.put_line( p_string) ;
    END IF;
    END ;
    FUNCTION style_defined ( p_style IN VARCHAR2 ) RETURN BOOLEAN IS
    BEGIN
    FOR i IN 1..g_style_count LOOP
    IF g_styles(i).s = p_style THEN
    RETURN TRUE ;
    END IF;
    END LOOP ;
    RETURN FALSE ;
    END ;
    -- Function : cell_used returns : BOOLEAN
    -- Description : Cell_used FUNCTION returns TRUE IF that cell IS already used
    -- Called BY : write_Cell_char, write_cell_num
    -- ??? right now it IS NOT called BY write_Cell_null , this needs TO be evaluated
    FUNCTION cell_used ( p_r IN NUMBER , p_c IN number , p_w IN VARCHAR2 ) RETURN BOOLEAN IS
    BEGIN
    FOR i IN 1..g_cell_count LOOP
    IF ( g_cells(i).r = p_r AND g_cells(i).c = p_c AND g_cells(i).w = p_w ) THEN
    RETURN TRUE ;
    END IF;
    END LOOP ;
    RETURN FALSE ;
    END ;
    PROCEDURE initialize_collections IS
    --- following lines resets the cell data and the cell count as it was
    -- observed that the data is retained across the two runs within same seseion.
    BEGIN
    g_cells := g_null_cells ;
    g_Cell_count := 0 ;
    g_styles := g_null_styles ;
    g_style_count := 0 ;
    g_rows := g_null_rows ;
    g_ROW_count := 0 ;
    g_columns := g_null_columns ;
    g_column_count := 0 ;
    g_excel_data := g_null_data ;
    g_data_count := 0 ;
    g_apps_env := 'U';
    g_worksheets := g_null_worksheets ;
    g_worksheets_count := 0;
    END ;
    PROCEDURE create_excel_apps is
    BEGIN
    -- CHECK the env value
    IF g_apps_env = 'N' THEN
    raise_application_error( -20001 , 'You have already called create_excel ( Non Apps ) procedure, Can not set env to create_excel_apps.');
    END IF ;
    initialize_collections ;
    g_apps_env := 'Y' ;
    END ;
    PROCEDURE create_excel( p_directory IN VARCHAR2 DEFAULT NULL , p_file_name IN VARCHAR2 DEFAULT NULL )
    IS
    BEGIN
    -- CHECK the env value
    IF g_apps_env = 'Y' THEN
    raise_application_error( -20001 , 'You have already called procedure create_excel_apps , Can not set env to Non-Apps create_excel.');
    END IF ;
    initialize_collections ;
    g_apps_env := 'N' ;
    IF ( p_directory IS NULL OR p_file_name IS NULL ) THEN
    raise_application_error( -20001 , 'p_directory and p_file_name must be not null');
    END IF ;
    BEGIN
    -- Open the FILE IN the specified directory
    l_file := utl_file.fopen( p_directory, p_file_name , 'w') ;
    EXCEPTION
    WHEN utl_file.write_error THEN
    raise_application_error( -20101 , 'UTL_FILE raised write error, check if file is already open or directory access');
    WHEN utl_file.INVALID_OPERATION THEN
    raise_application_error( -20101 , 'UTL_FILE could not open file or operate on it, check if file is already open.');
    WHEN utl_file.invalid_path THEN
    raise_application_error( -20101 , 'UTL_FILE raised invalid path, check the directory passed is correct and you have access to it.');
    WHEN others THEN
    raise_application_error( -20101 , 'UTL_FILE raised others exception ');
    END ;
    p( 'File '||p_file_name ||' created successfully');
    END ;
    PROCEDURE create_style( p_style_name IN VARCHAR2
    , p_fontname IN VARCHAR2 DEFAULT NULL
    , p_fontcolor IN VARCHAR2 DEFAULT 'Black'
    , p_fontsize IN NUMBER DEFAULT null
    , p_bold IN BOOLEAN DEFAULT FALSE
    , p_italic IN BOOLEAN DEFAULT FALSE
    , p_underline IN VARCHAR2 DEFAULT NULL
    , p_backcolor IN VARCHAR2 DEFAULT NULL ) is
    l_style VARCHAR2(2000) ;
    l_font VARCHAR2(1200);
    BEGIN
    --- CHECK IF this style IS already defined AND RAISE ERROR IF yes
    IF style_defined( p_style_name ) THEN
    RAISE_application_error( -20001 , 'Style "'||p_style_name ||'" is already defined.');
    END IF;
    g_style_count := g_style_count + 1;
    ---- ??? pass ANY value OF underline AND it will only use single underlines
    -- ??? pattern IS NOT handleed
    IF upper(p_style_name) = 'DEFAULT' THEN
    RAISE_application_error( -20001 , 'Style name DEFAULT is not allowed ');
    END IF ;
    IF upper(p_style_name) IS NULL THEN
    RAISE_application_error( -20001 , 'Style name can not be null ');
    END IF ;
    g_styles(g_style_count).s := p_style_name ;
    g_styles(g_style_count).def := ' <Style ss:ID="'|| p_style_name ||'"> ' ;
    l_font := ' <Font ' ;
    IF p_fontname IS NOT NULL THEN
    l_font :=l_font || 'ss:FontName="'|| p_fontname ||'" ';
    end if ;
    IF p_fontsize is not null then
    l_font := l_font ||' ss:Size="'|| p_fontsize ||'" ';
    end if ;
    IF p_fontcolor is not null then
    l_font := l_font ||' ss:Color="'|| p_fontcolor ||'" ';
    ELSE
    l_font := l_font ||' ss:Color="Black" ';
    end if ;
    IF p_bold = TRUE THEN
    l_font := l_font ||' ss:Bold="1" ' ;
    END IF;
    IF p_italic = TRUE THEN
    l_font := l_font ||' ss:Italic="1" ' ;
    END IF;
    IF p_underline IS NOT NULL THEN
    l_font := l_font ||' ss:Underline="Single" ' ;
    END IF ;
    -- p( l_font );
    g_styles(g_style_count).def := g_styles(g_style_count).def || l_font || '/>' ;
    IF p_backcolor IS NOT NULL THEN
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' <Interior ss:Color="'||p_backcolor ||'" ss:Pattern="Solid"/>' ;
    ELSE
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' <Interior/>';
    END IF ;
    g_styles(g_style_count).def := g_styles(g_style_count).def || ' </Style>' ;
    --- ??? IN font there IS SOME family which IS NOT considered
    END ;
    PROCEDURE close_file IS
    l_last_row NUMBER := 0 ;
    l_dt CHAR ; -- ??? Variable TO store the datatype ; this IS NOT used at this time but may be needed IF the memory
    -- issue IS there FOR example IF there IS big array
    l_style VARCHAR2(140) ;
    l_row_change VARCHAR2(100) ;
    l_file_header VARCHAR2(2000) := '<?xml version="1.0"?>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    <LastAuthor>a</LastAuthor>
    <Created>1996-10-14T23:33:28Z</Created>
    <LastSaved>2007-05-10T04:00:57Z</LastSaved>
    <Version>11.5606</Version>
    </DocumentProperties>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
    <WindowHeight>9300</WindowHeight>
    <WindowWidth>15135</WindowWidth>
    <WindowTopX>120</WindowTopX>
    <WindowTopY>120</WindowTopY>
    <AcceptLabelsInFormulas/>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
    <Alignment ss:Vertical="Bottom"/>
    <Borders/>
    <Font/>
    <Interior/>
    <NumberFormat/>
    <Protection/>
    </Style>'
    BEGIN
    IF gen_xl_xml.g_Cell_count = 0 THEN
    raise_application_error( -20007 , 'No cells have been written, this version of gen_xl_xml needs at least one cell to be written');
    END IF;
    IF gen_xl_xml.g_worksheets_count = 0 THEN
    raise_application_error( -20008 , 'No worksheets have been created, this version does not support automatic worksheet creation');
    END IF;
    p( gen_xl_xml.g_Cell_count) ;
    -- Write the header xml part IN the FILE.
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := l_file_header ;
    p( 'Headers written');
    FOR i IN 1..g_style_count LOOP
    p( ' writing style number : '||i);
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := g_styles(i).def ;
    END LOOP ;
    -- CLOSE the styles tag
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Styles>' ;
    p( 'worksheet count '|| g_worksheets_count );
    FOR j IN 1..g_worksheets_count LOOP
    l_last_row := 0 ; --- FOR every worksheet we need TO CREATE START OF the row
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    --- write the header first
    -- write the COLUMN widhts first
    -- write the cells
    -- write the worksheet footer
    l_row_change := NULL ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Worksheet ss:Name="'|| g_worksheets( j).w ||'"> ' ;
    p( '-------------------------------------------------------------');
    p( '****************.Generated sheet '|| g_worksheets( j).w);
    p( '-------------------------------------------------------------');
    -- write the TABLE structure ??? change the LINE here TO include tha maxrow AND cell
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Table ss:ExpandedColumnCount="16" ss:ExpandedRowCount="44315" x:FullColumns="1" x:FullRows="1">' ;
    FOR i IN 1..g_column_count LOOP
    IF g_columns(i).w = g_worksheets( j).w THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Column ss:Index="'||g_columns(i).c||'" ss:AutoFitWidth="0" ss:Width="'||g_columns(i).wd ||'"/> ' ;
    END IF;
    END LOOP ;
    -- write the cells data
    FOR i IN 1..g_cell_count LOOP ------ LOOP OF g_cell_count
    p( '()()()()()()()()()()()() '|| i);
    --- we will write only IF the cells belongs TO the worksheet that we are writing.
    IF g_cells(i).w <> g_worksheets(j).w THEN
    p( '........................Cell : W :'|| g_worksheets( j).w ||'=> r='|| g_cells(i).r ||',c ='|| g_cells(i).c||',w='|| g_cells(i).w );
    p( '...Not in this worksheet ');
    -- l_last_row := l_last_row -1 ;
    ELSE
    p( '........................Cell : W :'|| g_worksheets( j).w ||'=> r='|| g_cells(i).r ||',c ='|| g_cells(i).c||',w='|| g_cells(i).w );
    IF g_cells(i).s IS NOT NULL AND NOT style_defined( g_cells(i).s ) THEN
    -- p(g_cells(i).s) ;
    raise_application_error( -20001 , 'Style "'||g_cells(i).s ||'" is not defined, Note : Styles are case sensative and check spaces used while passing style');
    END IF;
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    IF l_last_row = 0 THEN
    FOR t IN 1..g_row_count LOOP
    p( '...Height check => Row =' ||g_rows(t).r ||', w='||g_rows(t).w);
    IF g_rows(t).r = g_cells(i).r AND g_rows(t).w = g_worksheets(j).w THEN
    p( '...Changing height') ;
    l_row_change := ' ss:AutoFitHeight="0" ss:Height="'|| g_rows(t).ht||'" ' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    l_last_row := g_cells(i).r ;
    EXIT ;
    ELSE
    p( '...NO change height') ;
    l_row_change := NULL ;
    END IF ;
    END loop ;
    IF l_ROW_CHANGE IS NULL THEN
    g_data_count := g_data_count + 1 ;
    p( '...Creating new row ');
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    l_last_row := g_cells(i).r ;
    END IF;
    END IF;
    IF g_cells(i).s IS NOT NULL THEN
    p( '...Adding style ');
    l_style := ' ss:StyleID="'||g_cells(i).s||'"' ;
    ELSE
    p( '...No style for this cell ');
    l_style := NULL ;
    END IF;
    p( '()()------------------------------------------------------------ last row '||l_last_row );
    IF g_cells(i).r <> l_last_row THEN
    p('...closing the row.'||g_cells(i).r);
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Row>' ;
    p( 'ROWCOUNT : '||g_row_count );
    FOR t IN 1..g_ROW_count LOOP
    p( '.....Height check => Row =' ||g_rows(t).r ||', w='||g_rows(t).w);
    IF g_rows(t).r = g_cells(i).r AND g_rows(t).w = g_worksheets(j).w THEN
    p( '.....Changing height') ;
    l_row_change := ' ss:AutoFitHeight="0" ss:Height="'|| g_rows(t).ht||'" ' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    EXIT ;
    ELSE
    p( '.....NO change height') ;
    l_row_change := NULL ;
    END IF ;
    END loop ;
    -- P( 'Row :'||g_cells(i).r ||'->'|| l_ROW_CHANGE);
    IF l_row_change IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' <Row ss:Index="'||g_cells(i).r||'"'|| l_row_change ||'>' ;
    END IF;
    IF g_cells(i).v IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ></Cell>';
    ELSE
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ><Data ss:Type="'||g_cells(i).dt ||'">'||g_cells(i).v||'</Data></Cell>';
    END IF ;
    l_last_row :=g_cells(i).r ;
    ELSE
    IF g_cells(i).v IS NULL THEN
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' > </Cell>';
    ELSE
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '<Cell ss:Index="'||g_cells(i).c||'"' || l_style ||' ><Data ss:Type="'||g_cells(i).dt ||'">'||g_cells(i).v||'</Data></Cell>';
    END IF ;
    END IF ;
    END IF ;
    NULL ;
    END LOOP ; -- LOOP OF g_cells_count
    p('...closing the row.');
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Row>' ;
    -- ??? does following COMMENT will have sheet NAME FOR debugging
    p( '-------------------------------------------------------------');
    p( '....End of writing cell data, closing table tag');
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := ' </Table>' ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := g_worksheets(j).wftr ;
    p( '..Closed the worksheet '|| g_worksheets( j).w );
    END LOOP ;
    g_data_count := g_data_count + 1 ;
    g_excel_data( g_data_count ) := '</Workbook>' ;
    p( 'Closed the workbook tag');
    IF g_apps_env = 'N' THEN
    FOR i IN 1..g_data_count LOOP
    utl_FILE.put_line( l_file, g_excel_data(i ));
    END LOOP ;
    utl_file.fclose( l_file );
    p( 'File closed ');
    ELSIF g_apps_env = 'Y' THEN
    FOR i IN 1..g_data_count LOOP
    fnd_file.put_line( fnd_file.output , g_excel_data(i));
    fnd_file.put_line( fnd_file.log , g_excel_data(i));
    END LOOP ;
    ELSE
    raise_application_error( -20001 , 'Env not set, ( Apps or not Apps ) Contact Support.' );
    END IF;
    END ;
    PROCEDURE create_worksheet ( p_worksheet_name IN VARCHAR2 ) IS
    BEGIN
    g_worksheets_count := g_worksheets_count + 1 ;
    g_worksheets(g_worksheets_count).w := p_worksheet_name ;
    g_worksheets(g_worksheets_count).whdr := '<Worksheet ss:Name=" ' || p_worksheet_name ||' ">' ;
    g_worksheets(g_worksheets_count).wftr := '<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
    <ProtectObjects>False</ProtectObjects>
    <ProtectScenarios>False</ProtectScenarios>
    </WorksheetOptions>
    </Worksheet>' ;
    END ;
    PROCEDURE write_cell_char(p_row NUMBER, p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN VARCHAR2, p_style IN VARCHAR2 DEFAULT NULL ) IS
    l_ws_exist BOOLEAN ;
    l_worksheet VARCHAR2(2000) ;
    BEGIN
    -- CHECK IF this cell has been used previously.
    IF cell_used( p_row , p_column , p_worksheet_name ) THEN
    RAISE_application_error( -20001 , 'The cell ( Row: '||p_row ||' Column:'||p_column ||' Worksheet:'||p_worksheet_name ||') is already used.Check if you have missed to increment row number in your code. ');
    END IF;
    -- IF worksheet NAME IS NOT passed THEN use first USER created sheet ELSE use DEFAULT sheet
    -- this PROCEDURE just adds the data INTO the g_cells TABLE
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := p_value ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := 'String' ;
    END ;
    PROCEDURE write_cell_num(p_row NUMBER , p_column NUMBER, p_worksheet_name IN VARCHAR2, p_value IN NUMBER , p_style IN VARCHAR2 DEFAULT NULL ) IS
    l_ws_exist BOOLEAN ;
    l_worksheet VARCHAR2(2000) ;
    BEGIN
    -- ??? IF worksheet NAME IS NOT passed THEN use first USER created sheet ELSE use DEFAULT sheet
    -- this PROCEDURE just adds the data INTO the g_cells TABLE
    -- CHECK IF this cell has been used previously.
    IF cell_used( p_row , p_column , p_worksheet_name ) THEN
    RAISE_application_error( -20001 , 'The cell ( Row: '||p_row ||' Column:'||p_column ||' Worksheet:'||p_worksheet_name ||') is already used. Check if you have missed to increment row number in your code.');
    END IF;
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := p_value ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := 'Number' ;
    END ;
    PROCEDURE write_cell_null(p_row NUMBER , p_column NUMBER , p_worksheet_name IN VARCHAR2, p_style IN VARCHAR2 ) IS
    BEGIN
    -- ???? NULL IS allowed here FOR time being. one OPTION IS TO warn USER that NULL IS passed but otherwise
    -- the excel generates without error
    g_cell_count := g_cell_count + 1 ;
    g_cells( g_cell_count ).r := p_row ;
    g_cells( g_cell_count ).c := p_column ;
    g_cells( g_cell_count ).v := null ;
    g_cells( g_cell_count ).w := p_worksheet_name ;
    g_cells( g_cell_count ).s := p_style ;
    g_cells( g_cell_count ).dt := NULL ;
    END ;
    PROCEDURE set_row_height( p_row IN NUMBER , p_height IN NUMBER, p_worksheet IN VARCHAR2 ) IS
    BEGIN
    g_ROW_count := g_ROW_count + 1 ;
    g_rows( g_row_count ).r := p_row ;
    g_rows( g_row_count ).ht := p_height ;
    g_rows( g_row_count ).w := p_worksheet ;
    END ;
    PROCEDURE set_column_width( p_column IN NUMBER , p_width IN NUMBER, p_worksheet IN VARCHAR2 ) IS
    BEGIN
    g_column_count := g_column_count + 1 ;
    g_columns( g_column_count ).c := p_column ;
    g_columns( g_column_count ).wd := p_width ;
    g_columns( g_column_count ).w := p_worksheet ;
    END ;
    END ;
    SHOW errors ;
    Thanks,
    Maddy B

    Hi,
    Peter Gjelstrup wrote:
    Next thing is how to use it:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    create_file(k_file);
    -- Call other procedures
    close_file;
    end;
    Don't forget: these procedures are all part of the gen_xl_xml package.
    To call them from outside the package, you have to prefix each procedure name with the package name, like this:
    declare
    k_file constant varchar2(30) := 'YourFile.xls'
    begin
    gen_xl_xml.create_file(k_file);
    -- Call other procedures
    gen_xl_xml.close_file;
    end;

  • No column heading in second page in alv report when save in excel file

    Hi Expert,
    How can i remove the column header from Alv report when program execute in background and save in excel file right now
    its comming column header in each page. Client dont want header column in excel from second page. is this possible?
    with regards
    chandan_viji

    Hi Ravi,
    thanks for reply i have solved this problm throug line count and NEW-PAGE LINE COUNT 10000 bcoz client want output in excel file only one page header.
    with regards
    chandan_viji

  • Need to extend header length in Excel file being downloaded by GUI_DOWNLOAD

    hello Experts,
    I have written a program where the data from DSO is downloaded into Excel File which is being saved on my desktop.
    Now, i am facing one problem with the length of header and the values.
    For eg:
    I have 15 cloumns and i have given description for each column ie header name. This header is being displayed only upto 255 characters. If the total length of all the columns header desc exceeds 255 char, then blank header is displayed further.
    Same is the case with the values of the columns.
    I am pasting the relevant code.
    The code for displaying header and fields is:
    Concatenate
    'Sales Org'
    'Sales Org Desc'
    'Sales Dist'
    'Sales Dist Desc'
    'Sales Rep'
    'Sales Rep Desc'
    'Customer Number'
    'Customer Desc'
    'Billing Document'
    'AGI Code No'
    'AgiCode Desc'
    'UCAGI Code No'
    'UCAGI Code Desc'
    'Design Code'
    'CalMonth'
    'CalYear'
    'Billing Qty'
    'ZDIF'
    'ZE01'
    'ZE13'
    Into ls_contents-line SEPARATED BY lc_tab.
    APPEND ls_contents TO lt_contents.
    CLEAR ls_contents.
    Loop at i_t_Table into wa_i_t_t_Table.
    concatenate
          wa_i_t_t_Table-/BIC/G00000574
          wa_i_t_t_Table-salesorg_name
          wa_i_t_t_Table-/BIC/G00000514
          wa_i_t_t_Table-salesdist_name
          wa_i_t_t_Table-/BIC/G00009361
          wa_i_t_t_Table-SalesRep_name
          wa_i_t_t_Table-/BIC/G00000466
          wa_i_t_t_Table-Customer_name
          wa_i_t_t_Table-/BIC/G00000464
          wa_i_t_t_Table-/BIC/G00000001
          wa_i_t_t_Table-agicode_name
          wa_i_t_t_Table-/BIC/G00000002
          wa_i_t_t_Table-UCagicode_name
          wa_i_t_t_Table-/BIC/G00000005
          wa_i_t_t_Table-CALMONTH2
          wa_i_t_t_Table-CALYEAR
          wa_i_t_t_Table-/BIC/G00001108
          wa_i_t_t_Table-/BIC/G00021022
          wa_i_t_t_Table-/BIC/G00021023
          wa_i_t_t_Table-/BIC/G00021024
    INTO ls_contents-line SEPARATED BY lc_tab.
    *CONCATENATE ls_contents lv_hex1 INTO ls_contents.
              APPEND ls_contents TO lt_contents.
              CLEAR ls_contents.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
       FILENAME                        = c_filename
    FILETYPE                        = 'DAT'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = ' '
    HEADER                          = '01'
      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                    = '0'
      WK1_N_SIZE                      = '20'
      WK1_T_FORMAT                    = '0'
      WK1_T_SIZE                      = '20'
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = lt_contents
      FIELDNAMES                      =
    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           = 8
      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.
    Note:  Gone through SDN where many things are suggested like to use parameter of GUI_DOWNLAOD ie "FIELDNAMES " which is disabled in my SAP version.
    Please suggest how to make all the headers and the values of the fields properly.
    Would appreciate immediate help.
    Thanks in advance.
    Regards
    Lavanya

    solved.

  • How to read the contents in the excel file on the basis of colunm heading?

    Hi,
    Here is my requirement like that  in excel file i got the customer number , amount etc....
    And my required fields are customer and amount. In file customer nr is under the heading 'CUSTOMER' and amount is under the heading 'AMOUNT'.
    Is there any FM for reading the contents under the colunm heading of excel?
    Please suggest me.
    Thanks,
    Harshal kulkarni

    Hi Harshal ,
    I dont think there is such function module /BAPI/Class-Method .
    but if your excel file is dynamic you can write your own logic using field - symbols.
    Regards ,
    Praveen

  • Translation of heading in Excel file.

    Hi frnd,
    My requirment is to send a report in excel format to the customer in customer language.
    The headings of each coulmns are translated to customer language format.
    I defined the column heading in Text symbols.
    Goto>text elements->text symbols.
    I have maintained the translation for each countries using:
    se63>translation->R3 enterprise->short text->S3 abap text---->REPT text elements.
    Here i give the object name as my report name and my desired languages.
    i could able to maintain the laguage.
    I am reading the heading using CALL FUNCTION 'LXE_OBJ_TEXT_PAIR_READ_RPT4'.
    My code:-
    y_lv_lang = y_wa_cust-LANGU.
      refresh y_it_label.
      CALL FUNCTION 'LXE_OBJ_TEXT_PAIR_READ_RPT4'
        EXPORTING
          t_r3_lang       = y_lv_lang
          s_r3_lang       = y_lv_lang
          o_r3_lang       = y_lv_lang
          objtype         = y_k_obtyp
          objname         = y_k_objn
         READ_ONLY       = 'X'
      IMPORTING
        PSTATUS         =
        tables
          lt_pcx_s1       = y_it_label
    Here the y_it_label will contain the translated colomn heading where as y_k_objn is the prog name ,y_k_obtyp is the object type which contain 'RPT4' and y_lv_lang contain the language.
    I am able to send report in excel format in customer language via mail. But when the customer is of Russia and ukrane the columns hedaing are printed as
    Ex:-
    'Material' is printed as    > 4  8 7 4 5 ; 8 O insted of of the russian language 'Код изделия'
    when my customer recieves the report as an excel file it gets the coulmn heading as this type wong character.

    Hi Sowmya,
    when you refer to my Excel Export tutorial on SDN: <a href="https://wiki.sdn.sap.com/wiki/x/0mQ">Exporting Table Data Using On-Demand Streams - SAP NetWeaver 7.0</a>:
    use <b>LinkedHashMap</b> instead of <i>HashMap</i>:
      private Map getProductColumnInfos() {
        Map columnInfosMap = new LinkedHashMap();
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.QUANTITY, "Quantity");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.ARTICLE, "Article");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.COLOR, "Color");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.PRICE, "Price in EURO");
        columnInfosMap.put(
          IPrivateTableCompBasketView.IProductsElement.TOTAL__PER__ARTICLE,
          "Total Per Article In Euro");
        return columnInfosMap;
    This keeps the order of key-displaytext-pairs passed by the client (table component) to the service (excel export component) stable.
    Regards, Bertram

  • Is there a way to check whether an Excel file has a header or not?

    Hi!
    I'm currently using POI Utility to read and write Excel files.
    You normally use the HasHeaderRow = true / false to specify whether the file has a header or not.
    Now, let's say I have a program that needs to read Excel files from a directory, some have headers, some don't.
    Is there a way to know dynamically whether a header has been defined or not?
    Then, for those having headers, the flag will be set as true, while for those which don't have any header, the flag will be set as false.
    E.g.
    <!--- Create an instance of the POIUtility.cfc. --->
        <cfset objPOI = CreateObject(
            "component",
            "POIUtility"
            ).Init()
            />
    <!--- Set directory --->
    <cfset currentDirectory = GetDirectoryFromPath(GetTemplatePath()) & "newDir">
    <!--- Check whether the directory exists. --->
    <cfif DirectoryExists(variables.currentDirectory)>
         <!--- Read files from the specified directory --->
         <cfdirectory action="list" directory="#variables.currentDirectory#" type="file" filter="*.xls" name="qDirectory">
         <!--- Check if the directory has any Excel file --->
         <cfif variables.qDirectory.recordcount gt 0>
              <!--- Loop query --->
         <cfloop query="variables.qDirectory">
                   <!--- Check if header is present in each of the file --->
                        IF headerExists THEN
                             headerFlag = true
                        ELSE
                             headerFlag = false
                        END IF
                   <!--- Read Excel File --->
                <cfset objSheet = objPOI.ReadExcel(FilePath = #variables.qDirectory.name#, HasHeaderRow = #variables.headerFlag#, SheetIndex = 0) />
              </cfloop>
         </cfif>
    </cfif>
    Any help would be most welcome.
    Thanks and regards,
    Yogesh Mahadnac  

    Hi cfSearching,
    Many thanks for your reply! I really do appreciate!
    However, I've still got 1 more question for you.
    At the moment, I'm using POI and sometimes cfx_Excel2Query to read Excel files.
    In both cases, you have to specify whether the first row is a header.
    How would you read the Excel file to check whether the 1st row is the header?
    I've tried using cffile, but I get all sorts of "garbage"
            <cffile action="read" file="#variables.filename#" variable="xlsResult">
            <cfloop index="i" list="#variables.xlsResult#" delimiters="#chr(13)#&#chr(10)#">
                <cfif variables.i eq 1>
                    <cfoutput>
                        Test 1st Row: #trim(replacenocase(listgetat(variables.i,1,","),'"',"","All"))#
                    </cfoutput>
                </cfif>
            </cfloop>
    I get the following output:
    ÐÏ à¡± á����.... etc etc
    I'd be very much grateful if you could please advise on the latter at your earliest convenience.
    Thanks and best regards,
    Yogesh Mahadnac

  • I'm trying to import raw data from excel file to diadem, how can i do that, and also i want to know if i can put header for it or not?

    i'm using diadem version 8.1, and my operating system is windows Me.
    i'm also want to know if the diadem hae an "undo button" or not??
    Thansk.

    Hi,
    To import EXCEL files you can open the device DATA and then go to the menu FILE->OPEN. In the following dialog you must set the FILE TYPE to Excel. If you open an Excel file with that settings the Excel-file-import-wizard will be launched. With the wizard you configure the parameters which should be imported (that includes header parameter too). Please refer to the NI-Web page to get the latest service pack "SP1d" for the Excel import filter (http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C104B?opendocument&node=132070_US)
    Yes, in DIAdem 8.1 we support undo for displacements in the device GRAPH. For DIAdem 9 we expand this functionality.
    I hope this information will help you.
    Greetings
    Walter Rick

  • DOWNLOAD HEADER & ITEM RECORD INTO EXCEL FILE

    I WANT TO KNOW THE LOGIC TO POPULATE HEADER DATA AND ITEM DATA INTO SAME INTERNAL TABLE AND AGAIN DOWNLOAD THE SAME TO EXCEL FILE .
    Header structure : rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item  structure    : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Final internal table : Combination of these 2 fields. i need to populate these and download.

    Hi,
    fill at first your ITAB with header-date and append it. Then append your items.
    Do not SORT after appending.
    Regards Mario

  • Need suggestion in uploading dynamic excel file to corresponding columns of internal table

    Hi Friends,
    I have an excel file which doesn't have standard template. Just the users will key in their header (in row1 ) and followed by item details in excel and upload to internal table. Now by doing some internal developments in program I need to place the values in corresponding fields.
    Let me explain with some examples.
    1. I have an internal table
    data : begin of itab occurs 0,
                       f1,
                       f2,
                       f3,
                       f4,
                       f5,
              end of itab.
    2. I have excel file as below
    3 . Now i need to fill my internal table itab as below
    Need to be placed in corresponding fields.
    4. When I used GUI_UPLOAD FM it updates internal table as
    Please give me suggestion on how to achieve it.
    Thanks in advance.

    Hi Kumar,
    use a temporary table to get excel values and then parse them to a second table with the format you want.
    This is pretty basic.
    regards,
    Edgar

  • Steps to prepare and upload  excel  files data to r/3?

    Hi abap experts,
    We have brand new installed ECC system somehow configured but with no master or transaction data loaded .It is new  empty system....We also have some legacy data in excel files...We want to start loading some data into the SAP sandbox step by step and to see how they work...test some transactions see if the loaded data are good etc initial tests.
    Few questions here are raised:
    -Can someone tell me what is the process of loading this data into SAP system?
    -Should this excel file must me reworked prepared somehow(fields, columns etc) in order to be ready for upload to SAP??
    -Users asked me how to prepared their legacy excel files so they can be ready in SAP format for upload.?Is this an abaper  job or it is a functional guy job?
    -Or should the excel files be converted to .txt files and then imported to SAP?Does it really make some difference if files are in excel or .txt format?
    -Should the Abaper determine the structure of those excel file(to be ready for upload ) and if yes,  what are the technical rules here ?
    -What tools should be used for this initial data loads? CATT , Lsmw , batch input or something else?
    -At which point we should test the data?I guess after the initial load?
    -What tools are used in all steps before...
    -If someone can provide me with step by step scenario or guide of loading some kind of initial  master data - from .xls file alignment  to the real upload  - this will be great..
    You can email me  some upload guide or some excel/txt file examples and screenshots documents to excersize....Email: [email protected]
    Your help is appreciated it.!
    Jon

    Depends on data we upload the data from file to R/3 .
    If it is regular updation then we used to get the data from application server files to R/3 since local file updation we can not set up background processing..
    If it is master data upload and that to one time upload then we use presenation server files to SAP R/3..
    See the simple example to upload the data to on master custom table from XLS File
    Program    : ZLWMI151_UPLOAD(Data load to ZBATCH_CROSS_REF Table)
    Type       : Upload program
    Author     : Seshu Maramreddy
    Date       : 05/16/2005
    Transport  : DV3K919574
    Transaction: None
    Description: This program will get the data from XLS File
                 and it upload to ZBATCH_CROSS_REF Table
    REPORT ZLWMI151_UPLOAD no standard page heading
                           line-size 100 line-count 60.
    *tables : zbatch_cross_ref.
    data : begin of t_text occurs 0,
           werks(4) type c,
           cmatnr(15) type c,
           srlno(12) type n,
           matnr(7) type n,
           charg(10) type n,
           end of t_text.
    data: begin of t_zbatch occurs 0,
          werks like zbatch_cross_ref-werks,
          cmatnr like zbatch_cross_ref-cmatnr,
          srlno like zbatch_cross_ref-srlno,
          matnr like zbatch_cross_ref-matnr,
          charg like zbatch_cross_ref-charg,
          end of t_zbatch.
    data : g_repid like sy-repid,
           g_line like sy-index,
           g_line1 like sy-index,
           $v_start_col         type i value '1',
           $v_start_row         type i value '2',
           $v_end_col           type i value '256',
           $v_end_row           type i value '65536',
           gd_currentrow type i.
    data: itab like alsmex_tabline occurs 0 with header line.
    data : t_final like zbatch_cross_ref occurs 0 with header line.
    selection-screen : begin of block blk with frame title text.
    parameters : p_file like rlgrap-filename obligatory.
    selection-screen : end of block blk.
    initialization.
      g_repid = sy-repid.
    at selection-screen on value-request for p_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                PROGRAM_NAME = g_repid
           IMPORTING
                FILE_NAME    = p_file.
    start-of-selection.
    Uploading the data into Internal Table
      perform upload_data.
      perform modify_table.
    top-of-page.
      CALL FUNCTION 'Z_HEADER'
      EXPORTING
        FLEX_TEXT1       =
        FLEX_TEXT2       =
        FLEX_TEXT3       =
    *&      Form  upload_data
          text
    FORM upload_data.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                FILENAME                = p_file
                I_BEGIN_COL             = $v_start_col
                I_BEGIN_ROW             = $v_start_row
                I_END_COL               = $v_end_col
                I_END_ROW               = $v_end_row
           TABLES
                INTERN                  = itab
           EXCEPTIONS
                INCONSISTENT_PARAMETERS = 1
                UPLOAD_OLE              = 2
                OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        write:/10 'File '.
      ENDIF.
      if sy-subrc eq 0.
        read table itab index 1.
        gd_currentrow = itab-row.
        loop at itab.
          if itab-row ne gd_currentrow.
            append t_text.
            clear t_text.
            gd_currentrow = itab-row.
          endif.
          case itab-col.
            when '0001'.
              t_text-werks = itab-value.
            when '0002'.
              t_text-cmatnr = itab-value.
            when '0003'.
              t_text-srlno = itab-value.
            when '0004'.
              t_text-matnr = itab-value.
            when '0005'.
              t_text-charg = itab-value.
          endcase.
        endloop.
      endif.
      append t_text.
    ENDFORM.                    " upload_data
    *&      Form  modify_table
          Modify the table ZBATCH_CROSS_REF
    FORM modify_table.
      loop at t_text.
        t_final-werks = t_text-werks.
        t_final-cmatnr = t_text-cmatnr.
        t_final-srlno = t_text-srlno.
        t_final-matnr = t_text-matnr.
        t_final-charg = t_text-charg.
        t_final-erdat = sy-datum.
        t_final-erzet = sy-uzeit.
        t_final-ernam = sy-uname.
        t_final-rstat = 'U'.
        append t_final.
        clear t_final.
      endloop.
      delete t_final where werks = ''.
      describe table t_final lines g_line.
      sort t_final by werks cmatnr srlno.
    Deleting the Duplicate Records
      perform select_data.
      describe table t_final lines g_line1.
      modify zbatch_cross_ref from table t_final.
      if sy-subrc ne 0.
        write:/ 'Updation failed'.
      else.
        Skip 1.
        Write:/12 'Updation has been Completed Sucessfully'.
        skip 1.
        Write:/12 'Records in file ',42 g_line .
        write:/12 'Updated records in Table',42 g_line1.
      endif.
      delete from zbatch_cross_ref where werks = ''.
    ENDFORM.                    " modify_table
    *&      Form  select_data
          Deleting the duplicate records
    FORM select_data.
      select werks
             cmatnr
             srlno from zbatch_cross_ref
             into table t_zbatch for all entries in t_final
             where werks = t_final-werks
             and  cmatnr = t_final-cmatnr
             and srlno = t_final-srlno.
      sort t_zbatch by werks cmatnr srlno.
      loop at t_zbatch.
        read table t_final with key werks = t_zbatch-werks
                                    cmatnr = t_zbatch-cmatnr
                                    srlno = t_zbatch-srlno.
        if sy-subrc eq 0.
          delete table t_final .
        endif.
        clear: t_zbatch,
               t_final.
      endloop.
    ENDFORM.                    " select_data
    and also you can use .txt file upload using Function module - GUI_UPLOAD
    if it is application server then use open datset command.
    Thanks
    Seshu

  • Save as dialog window for excel file save ....

    hi!
    i have a jsp that displays all the report names to the clients and when clicked on the report downloads an excel file and saves to the client machine.this is accomplished by calling a servlet that sets the content type as "application/octet-stream" and setting the header as "setHeader("Content-Disposition", "attachment; filename=myExcel.xls")
    and writing the bytes to the excel file.works just perfect.
    now if you open the excel file and make changes to it and try to save it with a different name by clicking 'save as' option from file menu, the 'save as file type' by default shows "text" instead of excel worksheet.
    have you guys come across this problem anytime....
    kindly let me know you have any suggestions ..
    thanks in advance,
    /rahul

    one more point:
    the save as list box displays "myExcel.xls"(with quotes) where it should have displayed simply myExcel.

  • UPLOAD DATA FROM EXCEL FILE

    hi guru,
    I want to upload data from excel file for mm02.. first of all help on the matter of how to upload data from excel...
    i hv used the FM ALSM_EXCEL_TO_INTERNAL_TABLE.. but its not working it uploading garbage value ... so tell me how to used it...
    help me on this matter.

    Check below example.
    parameters :  p_file  LIKE rlgrap-filename OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM get_file_name.
      PERFORM get_file_to_excel.
    *&      Form  get_file_name
    FORM get_file_name.
      DATA: lv_name LIKE sy-repid.
      lv_name = sy-repid..
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                program_name  = lv_name
                dynpro_number = syst-dynnr
                static        = 'X'
           CHANGING
                file_name     = p_file.
    ENDFORM. " get_file_name
    *&      Form  get_file_to_excel
    FORM get_file_to_excel.
      DATA: idata LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_file
                i_begin_col             = '1'
                i_begin_row             = '2'  "Do not require headings
                i_end_col               = '2'
                i_end_row               = '60000'
           TABLES
                intern                  = idata
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        STOP.
      ENDIF.
    * Get first row retrieved
      READ TABLE idata INDEX 1.
    * Set first row retrieved to current row
      DATA: gd_currentrow TYPE i.
      gd_currentrow = idata-row.
      LOOP AT idata.
    *   Reset values for next row
        IF idata-row NE gd_currentrow.
          APPEND f.  CLEAR f.
          gd_currentrow = idata-row.
        ENDIF.
        CASE idata-col.
          WHEN '0001'.
            f-belnr   = idata-value.
        ENDCASE.
      ENDLOOP.
      APPEND f.  CLEAR f.

  • Sharepoint foundation 2013, IIS Logging can't logging excel file problem

    Hello, I am new in SharePoint 2013, 
    When I was using SharePoint foundation 2010, I am using IIS for audit log. That can logging user name and what they clicked.
    some like:
    2014-05-28 08:09:40 10.161.121.247 GET /folder/subfolder/file.PDF - 80 domain\userid1,
    2014-05-28 08:09:40 10.161.121.247 HEAD /folder/subfolder/file.XLSX - 80 domain\userid2,
    When I am using SharePoint foundation 2013 the log like this:
    2014-05-28 08:09:40 10.161.121.247 GET /folder/subfolder/file.PDF - 80 0#.w|domain\userid1,
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/ - 80 0#.w|domain\userid2,
    The excel file can't logging, how can I fix it?

    Hello Margriet,
    thank for your answer, 
    what I mean is that:
    I would like my log like:
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/file.xlsx - 80 0#.w|domain\userid2,
    not
    2014-05-28 08:09:40 10.161.121.247 OPTIONS /folder/subfolder/ - 80 0#.w|domain\userid2,

  • How to upload excel file in application server??

    Hi,
    How to upload an excel file into internal table in background mode from application server?
    Thanks

    Hi vipin,
    check this it may help you...
    hope below links helps you
    Export the report list to Excel Sheet
    http://www.sapdevelopment.co.uk/file/file_updown.htm
    or below is a sample programme which helps you upload and download
    REPORT ytest5 LINE-SIZE 80
                    LINE-COUNT 65
                    NO STANDARD PAGE HEADING.
    TABLES: dd02l, dd03l.
    * selection screen
    SELECTION-SCREEN BEGIN OF BLOCK b00 WITH FRAME TITLE text-b00.
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
    PARAMETERS: tabname     LIKE dd02l-tabname OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b01.
    SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
    PARAMETERS: path(30)    TYPE c DEFAULT 'C:SAPWorkdir'.
    SELECTION-SCREEN END OF BLOCK b03.
    SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
    PARAMETERS: p_exp RADIOBUTTON GROUP radi,
                p_imp RADIOBUTTON GROUP radi,
                p_clear     AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b04.
    SELECTION-SCREEN END OF BLOCK b00.
    * data
    DATA: q_return     LIKE syst-subrc,
          err_flag(1)  TYPE c,
          answer(1)    TYPE c,
          w_text1(62)  TYPE c,
          w_text2(40)  TYPE c,
          winfile(128) TYPE c,
          w_system(40) TYPE c,
          winsys(7)    TYPE c,
          zname(8)     TYPE c,
          w_line(80)   TYPE c.
    * internal tables
    DATA : BEGIN OF textpool_tab OCCURS 0.
            INCLUDE STRUCTURE textpool.
    DATA : END OF textpool_tab.
    * table for subroutine pool
    DATA : itab(80) OCCURS 0.
    * events
    INITIALIZATION.
      PERFORM check_system.
    AT SELECTION-SCREEN ON tabname.
      PERFORM check_table_exists.
    START-OF-SELECTION.
      PERFORM init_report_texts.
      PERFORM request_confirmation.
    END-OF-SELECTION.
      IF answer = 'J'.
        PERFORM execute_program_function.
      ENDIF.
    TOP-OF-PAGE.
      PERFORM process_top_of_page.
    * forms
    *       FORM CHECK_TABLE_EXISTS                                      *
    FORM check_table_exists.
      SELECT SINGLE * FROM dd02l
      INTO CORRESPONDING FIELDS OF dd02l
      WHERE tabname = tabname.
      CHECK syst-subrc NE 0.
      MESSAGE e402(mo) WITH tabname.
    ENDFORM.
    *       FORM INIT_REPORT_TEXTS                                        *
    FORM init_report_texts.
      READ TEXTPOOL syst-repid
      INTO textpool_tab LANGUAGE syst-langu.
      LOOP AT textpool_tab
      WHERE id EQ 'R' OR id EQ 'T'.
        REPLACE '&1............................'
        WITH tabname INTO textpool_tab-entry.
        MODIFY textpool_tab.
      ENDLOOP.
    ENDFORM.
    *       FORM REQUEST_CONFIRMATION                                     *
    FORM request_confirmation.
    * import selected, confirm action
      IF p_imp = 'X'.
    *   build message text for popup
        CONCATENATE 'Data for table'
                     tabname
                     'will be imported' INTO w_text1 SEPARATED BY space.
    *   check if delete existing selected, and change message text
        IF p_clear = ' '.
          w_text2 = 'and appended to the end of existing data'.
        ELSE.
          w_text2 = 'Existing Data will be deleted'.
        ENDIF.
        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
             EXPORTING
                  defaultoption  = 'N'
                  textline1      = w_text1
                  textline2      = w_text2
                  titel          = 'Confirm Import of Data'
                  cancel_display = ' '
             IMPORTING
                  answer         = answer
             EXCEPTIONS
                  OTHERS         = 1.
      ELSE.
    *   export selected, set answer to yes so export can continue
        answer = 'J'.
      ENDIF.
    ENDFORM.
    *       FORM EXECUTE_PROGRAM_FUNCTION                                 *
    FORM execute_program_function.
      PERFORM build_file_name.
      CLEAR: q_return,err_flag.
      IF p_imp = 'X'.
        PERFORM check_file_exists.
        CHECK err_flag = ' '.
        PERFORM func_import.
      ELSE.
        PERFORM func_export.
      ENDIF.
    ENDFORM.
    *       FORM BUILD_FILE_NAME                                          *
    FORM build_file_name.
      MOVE path TO winfile.
      WRITE '' TO winfile+30.
      WRITE tabname TO winfile+31.
      WRITE '.TAB' TO winfile+61(4).
      CONDENSE winfile NO-GAPS.
    ENDFORM.
    *       FORM CHECK_FILE_EXISTS                                        *
    FORM check_file_exists.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                filename = winfile
                query    = 'FE'
           IMPORTING
                return   = q_return
           EXCEPTIONS
                OTHERS   = 1.
      IF syst-subrc NE 0 OR q_return NE 1.
        err_flag = 'X'.
      ENDIF.
    ENDFORM.
    *     FORM func_export                                              *
    FORM func_export.
      CLEAR itab. REFRESH itab.
      APPEND 'PROGRAM SUBPOOL.' TO itab.
      APPEND 'FORM DOWNLOAD.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB.' TO itab.
      CONCATENATE 'SELECT * FROM'
                  tabname
                  'INTO TABLE IT_TAB.' INTO w_line  SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'CALL FUNCTION ''WS_DOWNLOAD''' TO itab.
      APPEND 'EXPORTING' TO itab.
      CONCATENATE 'filename = ' ''''
                  winfile '''' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'filetype = ''DAT''' TO itab.
      APPEND 'TABLES' TO itab.
      APPEND 'DATA_TAB = IT_TAB.' TO itab.
      APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
      APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
      APPEND 'WRITE: /1 syst-vline,' TO itab.
      APPEND '''EXPORT'',' TO itab.
      APPEND '15 ''data line(s) have been exported'',' TO itab.
      APPEND '68 syst-index,' TO itab.
      APPEND '80 syst-vline.' TO itab.
      APPEND 'ULINE.' TO itab.
      APPEND 'ENDFORM.' TO itab.
      GENERATE SUBROUTINE POOL itab NAME zname.
      PERFORM download IN PROGRAM (zname).
    ENDFORM.
    *       FORM func_import                                              *
    FORM func_import.
      CLEAR itab. REFRESH itab.
      APPEND 'PROGRAM SUBPOOL.' TO itab.
      APPEND 'FORM UPLOAD.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB.' TO itab.
      APPEND 'DATA: BEGIN OF IT_TAB2 OCCURS 0.' TO itab.
      CONCATENATE 'INCLUDE STRUCTURE'
                  tabname
                  '.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'DATA: END OF IT_TAB2.' TO itab.
      APPEND 'CALL FUNCTION ''WS_UPLOAD''' TO itab.
      APPEND 'EXPORTING' TO itab.
      CONCATENATE 'filename = ' ''''
                  winfile '''' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'filetype = ''DAT''' TO itab.
      APPEND 'TABLES' TO itab.
      APPEND 'DATA_TAB = IT_TAB.' TO itab.
      IF p_clear = 'X'.
        CONCATENATE 'SELECT * FROM'
                    tabname
                    'INTO TABLE IT_TAB2.' INTO w_line SEPARATED BY space.
        APPEND w_line TO itab.
        APPEND 'LOOP AT IT_TAB2.' TO itab.
        CONCATENATE 'DELETE'
                    tabname
                    'FROM IT_TAB2.' INTO w_line SEPARATED BY space.
        APPEND w_line TO itab.
        APPEND 'ENDLOOP.' TO itab.
        APPEND 'COMMIT WORK.' TO itab.
      ENDIF.
      APPEND 'LOOP AT IT_TAB.' TO itab.
      CONCATENATE 'MODIFY'
                  tabname
                  'FROM IT_TAB.' INTO w_line SEPARATED BY space.
      APPEND w_line TO itab.
      APPEND 'ENDLOOP.' TO itab.
      APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
      APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
      APPEND 'WRITE: /1 syst-vline,' TO itab.
      APPEND '''IMPORT'',' TO itab.
      APPEND '15 ''data line(s) have been imported'',' TO itab.
      APPEND '68 syst-index,' TO itab.
      APPEND '80 syst-vline.' TO itab.
      APPEND 'ULINE.' TO itab.
      APPEND 'ENDFORM.' TO itab.
      GENERATE SUBROUTINE POOL itab NAME zname.
      PERFORM upload IN PROGRAM (zname).
    ENDFORM.
    *       Form  CHECK_SYSTEM
    *            Check users workstation is running
    *            WINDOWS 95, or WINDOWS NT.
    *            OS/2 uses 8.3 file names which are no good for
    *            this application as filenames created are 30 char
    *            same as table name.
    *            You could change the logic to only use the first 8 chars
    *            of the table name for the filename, but you could possibly
    *            get problems if users had exported already with a table
    *            with the same first 8 chars.
    *            As an alternate method you could request the user to input
    *            the full path including filename and remove the logic to
    *            build the path using the table name.
    FORM check_system.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query  = 'WS'
           IMPORTING
                return = winsys.
      IF winsys NE 'WN32_95'.
        WRITE: 'Windows NT or Windows 95/98 is required'.
        EXIT.
      ENDIF.
    ENDFORM.                               " CHECK_SYSTEM
    *       FORM PROCESS_TOP_OF_PAGE                                      *
    FORM process_top_of_page.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      ULINE.
      CONCATENATE syst-sysid
                  syst-saprl
                  syst-host INTO w_system SEPARATED BY space.
      WRITE : AT /1(syst-linsz) w_system CENTERED.
      WRITE : AT 1 syst-vline, syst-uname.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz syst-repid(008).
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      LOOP AT textpool_tab WHERE id EQ 'R'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
      ENDLOOP.
      WRITE : AT 1 syst-vline, syst-datum.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz syst-tcode(004).
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      LOOP AT textpool_tab WHERE id EQ 'T'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
      ENDLOOP.
      WRITE : AT 1 syst-vline, syst-uzeit.
      syst-linsz = syst-linsz - 11.
      WRITE : AT syst-linsz 'Page', syst-pagno.
      syst-linsz = syst-linsz + 11.
      WRITE : AT syst-linsz syst-vline.
      ULINE.
      FORMAT COLOR COL_HEADING INTENSIFIED OFF.
      LOOP AT textpool_tab WHERE id EQ 'H'.
        WRITE : AT /1(syst-linsz) textpool_tab-entry.
      ENDLOOP.
      ULINE.
    ENDFORM.
    if it helps you reward with points.
    regards,
    venu
    regards,
    venu.

Maybe you are looking for

  • AIR/Windows 7 Onscreen Keyboard

    Hi Any reason why the onscreen keyboard would stop working when a TextInput is being focused? * AIR 2.03 * Flex SDK 3.4 * j3500 Motion Computing tablet (http://www.motioncomputing.com.au/products/tablet_pc_J35.asp) The onscreen keyboard is the defaul

  • Why does my iPad lose the Internet connection ?

    Why won't my iPad battery recharge?  Sent this message before & would

  • I need drivers for my Audigy 2 in a Dell XPS

    I have a Dell XPS. I just installed Windows XP Pro SP3 in the computer and I dont have the drivers for the Factory installed Audigy 2 ZS - Dell (OEM) <span class="text">SB0358 sound card. The drivers didn't load when I installed the OS. Dell does not

  • Migrating from SQL Server to Oracle 8i

    Hi all :), I am trying to migrate from SQL Server to Oracle 9i. I am using the Migration Workbench. Everything goes fine during Capturing phase, but while creating Oracle model the Workbench just hangs at "Mapping Tablespaces" for over three hours. (

  • UCCX 7.0.1SR4 and Presence issue

    Hi I have configured the presence AXL user to that of my cups username and everything validates okay. My CUPC client works fine and can view all contacts so the LDAP profile is correct. However, when I try to search for contacts within CDA I recieve