cancel
Showing results for 
Search instead for 
Did you mean: 

SEND_CONSUMER_ERROR after adding UNA and UNB segments in mapping

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Experts,

I am getting the below error after I have added the UNA and UNB segment in the mapping.

Previously, the configuration was working fine.

Error Description

--------------------------------

Transmitting the message to endpoint <local> using connection IDoc_AAE_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.RuntimeException: Can not find Segment Elements for messageVersion 96A, message subversion 000000, message agency UN, segment S_UNB, newFirstlevelElement C_S001, currentIndexLevel1 0

UNB segments were showing the error, but after disabling that field I am getting error in UNH segment.

I am not sure why the structure is having the issue. I tried many things changing in TPM and configuration but nothing worked.

If anyone has faced this problem, please help on this issue.

Thanks,

Nidhi

Accepted Solutions (1)

Accepted Solutions (1)

Dimitri
Active Contributor
0 Kudos

Hi Nidhi,

You added segments... Where?

Did you check the B2B Integration Cockpit? Make sure the structure is changed too and use that XSD in your mapping.

Kind regards,

Dimitri

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Dimitri,

I have requirement to use the XSD according to the Message Type - INVOIC:D:96A:UN:SFTI01

I can see in B2B Cockpit that its not available in EDIFACT and nor in EANCOM(EAN008,EAN009).So, we assumed that EDIFACT(SFTI01) and used that XSD to proceed with the mapping.

Also, we have some fields in our mapping structure to map the above message type structure.

According to this structure, we have configured in our TPM also related to the same XSD.

Highlighted the first one...sub version- N/A which we are using as SFTI01 is not available.

In the agreement also we are using the same.

Tried many hit and trials for testing and the result is as below-

1) With SFTI01 in the mapping, its not working.

2) If we put EAN008, its working perfectly fine.

3) We tried using EANCOM XSD and putting SFTI01 but its also not working at all.

Mapping a constant SFTI01 is causing the error. Can you please advice over this issue.

Thanks,

Nidhi

Dimitri
Active Contributor
0 Kudos

Hi Nidhi,

You require a message structure which is not shipped by SAP, correct?

But your able to process it until the message mapping?

: any thoughts on the message structure? I guess there is a workaround for these kind of messages, isn't?

Kind regards,

Dimitri

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Dimitri,

After some more analysis i came to know that when I am removing the localejbs/EdifactConverterModule from the configuration the message is processing successfully even with the "SFTI01" .Also, its getting converted into EDIFACT format.

So, again my confusion is does this module is required for XML to EDIFACT conversion or not required? As per this analysis, it seems-

1) Either this module is the cause for the error, as its not getting the correct EDIFACT according to the log mentioned below.

04.08.2014 12:41:24.450InformationMP: processing local module localejbs/EdifactConverterModule
04.08.2014 12:41:24.451InformationB2B EdifactConverterModule : EDI format detected as EANCOM
04.08.2014 12:41:24.451Information0}: The module-paramteter "eancom.subversion.prefix" is not set. Using default value "false"
04.08.2014 12:41:24.575InformationB2B EdifactConverterModule: Message will be sent as ISO-8859-1.

2) TPM Configuration, basically the messages in the Agreement for the trading partner is causing the error.

Hope I am able to explain. Please suggest.


Thanks,

Nidhi

ruchir_sinha
Participant
0 Kudos

Hi Dimitri,

Message structure seems ok on first look. It will depend on the payload which is being processed. Let me analyse a bit more. Question is whether the control key is being picked correctly by TPM.

Best Regards,

Ruchir

ruchir_sinha
Participant
0 Kudos

Hello Nidhi,

I think you have already defined the Outgoing agreement. Now The EdifactConverterModule will detect the message as EANCOM only if you have Controlling agency starting with EAN/GS1.

Otherwise the message will always be detected as EDIFACT. Now next thing to be determined is whether the correct control key is being picked or not for conversion. Make sure the scenario association points to correct control key.

I am making some basic assumption about your scenario. Please correct me if I am wrong.

You have an IDod XML which is mapped to EDIFACT and then converted to EDI Message before being sent to partner. You have defined all the partner related details in TPM.

So your TPM Agreement page has an "Outgoing" where you are the Sender Partner and the Receiver Partner is configured to which the message has to be sent.

Now your channel immediately after mapping might be having the Modules attached to it. I am providing the Module and Module params below. Please check if you have similar configuration.

1. TPMContentAccessModule --> enable.ediAckProfile - "true"

2. GenericConverterModule --> tpm.enable - "true"

Let me know if you have something else as well also if possible could you attach the XML which you are trying to convert to EDI message so that I can try on my end if everything is working.

Best Regards,

Ruchir

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Ruchir,

Your assumption is correct.

EDIFACT structure we dont have a subvresion(SFTI01)

Module Configuration(1)

Module Configuration(2)

I tried both the options, but the results are same. Its not working at all. Same error is coming.

If I remove all the modules, the messages are getting successful.

XML is huge, so if you can give your id i can forward the same.

Thanks,

