KEMBAR78
Interview Questions | PDF | File Transfer Protocol | Internet
0% found this document useful (0 votes)
104 views38 pages

Interview Questions

document
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views38 pages

Interview Questions

document
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Interview questions:

 Can you brief about yourself?


 How did you start your career and what projects you worked on
 What is project landscape or what are the systems involved in the current project
 How many interfaces you have in your current project
 Can you take one interface what you implemented recently and explain me the business case
and step by step implementation
 Did you get any chance to interact with business directly? if yes in which case you interacted
with business
 How you will get work in your current project
 What adaptors/connectors you worked on in your current project
 What type of documentation you prepared in your current project
 Have you faced any complex situations in your experience ?if take one and how you resolved
 If you get any chance will you be able to handle project individually without any help?
 What is difference between header vs property in content modifier
 What is use of content modifier
 Did you get chance to work on banking interface if yes what type of adaptor you used to
communicate with bank?-
 Have you worked on sftp adaptor if yes what are pre requisites to use SFTP adaptor
 How to check the sftp connectivity from cpi ?
 What is use of Known _host file ?and how to get the details
 What is business case to go for ftp adaptor
 How to populate file names dynamically using FTP adaptor
 Assume we are getting order details from system but business order No in the file name on the
target system can we implement this requirement in sap cpi if yes how to implement it
 What are the issues you faced with sftp adaptor and ftp adaptor take one or more issues and
tell me the root cause and resolution steps ?
 Can you tell me some of Odata commands what you used for business case?
 How to filter content while quering data from Odata entries?
 Can you tell me any 5 apache camel expressions what you used in current project
 Assume target wants encrypted file how you are going to implement this requirement ?what
key and whose key you will use to encrypt?
 Where do you store these keys and certificates in sap cpi
 Have you used Encryption and Decryption pallets ?
 Difference between content modifier vs content enrich
 What is difference between parallel vs sequential multi cast
 If you use sequential multicast if one of the Reciever got failed then what will happen next?
whether data will go to next receiver or not?
 If you use parallel multicast if one of the Reciever failed then what will happen next ?whether
data will go to next receiver or not?
 How are you going to handle exceptions in sap cpi tell me Apache camel expression Name to
hold these exceptions?
 Assume that , In current project we need to pass source data to multiple receivers once message
successfully processed to receiver 1 then only we need to process Reciever 2 can we implement
this type of requirement if yes how to implement
 What is difference between Error End and End message and Escalation end ?
 How to call local integration process/subprocess into main process?
 Did you get chance to work on local integration process if yes what is business case
 In content enricher ,if you use Aggregation method –enrich what are the mandatory parameters
you observed?
 Have you correlate orginal message and lookup message
 What is difference between merge and enrich in content enricher
 Have you worked on mail adaptor if yes,what are pre requisites to use mail adaptor
 How to populate subject line dynamically? In body i want to populate iflow name ,Message ID
and data time ..etc if any integration process fail how to implement this requirement
 How to schedule the interface in sap cpi to run automatically
 By mistake you have deleted integration package from design can we revoke /revert that
integration package
 Did you get any chance to work with rest api?
 How to call the Rest api using OAuth client credentials?

HTTPs and HTTP adaptor questions

Authentication Mode

 What are the Recommended authentication modes on sender side?


 What are recommended authentication modes on Reciever side
 What are best practices
 How do you handle the certificates?
 What are the common issues that you face while working with HTTP adaptor
 Handling huge volumes of messages ?
 What are the parameters used to customize it
 How do you configure the custom headers?
 How did you monitor HTTP adaptor?
 How did you work with team to fix issues relating to integration?
 How did you handle attachments?

FTP adaptor

 What is FTP adaptor and what are the key features of FTP adaptor
 What are the configuration steps that you need to follow to establish a ftp connection
 What are the different processing modes in FTP adpator
 What are security considerations and the diferent types of security modes we have in the
FTP adaptor to connect with FTP server?
 How do you monitor and trouble shoot FTP issues?
 How do you process large files ?
 Best practices that you followed for implementing SAP integration in SAP CP
 Explicit FTPS and IMPlicit FTS difference and which one is preferable

 What is the difference between Content Modifier and Content Enricher?


 What is the difference between Content Enricher and Request-Reply?
 What is the difference between Header and Property in Content Modifier?
 What is the difference between Aggregator and Gather?
 How to handle exceptions in an IFlow?
