Join / Merge 2 XLS file in XSTRING Mode
Hello,
I have a XLS file in MIME Repository. What I need to do is, to read the XLS file and then append more data in my program and download it.
Steps i have tried:
1. Reading XLS from MIME
l_mr = cl_mime_repository_api=>get_api( ).
l_mr->get( EXPORTING i_url = 'sap/bw/Test.xls'
IMPORTING e_content = l_content ).
2.1 Merge / Join / Concatenate L_XSTR to l_content
CONCATENATE l_xstr l_content INTO l_content in BYTE MODE.
2.2 Tried to replace certain known BYTES in the XLS
REPLACE FIRST OCCURRENCE OF l_xstr in l_content WITH l_xstr1 in BYTE MODE.
But either way i'm unable to achieve my requirement.
Kindly let me know if anyone can done of joining the data of 2 XLS files in XSTRING mode.
Thanks.
Regards,
Chathia.
Hi Sandra,
I understood your point. Please find my reply to your options below.
1) Using OLE, GUI must be connected when you run the program, i.e. in dialog. It seems that it's what you have done, there's no reason it can't work.
--- Since I use web based app using Web Dynpro, OLE didnt work. However there is a option to integrate MS Apps but it cannot solve because I have huge volume of data to download (55000 records with 120 columns)
2) Using an XML format, it's easy to replace nodes. Note that Microsoft has provided an XML format with Excel 2003, which is not the same as the XSLX format with Excel 2007.
--- Really I do not need to join or replace data between 2 XLS. I dont think formatting in XML is possible.
I have downloaded the data successfully in one XLS (Eg. DATA_XLS - 55000records with 120columns). But I need to do formatting in the downloaded DATA_XLS (55000 records). I can provide the users with a custom Excel file which contains the VBA code and it will format the downloaded DATA_XLS, which is quick. But I want this process to be synchronised and if possible to be automated. So I uploaded the VBA_XLS to the Mime repository and provided a Button in web dynpro to download after the DATA_XLS is downloaded successfully. Since this is two different activities, users need to click on this manually after DATA_XLS is downloaded.
I would like to know if I can combine this together through some options, so tried the Byte replacement option.
To be more clear:
(1) VBA_XLS with only VBA Code (No data present, STRING conversion is not working)
(2) DATA_XLS with huge volume of data
If possible I need to combine both and more importantly the VBA code should work after download.
Could you please explain?
Regards,
Chathia.
Similar Messages
-
Merge xls files using powershell
is there any way to merge xls files using powershell ?
What does "merge" mean? Copy cells? Copy Sheets? Copy formulas? Copy Data?
"Merge"is way too vague.
¯\_(ツ)_/¯ -
To open & Edit the XLS file in edit mode after Extracting SAP data into it
Hello Experts,
I have a requirement to open and edit the xls file imidiately after downlaoding the SAP data into this XLS file. The XLS file is getting saved on presentation server (e.g. Destop/C: drive).
I have used function module "GUI_DOWNLOAD" OR "DOWNLAOD" to download the data from SAP table to XLS file. But now I need this XLS file to be get opned automatically after finishing the Download, so that user can make changes into XLS file and can save the changes into it. After saving I have to upload this modified Data into SAP table again.
For this I am really not aware how to get it done..but I believe you experts will definately help me out..waiting for your reply.
Thanks,HI,
did you ur problem was solved if not check this code once.
now only i tried it my system , it opens xl file and save all data in it.
DATA: ZKNA1 LIKE STANDARD TABLE OF KNA1 WITH HEADER LINE.
SELECT * FROM KNA1 INTO TABLE ZKNA1.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'C:\Documents and Settings\rajesh.NACL\Desktop\XLSSDSDS.XLS'
CREATE_PIVOT = 0
DATA_SHEET_NAME = ' '
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
DATA_TAB = ZKNA1[]
FIELDNAMES =
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_PIVOT_FIELDS = 6
DOWNLOAD_PROBLEM = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanq,
rajesh.k -
Joining / Merging csv files into one
Hi,
is there a way to join or merger a bunch of csv files into
one file?
regards
MartinThx Dan, for the reply, well I have the reference manual
right in front of me, and I thought about using cffile, but my
experience has been that cffile is very slow so merging say like 20
- 30 files into one with 600 records in each would be somewhat time
consuming or if even possible? does anyone know?
regards
Martin -
I have a lot of tapes that cut in the middle while recording more than 12 minutes. I would like to join/merge my files. What should I do? Which softwares should I use?
Because I don't have any of Sony's softwares, or softwares that they use, I can't help much on that side of things, but programs that I use are
Freemake Video Converter to convert it into a format that VirtualDub can read, then use VirtualDub to load up the first file, then use the Amend AVI to add the next file that you want to merge, and keep going until you're ready.
Then I check the video and audio compression, make sure they're on full compression, choose the codec and video bitrate, and audio bitrate that I want, and save.
I'm sure Sony's programs, or the ones they use, make it much easier. Try PlayMemories and Sony Vegas, they'll work with the AVCHD files without too much extra converting (and if it does convert, it's all in-program so should be much easier) -
How do I save my new data into a new .xls file? i am running my VI in a continious mode
I am using a Data Acquisition Board to get my pressure and displacement signals. Have to measure it continiously. I am able to save the data continiously but not in new XLS file for new experiment. If any of you could hepl me with it
This depends upon how you are writing it to file. If you are using the "Export Waveforms to Spreadsheet File" VI, then you can actually just open this file with Excel and you will see all of the data fine. That's the easiest way to do it. If you are wanting to write to Excel directly, you can use ActiveX calls to do this. If you choose the latter, I would suggest purchasing the Report Generation for Microsoft Office Toolset for LabVIEW. It provides VIs which write your data directly to Excel files.
J.R. Allen -
Problem sending xls file in an attachment via ABAP proxy
Hello,
I have in tmp directory a xls file, I tranfer such file to a table, and afterwards I send in an attachment via ABAP proxy, here is the code:
l_attachment TYPE REF TO if_ai_attachment,
lt_attach TYPE prx_attach,
l_name TYPE string,
lx_string TYPE xstring,
l_string TYPE string,
l_type TYPE string,
des TYPE string.
CLASS cl_ai_factory DEFINITION LOAD.
DATA: BEGIN OF itab OCCURS 0,
raw(255) TYPE x,
END OF itab.
DATA: l_controller TYPE REF TO if_ai_posting_controller.
DATA: it TYPE zhcm_mt_segur_out.
CREATE OBJECT prxy.
OPEN DATASET orig FOR INPUT IN binary MODE.
READ DATASET orig INTO itab-raw.
WHILE sy-subrc = 0.
APPEND itab.
READ DATASET orig INTO itab-raw.
ENDWHILE.
CLOSE DATASET orig.
LOOP AT itab.
CONCATENATE lx_string itab-raw INTO lx_string in byte mode.
ENDLOOP.
L_NAME = 'Segur.xls'.
L_TYPE = CL_AI_ATTACHMENT=>IF_AI_ATTACHMENT~C_MIMETYPE_EXCEL.
TRY.
L_ATTACHMENT =
CL_AI_FACTORY=>CREATE_ATTACHMENT_FROM_binary(
P_DATA = LX_STRING
P_TYPE = L_TYPE
P_NAME = L_NAME ).
APPEND L_ATTACHMENT TO LT_ATTACH.
L_CONTROLLER = CL_AI_FACTORY=>CREATE_CONTROLLER( ).
L_CONTROLLER->SET_ATTACHMENTS( LT_ATTACH ).
CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
EXPORTING
CONTROLLER = L_CONTROLLER
OUTPUT = IT.
COMMIT WORK.
CATCH CX_AI_SYSTEM_FAULT .
DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
CREATE OBJECT FAULT.
WRITE :/ FAULT->ERRORTEXT.
ENDTRY.
I am using a Mail receiver channel, I receive a mail, with to attachments, one .xml and the other one .bin, I save it to my computer and I change the extension to .xls and when I try to open it, the file is not valid and can be opened after being repaired. What Im doing wrong? I would like to receive a valid xls file, what i should change?
Thanks a lot,
LuisHi,
yes I know, I have used the MessageTransformBean module, and the PayloadSwapBean module. But which parameter I should use for leaving only one attachement in the e-mail. I did this configuration:
1
localejbs/AF_Modules/MessageTransformBean
Local Enterprise Bean
<b>trans</b>
2
localejbs/AF_Modules/PayloadSwapBean
Local Enterprise Bean
<b>swap</b>
3
localejbs/AF_Modules/MessageTransformBean
Local Enterprise Bean
<b>trans1</b>
4
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
Local Enterprise Bean
mail
<i><b>Module configuration</b></i>
trans
Transform.ContentDisposition
inline
swap
swap.keyName
payload-name
swap
swap.keyValue
Segur
trans1
Transform.ContentDescription
Segur
trans1
Transform.ContentDisposition
attachment;filename="Segur.xls"
trans1
Transform.ContentType
application/vnd.ms-excel;name="Segur.xls"
In the e-mail I get one attachement without name .xml and another one Segur.xsl, and I want only one attachment, the last one. What I should change in my configuration??
Best regards,
Luis -
Hello all.
My requirment is to convert a spool object to an XLS file in the background (and send it via mail).
Is it possible?
If so, please help!
please attach a code sample if you have one...
Thanks allot.
Barak.hi ,
this might healp you ought
TABLES: TBTCP, T024D.
*PARAMETERS TEST(5).
DATA: TJOBNAME LIKE TBTCP-JOBNAME VALUE 'REJ_COMP_MAIL_TO_MRP',
SPOOLID LIKE TSP01-RQIDENT,
V_LGORT LIKE MSEG-LGORT,
V_DISPO LIKE T024D-DISPO,
V_REPORT TYPE RSVAR-REPORT,
V_VARIANT TYPE RSVAR-VARIANT.
DATA: BEGIN OF VVALUES OCCURS 0.
INCLUDE STRUCTURE RSPARAMS.
DATA END OF VVALUES.
DATA : BEGIN OF T_RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOMLRECI1.
DATA END OF T_RECEIVERS.
DATA: BEGIN OF T_TBTCP,
jobname like tbtcp-jobname,
jobcount like tbtcp-jobcount,
LISTIDENT LIKE TBTCP-LISTIDENT,
SDLDATE LIKE TBTCP-SDLDATE,
SDLTIME LIKE TBTCP-SDLTIME,
VARIANT LIKE TBTCP-VARIANT,
END OF T_TBTCP,
ITAB_SPOOL LIKE STANDARD TABLE OF T_TBTCP,
WA_SPOOL LIKE T_TBTCP.
DATA: PLIST LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: DOCUMENT_DATA LIKE SODOCCHGI1.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: SO_ALI LIKE SOLI OCCURS 100 WITH HEADER LINE,
REAL_TYPE LIKE SOODK-OBJTP,
SP_LANG LIKE TST01-DLANG, LINE_SIZE TYPE I VALUE 255,
V_NAME LIKE SOEXTRECI1-RECEIVER.
DATA: GD_EVENTID LIKE TBTCM-EVENTID,
GD_EVENTPARM LIKE TBTCM-EVENTPARM,
GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
GD_JOBNAME LIKE TBTCM-JOBNAME,
GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
GD_ERROR TYPE SY-SUBRC,
GD_RECIEVER TYPE SY-SUBRC.
START-OF-SELECTION.
PERFORM GET_SPOOL_REQNUMBER USING TJOBNAME. " CHANGING SPOOLID.
PERFORM SEND_MAIL.
PERFORM REMOVE_BLANK_SPOOLS.
*& Form GET_SPOOL_REQNUMBER
text
-->P_0111 text *
<--P_UU text *
FORM GET_SPOOL_REQNUMBER USING P_0111.
SELECT ALISTIDENT BSTRTDATE BSTRTTIME AVARIANT
FROM TBTCP AS A INNER JOIN TBTCO AS B
ON AJOBNAME EQ BJOBNAME AND
AJOBCOUNT EQ BJOBCOUNT AND
ASTEPCOUNT EQ BSTEPCOUNT
INTO TABLE ITAB_SPOOL
WHERE AJOBNAME = P_0111 AND BSTRTDATE EQ SY-DATUM.
ENDFORM. " GET_SPOOL_REQNUMBER
*& Form send_mail
text
--> p1 text
<-- p2 text
FORM SEND_MAIL .
Get the spool data.
LOOP AT ITAB_SPOOL INTO WA_SPOOL.
REFRESH : SO_ALI, PLIST, T_RECEIVERS.
CLEAR : SO_ALI, PLIST, V_NAME, DOCUMENT_DATA, T_RECEIVERS, SPOOLID,
V_REPORT, V_VARIANT, V_DISPO.
IF WA_SPOOL-LISTIDENT <> '0'.
MOVE WA_SPOOL-LISTIDENT TO SPOOLID.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
RQIDENT = SPOOLID
FIRST_LINE = 1
LAST_LINE = 0
DESIRED_TYPE = ' '
IMPORTING
REAL_TYPE = REAL_TYPE
SP_LANG = SP_LANG
TABLES
BUFFER = SO_ALI
EXCEPTIONS
NO_SUCH_JOB = 1
JOB_CONTAINS_NO_DATA = 2
SELECTION_EMPTY = 3
NO_PERMISSION = 4
CAN_NOT_ACCESS = 5
READ_ERROR = 6
TYPE_NO_MATCH = 7
OTHERS = 8.
Check the return code.
IF SY-SUBRC <> 0.
MESSAGE S208(00) WITH 'Error'.
LEAVE LIST-PROCESSING.
ENDIF.
DATA : DATE LIKE SY-DATUM,
DATE1(10) TYPE C.
Prepare the data.
CLEAR OBJTXT.
REFRESH OBJTXT.
DATE = SY-DATUM - 1.
CONCATENATE DATE6(2) '-' DATE4(2) '-' DATE+0(4) INTO DATE1.
CONCATENATE 'PLEASE CHECK THE LIST OF REJECTED MATERIALS POSTED ON :' DATE1 INTO OBJTXT.
APPEND OBJTXT.
SELECT SINGLE DSNAM FROM T024D INTO T024D-DSNAM WHERE WERKS = '1000' AND DISPO = WA_SPOOL-VARIANT.
CONCATENATE 'MRP CONTROLLER :' WA_SPOOL-VARIANT '-' T024D-DSNAM INTO OBJTXT.
APPEND OBJTXT.
OBJTXT = ''.
APPEND OBJTXT.
CLEAR PLIST.
REFRESH PLIST.
PLIST-TRANSF_BIN = SPACE.
PLIST-HEAD_START = 1.
PLIST-HEAD_NUM = 0.
PLIST-BODY_START = 1.
DESCRIBE TABLE OBJTXT LINES PLIST-BODY_NUM.
PLIST-DOC_TYPE = 'RAW'.
APPEND PLIST.
CLEAR PLIST.
PLIST-TRANSF_BIN = 'X'.
PLIST-HEAD_START = 0.
PLIST-HEAD_NUM = 0.
PLIST-BODY_START = 0.
PLIST-BODY_NUM = 0.
PLIST-DOC_TYPE = 'RAW'.
PLIST-OBJ_DESCR = WA_SPOOL-VARIANT.
APPEND PLIST.
PLIST-TRANSF_BIN = 'X'.
PLIST-HEAD_START = 0.
PLIST-HEAD_NUM = 0.
PLIST-BODY_START = 1.
DESCRIBE TABLE SO_ALI LINES PLIST-BODY_NUM.
PLIST-DOC_TYPE = REAL_TYPE.
Get the size.
READ TABLE SO_ALI INDEX PLIST-BODY_NUM.
PLIST-DOC_SIZE = ( PLIST-BODY_NUM - 1 ) * LINE_SIZE + STRLEN( SO_ALI ).
APPEND PLIST.
***get the values of the variant
MOVE : WA_SPOOL-VARIANT TO V_VARIANT.
SELECT * FROM TBTCP WHERE JOBNAME EQ TJOBNAME ORDER BY SDLDATE.
MOVE TBTCP-PROGNAME TO V_REPORT.
ENDSELECT.
CALL FUNCTION 'RS_VARIANT_VALUES_TECH_DATA'
EXPORTING
REPORT = V_REPORT
VARIANT = V_VARIANT
SEL_TEXT = ' '
MOVE_OR_WRITE = 'W'
SORTED = ' '
EXECUTE_DIRECT =
IMPORTING
TECHN_DATA =
TABLES
VARIANT_VALUES = VVALUES
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 2
OTHERS = 3.
LOOP AT VVALUES.
CASE VVALUES-SELNAME.
WHEN 'S_DISPO'.
MOVE VVALUES-LOW TO V_LGORT.
MOVE VVALUES-LOW TO V_DISPO.
ENDCASE.
ENDLOOP.
SELECT SINGLE USRKEY FROM T024D INTO T024D-USRKEY WHERE WERKS EQ '1000' AND DISPO EQ V_DISPO.
IF SY-SUBRC EQ 0.
T_RECEIVERS-RECEIVER = T024D-USRKEY.
T_RECEIVERS-REC_TYPE = 'U'.
APPEND T_RECEIVERS.
IF V_DISPO = '3' OR V_DISPO = '5' OR
V_DISPO = '21' OR V_DISPO = '48' OR
V_DISPO = '51' OR V_DISPO = '231' OR
V_DISPO = '512' OR V_DISPO = '921'.
T_RECEIVERS-RECEIVER =
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COPY = 'X'.
APPEND T_RECEIVERS.
ENDIF.
IF V_DISPO = '14' OR V_DISPO = '86' OR
V_DISPO = '515' OR V_DISPO = '704' OR
V_DISPO = '711' OR V_DISPO = '712' OR
V_DISPO = '713'.
T_RECEIVERS-RECEIVER =
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COPY = 'X'.
APPEND T_RECEIVERS.
ENDIF.
T_RECEIVERS-RECEIVER = * T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COPY = 'X'.
APPEND T_RECEIVERS.
T_RECEIVERS-RECEIVER = * T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-BLIND_COPY = 'X'.
APPEND T_RECEIVERS.
ENDIF.
IF NOT SP_LANG IS INITIAL.
DOCUMENT_DATA-OBJ_LANGU = SP_LANG.
ELSE.
DOCUMENT_DATA-OBJ_LANGU = SY-LANGU.
ENDIF.
V_NAME = SY-UNAME.
Subject.
CONCATENATE 'List of Rejected Materials, MRP Controller:' WA_SPOOL-VARIANT
INTO DOCUMENT_DATA-OBJ_DESCR.
Send the email.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOCUMENT_DATA
SENDER_ADDRESS = V_NAME
SENDER_ADDRESS_TYPE = 'B'
TABLES
PACKING_LIST = PLIST
CONTENTS_BIN = SO_ALI
CONTENTS_TXT = OBJTXT
RECEIVERS = T_RECEIVERS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'Error in sending email'.
ENDIF.
COMMIT WORK.
Send the email immediately.
SUBMIT RSCONN01
WITH MODE = 'INT'
AND RETURN.
IF SY-SUBRC EQ 0.
WRITE 'To get the spool no'.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID = GD_EVENTID
EVENTPARM = GD_EVENTPARM
EXTERNAL_PROGRAM_ACTIVE = GD_EXTERNAL_PROGRAM_ACTIVE
JOBCOUNT = GD_JOBCOUNT
JOBNAME = GD_JOBNAME
STEPCOUNT = GD_STEPCOUNT
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE : / 'Spool id of the job that is sent', SPOOLID,
GD_EVENTID,
GD_EVENTPARM,
GD_EXTERNAL_PROGRAM_ACTIVE,
GD_JOBCOUNT,
GD_JOBNAME,
GD_STEPCOUNT.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " send_mail
*& Form remove_blank_spools
text
--> p1 text
<-- p2 text
*FORM REMOVE_BLANK_SPOOLS .
LOOP AT ITAB_SPOOL INTO WA_SPOOL.
MOVE WA_SPOOL-LISTIDENT TO SPOOLID.
CALL FUNCTION 'RSPO_ISELECT_TSP01'
EXPORTING
RFCSYSTEM = SY-SYSID
RQIDENT = SPOOLID
FORUPDATE = ' '
IMPORTING
TSP01_ELEM = W_INFO
EXCEPTIONS
ERROR = 1
OTHERS = 2.
CALL FUNCTION 'RSPO_IRETURN_RAW_DATA'
EXPORTING
RQ = W_INFO
TABLES
LINE_BUFFER = W_DATA
PAGE_INDEX = W_PAGES
LINE_BUFFER2 =
EXCEPTIONS
ERROR = 1
OTHERS = 2.
IF W_INFO-RQDOCTYPE = 'LIST'.
CALL FUNCTION 'RSPO_R_GET_TOC_SPOOLREQ'
EXPORTING
RQIDENT = SPOOLID
TABLES
TOCDESC = W_TODESC
EXCEPTIONS
ERROR = 1
OTHERS = 2.
CALL FUNCTION 'RSPO_SPOOLDATA_WRITE_INIT'.
READ TABLE W_DATA WITH KEY DATA_LINE = 'List contains no data'.
LOOP AT W_DATA.
IF W_DATA-DATA_LINE CP 'List contains no data'.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
*ENDFORM. " remove_blank_spools -
Is it possible to join two video files?
Is there any way i can use mac os to join two AVI files together, and then create a new copy of the combined video to show on my iPad. if i can avoid using iMovie that would be great.
thanksAs far as i know QuickTime can not support all kinds of AVI, and even it can join AVI files into one, the joined AVI files cannot be imported to iTunes, iPad, iPod, iPhone for playback.
I know a step by step guide on how to merge video files on Mac or Windows
This guide support join all kinds of video and audio formats like MP4, AVI, MPEG, MPG, VOB, MOV, RM, RMVB, 3GP, ASF, WMV, WTV, DVR, DivX, Xvid, M4V, MKV, FLV, F4V, SWF, WebM, OGV, Apple ProRes, AVCHD, MTS, M2TS, M2T, MXF, MVI, DAT, MOD, TOD, MPV, OGM, MP3, WAV, WMA, M4A, FLAC, M4B, AAC, AC3, APE, AIFF, Apple Lossless ALAC, VOC, QCP, AMR, AWB, DTS, AU, RA, OGG and etc
And you can join video files as well convert video to other video or audio formats or keep the same video format as the original one.
And you can also merger several video files even they are not in the same video format.
Hope it helps more or less -
I'm trying to read a XLS file from a URL.
What exactly the code is trying to do is this:
User clicks on a button in a webpage for select a xls file . The file selected may be read and a method write a txt file on another server.
How can i do this?
Many thanks.Hi,
Check whether path ur providing to the open data set stmt is correct or not in debugging mode.
* File upload to internal table from UNIX Directory
IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.
CONCATENATE p_path p_i1file INTO v_file.
CONDENSE v_file.
OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
IF sy-subrc EQ 0.
WRITE: / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
DO.
CLEAR tbl_input.
READ DATASET v_file INTO tbl_input.
IF sy-subrc NE 0.
EXIT.
ELSE.
APPEND tbl_input.
ENDIF.
ENDDO.
* Close Input File
CLOSE DATASET v_file.
ELSE.
WRITE:/'Error uploading file: '(008),v_file.
STOP.
ENDIF.
ENDIF.
It should work.check the sy-subrc value and file value in debug mode.
Thanks
Parvathi -
Problem reading .xls file from App Server
Hi Everyone......
I hope this might be a common problem but i searched for similar problem......i did'nt find the solution my problem is
I'm trying to download .xls(excel file data into an internal table using OPEN DATASET FOR INPUT IN TEXT MODE ENCODING DEFUALT and read dataset for reading it).But in the read dataset syntax all stange values like **$#@&&& are getting uploaded???? I dont now why......
Is it happing because i'm trying to upload .XLS file ???
My coding is as follows...........
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
IF sy-batch IS INITIAL.
MESSAGE i001(zz) WITH 'Error opening file for upload'.
EXIT.
ELSE.
MESSAGE s001(zz) WITH 'Error opening file for upload'.
EXIT.
ENDIF.
ENDIF.
*First Uploading the data into structure
DO.
READ DATASET p_file INTO l_wa_tab. "My internal table work area
IF sy-subrc = 0.
APPEND l_wa_tab TO l_tab.
ELSE.
EXIT.
ENDIF.
ADD 1 TO count.
ENDDO.
CLOSE DATASET p_file.
Any solution for above problem.........Hi,
Check whether path ur providing to the open data set stmt is correct or not in debugging mode.
* File upload to internal table from UNIX Directory
IF NOT p_i1file IS INITIAL AND NOT p_path IS INITIAL.
CONCATENATE p_path p_i1file INTO v_file.
CONDENSE v_file.
OPEN DATASET v_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
IF sy-subrc EQ 0.
WRITE: / 'INPUT FILE CONTAINS NO RECORD :'(010), v_file.
DO.
CLEAR tbl_input.
READ DATASET v_file INTO tbl_input.
IF sy-subrc NE 0.
EXIT.
ELSE.
APPEND tbl_input.
ENDIF.
ENDDO.
* Close Input File
CLOSE DATASET v_file.
ELSE.
WRITE:/'Error uploading file: '(008),v_file.
STOP.
ENDIF.
ENDIF.
It should work.check the sy-subrc value and file value in debug mode.
Thanks
Parvathi -
Creating an XLS file and Zip it
Hi All,
we have a requirement where in we have to create an XLS file from internal table. This xls file then has to be zipped and mailed.
If anyone knows how to create an xls file and zip it in WebDynpro, without using OPEN, CLOSE DATA SET etc, Please let us know. It will be of great help.
Thanks,
Anand>2) Convert the STRING format to XSTRING format by using the FM SCMS_STRING_TO_XSTRING.
Actually you should use CL_BCS_CONVERT=>STRING_TO_XSTRING now.
>3) Use the method COMPRESS_BINARY of class CL_ABAP_GZIP to compress the XSTRING file.
You probably want to use CL_ABAP_ZIP instead of CL_ABAP_GZIP. CL_ABAP_GZIP only does compression, which is fine for storing a single packet of data in the database. However CL_ABAP_ZIP is better suited for mult-part zip (multiple inner files).
>4) Use the method SEND_WEB_MAIL of class CL_HRRCF_SERVICES_MAIL to mail across the zipped contents.
This seems to be an HR specific class. Better to use the cross application, NetWeaver provided functionality for sending mail - CL_BCS. -
How do I add an attachment (xls file in my case) to the pdf
Hello,
I need to add a excel file as attachment in the generated PDF form.
Someone could tell me if this is possible and how to do it?
Thanks for the helpHi,
I did little research and found that we can attach any attachment to Interactive form.
1.Get the XLS attachment(You can add File Upload UI Element(Say XLS) to your Application and Bind data,filename and mime Type Properties) with this , user can choose the XLS file to be attached from Desk top.
2. In the Interactive UI Element,bind the property "pdfsource" (Say PDF_SOURCE), this will contains the PDF in xstring format.
3. Add a button (Say Attach XLS) on the application and add an Action Method.(Say ADD)
4.in the Action Method(ADD) of the Button, follow the Steps.
1. Get the File(XLS File) Uploaded,Mimi Type from File Uploade UI Element(Say lv_xls_data,lv_mimetype,lv_file_name)
2. get the pdf source( PDF_SOURCE) from Interactive form.(Say lv_pdf_source)
use the Following Code
DATA: l_fp TYPE REF TO if_fp,
l_pdfobj TYPE REF TO if_fp_pdf_object,
l_pdf TYPE xstring,
l_att TYPE xstring,
l_fpex TYPE REF TO cx_fp_runtime,
l_type TYPE string,
l_errmsg TYPE string,
l_short TYPE sdba_actid,
l_ext TYPE sdba_funct,
l_filename TYPE skwf_filnm,
l_mimetype TYPE skwf_mime,
l_attachment TYPE sfpattachments,
l_attachments TYPE tfpattachments,
l_len TYPE i,
l_tab TYPE tsfixml,
p_dest TYPE rfcdest .
MOVE cl_fp=>get_ads_connection( ) TO p_dest.
l_mimetype = lv_mimetype.
* Get FP reference.
l_fp = cl_fp=>get_reference( ).
TRY.
* Create PDF Object.
l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
* Set document.
l_pdfobj->set_document( pdfdata = lv_pdf_source ).
l_attachment-FILENAME = lv_file_name."Name of the Attached File.
l_attachment-mimetype = lv_mimetype.
l_attachment-description = 'XLS_Attachment'.
l_attachment-data = lv_xls_data."XLS File to Be attached .
INSERT l_attachment INTO TABLE l_attachments.
l_pdfobj->set_attachments( attachments = l_attachments ).
* Execute, call ADS.
l_pdfobj->execute( ).
* Get result.
l_pdfobj->get_document( IMPORTING pdfdata = l_pdf ).
CATCH cx_fp_runtime_internal INTO l_fpex. "#EC NO_HANDLER
CATCH cx_fp_runtime_system INTO l_fpex. "#EC NO_HANDLER
CATCH cx_fp_runtime_usage INTO l_fpex. "#EC NO_HANDLER
ENDTRY.
Finally "l_pdf" contains the PDF with Attached XLS and you can send this as PDF Document.
Thanks.
Uma -
Upload .xls file in internal table in web dynpro abap
Hi everyone,
i want to upload .xls(excel file) into an internal table.....after lots of attempts i came to a conclusion that web dynpro only supports .CSV(another format of excel file) to be uploaded into internal table....i tried many ways....is there a way i can upload .xls file...kindly help me in the same. following is the code i m using
DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
DATA ITEM_FILE TYPE WD_THIS->ELEMENT_CONTEXT-EXCEL_UPLOAD.
get element via lead selection
LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
@TODO handle not set lead selection
IF LO_EL_CONTEXT IS INITIAL.
ENDIF.
get single attribute
LO_EL_CONTEXT->GET_ATTRIBUTE(
EXPORTING
NAME = `EXCEL_UPLOAD`
IMPORTING
VALUE = ITEM_FILE ). "xstring format
DATA S_CONT TYPE STRING.
DATA CONVT TYPE REF TO CL_ABAP_CONV_IN_CE.
DATA: FIELDS1 TYPE STRING_TABLE.
1st tried this code-> using "cl_abap_conv_in_ce"
CALL METHOD cl_abap_conv_in_ce=>create
EXPORTING
*encoding = c_encoding "optional
input = ITEM_FILE
RECEIVING
conv = CONVT.
CALL METHOD CONVT->read
IMPORTING
data = S_CONT.
when it didnt work out...then tried followin function module
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
IN_XSTRING = ITEM_FILE "xsrting
IMPORTING
OUT_STRING = S_CONT
TYPES: BEGIN OF TY_TAB,
NAME_CHAR TYPE STRING,
DESCR_CHAR TYPE STRING,
NUMBER_DIGITS TYPE STRING,
END OF TY_TAB.
DATA: FIELDS TYPE STRING_TABLE.
DATA: LV_FIELD TYPE STRING.
DATA: S_TABLE TYPE STRING_TABLE.
DATA: ITAB TYPE TABLE OF TY_TAB.
DATA: STR_ITAB TYPE TY_TAB.
*splits string based on new line
SPLIT S_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE S_TABLE.
FIELD-SYMBOLS: <WA_TABLE> LIKE LINE OF S_TABLE.
LOOP AT S_TABLE ASSIGNING <WA_TABLE>.
splits string on basis of tabs
SPLIT <WA_TABLE> AT ',' INTO
STR_ITAB-NAME_CHAR
STR_ITAB-DESCR_CHAR
STR_ITAB-NUMBER_DIGITS.
APPEND STR_ITAB TO ITAB.
ENDLOOP.
I am able to do the uploading if the file is in .CSV format and not .XLS format....
there are lots of forums on SDN for the same....but at the end there is no solution provided.....
experts kindly solve it this time...thanks in advanceHi,
It is not possible to upload an xls file because it will be having some binary characters. better to go with .csv file format.
Refer this [link too|Re: Excel File Uplaod] it will explain you clearly.
Regards
Arun.P -
Upload a .xls file in web dynpro abap
Hello,
I want to upload a .xls file into a internal table in web dynpro abap (Netweaver 7.31).
The file is not delimited, is not an csv file.
In my view I have an fileUpload UI Element with the attribute data is un attribute type XSTRING and the following function module are not in my system:
HR_KR_XSTRING_TO_STRING
ALSM_EXCEL_TO_INTERNAL_TABLE
How can I upload the file with this format?.
Thanks in advance.
XaviUnless the files are zipped together into one archive file, you have to do them one at a time. Furthermore with the normal browser based fileUpload UI element, you must do them one at a time and the user must manually select each one (browser security limitation).
If you are on 7.01 you can use ACFUpDown to perform multiple file uploads, but there is no file dialog or directory scan so file selection is difficult.
If you are on 7.02 you can use ACFUpdown and it has a multiple file open/save dialog.
If you are on 7.01 you could use FlashIslands to perform the multiple file upload. I have a tutorial and source code sample for this on SCN.
If you are on 7.01 you could also use ACFExecute to run a batch script on the client side that zips all the files and then upload the zip archive.
Maybe you are looking for
-
Hi Experts, Iam doing a Idoc to file scenario. Based on the sales organization(VKORG),i need to create the multiple records in the file. For example : E1MARAM 0..Unbounded | |E1MARMM 0..Unbounded | E1MARMM | E1MARMM | E1MARMM | E1MVKEM 0..Unbounded |
-
I have a CSS11506 with an SSL module loaded. The CSS is gigabit trunked to an L2 switch. Load balancing the web servers, running on port 80, is working fine with standard HTTP. Once enabling SSL on the CSS and trying to access the service via HTTPS,
-
My UAT set up: WFE name: abc.sharepoint.com Non host header site at port 80: http://abc.sharepoint.com IIS for this site: http with ip * For App store: Added https binding on port 80 with new ip and app store certificate Extended abc.sharepoint.com
-
How to use Tweens in FlashDevelop?
Ive got this text that needs to move from top to bottom and ive tried using the general x,y coordinates, however my teacher suggested to use tweens in starling. Ive searched the web and i keep finding 3rd party or custom made tweens. However does any
-
Possible to have E-Mail button pull address from text field?
I've added a button that will submit the form as a PDF to an e-mail address. Another field will pull the customer e-mail address from our system. Is there a way to merge the two to ensure the E-mail button set up will use the e-mail address pulled in