cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC flat file to XML error

Merina1
Participant
0 Kudos

Hi Experts,

I need to convert flat idoc file to IDOC xml. I am using the module SAP_XI_IDOC/IDOCFlatToXmlConvertor in sencer file channel.SAP PI version 7.4.

I am facing the below issue in sende channel and the file is not picked up :

Sending file failed with java.lang.NumberFormatException: For input string: ""

The below log is availbe in log viewer :

Module Exception 'com.sap.aii.af.idoc.exception.IDOCModuleException: PSGNUM can not be identified for segment E1MBXYH.' found, cause: java.lang.NumberFormatException: For input string: ""

The doc format is as follows :

EDI_DC40_U                         2   WMMBID02                                                    WMMBXY                                          

Please suggest how will this be resolved.

Thanks,

Merina

Accepted Solutions (0)

Answers (2)

Answers (2)

suman_saha
Contributor
0 Kudos
azharshaikh
Active Contributor
0 Kudos

Hi Merina,

As per the error seems that the it is unable to convert some of the fields  to xml i.e in the IDoc some of the fileds are given the datatype numeric and while testing u will be passing the string values. so, it is unable to convert to xml.

"PSGNUM can not be identified for segment E1MBXYH"


Please check for this Segment value in the Input file if its having a valid value...


Regards,

Azhar

Merina1
Participant
0 Kudos

Hi Azhar,

The issue is with the control segemnt where sender is not sending the DOC num.. when those details are entered it works fine. But the sender would not send it , hence need to resolve it with some other approach.

Regards,

Merina

azharshaikh
Active Contributor
0 Kudos

Hi Merina,

SAP_XI_IDOC/IDOCFlatToXmlConvertor does Default Validation for IDOC as per the metadata...

AFAIK we cant disable this validation option.


1. Either Request the sender to send files in proper format as required by SAP

2. Orelse you might have to create a Z - IDOC as per your requirement...


Regards,

Azhar

suman_sourabh
Participant
0 Kudos

Hi Merina,

Develop one custom adapter module to check the mandatory control segment fields. and if any field is missing then populate it with some default value. then after use IDOCFLATtoXML as 2nd module to convert the flat idoc to IDOC XML.

The FLAT IDOC file is fixed length file, hence to introduce any default value in the control segment is easy.

Hope this will help.

Regards,
Suman