What are the different Processing Statuses available?
 What are the different ways in which an Integration Flow can be migrated from one tenant
to another?
 How do you connect to outside world?
 What is difference between iflow and local integration process ?
 How to handle exceptions if an iflow fails with http call?
 Why should you use externalized parameters?
 How will you handle mapping documents and why you should map them?

-----------------------------------------------------------------------------------------------------------------------------------

 Why Value Mapping was provided by SAP when Fixed Value Mapping does the same job?
 How does splitByValue work?
 How will Gather know that the last split message has reached?
 In which node are the IFlows deployed?
 Where are the certificates installed in Cloud Integration?
 What message formats can Cloud Integration read?
 Does Message Mapping support JSON format? If not, how to handle an incoming JSON
format in the Message Mapping step?
 When does a message go to "Discarded status"?
 When does a message go to "Processing status"?
 What are the steps to configure an IDOC for Outbound Communication?
Purpose of the known_hosts File

Host Verification: When you connect to a server via SSH for the first time, its public key is stored in the
known_hosts file. On subsequent connections, SSH checks the stored key against the server's key to
confirm the server's identity.

The known_hosts file is used primarily in the context of Secure Shell (SSH) to manage the list of hosts
that have previously been connected to. This file helps in securing SSH connections by storing the public
key fingerprints of hosts. When you attempt to connect to a host, SSH checks this file to verify the
identity of the host you're connecting to, thereby preventing man-in-the-middle attacks.

------------------------------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------------------

Trace and Monitoring in SAP CPI


Navigate to the Monitor > Manage Integration Content > Select the Iflow > Monitor Message
Processing
 Now we can see the messages status as completed
 If you want to trace Iflow logs step-to-step then click on the trace option
 Then we can see step-to-step process logs with content
How to Change Log Level to Trace

How to View the Trace


After the integration flow has been processed again, perform the following steps:

1. Open the Operations view (Monitor section) and select tile All Integration Flows (Past 24
Hours) (or another tile providing access to the monitoring data of the integration flow)
under Monitor Message Processing.

2. Select the integration flow and on the right side of the screen click the link Trace.
1. The integration flow model is displayed on the right-hand side.

The envelope icon indicates the message's traversal path:

Icon Description

Successfully processed step with trace data available.

Error in processed step with trace data available.

Successfully processed step with no trace data available (for log level Info or Debug, or if the
trace retention period (default 60 min) is exceeded).
Icon Description

Error in processed step with no trace data available.

Log level Trace expires after a certain time (default value: 10 minutes) and switches back to the log
level set before. The trace data is cleared from the tenant storage after 60 min.

--------------------------------------------------------------------------------------------------------------------------

I am writing this blog to address the requirement where we need to add SAP CPI message-id in FILE-
NAME for FTP/SFTP receiver adapter.

In my scenario, 10 +files were getting created at the same time (up to milliseconds) hence adding time
stamp was not the solution.

So I followed many blogged to make every filename unique but could not achieve the result.

Here are the detailed steps required to add "Message-ID" in File Name.

Option 1- Add only Message-id

1. Create the iflow as per your requirement


2. Go to your SFTP/FTP receiver channel.
3. set file name like this

Order_${date:now:yyyyMMddHHmmss}_${header.SAP_MessageProcessingLogID}.xml

Date time is optional here.

It will add the CPI message-id in the file name and it will be helpful to monitor the message as well in
CPI.
Option 2- Add Message-id along with a Counter

In my iflow I have also added <counter> in the file name.

1. Create the iflow as per your requirement


2. add "Content Modifier" (in my iflow, its "UserDefinedvalue")

3. set up a number range in CPI using this blog.


4. once number range defined ,go to "Exchange Property of your Content modifier"
5. creat a Property and give it a name ex- number, and in value -give the same as you have set in
number range in "operation view" ex "NumberRange"

6. now go to your SFTP/FTP receiver channel and set the filename like this

