Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

Reusing attachment wrapper in FPM

$
0
0

Sometimes application needs to upload some kinds of document( attachment ) from the user desktop and store in sap data base or in content server.

The below post shows how we can reuse the FPM_ATTACHMENT_WRAPPER component to upload any document. Once we receive the source place i.e URl then the document content can be uploaded by the standard frontend service methods or GUI_UPLOAD FM technique and then it can be stored any where as desired.

 

FPM_ATTACHMENT_WRAPPER  component provides either ECM ( Enterprise Content Management ) or KPro( knowledge Provider ) storage types to store the document  but the post doesn't speak in detail about the storage types but just tells how FPM_ATTACHMENT_WRAPPER component can be sued to just reuse the ATTACHMENT WINDOW. Currently FPM_ATTACHMENT_WRAPPER provided in the list uibbs.



On the list uibb we have a button called Attachment.

1.png

When user clicks on the attachment button a upload browsing pop up appears by FPM_ATTACHMENT_WRAPPER component.


2.png


User can browse and select a doc and provide a document name and on click ok the document content can be uploaded and stored as per required.

3.png

4.png

The feeder class for the list uibb.

5.png


6.png

7.png

Create an event for the button.

8.png

9.png

Create an ovp application configuration.

10.png

Select free style uibb  and provide component name as FPM_ATTACHMENT_WRAPPER and create a configuration.

11.png


Create a list uibb configuration.

12.png


Here the storage type as ECM - Enterprise Content Management or KPro- Knowledge Provider.


13.png


List UIBB configuration.

14.png

15.png



16.png


In the process event of the feeder class the below logic should be added to open the attachment upload pop up.



17.png


Test the application and on click on the button the pop up appears.



18.png

Now when the ok button is selected we should be able to read the document content from the address. So put the below code.

19.png

20.png

 

When OK button is pressed . The event parameter gives the details.


21.png


22.png



23.png


24.png



So here we have the file name URL and then by the forntend service method call we can read/upload the content and stores in ECM or Kpro.

25.png




Viewing all articles
Browse latest Browse all 2548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>