cancel
Showing results for 
Search instead for 
Did you mean: 

Create an empty msg

roger_alluivall
Participant
0 Kudos

Hello Experts,

i have an interface that takes a file from a filesystem and sends it to SAP. Sometimes this file is empty but i still need to process it. However, what i actually need is to create a empty Message Type. I mean, if i configure the CC to "Process Empty Files" the payload generated is empty. What i need is that instead of a blank payload, a empty message type.

Does anybody has any idea on how to do it?

Thank you very much.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I guess you want empty tags if file is coming empty??

If yes then try with std. function MapWithDefault.

roger_alluivall
Participant
0 Kudos

Hi,

yes what i need is the msg with empty tags. However I need it before the operation mapping happens because i have a module that has to be previously executed. I was thinking of creating an adapter module that creates the "empty msg" when the payload is empty. The easy solution would be to enable a parameter which i can use to pass the xml structure of the empty msg to the module and return it in the payload. However, I fwould like to obtain the structure definition of the msg from SAP PI. Is there any way to get Message Type definitions from a Adapter Module?

Thank you in advance.

former_member208856
Active Contributor
0 Kudos

I hope you can pick an empty file from Sender side.

Now make all Target side fields as Optional (No any filed or segment is Mandatory).

Now pass that empty file to target, it will generate an empty file for target, first check it in mapping.

And close the CC "Empty file procrssing option".

stefan_grube
Active Contributor
0 Kudos

> What i need is that instead of a blank payload, a empty message type.

I do not know, what you mean by "empty message type", but if you want anything else besides an empty payload, you have to write an adapter module or a Java mapping to create this.

Former Member
0 Kudos

Hi Roger,

You can control this in message mapping.

In mapping, check if nothing is coming from source side, then suppress the target node.

This will create the file with message type only.

-Supriya.