Order_${date:now:yyyyMMddHHmmss}_${property.number}_$
{header.SAP_MessageProcessingLogID}.xml
Date time is optional here.

Here ${property.number} - is the name we sent in "exchange Property".

After deploying the changes you should get the file name as per expectations.

-------------------------------------------------------------------------------------------------------------------------------------------
----- [SAP CPI] – HOW TO USE DYNAMIC CONFIGURE FOR SFTP RECEIVER ADAPTER
I want to discuss about How to use dynamic config for SFTP receiver adapter. As you know, in scenario
integration between CPI and SFTP, we have to set hardcode value of SFTP as address, directory,
filename, credential… in integration flow with SFTP receiver. For example
In many cases, we have to parameter all of this variable. How to do that ?

Actually, We can use externalize parameter. In newest release, CPI support type DYNAMIC for Proxy
Type and Authentication dropdown. If choose this value, configuration will get value from property as

Attribute SAP property Type Values

Proxy Type SAP_FtpProxyType String internet/onPremise

Authentication SAP_FtpAuthMethod String key/user/dual

Timeout
SAP_FtpTimeout int Values of type integer

Max. Reconnect SAP_FtpMaxReconnec


int Values of type integer
Attempts t

SAP_FtpMaxReconDel
Reconnect Delay int Values of type integer
ay

boolea
Automatically
SAP_FtpDisconnect n, true/false
Disconnect
string

Change boolea
Directories SAP_FtpStepwise n, true/false
Stepwise string

boolea
Create Directories SAP_FtpCreateDir n, true/false
string
boolea
Use Fast Exists SAP_FtpFastExistsChec
n, true/false
Check k
string

Use Fast Exists Overwrite/Append/Fail/


SAP_FtpAfterProc String
Check Ignore

boolea
SAP_FtpFlattenFileNa
Flatten Filenames n, true/false
me
string

Configuration dynamic for SFTP Address

 Add Content Modifier component into integration flow


 Add header as

Name Source Type Source value Data Type

address expression {{address}} java.lang.String

credentialName expression {{credentialName}} java.lang.String


userName expression {{userName}} java.lang.String

 Add property for content modifier as

Name Source Type Source value Data Type

SAP_FtpProxyType expression {{sftpProxy}} java.lang.String

SAP_FtpAuthMethod expression {{sftpUser}} java.lang.String

If you select DYNAMIC for dropdown proxy type and Credential in iFlow, you have to define propery
SAP_FrpProxyType and SAP_FtpAuthMothod. If no, you will take error.
Test configuration

Choose Artifact and click configuration to set value for parameters


Summary

In this article, I discuss about How to configuration for SFTP dynamic. I also talk about Externalize
Parameter to set value for parameter from artifact configuration

[SAP CPI] – HOW TO FILTER FILE WHEN WORKING WITH SFTP


share one mini scenario when working with SFTP.

Scenario

Integration Flow want get all files with extension XML from folder SFTP into flow. Do some logic and
then will sent payload into queue.

Queue is JMS adapter.

All information of SFTP, ex: address, folder, credential… will be set by parameter.

This is integration flow of this scenario


#1. Configuration sender adapter

#2. Configuration SFTP sender adapter

In this configuration, we will use externalize parameter to config dynamic value for SFTP.
This is parameter table for this configuration
#3. Configuration Content Modifier

In this content modifier, we will create header with name CAMELFILENAME to get extension of file
which get from SFTP folder.

When working with File, we can get some information of FILE as

${file.name} Get full file with extension HCI\InputFile.xml

${file:name.ext} Get extension of file xml


${file:name.noext} Get file with no extension HCI\InputFile

${file:onlyname} Get file name InputFile.xml

${file:onlyname.noext} Get file name no extension InputFile

${file:ext} Get extension xml

#4. Configuration Router

Base on value of HEADER.CAMELFILENAME, we set condition in router to get just file with extension is
XML

#5. Configuration for queue. JMS receiver adapter


#6. Input value for parameters

After save, we need to input value for parameters which we define in integration flow.

Go to artifact, choose configure.

#7. Test from POSTMAN

In this step, we will do test script as

 First, send file with extension NOT equal XML. (Ex: ZIP file). In this case flow will run router default
