cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with target excel (.xlsx) using receiver file channel in SAP PO 7.5

former_member593220
Participant
0 Kudos

Hi,

In my scenario in RFC to File, I have to convert incoming data of function module in excel and need to create "SAP Customerorders.xlsx" along with time stamp before the suffix.

For example : "SAP Customerorders20210504-094835-418.xlsx" in target directory.

I have tried searching multiple blogs and finally implemented the solution based on the below 2 blogs, using module bean & FCC parameters as well separately.

"https://blogs.sap.com/2014/11/03/exceltransformbean-part-2-convert-simple-xml-to-various-excel-formats-easily/"

"https://answers.sap.com/questions/633303/xml-to-excel-conversion-in-file-content-conversion.html"

Message is getting created in target directory but when I am opening the file in my windows 10 machine am getting error pop up saying that "Excel cannot open the file 'SAP Customerorders20210504-094835-418.xlsx' because the file format or file extension is not valid. Verify that the file ha not been corrupted and that the file extension matches the format of the file."

In receiver channel I have maintained the target file name as "SAP Customerorders.xlsx" and added timestamp option in processing tab.

Below are the module parameters maintained in file receiver channel.

module-parameters-receiver-file-channel.jpg

Also used below parameters to try with FCC:

Recordset.fieldFixedLengths               10,5,5,10 
Recordset.endSeparator                    '0x0D''0x0A' 
Recordset.fieldNames                      Output_1,Output_2,Output_3,Output_4 
Recordset.keyFieldInStructure             ignore 
ignoreRecordsetName                       true 
Recordset.fieldSeparator                  '0x09'

Kindly help me to overcome this issue.

--

Regards

Raj

former_member593220
Participant
0 Kudos

Hello all,

Could you pleas give me inputs how I can create valid .xlsx file in target FTP.?

--

Regards

Raj

Accepted Solutions (1)

Accepted Solutions (1)

peter_wallner2
Active Contributor
0 Kudos

Hello Raj,

when you use the module from Eng Swee you do not have to convert the XML to a flat with FCC. It should convert from XML to EXCEL. After all you are using this class "com.equalize.xpi.af.modules.excel.XML2ExcelTransformer"

Also in your screenshot you use the "MessageTransformBean" but in Eng Swee's blog it says you have to use "Custom_AF_Modules/FormatConversionBean". Did you download that bean and deploy it to SAP PI/PO? Download link: https://github.com/engswee/equalize-xpi-modules/releases/tag/1.7.1

Best regards, Peter

former_member593220
Participant
0 Kudos

Hi Peter,

Thanks for the info you have provided. As we don't have support from Basis to import the required module for Excel conversion, we have asked to modify the requirement to create .CSV file at receiving end instead of EXCEL for now.

Thank you again for inputs.

--

Regards

Raj

peter_wallner2
Active Contributor
0 Kudos

Hello Raj,

that is a workaround, glad it is working out for you. Once you have the .ear file downloaded you can also use NWDS (Eclipse) to deploy it to SAP PO using the "deploy view". So you might not need SAP Basis.

All the best,
Peter

Answers (0)