cancel
Showing results for 
Search instead for 
Did you mean: 

How to add attachment (URL) to parked document inbackground?

Former Member
0 Kudos

Hi guys,

I wonder how it is possible to add the URL (of external document) to parked document in the background (with BAPI)?

After I park document (for example with transaction FV60 or MIR7) a small button (called Services for Object) appears in the left upper corner (on the left side of the transaction heading) and when I click on it I can select option (Create External Document URL). That way I can manually add the link to external document.

But the thing I need is to add that URL in the background (through BAPI).

Actually I am doing the following thing: In one other BAPI I need to call BAPI for parking incoming invoice, and in that same BAPI I need to add URL to external document.

So, what I would like to know is: which BAPI's, or API's or whatsoever are used for creating these attachments, so that I can call them in the background (with another BAPI).

I would appreciate any kind of help because the project is running, and I can't find any solution for this problem.

Thanks for help!

Karlo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Karlo,

The BAPI which does the incoming invoice post is BAPI_INCOMINGINVOICE_PARK. Now I am not sure whether through this BAPI you can save the URL of the external document.

You can check the transaction SE37, type the BAPI name and go to Function Module documentation of this BAPI to fully understand its functionality.

Now if this BAPI doesn't do the intended functionality you can create a custom BAPI with an Z naming convention, call the standard BAPI to park the incoming invoice and do a call transaction to save the URL of the created incoming invoice.

Hope the idea is clear,

Sojan

Former Member
0 Kudos

Hi Sojan,

What I really meant to do was to create a custom BAPI in which I would first park document and then add the external URL to it, but I don't understand what You meant under ("do a call transaction to save the URL of the created incoming invoice").

How can I call a transaction in my custom BAPI when I don't know which BAPI's or BADI's or whatsoever is used for manual adding of that link?

The thing I need to know is: What functions (BAPI's or BADI's or whatsoever) are called to add that link to a specific parked document?

Thanks for help!

Karlo

Answers (2)

Answers (2)

Former Member
0 Kudos

The function is 'SGOS_URL_CREATE_DIALOG' with commit.

If you want do it in background copy the function and replace the pop up to enter parameters by global variable/parameters added in the Z function. I did this.

Regards.

Leo.

Former Member
0 Kudos

Karlo,

Call transaction is a custom statement which can update a transaction using the batch input method of SAP R/3. Any abapper would be able to give more information on this.

http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9da935c111d1829f0000e829fbfe/content.htm.

You can introduce this statement after creating the incoming invoice and update the incoming invoice using the call transaction method.

Sojan