(Route 2), and we will receiver ABC as payload
 Second, send file with extension EQUAL XML, in this case flow will run route 1, and we will receiver data
in JMS (data in JMS queue will be decrypt)

 Check in queue
Summary

Dynamic File name in SAP CPI:


To send file as an attachment to HTTP receiver as per my understanding you should form
multipart/form-data and below blog might help you.
SFTP File Level Checks in SAP BTP Cloud Integration

In the realm of SAP BTP Cloud Integration, we've observed a growing client demand for transferring
data via file exchanges between SFTP servers. This is a common scenario that any integration developer
is likely to encounter and design.

However, if an external party is responsible for triggering the I-flow, we should consider using an I-flow
with an SFTP Poll-Enrich approach rather than relying on the Sender SFTP adapter with its built-in
scheduler.

The primary setback for this scenario is that SFTP with Poll-Enrich can only poll one file per iflow
trigger. To address this, we need a Main I-flow that utilizes a Looping Process Call to repeatedly invoke a
Local Integration Process (LIP). This LIP will have SFTP with Poll-Enrich configured in it.

Here is the I-flow Design:

Main I-flow:

Content Modifier:
Looping Process Call Config:

LIP - SFTP Process:

Content Modifier:

Poll-Enrich:
When defining requirements for a file integration scenario using SAP BTP Cloud Integration, we
can consider implementing the following file-level checks. These checks will aid in designing an efficient
flow and enhance error handling.

1. No File Check: Considering SFTP with Poll-Enrich and an external party triggers the I-flow, it's
important to address the scenario where no file is available on the SFTP server. In such cases, if the I-
flow runs and attempts to poll the SFTP server, it could result in an error. To prevent Iflow ending up
with error, we can apply below condition in the Router immediately after the SFTP with Poll-Enrich:

${property.SAP_PollEnrichMessageFound} = 'false' and $


{property.CamelLoopIndex} = '0'

If the condition is met, you can either terminate the flow or raise an exception with a specific error code.

2. No More Files to Process: Considering SFTP with Poll-Enrich and an external party triggers the I-flow,
it's important to apply this check if no more files are available on the SFTP server during processing. If
the LIP I-flow continues to run and attempt to poll for files due to the configured number of iterations in
the Looping Process Call, it may lead to errors. To prevent Iflow ending up with error, we can apply
below condition in the Router immediately after the SFTP with Poll-Enrich.

${property.SAP_PollEnrichMessageFound} = 'false' and ${property.CamelLoopIndex} > '0'

If the condition is met, you can either terminate the flow or raise an exception with a specific error code.

3. Multi File Check: Considering SFTP with Poll-Enrich and an external party triggers the I-flow, it's
important to apply this check when during processing of the files, exact 1 file should be processed and
the rest of files should go to error. However, due to the number of iterations configured in the Looping
Process Call, the LIP I-flow might attempt to poll the 2nd file from the SFTP server. To prevent Iflow
ending up with error, we can apply below condition in the Router immediately after the SFTP with Poll-
Enrich.

${property.SAP_PollEnrichMessageFound} = 'true' and $


{property.CamelLoopIndex} > '0' and ${header.CamelFileName} not
contains '*'

If the condition is met, you can either terminate the flow or raise an exception with a specific error code.

4. Empty File Check: Considering SFTP with Poll-Enrich and an external party triggers the I-flow, it's
important to apply this check when during processing of the files, there is empty file available at SFTP
server. To prevent the I-flow from processing and forwarding the polled empty file to the target, we can
apply below condition in the Router:

${header.CamelFileLength} = '0'

If the condition is met, you can either terminate the flow or raise an exception with a specific error code
or send the file to error folder.

Here is the Final Design of the I-flow after adding all the above conditions in the router branches in LIP -
SFTP Process flow:

I hope this blog post proves useful for implementing effective file-level checks for SFTP File Integration
scenarios.

During the journey of SAP Cloud Integrations, there was a requirement that we have to trigger emails for every failure of
message/transaction respective to Integration flows occurring in the SAP Cloud Integration tenant. This is not just it. The recipient
email addresses can be different as per the owner of Integration flows.

To cater to the solution, I have designed the integration flow and thought of sharing it as a blog post.

