cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.4 scenario. Flat file to XML -problems with FCC & mapping

former_member233999
Participant
0 Kudos

Hi All,

I was hoping you might be able to assist with an interface issue I've got.

The interface overview is: I have a flat file in UTF-8, pipe delimited, with a header, gl and a tax line item. The file will contain many invoices in one csv file. The file can only contain one header (INV) and 1 or more GL and one or more TAX lines...

File structure

INV (header

GL (general ledger info)

TAX (tax based info)

I've had issues with the file content conversion, I've got to the point where I'm able to read one of the recordsets (the inv line) and in a second scenario i've managed to get both the INV and the GL info in, but should I have more than 1 GL line it falls over, with a mapping error.

My setup at present is:

My design:

Flat csv file:

I have a destination set of DT and MT and a SI for both sender and receiver and a set of mapping, as below:

My Config is:

When I run in the above file, I get the following error:

If I run the above in with the recordset for the GL set to 1 it will allow me 1 GL line item. As below:

However I want to have more than 1 GL item per recordset, so set the recordset structure to INV,1,GL,*

When I do this, I get the following error in NWA logs.

And the mesmon error:

So apparently I've got a mapping error, but to me my mapping looks ok.. The values are definitely being passed through, as ive checked the queue context in the MM:

Please assist .

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi George

It looks like your error is on the target field INV.

Please provide the following screenshots:-

1) Display queue on target field INV

2) Display of source structure in Test tab. This is to check for any structure incompatibility/mismatch - refer to the screenshot on item (iii) of my reply in the following thread

Re: Removing CDATA around XML Adds Unwanted Escaping

Regards

Eng Swee

former_member233999
Participant
0 Kudos

Hi Eng Swee,

Please find the info you require:

1)

2)

They look identical. Also the queue is passing nothing, which I would expect as its just a header?!

engswee
Active Contributor
0 Kudos

Hi George

That's weird. It looks ok.

Can you confirm if you made a verbatim copy of the payload that caused the error, and used it in the Test function? I just want to make sure you are testing with the real runtime payload, and there are no edits/changes when you enter it into the Test function.

If you confirm the above steps are correct, then I can't think of anything wrong other than maybe the cache is not updated.

Regards

Eng Swee

former_member233999
Participant
0 Kudos

Hi Eng Swee,


The payload that causes the error is attached. Its a csv so you will have to rename it to .csv.

The file as it exists in MesMon, once picked up the .csv file is attached. You can see that its only picked up the GL line.. Totally ignoring the INV line, where it cant map the INV part.

I may go for a reboot of the server...

engswee
Active Contributor
0 Kudos

Hi George

I tried replicating your config and testing with your file and it works fine on my system. The FCC correctly extracts both INV and GL lines.

Below are the config and output generated.

Just a snippet of the output.

One thing I'd suggest you check is to make sure that every parameter and value do not have any trailing spaces in the table. This has been a common issue I've come across in the past, especially if the values are copied and pasted. It is not easily detectable as the trailing spaces are not visible to the eye.

A few other recommendations, not crucial but would be good:-

i) Keep Recordset Sequence as default Ascending

ii) Keep Recordsets per Message as default blank

iii) Do not configure <structure>.endSeparator. It is automatically defaulted to 'nl'. (You used nl without quotes which is incorrect anyway)

Regards

Eng Swee

former_member186851
Active Contributor
0 Kudos

Yes Engg,

You can see one more thread we had 37 discussions,Not seeing any error in his config.

Its weird that when he gives GL,* its failing.

former_member233999
Participant
0 Kudos

Thanks Eng Swee,

I rebuilt from scratch using your bullet points above as guidelines and ensuring I keep my naming conventions clean and I'm having more success .

I've managed to get the entire file out as per the below :

However, my file had multi G and T lines But as you can see in the above I'm only getting one instance out. My FCC states these should be Multi instance, as does my mapping and occurance in my DT. What else can I check?

former_member186851
Active Contributor
0 Kudos

Hello George,

AT FCC only if you give * as occurence it should pick multiple records.

anyways lets wait for Enggs comment as well.

engswee
Active Contributor
0 Kudos

The FCC conversion is independent of the design of your Message Mapping or DT/MT.

Your input file and config (using I, G and T instead) looks different now. Can you please paste your latest FCC config, and input file?

former_member233999
Participant
0 Kudos

FCC

Input File:

Thankyou.

former_member233999
Participant
0 Kudos

It was the OCcurances set for the G and T levels in the DT's and MT's. Corrected these from 1:1 to 1:many at the node level and this seems to have worked.

Thank you for all your assistance.

former_member186851
Active Contributor
0 Kudos

Please close both the threads Geroge..

Happy that your issue hase been resolved.

engswee
Active Contributor
0 Kudos

Hi George

Glad to know that your issue has been resolved.

However, I would like to add a few more pointers because I find that both this and your other related thread have had a lot of misleading information, which possibly caused the lengthiness of both threads!

i) It is important to differentiate the content of the payload at each step of the processing within PI's pipeline, i.e. what is the payload after FCC, what is the payload before mapping, after mapping. You need to indicate the payload is for which step. For example, the last screenshot you provided above with the single H, G, T lines would be the after mapping payload. It so happens you are having a 1-1 mapping with exact same MT for source and target. But because all your previous payload provided were before mapping, this caused us to assume the issue was caused by FCC instead of mapping (which then is related to the occurrences setting).

ii) As I mentioned above, FCC processing is independent of definition of DT in ESR, meaning FCC won't perform a lookup on DT to verify the schema. It is the developer's onus to ensure that the FCC configuration is set up so that it produces an XML that conforms to the DT schema.

Lastly, this is related to proper closing of threads in SCN. Noticed that you set your other thread to Assumed Answered. I believe there were some responses there that have helped you along the way. If so, do consider marking them as helpful answers. Read up the following on closing discussions.

Regards

Eng Swee

former_member233999
Participant
0 Kudos

Hi
Eng Swee,

I will make note of those points.

Many thanks for all your assistance.

Regards,
George.

former_member233999
Participant
0 Kudos

Thankyou very much for your assistance.

former_member186851
Active Contributor
0 Kudos

Glad that your issue is solved George.

Answers (1)

Answers (1)

Former Member
0 Kudos

It looks you have all the fields assigned as mandatory fields but some of them are not populated in the source xml file.

kindly check /share your source xml for multiple GL  (After FCC )