Nidhi

ruchir_sinha
Participant
0 Kudos

Hi Nidhi,

Your second module configuration is incorrect. You should not use both GenericConverterModule and EdifactConverterModule together. Internally Generic Module calls EDIFACT converter module itself. So calling it twice means you are converting back to XML.

You can send the payload to my id ruchir.sinha@sap.com

Best regards,

Ruchir

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Ruchir,

I have made the changes and kept the configuration as in the Channel_1 screenshot.

I have sent you the payload on your email id.

Please let us know if you get to know something wrong in the configuration.

Thanks,

Nidhi

ruchir_sinha
Participant
0 Kudos

Hi NIdhi,

I have replied in the mail. I think the encoding which was being used is incorrect. Once I changed that I was able to convert the XML to EDIFACT successfully. Please let me know if it works.

Best Regards,

Ruchir

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Ruchir,

Its not working for me. For changing the encoding I used XMLAnonymizerBean but its not working as its showing in the output as UTF-8. Also, in the channel we are using ISO-8859 not the UTF-8.

On the other hand, when I change my mapping field from SFTI01 to EAN008 it works well, but it does not convert to EDIFACT message neither by GenericConverterModule nor by EdifactConverterModule.

I am not sure why encoding is not working, how can i test if encoding is the only reason??

Please help to resolve the same.

Thanks,

Nidhi

Answers (7)

Answers (7)

saurabhkumbhare
Active Participant
0 Kudos

Hello Nidhi,

Your interface was referring to the wrong control key association.

I have corrected it and now you can see that it is working.

Thanks

Saurabh

nidhi_srivastava22
Active Contributor
0 Kudos

Hi All,

Issue is resolved now..!

1) The encoding was changed to CP1252 using XSLT mapping. And then the special characters were converted and it was working fine.

2) There was a bug in our Mendelson software due to which XML was not getting converted to EDIFACT. Once we deleted the old files and triggered the idoc it worked fine. No issues with Edifact Converter Module.

Thanks for all your expert advices.

Regards,

Nidhi

nidhi_srivastava22
Active Contributor
0 Kudos

Hi Experts,

Again it is not working. I checked the audit log of the messages when it was last successful, it shows it was delivered after 3 retries which is not a correct method.

Please suggest on this issue.

Thanks!

Regards,

Nidhi

nidhi_srivastava22
Active Contributor
0 Kudos

Hi All,

After the inputs from you all, tested 2-3 files and results are as below-

1) encoding for special characters need to be changed to "cp1252" . But, XMLAnonymizerBean is not working with B2B. Can you please suggest any other way to change the encoding for the same.

2) How to convert the XML to EDIFACT payload. EdifactConverterModule and GenericConverterModule is not working for me. I checked for small files so that special characters can be avoided, but no luck.

Please suggest the solution for the above mentioned points.

Thanks!

Regards,

Nidhi

saurabhkumbhare
Active Participant
0 Kudos

Hi Nidhi,

If you copy the payload from RWB to b2bic and try to convert it in the converter, it will give an error.

This is because the Danish characters are not accepted.

I removed it and it worked.

Therefore it is a pure encoding issue as rightly said by Ruchir.

Thanks

Saurabh

saurabhkumbhare
Active Participant
0 Kudos

Hi Ruchir,

Thanks for your responses once again.

Now I understand.

Whatever you have assumed above is correct and the changes are made by Nidhi.

Nidhi / Myself will send you the payload for you to test at your end by tomorrow since we are currently upgrading our SAP PO system to SP6.

Thanks

Saurabh

saurabhkumbhare
Active Participant
0 Kudos

Hello Ruchir / Dimitri,

1. First assumption of her is that the below message is EDIFACT

Message Type - INVOIC:D:96A:UN:SFTI01.

If I am right, there cannot be a subversion for an EDIFACT message of type SFTI01.

Therefore in order to use Message Type - INVOIC:D:96A:UN:SFTI01, she should copy some EANCOM message close to the SFTI message and should create a new subversion called INVOIC:D:96A:UN:SFTI01.

So :

1. Can a new sub-verison be created ? Is this possible ?

2. Since the controlling agency = SFTI01, (therefore its not 'starting' with EAN/GS1 ), then how to enable such that message is treated as EANCOM.

Thanks

Saurabh

ruchir_sinha
Participant
0 Kudos

Hi Saurabh,

You do not need to create the subversion STFI01. Just take the INVOIC D 96A message and copy it to a new Ctrl Key (if you want to modify the existing ctrl key). Then you take the payload with STFI01 and it will be treated as EDIFACT. This message will not be processed as EANCOM and you need to have EDIFACT settings everywhere in order to process this.

Currently creation of subversion in message editor is not possible but it will be made available in future. If at all due to some reason it is mandatory to create  a subversion then it can be done from the DB Table itself. But it might be possible to convert your payload without creating new subversion. Please try.

Best Regards,

Ruchir

nidhi_srivastava22
Active Contributor
0 Kudos

Hi,

I checked this link, but no luck as this was also not answered.

Thanks,

Nidhi