cancel
Showing results for 
Search instead for 
Did you mean: 

Upload File to ECC using PI

Former Member
0 Kudos

I am new to PI.Can you please help me with the below scenario using PI.

We have PDF files on a server drive that is NFS mounted to the PI system. We need create a DMS document and attach these files to the document.

We have a BAPI that can upload pdfs as DMS documents (CV01N t-code). How do I use PI to call the bapi (BAPI has the file and path as parameters).

I configured DMS document type to external numbering. I have to read the file name to take the 1st 10 chars of the file name to use as the document number. This will be unique by design.

BAPI is working within ECC.

Please help with steps in PI to move the file from External NFS mounted drive to ECC and then call this BAPI.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Do you have any mapping from file->RFC?

If not just develop a simple file to file pass through interface as explained in below blog.

http://www.saptechnical.com/Tutorials/XI/File2File/Demo1.htm

schedule your FM (calling this FM from a ABAP report)

Also have a look at the below thread on the same topic..

http://scn.sap.com/thread/1926202

Former Member
0 Kudos

Thank you Hareesh. This is going to help me get started.

No Mapping Needed. I have to read the file name to get the 1st 10 chars. I can do this in the BAPI in ECC.

We are on 7.1 of PI.  The screens in the link you have are different. Will try to see if I can make it work. Is there a link that has screens from 7.1?.

former_member184720
Active Contributor
0 Kudos

Doesn't matter Gopi. It's the same approach for 7.0 and 7.1.

(in the screenshot, they have used FTP as transport protocol. you might have to use NFS as it's mounted directory for you)

If you are on 7.11 and above you can create Integrated configuration which runs on java stack.

Refer to Gagan's screenshot in the below thread

http://scn.sap.com/thread/3458028

Message was edited by: Hareesh Gampa

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you all. I finally was able to move the files from one mounted drive to another. Now that it is working it is rather very simple. The issues were mainly because of the upper/lower case representation. File Folder Names were upper case in Windows and when mounted they were lower case in SAP UNIX box. Took time to figure it out as did not have telnet access. Gained some good experience troubleshooting.

Thank you all again. Next step is to call an RFC after the file is transferred with input parameters as file name and the SAP file folder path to create a DMS record. Will do some research before posting for help :-).

Harish
Active Contributor
0 Kudos

Hi,

Please follow the below step

  1. Import the BAPI from ECC to SAP PI
         Go to Integration Repository.
  2.      Double click on SWCV must set to Import of RFC and IDOC Interfaces from SAP Systems permitted and Connection Data form Import from SAP System should point to ECC (System ex XXX,  Client nnn and Message Server)
  3. In SWCV->Imported Objects right click RFCs import of SAP Objects.
  4. This will pop-up new window with list of RFC, IDOC and BAPI available in ECC system.
  5. Import the BAPI you want.

Create receiver RFC channel to invoke the BAPI.

regards,

Harish

Former Member
0 Kudos

Thanks Harish. I am really new to PI, Never used it before. So I am finding my way to implement this scenario. I will update on questions as I proceed. Thanks for the help so far.

Former Member
0 Kudos

Harish, Sorry to bother you.

I created a Business Component without party with a receiver and sender communication channels.

When I run the test it is showing an error saying receiver agreement not found.

I saw posts saying we cannot really use the test tool.

Can you please help me with how to setup this to run automatically every 1 hr?. Appreciate your help.

former_member184720
Active Contributor
0 Kudos

Hi Gopi - Creating the channels doesn't complete your configuration.

You should also create the sender agreement, receiver determination, interface determination along with the receiver agreement.

Follow the below document and in your case you might be using RFC receiver channel instead of file.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4013f6bb-7ec3-2b10-62b5-e5be01e49...

Harish
Active Contributor
0 Kudos

Hi Sesha,

The error is because receiver agreement in not found for the sender service/system, receiver service/system and receiver interface combination. The error can occur because of below issue

  1. Wrong receiver interface trigger from interface determination
  2. Cache is not updated for interface determination of receiver agreement

For your scenario if you want to pick the file every hours then configure the polling interval as per your requirment or you can configure the channel availability for every hour.

regards,

Harish

Former Member
0 Kudos

Hi Hareesh, Thanks for your response.

I am going with a simple file-to-file scenario as I do not have to have any transformation.

I created a Business Component and receiver and sender Channels. Sender is has the path to where the files are (this directory is mounted to PI). Receiver has the path to where I need to send the file (this is also mounted to PI).

What is the setup I need to have this run every 1 hr or a predefined time setting?.

Thank you.

former_member184720
Active Contributor
0 Kudos

Then you can simply follow the above suggested blog ..

To process the files for every one hr -

In your sender channel set the polling intervel to 3600 seconds (you can find it in processing tab of your file sender channel)

Message was edited by: Hareesh Gampa