How to create an EXCEL file in Presentation server
hello experts,
please suggest me a solution for the following problem :
I have an internal table with some data.
how can i create an excel file with that data in Presentation Server.
Thanks & Regards
sasi.
hi,
u can use FM: 'DOWNLOAD'.
it will prompt u for destination - just give the requd filename and extension.
Ex:
call function 'DOWNLOAD'
exporting
filename =
filetype = 'DAT'
tables
data_tab = tb_output
fieldnames = tb_fld_nam
exceptions
invalid_filesize = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
customer_error = 7
others = 8.
where,
tb_output = internal table having the fields which u want in the O/P
Ex:
data: begin of tb_output occurs 0,
name_1(20) type c,
name_2(20) type c,
end of tb_output.
tb_fld_nam = Field headings :
Ex:
data: begin of tb_fld_nam occurs 0,
name(25) type c,
end of tb_fld_nam.
tb_fld_nam-name = 'Name 1'.
append tb_fld_nam.
tb_fld_nam-name = 'Name 2'.
append tb_fld_nam.
Thanx & Regards,
Ajoy
Similar Messages
-
How to create an Excel file from XML in the Receiver File Adapter Comm Ch
How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
I saw this blog, but I don't know how to create a XSLT transformation.
/people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
Any help would be appreciated. Thanks.Here are the steps I took to create an XSLT transformation in XI 3.0:
1. I created my source and target XSDs using XMLSpy.
2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
3. I created another XSLT mapping to format the target into Excel XML.
4. Import the source and target XSDs in the IR's External Definitions
5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
6. Reference the XSL mappings in the Interface Mapping -
How to create a excel files XSL templates
Hello,
I want to create a excel file, and i started doing it using POI library, but that it's very hard, and I want a way to create excell files using xsl templates.
I think that you can do it using apache cocoon, but i don't know how do it. Anyone has done it?
ThanksCheck out SsTemplates Spreadsheet Templates for Excel. We release this software a couple months ago based on work that we have done at Carbon Five. It has made working with POI to produce Excel documents in a Java environment an easy part of our development process.
SsTemplates builds upon the Jakarta POI/HSSF libraries for writing Microsoft Office documents by providing a simple XML templating language for creating Excel documents similar to creating HTML pages with JSP and CSS.
It's open source and available for download from SourceForge. You can read all about it at http://carbonfive.sourceforge.net/sstemplates/. -
How to create an excel file from SAP?
I needed to create an excel file(with out data) format with fields read from a table.
check FM
EXCEL_OLE_STANDARD_DAT
Regards
prabhu -
How to create a excel file which will open in every version of MS Office?
For excel file handling we are using Measurement Studio 8.0 for VS .NET 2003. Now we are save the excel file into.xls file using this format "CNiExcelWorkbook::FileFormatExcel9795" . it will save the file. Now the problem is If that PC has MS Office 2003 or lesser version, then its working fine. But if the PC has MS Office 2007, it will giving problem. So my question is how to save excel file which will support any version of MS Office?
Tapasen
reply me @: [email protected] or [email protected]In your code, write this:
DATA my_path type string.
GET PARAMETER ID 'ZPATH' FIELD my_path. "or any other name you choose
double click on ZPATH, choose create. You will have created a new parameter. You can use any names starting with Z or Y.
Go to SU01, and set this parameter there (ZPATH)..I hope this doesn't need further clarification.
In parameter value, put the path to the file..
After executing the GET statement, the value will be available in the variable my_path. Pass this to GUI_UPLOAD/DOWNLOAD functions, and it should work fine.
Regards,
SD -
Populate existing excel file in presentation server
Hi,
My requirement is to populate an existing excel file in the presentation server. After the data has been uploaded the file needs to be saved in another name .
Could someone help me out on this.
thankshi,
check this sample code...
hope it works..
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
end of itab.
select vbeln
posnr
from vbap
up to 20 rows
into table itab.
* EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
* handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_WORK TYPE OLE2_OBJECT,
H_SHEET TYPE OLE2_OBJECT,
H_CELL TYPE OLE2_OBJECT,
V_COL LIKE SY-TABIX. " column number of the cell
DATA:
V_STEP(30),
V_FILE LIKE RLGRAP-FILENAME.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Creating Excel...'
EXCEPTIONS
OTHERS = 1.
* start Excel
V_STEP = 'Starting Excel'.
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'APPEND'
EXPORTING #1 = 'D:SappdfABAP Trainingsheettr.xls'.
* PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* Get the list of workbooks
V_STEP = 'Preaparing Excel'.
CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_WORK.
PERFORM ERR_HDL.
** Add new workbook (create a file)
CALL METHOD OF H_WORK 'ADD'.
PERFORM ERR_HDL.
* Get the created worksheet
************************Sheet Number
CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_SHEET EXPORTING #1 = 3.
************************Sheet Number
PERFORM ERR_HDL.
* Activate (select) the first sheet
CALL METHOD OF H_SHEET 'ACTIVATE'.
PERFORM ERR_HDL.
* tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
* PERCENTAGE = 0
TEXT = 'Adding Data to Excel...'
EXCEPTIONS
OTHERS = 1.
* output column headings to active Excel sheet
V_STEP = 'Adding data to Excel'.
LOOP AT ITAB.
V_COL = SY-TABIX.
PERFORM FILL_CELL USING 1 V_COL ITAB-vbeln.
PERFORM FILL_CELL USING 2 V_COL ITAB-posnr.
ENDLOOP.
V_STEP = 'Releasing Excel'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
H_EXCEL-HANDLE = -1.
*& Form ERR_HDL
* text
* --> p1 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Error in processing Excel File:', V_STEP.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
*& Form FILL_CELL
* text
* -->P_1 text
* -->P_1 text
* -->P_1 text
FORM FILL_CELL USING ROW COL VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_CELL
EXPORTING #1 = ROW #2 = COL.
PERFORM ERR_HDL.
SET PROPERTY OF H_CELL 'Value' = VAL .
PERFORM ERR_HDL.
regards
satesh -
Download SAP data to Excel file in Presentation server
Hi gurus,
I need to download SAP data to excel file. for that im using SAP_CONVERT_TO_XLS_FORMAT function module. I have to download with column header and also date should be in YYMMDD format. Im changing the format in ITAB but when populating to excel leading zero's were removed.(EX. 12102007 is converted to 071012 and it was populated as 71012). can someone explain how to use this function module or give someother solution for this....And if possible explain the parameters of the function module SAP_CONVERT_TO_XLS_FORMAT. Is there any function module for converting date as required format?
Thanks,
AmalHi Amal...
The Problem you are facing is because of Display properties of Microsoft Excel itself. I believe this can not be solver with in SAP. Instead I would suggest you to go for a .csv format. which can also be viewed in Excel.
In any case if you get to find a different solution for this, I would appriciate if you can share it with me :).
Santosh -
UPLOADING EXCEL FILE INTO PRESENTATION SERVER
hi guys,
any one can provide the function module to upload an EXCEL file fromt he presentation server into SAP-CRM system.
regards
viswa gunthaHi Viswa,
you should try to use the SDN Search. I've searched for "Excel upload" and the second link was:
Uploading Data From Excel Sheet to SAP Database Tables
Regards
Gregor -
How to Create a excel file from a table.
i want to excel output from a oracle table.
Please use below one:
DECLARE
CURSOR C1
IS
SELECT DISTINCT JVH_LCM_LCTN_CODE FROM F_JV_HDR;
CURSOR C2 (V_LOC VARCHAR2)
IS
SELECT *
FROM
(SELECT *
FROM F_JV_HDR
WHERE JVH_JV_DATE <= '31-OCT-2011'
AND JVH_DSM_DCMNT_TYPE = 'SJV'
AND JVH_LCM_LCTN_CODE = V_LOC
ORDER BY JVH_JV_DATE DESC
WHERE ROWNUM <= 10
UNION ALL
SELECT *
FROM
(SELECT *
FROM F_JV_HDR
WHERE JVH_JV_DATE > '31-OCT-2011'
AND JVH_DSM_DCMNT_TYPE = 'SJV'
AND JVH_LCM_LCTN_CODE = V_LOC
ORDER BY JVH_JV_DATE
WHERE ROWNUM <= 10;
v_file utl_file.file_type;
linebuf VARCHAR2(32767);
BEGIN
v_file := utl_file.FOPEN('MAIL_OUTPUT','F_JV_HDR-SJV.csv','w') ; --Change the CSV file name
LINEBUF := 'JVH_LCM_LCTN_CODE,JVH_DSM_DCMNT_TYPE,JVH_JV_TMPRY_NMBR,JVH_JV_TMPRY_DATE,JVH_SRCE_INDCTR,JVH_CRTD_DATE,JVH_CRTD_BY,JVH_ATHRSTN_STS,JVH_DSM_TRM_TR_CODE,JVH_DSM_DCMNT_SRS,JVH_LCM_LCTN_CODE_BOOK,JVH_ATHRSTN_RQRD_INDCTR,JVH_FNCL_CLSRE_INDCTR,JVH_TRNSCTN_WITH_INDCTR,JVH_TRNSCTNR_CODE,JVH_JV_NMBR,JVH_JV_DATE,JVH_RMRKS,JVH_JV_RVRSD_NMBR,JVH_CHQE_DUE_DATE,JVH_ATHRSD_DATE,JVH_ATHRSD_BY,JVH_TR_CODE_RVRSD,JVH_DCMNT_TYPE_RVRSD,JVH_JV_RVRSD_INDCTR,JVH_NJV_TAG,JVH_TYPE,JVH_AUTO_RVSL_INDCTR,JVH_AUTO_RVSL_DATE,JVH_BUS_BKS_UPLOAD'; --Chage the headings
utl_file.put_line(v_file,linebuf);
FOR I1 IN C1
LOOP
FOR I2 IN C2(I1.JVH_LCM_LCTN_CODE) --Change the cursor parameter
LOOP
LINEBUF := I2.JVH_LCM_LCTN_CODE||','||I2.JVH_DSM_DCMNT_TYPE||','||I2.JVH_JV_TMPRY_NMBR||','||I2.JVH_JV_TMPRY_DATE||','||I2.JVH_SRCE_INDCTR||','||I2.JVH_CRTD_DATE||','||I2.JVH_CRTD_BY||','||I2.JVH_ATHRSTN_STS||','||I2.JVH_DSM_TRM_TR_CODE||','||I2.JVH_DSM_DCMNT_SRS||','||I2.JVH_LCM_LCTN_CODE_BOOK||','||I2.JVH_ATHRSTN_RQRD_INDCTR||','||I2.JVH_FNCL_CLSRE_INDCTR||','||I2.JVH_TRNSCTN_WITH_INDCTR||','||I2.JVH_TRNSCTNR_CODE||','||I2.JVH_JV_NMBR||','||I2.JVH_JV_DATE||','||I2.JVH_RMRKS||','||I2.JVH_JV_RVRSD_NMBR||','||I2.JVH_CHQE_DUE_DATE||','||I2.JVH_ATHRSD_DATE||','||I2.JVH_ATHRSD_BY||','||I2.JVH_TR_CODE_RVRSD||','||I2.JVH_DCMNT_TYPE_RVRSD||','||I2.JVH_JV_RVRSD_INDCTR||','||I2.JVH_NJV_TAG||','||I2.JVH_TYPE||','||I2.JVH_AUTO_RVSL_INDCTR||','||I2.JVH_AUTO_RVSL_DATE||','||I2.JVH_BUS_BKS_UPLOAD; --Change the cursor values
utl_file.put_line(v_file,linebuf);
END LOOP;
END LOOP;
UTL_FILE.FCLOSE(V_FILE);
END;
/ -
How can I create an Excel file?
Hi,
How can I create an Excel file using Forms 6i.
What I'm doing is to create a file using TEXT_IO package an name it .XLS. If a read it double-clicking over the file, it opens Ok but If I open directly from Excel it opens the Convert dialog.
I need to create an excel file as it was made from within Excel.
Thank in advance,
BenjaminWhen you are talking about subfiles, are you talking like Package contents of an application?
Terminal application in Applications -> Utilities can give a command line grasp of all your files using the du command.
Type
man du
when entering the terminal, followed by the enter key.
Note, by default the terminal opens at the Home folder. To navigate outside the Home folder enter "/Volumes/name of mounted drive/folder/subfolder" as your path. If there are spaces in the name, putting quotes around the whole path can help. If you end your du command with a > name.txt a text file with the name name.txt will be plugged into your Home directory. That you can open with Excel and parse by /es thus giving you everything in Excel. -
How do I create an excel file that has the volume output and the time at which it occured?
Hello:
I am using Labview to control a New Era Pump Systems automatic syringe pump and to record diameter measurements from a LaserMike optical comparator. My program is fully functional, the code is attached with all auxilliary files in the NE-50X folder. I mostly understand my program, I used drivers for the NE-50X pump found on the NI website to build my code and added to it as needed.
If anyone has ideas about how to do any of these three things, your help is greatly appreciated. I have the output from the syringe pump going into a line graph while I run the test with the time on the x-axis and volume on the y-axis. How would I be able to create an excel file from this information? I would like the excel file to have the time in one column and the volume at that time in the next column. I though that I had wired it correctly, however I feel that the time seems to be a little off and very exact. Attached is the block diagram of what I have done.
Hello:
If anyone has ideas about how to do any of these three things, your help is greatly appreciated.
Attachments:
RATETEST.vi 202 KBLet me start by answering the specific question, and then I will provide some suggestions on the code.
The function you want is the "Write to Spreadsheet File", which you're already using, albeit in a confusing means (more later). I was not able to find any place in your code where you're actually acquiring time information, so I don't understand your comment about the time not being exact. (I'm assuming you mean "not", even though that word was not in your actual sentence.)
As for the code:
As I mentioned, you're using the "Write to Spreadsheet File" twice, as well as the "Write to Measurement File" Express VI. All three seem to be logging the same information, though one of the "Write to Spreadsheet File" functions is logging some sort of volume and diameter information. Please pick one.
You're looping around the path for one of the "Write to Spreadsheet File" functions, but not for the other two functions. Why are you looping the path in the first place?
You' re continuously accruing data into an array to put onto an XY Graph. Please keep in mind that this means the program will slow down as it progresses as this array gets larger and larger, and LabVIEW needs to shuffle memory around. Depending on how fragmented your memory is, you may find the program will crash since LabVIEW cannot allocate a large enough contiguous block of memory for the array.
Your wiring really needs to be cleaned up. Tip: Right-click on a wire and select "Clean Up Wire".
In the middle of the diagram you have a case structure in which the True part has a single iteration loop that's adding 1 to the iteration and updating some local variable, and in the False part you're doing something else with it. I have no idea what you're trying to do, but surely there must be a better way to do it.
You seem to have two tank indicators on top of each other on the front panel and then flipping the visibility of them based on some value. I would think that it would be easier to simply display both at the same time, no? As a user, I would find it somewhat perturbing to see the tanks appear and disappear. -
How to create .ctl (control file) to calide excel rows in ssis ?
In my package i have a requirement to use .ctl control file to valide excel rows. can anyone tell me how to create a .ctl file which will have all of this information.
A few assumptions 1st:
1) I understood the .ctl file can be any ASCII (flat) file of arbitrary format; and that
2) You will drive the validation rules.
Since you seem like want to apply the validation as the first step in your package I advocate plugging the Script Transformation task in which happens to expose the "ProcessInputRow" method that in turn allows a developer to intercept each row for inspection.
This is where you will need to apply much thinking to how to make the validation rules applied in retrospect to the incoming data.
You drive the code (logic). More through help is a click away here http://www.codeproject.com/Articles/193855/An-indespensible-SSIS-transformation-component-Scr which only covers how to make the row-by-row processing possible.
If you expected SSIS to have this functionality provided for free - unfortunately this is not happening.
One of many reason is, what you want to do is extremely laborious.
Arthur My Blog -
How to upload excel file in application server??
Hi,
How to upload an excel file into internal table in background mode from application server?
ThanksHi 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. -
How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12
Dear All,
How to Create MultiSheet Excel Report Output in XML Publisher in Oracle R12.
My Requirement is to develop RTF Template and geneate Excel output in Multiple sheet.
plz guide me on this..
thnx
Khushalplz see
BI Publisher: How to create Multisheet in Single Excel file using Excel Template [ID 1352000.1]
for r12 you can use excel template
i think it more appropriate for excel output -
How to open a excel file in WLS 8.1 server.
Dear Sir,
I have created a excel file in WLS 8.1 Application server.
Now I used method as redirectURL(req,resp,Population.xls) to open that file but it failed to open it.
If I give the full path as 'D://USER_OBJETS/APPLICATION/Population.xls'
but it tried to open from client PC not from the server.
so the problem, I managed to create file in server but unable to open it.
Kindly advise how to resolve this problem.
Thanks and Rgds,
Anandan-Singapore.Are you asking in general how to read an Excel file using ActiveX, or are you asking specifically? If you're asking in general, please do a search, as there have been many examples posted on how to use ActiveX to read/write Excel files. There are also numerous links in the Excel thread.
Maybe you are looking for
-
i have just upgraded to IOS 8.1.3 from IOS 7.1.2 , and I could no longer find my hotspot menu for sharing my cellular data with my other devices. what should I do?
-
Mandatory fields for BAPI_ACC_DOCUMENT_POST
Hi I am getting the follwing data from the file (Which is coming from oracle) invoice number and the amount, from that i have to use Fb70 tcode for posting ,Please help me what are the mandatory fields for FB70, how will get those fields from SAP. Ho
-
Data source for the concurrent program 'Send Separate Remittance Advices'
Hi All, We have requirement to develop a custom report to send the remittance to the vendors. But we are unable to figure out on how to get the data source for the standard program 'Send Separate Remittance Advices'. The program is of the type Java c
-
Recently my macbook started logging me out at random times and then I thought that maybe if I updated the software it won't do it anymore but whenever I go to click on the software update icon it logs me out. I'm worried that this might be something
-
Give me some advice about the big message
Whether JMS provider provide the function to deal with big message? i haven't found.Whether should I split the message myself? but if i split myself,the message as a whole will be difficult to ensure whole.I can only receive message one by one.If i o