Importing when source file has a new line
Hi,
While importing a pipe " | " delimted (will apply to any delimter) text file, I have Long text field from source system which is having Product Descriptions in it. Users have enterd the data in multiple lines in that field in the source system, which is a valid case .
When we have extracted the data from source & trying to Import in Import Manager, the "enter" is taking a new line & hence as a new row. How do I import the data keeping the new lines in MDM?
Product_Id|Description|Language
001|Test 1|EN
002|Test
2|EN
003|Test 3|GB
here the Product Id 002 should be imported in text large field with description having the new line character.
Thanks,
Ketan
Ok so the best way is to extract your data from SQL server as XML format into this kind of format:
<?xml version="1.0" encoding="UTF-8"?>
<Products>
<Product>
<Product_Id>001</Product_Id>
<Description><<![CDATA[ Test 1]]></Description>
<Language>EN</Language>
</Product>
<Product>
<Product_Id>002</Product_Id>
<Description><<![CDATA[ Test
2]]></Description>
<Language>EN</Language>
</Product>
<Product>
<Product_Id>003</Product_Id>
<Description><<![CDATA[ Test 3]]></Description>
<Language>GB</Language>
</Product>
</Products>
It is the only way to handle carriage return in Import Manager; with delimited text it is not possible.
Let us know.
Edited by: cau vianney on Mar 1, 2010 3:17 PM
Edited by: cau vianney on Mar 1, 2010 3:19 PM
Similar Messages
-
Uploaded text file has a new line added at the top using BSP MVC applicatio
I have a BSP MVC application that uploads data on to the application server. When I open the uploaded text file, the very first line on the file looks like the line below. ->
htmlb:button:click:nullhtmlb_form_1UploadUpload0htmlbdfsdf
But the rest of the file looks okay. This is causing other than .txt files to get corrupted.
Here is the code from my DO_HANDLE_EVENT.
data: entity type ref to if_http_entity,
name type string,
content type xstring,
content_type type string,
idx type i value 1,
v_root(26) value '
houappl131\SRM_Download\',
v_unxfile(100),
v_transfer type xstring,
v_type(6),
v_len type i,
v_dirfile type zfileinfo,
v_ofile(80),
v_guid type guid_32.
class cl_htmlb_manager definition load.
data: v_asn(10) type n.
data: fu type ref to cl_htmlb_fileupload,
file_id type string value 'batchfile'.
data: o_page_context type ref to if_bsp_page_context.
data: parent type ref to cl_bsp_controller2,
lo_model type ref to cl_sus_m_asn_detail.
o_page_context = me->get_page_context( ).
cl_htmlb_manager=>dispatch_event_ex( request = request
page_context = o_page_context
event_handler = me ).
refresh z_batch->message.
if htmlb_event->server_event = 'Upload'.
fu ?= cl_htmlb_manager=>get_data( request = request id = file_id name
= 'fileUpload' ).
if fu->file_name gt space.
z_batch->parameters-fpath = fu->file_name.
v_len = strlen( z_batch->parameters-fpath ).
if v_len gt 4.
v_len = v_len - 3.
endif.
v_type = z_batch->parameters-fpath+v_len(3).
search z_batch->parameters-fpath for '.'.
if sy-fdpos gt 0 and v_len gt 0.
v_len = v_len - sy-fdpos.
v_type = z_batch->parameters-fpath+sy-fdpos(v_len).
endif.
clear v_asn.
v_asn = z_batch->parameters-asnhdr.
concatenate v_asn
z_batch->parameters-asnitem
z_batch->parameters-batch
v_type
into v_unxfile separated by '.'.
concatenate v_root v_unxfile into v_unxfile.
condense v_unxfile no-gaps.
open dataset v_unxfile for output in binary mode.
while idx <= request->num_multiparts( ).
entity = request->get_multipart( idx ).
name = fu->file_name .
if name is not initial.
content_type = entity->get_header_field( 'Content-Type' ).
clear content.
content = entity->get_data( ).
v_transfer = content.
transfer content to v_unxfile.
append content to z_batch->filetab.
endif.
idx = idx + 1.
endwhile.
close dataset v_unxfile.
endif.
endif.
Here is my fileupload button in the view
<htmlb:page title="File Upload " >
<htmlb:form method = "post"
encodingType = "multipart/form-data" >
<htmlb:label id = "Batchnum"
design = "Label"
for = "Batchnumber"
text = "Batch" />
<htmlb:inputField id = "Batchinput"
value = "//zbatch/parameters.batch" />
<htmlb:fileUpload id="batchfile" />
<htmlb:button id = "Upload"
text = "Upload"
onClick = "Upload" />
<htmlb:button id = "Close"
text = "Close window"
onClick = "Close" />
Any of you gurus know why this is happening?I solved it myself
-
Restoring images when source file has been removed
Hi - I've been working on a wedding where I imported a load of TIFFs into Lightroom and did some work on them. I've since accidentally deleted the folder containing the source TIFF files, but I can see the "worked" thumbnails still in Lightroom.
Is it possible to apply the settings that Lightroom seemingly stores about each image to a new raw image to make a new set of TIFFs?
Cheers
GaryJudith, that should do it! Just create Tiffs named as before with no new adjustments. Might truly fool LR back to where you want it.
Don
Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
http://donricklin.blogspot.com/ -
How to write to a file with \n (new line)???
Hi there,
I have the following method that reads a file's content and convert it into a string:
public static String getFileContent(String fileName) throws IOException
File file = new File(fileName);
FileInputStream fileInputStream = new FileInputStream(file);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));
StringBuffer stringBuffer = new StringBuffer();
String line;
while ( (line=bufferedReader.readLine()) != null )
stringBuffer.append(line+"\n");
return stringBuffer.toString();
}I'm trying to write a method that writes a String to a file WITH THE NEW LINE. All classes I used (DataOutputStream, FileWriter, PrintStream...) do not force a new line (I get everything in one line)
I thought maybe I should change the "\n" in the line
stringBuffer.append(line+"\n"); but...didn't know what.
thanks for any adviseBufferedReader readLine remove the newline sequence. But you're putting \n back which should do what you appear to want.
However newline sequence isn't always just \n, on unix systems it's \n, on windows its \r\n (reads "carriage-return, linefeed"). Sytem.getProperty("line.separator"); will get you the appropriate end of line string. -
Import a CSV-file into a new table?
hi, im trying to import a csv file into a new tabel, but i just cant make it work :-O. what are the steps to do that? im using sql developer version1.1.2.25.
thanks for helping :-)We do not support CSV import at this stage, we only support XLS import.
Regards
Sue -
Media Encoder CS5 - Source File has a Bad Header
I've got a system demonstration recorded as a .wmv file. I tried adding it to Adobe Media Encoder and I get the following message: "The source file has a bad header. Please check that it is a valid file."
Here is my file name: Web App III part 1.wmv
I even tried changing the file name to: WebApp3Rec1.wmv
It still won't work. Help!Hi, a little more info that may help. I have saved PowerPoint 2010 files as .wmv on one computer and if I then try to convert them using Adobe Media encoder on a different computer I get the same bad header message as you. (First computer running vista, second running W7.) However, if I use the second computer to save the PowerPoint file as a .wmv then Media Encoder has no trouble converting it.
It is very frustrating. -
Getting question marks in html output when xml file has an mdash or rsquo
I have a java servlet that gets an xml file out of ifs, applies
a style sheet to it, and sends it to the browser as html.
I have:
DOMparser parser = new DOMParser();
parser.parse(XmlUrl);
The characters ampersand, greater than, less than, and
apostrophe work fine.
HOWEVER, When the xml file has an mdash(—) or a rsquo
(’) in it, my html output in IE shows up with question
marks where these characters are supposed to be.
Does anyone know what I can do to fix this? I don't understand
why it would work with some special characters and not others?UPDATE
Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
Thanks.
Fede. -
XVBAP has the new line item but does not update Sales Order
Hi
I need to update the sales order with a new line item when the line item has a base unit of measure as the sales unit. I need to then convert the base unit to sales unit with a whole figure and the rest can be in the base unit.
I am able to see the update in the xvbap but the line item doesn't get updated.
I am puting this code in a perform within
MV45AFZB within Form USEREXIT_CHECK_VBAP
But I guess I am doing something wrong can someone please take a look at it and tell me what is wrong with the coding.
*& Include ZSD_CREATE_NEW_LINE_ITEM *
*& Form create_new_line_item
text
--> p1 text
<-- p2 text
FORM CREATE_NEW_LINE_ITEM .
CONSTANTS: C_MEINH LIKE MARM-MEINH VALUE 'CSE'.
Variables Used
DATA: WS_WMENG LIKE VBEP-WMENG.
DATA: INPUT LIKE VBAP-KWMENG,
WS_EA LIKE VBAP-KWMENG,
WS_CSE LIKE VBAP-KWMENG.
DATA: WS_MVKE_VRKME LIKE MVKE-VRKME.
Internal Tables and Structures
DATA: WS_XVBAP LIKE XVBAP.
DATA:
it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE,
it_vbep LIKE vbep OCCURS 0 WITH HEADER LINE,
it_xvbap LIKE vbapvb OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF WS_MARM,
MEINH LIKE MARM-MEINH,
UMREZ LIKE MARM-UMREZ,
UMREN LIKE MARM-UMREN,
END OF WS_MARM.
CLEAR WS_MVKE_VRKME.
SELECT SINGLE VRKME INTO WS_MVKE_VRKME
FROM MVKE
WHERE MATNR EQ XVBAP-MATNR
AND VKORG EQ XVBAK-VKORG
AND VTWEG EQ XVBAK-VTWEG.
IF VBAP-VRKME <> WS_MVKE_VRKME.
LOOP AT XVBAP.
SELECT SINGLE MEINH UMREZ UMREN
FROM MARM
INTO WS_MARM
WHERE MATNR = VBAP-MATNR
AND MEINH = WS_MVKE_VRKME.
IF XVBAP-MEINS <> WS_MVKE_VRKME.
IF NOT XVBAP-KWMENG = 0.
WS_WMENG = XVBAP-KWMENG / WS_MARM-UMREZ.
IF WS_WMENG > 1.
This means that the line item needs to be split into CSE & EA
INPUT = XVBAP-KWMENG.
WS_EA = INPUT / WS_MARM-UMREZ.
WS_CSE = WS_EA.
WS_EA = WS_CSE * WS_MARM-UMREZ.
WS_EA = INPUT - WS_EA.
Now we have the qty. split into EA & CSE. Now to
assign it to xvbap
XVBAP-KWMENG = WS_EA.
XVBAP-VRKME = WS_MVKE_VRKME.
READ TABLE XVBAP WITH KEY POSNR = XVBAP-POSNR.
MODIFY XVBAP INDEX SY-TABIX.
WS_XVBAP = XVBAP.
WS_XVBAP-KWMENG = WS_CSE.
MOVE-CORRESPONDING WS_XVBAP TO XVBAP.
INSERT XVBAP INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDIF.
ENDIF. " IF xvbap-vrkme 'EA'.
ENDFORM. " create_new_line_itemHi Clark,
Pls check the Include MV45AFZZ instead of the one which you are using . Here in this include MV45AFZZ you can have access to the Header and Line items data .
Here in this include
FORM USEREXIT_SAVE_DOCUMENT *
This userexit can be used to save data in additional tables *
when a document is saved. *
If field T180-TRTYP contents 'H', the document will be *
created, else it will be changed. *
This form is called at from form BELEG_SICHERN, before COMMIT *
form userexit_save_document.
Endform.
Either you can write the code you want to update the XVABP table here or you can use the form .
FORM USEREXIT_MOVE_FIELD_TO_VBAP *
This userexit can be used to move some fields into the sales *
dokument item workaerea VBAP *
SVBAP-TABIX = 0: Create item *
SVBAP-TABIX > 0: Change item *
This form is called at the end of form VBAP_FUELLEN. *
form userexit_move_field_to_vbap.
endform.
This are the 2 performs in this include where you can do you code and it will defnitely solve your problem.
Good Luck to you . Let me know if your problem get solved.
Thanks & Regards,
Naidu. -
File Adapter inserting New Line
All -
I'm stuck on this one. Would anyone know why the File adapter would insert a New Line at the beginning of my file? The file is output correctly with the exception of a blank line at the very beginning of the file.
Are there any conversion parameters I need to supply for the receiver file adapter? I currently have:
data.endSeparator = 'nl'
data.fieldFixedLenths = 30,30,15,3
data.fieldNames = F1,F2,F3,F4
data.fixedLengthTooShortHandling = Cut
Thanks,
DaveOk, found the issue!
The File Adapter is configured as FTP and when the file is FTP'd to the target directory and viewed using Internet Explorer, a carriage return/line feed is added to the beginnig of the file. When I FTP the file from the remote directory to my local directory and then view the file, it's fine. Not sure why Internet Explorer changes the formatting of the file.
Bottom line - the remote file is fine.
Cheers,
Dave -
Premiere Pro CS6 importing .mp4 = "The file has no audio or video streams."
Hi,
When I import an MP4 clip into Adobe Premiere Pro CS6, I get the following message:
"File Import Failure
151_0010_01.mp4
Error Message
The file has no audio or video streams."
I have the latest Quicktime, and I have reinstalled Premiere Pro CS6 a few times already. If anyone knows a fix for this, I would greatly appreciate it. My system and clip info are found below. Thank you, Robert.
OPERATING SYSTEM
Win 7 Ultimate 64bit
CLIP INFO
Complete name \BPAV\CLPR\151_0009_01\151_0009_01.MP4
Format : MPEG-4
Commercial name : XDCAM EX 35
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 1.76 GiB
Duration : 7mn 5s
Overall bit rate mode : Variable
Overall bit rate : 35.6 Mbps
Encoded date : UTC 2009-07-19 04:22:10
Tagged date : UTC 2009-07-19 04:22:10
Video
ID : 1
Format : MPEG Video
Commercial name : XDCAM EX 35
Format version : Version 2
Format profile : Main@High
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=15
Codec ID : 61
Duration : 7mn 5s
Bit rate mode : Variable
Bit rate : 34.0 Mbps
Maximum bit rate : 35.0 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.231
Stream size : 1.68 GiB (96%)
Language : English
Encoded date : UTC 2009-07-19 04:22:10
Tagged date : UTC 2009-07-19 04:22:10
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : PCM
Format settings, Endianness : Big
Format settings, Sign : Signed
Codec ID : twos
Duration : 7mn 5s
Bit rate mode : Constant
Bit rate : 1 536 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 77.9 MiB (4%)
Language : English
Encoded date : UTC 2009-07-19 04:22:10
Tagged date : UTC 2009-07-19 04:22:10I encountered a similar problem. I had quicktime files that would play in the quicktime player from the desktop, but wouldn't import the files "the file has no audio or video streams". I had just reinstalled quicktime, and Premier with no change. Finally realized that we had Barracuda protection that was at fault. It was preventing communication to the quicktime codec and thus Premier could not interpret the footage. Another symptom, I would also launch After Effects and it would tell me that quicktime wasn't installed.
I solved this by uninstalling Barracuda. We reported the fault to Barracuda, and have not seen any change in the software. -
PDF file has three parallel lines for each line object.
Working with Illustrator CS5 on a Windows 7 64-bit PC.
When opening files created with a CAD application, I noticed that most each line, whether straight or curve, appeared to be an extended ellipse. In most cases, they contained a line in the middle.
A closer observation determined that the lines where all separate objects, as shown in the figure below.
As you can imagine, the extra objects increase the size of the PDF file enormously.
Since I am using these files in MS Word, I need to convert them to either EMF or WMF format. However, Illustrator exports even larger files. I managed to reduce the size of the PDF, but the exported files are even larger than the original PDF file. Saving the original PDF file in AI format did not help either.
The only way I see to reduce the file size, whether PDF or AI, is to eliminate the extra lines. Other than deleting each line at a time or redrawing the entire file, which I am already doing, is there any way to eliminate those pesky extra lines?
Thanks!Larry,
That would have been the easiest way. Unfortunately, that is not the case.
If you look at the inserted figure, you would see that the half circle at the end of each triple line is a separate object. This means that all the lines, whether internal or external, are in fact individual strokes. -
Can I update elements 11 to import olympus RAW files from my new OM-D M5 mk 2?
I have bought a new Olympus OMD E-M mark 2. Great, but my copy of Elements 11 won't import its RAW files. I have tried to instal RAW 6.4.1 and RAW 7.1 patches but the installer just says it's the wrong version even though I downloaded from a Elements page. I've just re-installed the Application Manager and that didn't help. Please can you help me find the right patch and get it working?
ThanksNo you can't update PSE11. But it is possible to download and install the free DNG converter to convert your raw files to the Adobe universal Raw format and the files will open in all versions of PSE (keep your originals as backups and for use in the camera manufactures software)
Windows download (.exe file) click here DNG Converter 8.8
Mac download (.dmg file) click here DNG Converter 8.8
You can convert a whole folder of raw images in one click. See this quick video tutorial:
You Tube click here for DNG Converter tutorial -
I want to import a MP3 file into a new garageband project
I want to import an MP3 or any garageband compatible file into a new garageband project. I am using existing learn to play tracks and I create a guitar track to play along but I would like to import other external tracks. Suggestions please.
terryfromrockland wrote:
I want to import an MP3 or any garageband compatible file
http://www.bulletsandbones.com/GB/GBFAQ.html#importaudio
(Let the page FULLY load. The link to your answer is at the top of your screen) -
How can i Import a BIAR file by using Command Line Tool?
Dear All,
I wrote a properties file for import a biar file. my properties file is below:
action=importXML
exportBiarLocation=D:\Tamzid\BIAR\Test_Import.biar
userName=Administrator
password=
authentication=secEnterprise
CMS=bldhkbotest01:6400
exportDependencies=false
includeSecurity=true
exportQuery=select * from ci_appobjects
I have run the above properties file from cmd by the following way:
C:\Program Files\Business Objects\common\4.0\java\lib>java -jar biarengine.jar D:\Tamzid\BIAR\MyExport.properties
But it gives an error :
Enterprise authentication could not log you on. Please make sure your logon information is correct. (FWB 00008)
though my logon information is correct.
Please any body have any idea?
OS: Windows 2003 server
BO version: XI 3.1
Best Regards,
Tamzid.Dear All,
My problem is solved by the following code:
exportBiarLocation=D:\ExportMyFile.biar
action=exportXML
userName=Administrator
password=bl123456
CMS=bldhkbo02:6400
authentication=secEnterprise
exportQuery=select * from ci_appobjects
Save the above proterties file in a specific path.
Run the above properties file by the following cmd command:
C:\Program Files\Business Objects\common\4.0\java\lib>java -jar biarengine.jar ....\MyExport.properties
Regards,
Tamzidul Amin. -
My computer broke... can I import my iPod files to my new computer?
Recently my computer which contains all my songs which are on my iPod broke and I got a new computer... is there anyway that I can transfer all my iPod files onto my new computer?.... I know how to transfer my songs that i purchsed from iTunes but I want to transfer songs that I did not purchse as wel... is it possible?
This Zevoneer post should help:
http://discussions.apple.com/thread.jspa?messageID=4446066�
Maybe you are looking for
-
Print Current Date on iCal Printed Output
My wife likes to print out her weekly calendar from iCal (which she sync's with her iPhone). It would be very useful if iCal could place "the dated printed" on the output hard copy. This would prevent outdated versions of the calendar from getting co
-
Java NIO locking and NTFS network resources
Hi all - just ran into a really nasty situation and I was wondering if anyone else has hit it and might have some suggestions. Platform: JRE 1.4_02 on a Win XP machine The following test code locks a file, then copies it to another location using NIO
-
Is there any java programming tool/editor available??
I am new to java and need to do my class work. I need an editor/programming tool for writing, editing and compiling java applications. I have been suggested TextPad. But is there anything more advanced and sophisticated available than TextPad. I hear
-
Moving SAP server to a new domain
Hi, We need to move a set of SAP servers (windows) running in one network/domain to another network/domain. No other change is planned, the systems are going to remain as is. I would like to know - What might be involved in achieving this (I tried se
-
SHOPPING CART-DELIVERY ADDRESS(NAME- DISABLE)
Hi, Iam using SRM7.0.During Creation of SC,Delivery Address -NAME Field is disabled.Before it used to Work perfectly.All other fields in Delivery Address are in Enable mode. Please can you say your suggestions regarding the issue. Thanks, Anitha Aver