cancel
Showing results for 
Search instead for 
Did you mean: 

CustomAdapterModule Failed Due to Upgrade

Former Member
0 Kudos

Hi,

A custom adapter module was designed in PI 7.0 SP15. The purpose of the custom adapter module was to assign the file name that was generated dynamically and sent through the File Receiver. In the File receiver we are using a custom module to set name for the file and an SAP standard module to ZIP the file . The module was designed such that the actual data file inside the ZIP file should have a name simiar to that of the ZIP file.So a file 'Sample' generated from XI would be processed in the adapter framework and sent to the target as 'Sample.zip' that would contain the acutal data file in it as 'Sample.xml'. This was working fine for a while but recently when the PI stack was upgraded to SP21 it is not doing as expected.It does not throw any error but the Zip file received at the target and the actual file inside the ZIP file doesn't have the same names.The file inside the ZIP always comes as 'Untitled.txt'. When I checked the audit log the Customer adapter module and SAP adapter module(AF_Adaptermodule/ZIP) status was success.No traces were found as the file was successfully posted to target.

We have used this UDF code to generate the file name :

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://xyz.com/email","FileName");

Piece of code used in Custom module to set the name :

try {

Message msg = (Message) inputModuleData.getPrincipalData();

XMLPayload payload = msg.getDocument();

String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File",

"FileName");

if(fileName == null) fileName="default.txt";

else fileName = fileName.replaceFirst(".zip", ".xml");

payload.setContentType("text/plain;charset = \"UTF-8\";"

+ "filename=\"" + fileName + "\"");

msg.setDocument(payload);

inputModuleData.setPrincipalData(msg);

} catch (Exception e) {

throw new ModuleException(e);

}

Did any changes come up in the SP21, with reference to the Property FileName or method ContentType.

This is a problem with the upgrade, Can you provide your valuable inputs on it.

Has anybody faced such issues with the custom adapter modules when the stack was upgraded.

Thanks,

Rag

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hey Raghavendra,

Did your issue get resolved. I have run into the exact same issue after upgrading to PI 7.0 EHP1 SP6.

Wanted to check in the forum if anybody had faced similar issue, before I raise a ticket with SAP..

Let me know.

Thanks

Pradeep

Former Member
0 Kudos

Use of customized adapter should be carefully considered, as I can see your requirements could possibly achieved by using other options. Maybe you can search SAP notes or wait until whoever came into similar situation.

Regards

Liang