on 05-17-2010 12:11 PM
I have a text file, with following values.
AAA056070144AEA056070144AACTESTPO271+(.......sequence continues)
Length of TAG (Like AAA, AEA,AAC etc) is fixed (i.e.3 ). Length of the Values coming after TAG are not fixed. Field Separator is '+'.
Source structure is
DT_OrdersFromECHO
|_ ECHO_SO
|_ Value
My requirement is after FCC, I sud get
ECHO_SO
|_ Value : AAA056070144
ECHO_SO
|_ Value : AEA056070144
ECHO_SO
|_ Value : AACTESTPO271
If I mention field Separator and filed Names ,it gives an error
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'ECHO_SO':java.lang.Exception: ERROR in configuration / structure 'ECHO_SO.': More elements in file csv structure than field names specified!
How can i achieve it?
> AAA056070144AEA056070144AACTESTPO271+(.......sequence continues)
>
> Length of TAG (Like AAA, AEA,AAC etc) is fixed (i.e.3 ). Length of the Values coming after TAG are not fixed. Field Separator is '+'.
When I understand this correct, you do not have a fixed structure, that means you cannot use FCC as this requires a fixed file format.
Could you let me know, what you want to do with that data? What is the target interface? How should the fields of target interface be populated from source file structure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan
Requirement is that ...AAA is ECHO sales order creation
BAA is Retail Price
CAA is Price maint
Values coming after TAGs will denote which customer to update with what value.(Handled in ABAP)
Now, which adapter sud I use to get XML version of the message? XSLT or Java mappings are done at mapping level. But I need to read the data first.
How do i read the data and make it usable at PI.
You need a data structure where all possible tags are maintained. Check if the tags are hierarchical or repeating, that you have to model in the data type the same way.
The file adapter reads the data without FCC. The first mapping step is a java program which creates the XML structure corresponding to your data type. (XST won't work, as XSLT can only be used for XML files)
A second mapping step creates the target strucure (IDoc?) from data type, so you can use graphical mapping here.
This is not an easy task. The development and testing of the Java program will need much effort.
Hi Snehal,
Looks like the input file have more values than the number of field names specified
try using NameA.additionalLastFields = ignore as one of the parameter ans see whether you are getting any error messages
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Input file structure is
AAA1234AEA12345BAA3456BAD345678CAA9876+CAD13445
Let me know how can i achieve the result as
TAG : AAA
Value: 1234
TAG : AEA
Value: 12345
TAG : BAA
Value: 3456
AND SO ON....
I have tried so many things so i m not able to paste a structure here .
The result which i get is only first filed is converted. It ignores rest of the fields.
Hi Snehal,
>AAA1234AEA12345BAA3456BAD345678CAA9876+CAD13445
So you will have only one line in the input file which have all the records separated by + sign. Right?
If this is the case then you cannot use FCC of the sender file channel. because at a time the fields or the values are not fixed..
So I will suggest you to read the file into PI (without FCC) and then break it into
TAG : AAA
Value: 1234
TAG : AEA
Value: 12345
TAG : BAA
Value: 3456
either using XSLT of java mapping.. So your interface mapping will have this mapping as 1st and your normal (source to targte conversion) mapping as 2nd
Regards
Suraj
Hi Snehal,
>>XSLT or Java mappings r bit complex
XSLT might be , but java mapping is very simple (in this case), its just a end of line loop, and for each + you need to put the string into an array.
Later for each array value, you ned to break it into a non-number and number field. if you have some java knowledge then you will be able to write the code. Also check this wiki page on how to make java mapping..
http://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
Regards
Suraj
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.