I am creating a custom Fiori like application, which creates a Purchase Requisition.
It also has a possibility to add attachments at header level.
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?