For an instance, we have an integration flow that is responsible to transmit the file from one SFTP location to another. Whenever
there is any failure for this flow during file transmission, the exception sub-process should capture the exception message and send
it to the owner of the flow to enable him to take further necessary actions.
Below is the integration flow snapshot of the Integration flow:

Steps performed for Exception Subprocess in Integration flow:

Exception Subprocess has a Content Modifier that captures the message headers and prepares an XML Message body and posts
the same using ProcessDirect adapter to Exception Integration Main flow designed for posting the emails to integration flow
respective owners.
Exception Subprocess:-

Content Modifier (named as Send Exception Details):

Message Header:

Expression - stacktrace: ${exception.stacktrace}

Constant - InterfaceID: IFLOW_01 (you can set this as anything unique name to use it as I-flow specific Id)

Message Body:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<InterfaceId>${header.InterfaceID}</InterfaceId>
<Exception_Details>
<Date>${date:now:MM-dd-yyyy}</Date>
<Time>${date:now:hh:mm:ss}</Time>
<Message_ID>${property.SAP_MessageProcessingLogID}</Message_ID>
<IFlow_Name>${camelId}</IFlow_Name>
<Exception_Message>${exception.message}</Exception_Message>
</Exception_Details>
</root>

Process Direct Adapter:

Main Exception Handling Flow:

Using the ProcessDirect adapter at the sender end and keeping the same endpoint, the exception message is received
in Exception Handling Main Flow.

Sender side Process Direct Snapshot below:


Content Modifier (named as Get Header/Properties

Message Header:

Exchange Property:
Groovy Script (named as Call Value Map

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import com.sap.it.api.ITApiFactory;
import com.sap.it.api.mapping.ValueMappingApi;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.*
import java.lang.*;
import java.util.*;

def Message processData(Message message)


{
def body = message.getBody(java.lang.String) as String;
def map = message.getHeaders();
def InterfaceName = map.get("InterfaceId") as String;
def obj = ITApiFactory.getApi(ValueMappingApi.class, null);
def mappedValue = obj.getMappedValue("InterfaceDetails", "InterfaceName", InterfaceName,
"InterfaceDetails", "RecipientName");

if (mappedValue == null)
{ throw new IllegalStateException("No valuemapping maintained for Interface:
"+InterfaceName);
}
message.setProperty("RecipientName", mappedValue);
return message;
}

Mail Adapter Configuration:

In the Connection tab, the connectivity details are maintained. In the Processing tab of the mail adapter, below is the snapshot of the
configuration done:

Mail Body:

Hi Team Members
</br>
</br>
This email is to notify you that an interface has failed in the middleware SAP Cloud
Integration.</br>
Here are the details about the interface, and the exception caught which would help you analyze
this issue further:</br>
</br>
<table style="width:50%">
<tr>
<td style="background-color:#5B8AB6;color:white">
<b>Date</b>
</td>
<td>${property.Date}</td>
</tr>
<tr>
<td style="background-color:#5B8AB6;color:white">
<b>Time</b>
</td>
<td>${property.Time}</td>
</tr>
<tr>
<td style="background-color:#5B8AB6;color:white">
<b>Message ID</b>
</td>
<td>${property.Message_ID}</td>
</tr>
<tr>
<td style="background-color:#5B8AB6;color:white">
<b>Integration Flow Name</b>
</td>
<td>${property.IFlow_Name}</td>
</tr> <tr>
<td style="background-color:#5B8AB6;color:white">
<b>Exception Message</b>
</td>
<td>${property.Exception_Message}</td>
</tr>
</table>
</br>
</br>
<i>This is an auto-generated email from the middleware (SAP Cloud Integration). Please do not
reply to this email.</i>
</br>

The above Groovy is calling the Value Mapping maintained as per the InterfaceID that we had set in the above steps as Constant in
Exception Subprocess Content Modifier to maintain a unique Iflow-specific ID which would enable sending the email as per Iflow
respective owners.
Value Map Snapshot:

In the value map, we can add more entries and correspond to them, we can assign the desired email IDs (separated with commas)
to which email should be sent for that specific iFlow failure.

This is how we can handle the exceptions for the iFlows and send email notifications to desired emails.

You might also like