cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments for a yet to be created business object

kammaje_cis
Active Contributor
0 Kudos

Hi all,

I am creating a custom Fiori like application, which creates a Purchase Requisition.

It also has a possibility to add attachments at header level.

Problem:

When I hit "Submit" after entering all details and mentioning attachment URL, attachment cannot be created/related unless the PR is already created and the ID known.

One approach I am thinking is:

Temporarily create the file in SAP server immediately after attachment file is selected and return back some kind of ID Later send this ID with the PR data so that file can be associated. Is there any framework to create temporary file like this?

If I use a batch request to combine create PR data and create stream, but the problem is I cannot get the PR ID for creating stream.

Any other approaches?

CCing ,

Thanks

Krishna

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184867
Active Contributor
0 Kudos

Hello Krishna,

From Gateway perspective, another option can be to use deferred batch which is available from SP9. You can have a look at the sample code in . This new method allows you to access all your payloads and process as you wish. Maybe you can call your BAPI to create the PR and then with the PR number save the document.

You can find about this new feature in http://help.sap.com/saphelp_gateway20sp09/helpdata/en/90/dc8363306c47d3b2fca1398f5de94b/content.htm

But I am also curious to know how is this being handled in Fiori apps, especially with Gateway component less than SP9 ?

Let us wait for the response from Fiori experts.

Regards,

Atanu