cancel
Showing results for 
Search instead for 
Did you mean: 

SUP attachment viewer error in downloading pdf

Former Member
0 Kudos

Hi Experts,

I am trying to download payslip on android device using attachment viewer, but when i am trying to click on attachment viewer It is taking some wired for of data which is some Japanese language. Kindly tell me process and steps of using the same to download payslip.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

In using attachment viewer in SUP i am not able to download pdf as attachment. Kindly help me how can i download pdf on android device using SUP.

Thanks in advance....

midhun_vp
Active Contributor
0 Kudos

Without providing all the information on the issue no one will be able to help you.

Please give complete information in what all you did in SAP back-end, SUP and in HWC WF.

The general steps involves in enabling attachment viewer are:

  • Create a function module which converts the file into base64 encoded binary string. The FM should also provide the file name, Mime type and size of the file.

          MIME types: for pdf - application/pdf

                              for images - image/jpg etc.

  • Create MBO for the FM, where the field carrying the base64 formatted data will ave datatype bigbiary.
  • create a Attachment Viewer UI control and fill the properties.

To make sure that data you are sending from SAP is reaching SUP without any lose read the logs as per my previous posts.

- Midhun VP


midhun_vp
Active Contributor
0 Kudos

Are you developing a native application or an HWC application? From the keyword I am assuming that you are developing an HWC based application.

In an android and BB device to see the pdf you need to install PDF reader. What is the data type of the export parameter of the RFC which carries the binary data, it should be Xstring. And in the MBO the datatype would be bigstring.

For more information open the logs in the SUP server,

D:\Sybase\UnwiredPlatform\Servers\UnwiredServer\logs\WorkflowClient

Inside the folder WorkflowClient you can find a file with a name similar to ...__OBMO_WorkflowClient_user...... Where the user is the one you are registered in the SCC.

Check whether you are able to see the attachment data similar to this: iVBORw0KGgoAAAANSUhEUgAAAhAAAAHdCAIAAADD/NcpAAAC8WlDQ1BJQ0MgUHJvZmlsZQA

AeAGFVE1oE0EY/RJbUrDopWoPKkMPRbQtiwVvFZo0LbUlhqSttSiymd00abe7y+wmavGkghfBHzx4tRYvKqIH

rTcVQVA0h1q9FFEUBEUoFHqpJb7ZpNmk/k3Y3bffvO9775vJLFH9oGrbRpAROdwUib4wGz06xkLzFKIAeUPljt

0djw/KF8ktRavvK+9K3Pl2Od/1NDRz+1H03tePx/etTnQdqGb+AW8WECQKNGCuabyEd0qcKmFF4pOu7YLTIz

HPqBrwKHCbGEpEgM8DbxmvwqkqrOkOJ6pbBMfitkCduuvA3ZrDp5B7jWhTUPaMGIY7QHRwF2Kv/NiYQ3

TnFtGOVj+2p5lo2xGiuU4/

To check whether the data you are getting is correct use binary to image converters available in the internet. Once you provide the binary data it will give you the image/pdf etc..

- Midhun VP





Former Member
0 Kudos

HI Dear,

Thanks for your help.....

I am using MBO with string data coming from SAP and in MBO data type I have take in string 9000, but still I am getting stuck when deploying on my android device which has pdf viewer is not working. Kindly give me complete scenario so that I can use attachement viewer.

Thanks in advance....

midhun_vp
Active Contributor
0 Kudos

You have to use Xstring in the export parameter of the RFC, in which you are sending the binary (base 64) form of the pdf. When it comes to MBO it will be bigstring.

String with 9000 will not work because when you convert a pdf or any other file to binary form it will be some 1000's of characters, you can try it using image to base64 converters  or vise versa in the web. Ex: http://www.motobit.com/util/base64-decoder-encoder.asp

- Midhun VP