cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle Empty Value Check in SAP CPI?

shin861231
Explorer
0 Kudos
632

Hello, 

I am now trying to design a Integration Flow in Cloud integration (CPI).

There's a requirement that we should embed an empty value check for mandatory fields in Excel File (CSV) in the flow.

The scenario is quite simple, being CSV file read from FTP server(Sender) -> Integration Flow -> CSV file being outbounded to FTP server(receiver).

Can this be achieved by built-in functions in Integration Flow? Or do I have to write scripts?

 

Thank you.

View Entire Topic
Ryan-Crosby
Active Contributor
0 Kudos

One option would be to use CSV to XML converter, XML Validation (with appropriate schema), and then XML to CSV converter before passing the contents on to the file destination.  Any other approach would require a script to examine the contents of the payload.

 

Regards,

Ryan Crosby

shin861231
Explorer
0 Kudos
Hello Ryan, thank you for your reply.
shin861231
Explorer
0 Kudos
As far as I know XML validation can only be used to check the schema for the input message, which means it can only check if the node exists, but not if the value is input in the nodes. If I want to check empty values in the nodes, how should I design the XML schema(xsd)?
Ryan-Crosby
Active Contributor
0 Kudos
@shin861231 it will check for empty strings if the minimum length is defined because it's used in the EDI flows that SAP delivers and the ones I built.
shin861231
Explorer
Hello Ryan, Thank you so much. It worked!