File content converision -Header data in Target
Here is my input file structure . I need to split each record as a message for each suplierno,ponumber
and receiptdetails
File structure
SupplierNo -1st record
PONumber
Receiptdetails
SupplierNo - 2nd message
PONumber
Receiptdetails
PONumber -3rd message
Receiptdetails
Content conversion record structure
BatchHeader,1,Supplier,1,POHeader ,*,ReceiptDetail,*
For the single PO it is working fine. But if the supplier has more than one PO ,
in this 2nd PO message I am not getting the supplier no in the header . How can I get this supplier no in the second message.on target Or how can I add in the target side mapping to get the previous supplier no for the 2nd message
I am mapping supplierno > vendor in the top control section
Thanks for your help
sorry i send the incorrect one
File strucure
H01PRISM_GRO 20131211220238 Header
H110000104102 supplier 1st record
D01420080321320131111REPS3100 POHeader
D03000101996566-0069 9.000 +EA 20131211318305 ReceiptDetail H110000108701 supplier 2nd record
D01420074762320130731P1403010 POheader
D03000105181352-001 Receipt 1.000 +EA 2013121180028111 D01420076487220130903P1101000 PO 3rd record
D0300010H59852211254001 Receipt
Input structure If you look at the 3rd PO number there is no supplier no after content conversion. This one should be mapped to in the header at contol level so if the file has supplier then it works fine .I need to have each record with suppl no
<?xml version="1.0" encoding="utf-8"?>
<ns:mt_GoodsReceiptOutbound xmlns:ns="http://test.com/PRISM/SCM/B2B/Services">
<Batch>
<BatchHeader>
<DocumentType>H01</DocumentType>
<DocumentID>PRISM_GRO</DocumentID>
<RunDate>20131211</RunDate>
<RunTime>220238</RunTime>
</BatchHeader>
<Supplier>
<DocumentType>H11</DocumentType>
<SupplierID>0000104102</SupplierID>
</Supplier>
<POHeader>
<DocumentType>D01</DocumentType>
<PONumber>4200803213</PONumber>
<POIssueDate>20131111</POIssueDate>
<POPurchOrg>REPS</POPurchOrg>
<POPlant>3100</POPlant>
</POHeader>
<ReceiptDetail>
<MovementType>101</MovementType>
<StorageLocation>0001</StorageLocation>
</ReceiptDetail>
</Batch>
<Batch>
<Supplier>
<DocumentType>H11</DocumentType>
<SupplierID>0000108701</SupplierID>
</Supplier>
<POHeader>
<DocumentType>D01</DocumentType>
<PONumber>4200747623</PONumber>
<POIssueDate>20130731</POIssueDate>
<POPurchOrg>P140</POPurchOrg>
<POPlant>3010</POPlant>
</POHeader>
<ReceiptDetail>
<DocumentType>D03</DocumentType>
<POLineItem>00010</POLineItem>
<MaterialNumber>5181352-001</MaterialNumber>
<ReceiptQuantity>1.000</ReceiptQuantity>
<Filler></Filler>
<StorageLocation>0001</StorageLocation>
</ReceiptDetail>
</Batch>
<Batch>
<POHeader>
<DocumentType>D01</DocumentType>
<PONumber>4200764872</PONumber>
<POIssueDate>20130903</POIssueDate>
<POPurchOrg>P110</POPurchOrg>
<POPlant>1000</POPlant>
</POHeader>
<ReceiptDetail>
<DocumentType>D03</DocumentType>
<POLineItem>00010</POLineItem>
<MaterialNumber>H59852211254001</MaterialNumber>
<ReceiptQuantity>1.000</ReceiptQuantity>
</ReceiptDetail>
</Batch>
</ns:mt_GoodsReceiptOutbound>
Similar Messages
-
Could not parse the file contents as a data set. There were too many variable names in the first line of the text file.
What are the Variables settings, what is the text file’s content, …?
-
File Content Conversion - Header
Hi,
I need to produce an pipe delimited file. The only problem is that that column fields would need to be differentiated with an hypen.
A typical file format is
NAME
ADDRESS
AGE
ONE
134,DSTREET
27
TWO
222,SSTREET
28
How do i specify the two lines of hypen(-) in file content conversion, is it possible or do i need to use any unix script to achieve it.
When i posted, the pipe delimited disappeared.
Please note that there is pipe delimeted between each fields.
Regards
Krish
Edited by: Krish on Dec 21, 2011 2:20 PMhi Krish,
you can do it in your target Data Type, by specifying a structture which is not only based on your records, but like that:
HypenLine1
your headerLine (with field names)
HypenLine2
your Records... (so your current structure)
so something like:
DT_MyDataType
....HypenLine1 level with occurence 0..1
.............LineField with occurence 0..1
.... headerLine level with occurence 0..1
and in your mapping,
¤ you put constant in each field of your HeaderLine to provide the name of your field. (*)
¤ you put as many '-' character you want in your single field "LineField" of HypenLine1 and HypenLine2.
(*) of course, in your receiver CC, you should remove your option which produces the headerLine based on your fields names, as now this line is maintained directly in your mapping.
Mickael
Edited by: Mickael Huchet on Dec 21, 2011 2:38 PM -
Procedure for creating Recording in LSMW with header data and line item
Hello Friends,
I have to do the Initial Upload of Model Service specification using LSMW ( Recording).
Transaction : ML10
The problem i am facing is that i have been given 2 files one with HEADER data and the other with LINE ITEM(Service data).
Can we use the RECORDING method to upload 2 files?
If not possible how do we proceed.
Thanks and regards
Ashish Naik.Step-by-Step Procedure:
Details of the BAPI used in this scenario:
Business Object: BUS2012
Method: CreateFromData
Details of Message Type and Basic IDoc Type:
Message Type: PORDCR
Basic IDoc Type: PORDCR02
Letu2019s have a look at the BAPI first, before proceeding to the LSMW:
1. Go to Transaction BAPI
2. Click on Search Button
3. Enter the value u201CBUS2012u201D and select u201CObj.type(Technical Object Nameu201D
4. Press ENTER
5. Following screen appears:
6. On the left side of the screen, Expand the u201CPurchaseOrderu201D.
7. Select u201CPurchaseOrderu201D and double-click on the same for details.
Building LSMW using BAPI:
1. Go to Transaction LSMW.
2. Enter the Project, Subproject and Object information and click on CREATE.
3. Enter the descriptions for Project, Subproject and Object as prompted.
4. Now select Settings à IDoc Inbound Processing
5. u201CIDoc Inbound Processingu201D screen appears. Enter the required details as shown below:
6. Click on u201CActivate IDoc Inbound Processingu201D.
7. Click on u201CYesu201D when prompted for u201CActivate IDoc Inbound?u201D
8. Hit on u201CBacku201D to return to the main screen.
9. Click on Continue (F8). Following Screen appears:
10. Select the Step 1 u201CMaintain Object Attributesu201D and select u201CExecuteu201D.
11. Select the radio button u201CBusiness Object Methodu201D and enter the following details:
Business Object: BUS2012
Method: CreateFromData
Hit ENTER
12. Save and click on BACK button. Following information message is displayed.
13. Now select step 2 u201CMaintain Source Structuresu201D and click u201CExecuteu201D.
14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on u201CCreateu201D again to create the child structure. Following popup appears:
Select u201CLower Levelu201D and click on Continue. Enter the Item data structure name.
Click Save and hit BACK button to go to the main screen.
15. Select step 3 u201CMaintain Source Fieldsu201D and hit execute.
16. Enter the fields as shown below:
17. Click SAVE and return to main screen.
18. Select step 4 u201CMaintain Structure Relationsu201D and click Execute.
Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
Select HEADERDATA and hit ENTER
Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
Click Save and return to main screen.
19. Select the step u201CMaintain Field Mapping and Conversion Rulesu201D and click on execute. Maintain the Field Mapping as seen below:
20. Select step 7 u201CMaintain Source Filesu201D and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
Save and return to main screen.
21. Select the step u201CAssign Filesu201D and click on Execute.
Assign the file provided to the source structure. Here the same file is provided for both the structures.
Save and return to the main screen.
22. Select the step u201CRead Datau201D and click on Execute.
Click on Execute.
Return to the main screen.
23. Select the step u201CDisplay read datau201D and click on execute.
Click on the structure name to get the field level values.
24. Return to main screen and now select u201CConvert Datau201D.
25. Return to the main screen and select u201CDisplay Converted datau201D.
26. Return to main screen and select u201CStart IDoc generationu201D.
27. Now select the step u201CStart IDoc Processingu201D on the main screen.
28. Return to main screen and click on u201CCreate IDoc overviewu201D. Here the data record and status records of the IDoc could be viewed:
Check this. This may help -
Sender FILE Adapater Content Conversion: Header and Item Data
Hi
I need to pick a file and do the content conversion. The XML structure which should be formed should be in the below format. I have a CSV file which needs to be converted.
Kindly suggest how can I maintain parameters for Header and Item level data in Recordset structure.
How can I specify in Recordset parameter which is Header(Customerno, Doc type and Address) and Item level(Line Item) data.
<?xml version="1.0" encoding="UTF-8" ?>
<customernumber></customernumber>
<documenttype></documenttype>
- <Address>
<name1></name1>
<name2></name2>
</Address>
- <LineItem>
<material>100016</material>
<amount>1000</amount>
</LineItem>Hi Swetank,
The file after conversion should have one Header and you can have any number of line items.
Once you choose File Content Conversion in the message protocol header while configuring the Sender File Adapter, you get the following enteries in the Content Conversion Parameters:
Document Name
Document Namespace
Document Offset
Recordset Name
Recordset Namespace
Recordset Structure
Recordsets per Message
Key Field Name
To maintain the Header information, Some entries are mandatory, i.e.
Recordset Name: Here please specify the name of the structure. It is included in the XML schema.
Recorset Structure: Here you need to enter the sequence and the number of substructures. Since Header is one but you can have many Line items, you will write:
customernumber,1,documenttype,1,Address,1,LineItem,*
this format is clearly explained in the link provided by Divya.
And in the Additional fields you need to write the name of fields corresponding to different Recorset Structures and also add some property to it, like fixed lengths, use some separators etc.
and Most important field is:
Key Field Name: If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value *, then the substructures must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. In this case, you must specify a key field and the field name must occur in all substructures.
Here you need to enter LineItem as it is the only Recordset Structure with an *.
I hope this solves your problem,
Thanks and Regards,
Varun Joshi -
BPM was Picking two files but it was not processing 2nd file data in target
Hi all,
I have designed scenario for picking two files and i want to merge this files into single structure and send it target.when i am try to testing my bpm was picking two files but it is processing only file it went target system.i have steructe for source like
source1 target
root header
a item 0 to unbounded
b a
c b
c
source2 item1 duplicated structure
a a
b b
c c
i am getting two source files with the same structure but i have to map it one target structure and i want to map both source fileds to one target structre under item node so i was duplicated item node and mapped a b c fields from both(2 source structures).while testing BPM is picking two file bu in the target i am getting only first file data under item node,whatever i mapped with duplicate structure with second file i am not getting into target file(target is standard proxy structure so cant' create new one item node in that occurance is 0 to unbounded thats y i duplicated node while testing interface mapping its working fine).can anyone suggest solution for this problem.
Thanks,
Seshagiri.Hi,
In BPM follow the below steps and hopefully your problem will be solved.
1. Configure one sender CC to get the files from your application server, once the files hit the BPM now you need to
configure your BPM accordingly.
2. Use the Receiver step in BPM to receive the messages. Use the correlation step to get the correct files.
3. Use container and append the files, so both the files will be append, this means the message content will
have 1header, body, footer, 2header, body, footer.
4. If you want to split the message to different receiver then use the fork step else leave it.
5. Use the transformation step, the transformation step will call the message mapping. Provide the correct message
mapping.
6. Now use the sender step to send the message to the receiver-target system. In this step use the split value for each
concept if you want to generate two different files.
7. Configure 1 receiver CC to generate both the files.
Hope this helps.
Cheers,
Jay -
It is necessary to create one header data for each file to be sent to CDFS.
hi GUYS
my sce anrio is FILE-XI-PROXY
REQUIREMENT IS
SOURCE FILE TARGET FILE WILL BE
H1 H1 H1 H1
I1 I1 I2 I3
I2 F1 F1 F1
I3
F1
It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
Thanks
NAGaa
-
Supress Column Heading - File Content Conversion in Sender Adapter
Hi,
Let me give a more clear picture about my scenario. I need to convert CSV File to XML output:-
My source file has column heading and values. The sample data is mentioned hereunder:-
PERNR;KID;PNALT;NACHN;NAME2;VORNA
;1200;1200;Angus
I have created a data type as under:-
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Header (Category - Element, Occurence - 0...1)
PERNR_H
KID_H
PNALT_H
NACHN_H
NAME2_H
VORNA_H
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
The file conversion parameters in the file sender adapter are mentioned hereunder:-
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Header,1,Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
I dont' have a key field value. How do we remove the header and show only the values in the xml output. I have searched the forum topics as well checked many blogs related to file content conversion, but nothing helped. Kindly advice how to fix this issue. Thanks in advance.
Regards.
PraveenHi Praveen,
Change your File Adapter as below
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
There is no need for the Header required in the data type.
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
Now the trick is in the mapping program
Lets assume your mapping looks like
MT_LegacyEmployee ---> MT_TargetEmployee
- Employees ---> Records
- Employee ---> Record
- PERNR ---> TargetPERNR
- .. so on
When you do a mapping from Employee ---> Record apply the following logic.
(PERNR)--->
(TestEquals =) --->(NOT)--->
(Constant) ---> (IF)
(PERNR) (IF Without Else) ---> (Record)
(THEN)
(Employee)--->
When doing this make sure RightClick on PERNR and Select Context ---> Employees.
By default context would be from Employee and it will give you an error of XSD format. So make sure you are changing the context. -
Receiver file Content Conversion with Header line
Hi,
Here I am doing receiver file content conversion with header line.
I am able to get the output file correct, when I open the file in notepad the header line and data appearing in the same line (not accepted).
But when I tried to open the name file in internet explorer I can see the header line and data in two different lines (accepted).
What should I do I want to see the same output in the notepad?
Please help me out.
Thanks in advance,
Srikanth.You can use NameA.addHeaderLine.
Specify whether the text file will have a header line with column names. The following values are permitted:
0 u2013 No header line
1 u2013 Header line with column names from the XML document
2 u2013 As for 1, followed by a blank line
3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied
4 u2013 As for 3, followed by a blank line
The below weblinks will help you to know the other paramters.
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm -
IDoc to File with different file name and data based on the IDoc header dat
Hi,
I got a requirement to implement IDOC to file senario. In this the Converted file should have the file name and file content based on IDoc Header data. Means If one of the IDoc header field value is
'A' - then the file name recieved by reciever system should be 'A.txt' and with the columns A B C D F.
'B' - then the file name recieved by reciever system should be 'B.txt' and with the columns C D F.
In both the case IDoc message type is same.
Please suggest me what i need to do to achieve this.
Thanks in Advance. ...
Regards
SriHi,
As per my requirement, we need to create one file for each IDoc based on IDoc header data. SAP program generates 10 IDocs for each run. All 10 IDoc's message type is same. Each IDoc has one header record with the file name. Base on the name in the IDoc header record, file needs to be created with different columns and file name. Means..
IDoc 01- Header Description contains 'A' - than file will be generated should have name as 'A.txt' and columns 'parent' 'child' 'descripion'.
IDoc 02- Header Description contains 'B' - than file will be generated should have name as 'B.txt' and columns 'Name' 'Department' 'Description'.
IDoc 10- Header Description contains 'J' - than file will be generated should have name as 'J.txt' and columns 'Order No' 'Materail' 'Description'.
Hope this will give more clarity on my requirement. Please let me if you are still not clear on requirement.
Thanks for your all help..
Thanks & Regards
Sreeni -
We have a Content Presenter taskflow. This task flow is added to a jspx page. The taskflow fetches the content from the contributor data file. The contributor data file is having a WYSIWYG editor. The content of the WYSIWYG editor is being displayed correctly through the task flow.
We have some links in the WYSIWYG editor. These links again point to some data files. When we click on these links from within the portal, then we are getting a blank page(the url of this blank page is: http://localhost:7101/eWSIBPortal/faces/oracle/webcenter/sitestructure/render.jspx?datasource=UCM%23dDocName%3AWSIB_ARTICLE) and not displaying the content of the data file that we are pointing to from the WYSIWYG editor.
We want to display the content of these data files(which we have pointed from WYSIWYG editor) in-line within the portal.
Please help us to resolve this issue and let us know if any information is required from our end.Thanks for reply. However, can I use XSQL to dump the formated text to a file? or just can display to client through web browsers?
-
Problem with non-ASCII file name in content disposition header
Hi All,
I am facing some problems with the non-ASCII file name incase of content-disposition header. I read from the RFC 2183 that if the file name contains non-ASCII characters then the same should be encoded before sending to browser. I did the same but realized 2 problems:
1. The name of the file is truncated in case the file name is slightly long for e.g. �����������j�b�g��������������������������.txt
2. Also when the same file is opened in notepad, the title is showing encoded name %E6%9C%80%E4%B8%8A%E4%BD%8D.....
Overall, I feel that the browser is not understanding or responding to the encoded header values.
Is there any solution to this problem? I am using Microsoft IE 6.0.
The code snippet is given below:
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String fileName = "�����������j�b�g��������������������������.txt";
fileName = URLEncoder.encode(fileName, "UTF-8");
resp.setCharacterEncoding("UTF-8");
resp.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
resp.setContentType("application/download-binary");
String s = "This is inside txt file";
resp.getOutputStream().write(s.getBytes("UTF-8"));
return;
}Any help or pointer would be highly appreciated.
Thanks and Regards,
AshishThe MIME standards for non-ASCII filenames are not widely implemented.
Many mailers use an ad hoc method for encoding filenames. JavaMail
supports both methods, but you need to set properties, such as the
mail.mime.encodefilename property. See the JavaMail javadocs for
the javax.mail.internet package. -
Get-Content and add Date and Time in a new file
Hello,
in a existing file I have data like:
1;Idle
5;chrome
1;spoolsv
Now I need to grab the content and add date and time in front of each line and save it to another file like:
07.04.2015;10:18;1;Idle
07.04.2015;10:18;5;chrome
07.04.2015;10:18;1;spoolsv
But I don't have any idea how I could solve this challange. Does anyone have a helping hand for me?
GreetingsHello,
If you need a new file with the desired output try this
get-content .\current.txt | Foreach-Object{ $dntv = (get-date) ; "$dntv" + $_} | Out-File newfile.txt
regards,
V
Venu -
Upload file - get rid of Content-Disposition: form-data;
Hello,there.I just want to know if somebody had succesfully solved problem of getting rid of rows
at uploaded file
-----------------------------7d23c05be8
Content-Disposition: form-data; name="fromflr"; filename="C:\WINDOWS\Desktop\Clock"
Content-Type: text/plain
"Some Data"
-----------------------------7d23c05be8
Content-Disposition: form-data; name="toflr"
HARGAL
I just need get rid of rows like
-----------------------------7d23c05be8
Content-Disposition: form-data; name="toflr"
HARGAL
and leave only "Some Data" in uploaded file.
Any suggestion would be appreciate.See for example Upload taglib from Coldtags suite:
http://www.servletsuite.com/jsp.htm -
File content conversion - sender adapter for Header and detail records
Hi Experts,
I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
Thanks
DeepakHi
Refer the below fourm link,
Flat file whitout id
Regards
Ramg.
Maybe you are looking for
-
i installed a demo version of adobe flash cs6 and after 1day , when i try to save my stuff it gives me a fatal error , can anybody give me a soluction please, THANKS IN ADVANCE
-
Size of song in MB does not show in Lumia520
how can i see size of song, image or video files in Lumia520....
-
STATIC TIME STAMP IN MULTIPLE COLUMNS
I have a single spreadsheet for Monday - Friday. There are multiple columns for each day. It has been asked of me the following: When the customer name is typed for the first time in columns: E, T, AH, AV, BJ rows 5-28 then the static date & time
-
Hello all, I am having a standard transaction with a header details and Item details screen. Now I want to add some fields to the header and item details screens. How to figure out which screen and userexit to use for this purpose. Is there any stand
-
I cant open itunes says disc is full
I cant get in to delete anything and dont know what it's referring to. please advise