cancel
Showing results for 
Search instead for 
Did you mean: 

Services for Objects - Create Attachment

Former Member
0 Kudos

I am creating a flavor for ME51N Create Purchase Requisition and currently stumped on how to successfully attach a document. In the standard SAP GUI, users can click Services for Objects menu/button then Create > Create Attachment, locate the file and attach it. In Personas/the Web Application Server, I recorded this process and added it to a script button. See the script recorded below:

When I run the script, two pop-up boxes appear simultaneously. The Import file is technically first and I can click Ok and still upload the file. The Error still comes up though:

So, I tried cleaning up the original script (below) and the errors still appear, same as above:

My current assumption is related to the Import file" Allow to open local file?" pop-up box potentially. In the standard SAP GUI this does not happen at all, users can simply grab the file. Although the error errors states that an executed step failed, if I click the Ok button in the Import file box, I can proceed with attaching the file.

What is going here? Is there a way to avoid the error message? My ultimate goal is to create a script button for usres to click to attach their documents to the new Purchase Req. I appreciate any and all assistance and/or suggestions.

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

To avoid the popup asking for file upload permission, try to see if Elevated Trust Mode helps (if you didn't do this already). Refer to note 2025591 for the details.

Former Member
0 Kudos

Hi Tamas, may I post here a related question?

I have a very similar script to fire a Create Attachment menu option for a Quality Notification document (QM01 flavor). I don't mind the "Allow to open a local file?" message, but it appears twice!

What am I doing wrong?

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Honestly, I don't know why would this appear twice... but with elevated trust mode, no popup should appear. Did you try that?

Answers (0)