Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
-Mustafa_Onur-
Explorer
334

Hello Everyone,

I hope everything is all right and well. When I stepped into the PI/PO industry, our team consisted of only two people: Me and my senior. Since my senior is usually very busy, I had to do much work on my own. Unfortunately, sometimes there was no one on our team who had done some of the work we received before. With the excitement of being a junior, I managed to do these jobs on my own, which no one in our team had done before, with a lot of research, sweat, and tears. In this way, I made both myself and my senior proud. My days as a junior are a few years behind me. Now, I think I have enough knowledge to share these pieces of information. While sharing these pieces of information with you, I will try to explain it to you as easily and understandably as I can.

The first of these is how to read and transmit zip-compressed files over SFTP. As you know, we cannot send zip files directly via SFTP. Of course, there are some methods for this. The first thing that comes to mind is writing a UDF for this process. However, there was a saying we often heard from our professors during my engineering education: An engineer is someone who can produce practical solutions to problems. As a result of my research based on this, I learned that this job can be done in a simpler way, without using code. Thanks to PayloadZipBean, I learned that this can be done easily. I share with you the link containing the details:

https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/45/da9358a1772e97e10000000a155369/content.ht...

Based on the information here, we can send zip-compressed files via SFTP. Let's say, we have a zip file named Warhammer40k.zip, and we need to unzip the compressed file in this file and send them to the other party. One of the best aspects of this process, apart from doing it without code, is that we can do this without creating any ESR objects.

So, to perform the process, first of all, in the SFTP sender channel, the Set Adapter Specific Message Attributes and File Name boxes under the Advanced tab must be checked :

mustafa_onur_0-1718664412251.png

 

mustafa_onur_1-1718664412255.png

Afterwards, the following changes should be made in the Module tab:

mustafa_onur_2-1718664412257.png

Below you will find the information that needs to be written :

1        AF_Modules/PayloadZipBean                                  Local Enterprise Bean        zip

2        localejbs/CallSapAdapter                                          Local Enterprise Bean        entry

zip  zip.mode  unzip

 

After the operations in the Sender channel are completed, it will be sufficient to perform the following operations in the SFTP Receiver channel:

mustafa_onur_3-1718664412260.png

The Use Adapter Specific Message Attributes box under the Advanced tab should be selected:

mustafa_onur_4-1718664412264.png

If you remember, we were going to do these operations without creating any ESR object. So, in this case, how do we enter the information on the Integrated Configuration side? The important parts here are the Interface and Namespace names. Even if you have not created the objects, you can give names to these objects on the Integrated Configuration side :

mustafa_onur_5-1718664412268.png

When we want to send our Warhammer40k.zip file after the settings in the Integrated Configuration are made, the service will unzip the file and forward the file inside to the other party :

mustafa_onur_6-1718664412278.png

 

mustafa_onur_7-1718664412278.png

Small notes:

  • As you can see, AF_Modules/PayloadZipBean must be written before the adapter's own module name.
  • You can also use this module on files with rar extension.
  • The steps in the Advanced tab should not be skipped. Otherwise, the service will receive an error.

In my next article, I will explain what methods we should follow in case there are multiple files with different names in the zip file.

Thank you, have a great day!

2 Comments
DenizZilyas
Participant
0 Kudos

Very useful ! Thanks for sharing.

Han_Soylu
Explorer
0 Kudos

Well done, very detailed and well explained. Thank you for sharing.

Labels in this area