cancel
Showing results for 
Search instead for 
Did you mean: 

SUP HWC Attachment Viewer not displaying attachment

Former Member
0 Kudos

Hello Community,

I am struggling to get the SUP 2.2 SP4 attachment viewer to show my PDF attachment from SAP.

I am calling an MBO that displays PO data from SAP. From the Details screen of that PO result I want to add an attachment control to retrieve the PDF attached to the PO.

The PDF is retrieved by entering a PO number and it returns the:

MIME : application/pdf

Attachment data: XSTRING > BIGBINARY

File : STRING name value

Size: INT

If I perform an online request I am able to view the above fields and the data attached to the fields.

If I add the attachment view control into the screen the I get the error "Missing required parameter".

My setup is as follows:

As you can see from above I want to use a Personalization Key to bind a PO number to the input for the Attachment MBO. However I dont get an option to bind this as the PK mappings option doesn't have any available data.

Also I would like to note that when I select an object query from the attachment viewer options menu I only have the option to select the findByPrimaryKey field and not the findAll.

If I change the MBO to use an Online cache group and the findByParameter object query is generated I cant access the object query in the properties of the attachment viewer.

Please help!!

Thank you

Jared

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

I got the attachment viewer working in the end.

I first had to make a call to the BAPI to return the values for the attachment. So I used an online request and a findAll object query to return the data into a list view.

From the list view I would click on an item in the list which would take me to the details of the list view.

I then created the attachment viewer in this screen and used the BINARY key for the "Input Data Binding" key.

I was then able to view the attachment like this. I still haven't got it working using the object query.

Answers (2)

Answers (2)

former_member228049
Participant
0 Kudos

Could you paste your attachment control's properties view General page ?  It seems you only need to set Input databinding to the right key ( which should map to image attribute of the MBO ) and MIME type which should be the image file type ( e.g. image/jpeg)

It seems this error message pop up when type is null or fileName is null or attachment data is null or the key is null.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jared,

You should give a try to below steps:

1. Create one personalization key of same data type and data length. String(10) and select storage type as transient

2. Change cache policy to online.

3. Right click to the PDF mbo, load arguments> map PONUMBER to ATTACHMENTPONUMBER in propogate to attribute option and personalization key

4 . redeploy mbo

5. In hybrid app designer/workflow

Go with findByParameter object query against attachment.

Rgrds,

Jitendra

Former Member
0 Kudos

Hi Jitendra,

If I change the PDF MBO into the online cache group then I put the load arguments to map to the ATTACHMENTPONUMBER I am unable to select the PK I made.

I deployed the MBO anyway then created the attachment viewer again but was unable to select an object query.