cancel
Showing results for 
Search instead for 
Did you mean: 

How to send pdf binary source data to R/3 attribute.

Former Member
0 Kudos

Hi all,

I was able to display pdf using pdfSource in binary format(array of bytes). I need to assign this pdfSource data to a R/3 attribute.

I used the following line of code:

setPdf(wdContext.CurrentContextElement().getPdfSource());

But this method setPdf(String) takes String parameter and I cannot assign pdfSource data and hence cannot update R/3 attribute.

Please let me know the process if I need to change anything in this regard.

Do I need to change data type of R/3 attribute to XSTRING instead of STRING to accept pdfSource data in binary format.

Thank you for your help.

Regards

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasad,

I am unaware of the available datatypes in R3.

But i suppose u can try these ;

-The context pdf you declared is string ,cant u declare it of type binary itself to set the pdfsource value and send it to r3 method .

- If R3 doesnt take binary ,then u can workaround by writing an utility method

1. converting the getPdfSource to integer first using

<b>http://www.captain.at/howto-java-convert-binary-data.php</b>

2.convert the integer to string

String myString = Integer.toString(my int value)

Now assign the context setpdf(myString)

hope it helps

Cheers

Swathi

Former Member
0 Kudos

Hi Swathi,

Thank you for the response.

Able to update R/3 attribute with data type XSTRIG.

Regards

Prasad

Answers (0)