cancel
Showing results for 
Search instead for 
Did you mean: 

Photo from Pa30 into Adobe Forms.

former_member184635
Participant
0 Kudos

Hello,

We have uploaded the photos of Employees in HR server.

Now in the Adobe Forms, we needs to fetch these photo's and display.

Is it possibe?

I know that through webdynpro , we can pass the photo as Xstring and display in Adobe form.

We want in the Adobe form directly call the photo which is stored in Pa30 & display without using the intermeidate webdynpro.

How this can be acheived?

Regards,

Dadarao.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

This message was moderated.

OttoGold
Active Contributor
0 Kudos

What about this one:

about working with pictures:

/people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal

Regards Otto

former_member184635
Participant
0 Kudos

Hi Ottoi,

I already tried and check the forum , where I got the code which you had given.Already I had check the classes and other class too. but didn't find the extract solution of getting an archieve image hence I posted on this formun.

The answer I found was in this forum about an image stored through se78. But in our scenerio it was archieve & stored in content directory.

Any way I found the solution in two ways :

1. The solution you propsed was getting the image in Xstring & showing in adobe form.

2. Using the URL of the image & showing the adobe Form.

I found the using URL solution is simpler & better because the archeive image can directly be fetched in xstring,I need to convert to XSTRING to shown in adobe forms. while the URL can be directly converted to image using a single line code in FormCalc.

Any ways thanks for the reply.

Regards,

Dadarao.

Former Member
0 Kudos

>

>

> Any way I found the solution in two ways :

>

> 1. The solution you propsed was getting the image in Xstring & showing in adobe form.

> 2. Using the URL of the image & showing the adobe Form.

>

> I found the using URL solution is simpler & better because the archeive image can directly be fetched in xstring,I need to convert to XSTRING to shown in adobe forms. while the URL can be directly converted to image using a single line code in FormCalc.

>

> Any ways thanks for the reply.

>

> Regards,

> Dadarao.

HI Dadarao ,

Can you please post the code for handling the URL ...

Tnx

former_member184635
Participant
0 Kudos

Hi Eron,

you need to fetch the URI of the photo through Std. Funtional Module.

Map this URI to some text field which will be hidden on Adobe Form.

AT Form-ready event of the image field of adobe form, map this text field value to the image field value.

hope this will helpful.

Regards,

Dadarao.

0 Kudos

Hy Dadaro,

i tryed your Method, but the Image isn't shown on the adobe form. I'm using the FM "ARCHIVOBJECT_GET_URI" to get the URI from the Image. In my Adobe Form i added the following FormCalc Code to the Form:ready Event from the ImageObject:

this.value.image.href = this.parent.Textfeld1.rawValue;

Textfield 1 is mapped to the URI.

So where's my fault? Our Images are stored in ArchiveLink. The URI i get returned seems like:

http://<srvernamer>:1080/sap/bc/contentserver/100?get&pVersion=0046&contRep=Z2&docId=DD8091250CF776F....

Regards Oli

former_member184635
Participant
0 Kudos

Hello,

Change the code : this.value.image.href = this.parent.Textfeld1.rawValue;

to

this.value.image.href = xfa.record.Textfeld1;

Also,

You can get the URI of Photo through the FM : HRWPC_RFC_EP_READ_PHOTO_URI also.

Hope this helps !!!!

Regards,

Dadarao.

0 Kudos

Still don't work!

OttoGold
Active Contributor
0 Kudos

1) I don´t think the picture type will be a problem. This is a graphic load, where you set the output type. If the picture is a JPG, maybe the SAP tool can convert it to BMP. Prove me wrong, but you didn´t try, right? You´re just complaining because you don´t like my code:)) So try first, complain later.

2) you can experiment with other methods of this class, like MIME_URL_FOR_BDS_GRAPHIC, which sounds promising. You didn´t opened the class in class builder to check, right? So open up first, complain later:))

Otto

former_member184635
Participant
0 Kudos

Hi ,

Thanks for the reply.

Can you pls. tell me about how to use the URL in ADobe fforms to display the photo.

The cl_ssf_xsf_utilities=>GET_BDS_GRAPHIC_AS_BMP is not fetching the XString since the photos in HR server are stored as object HRICOLFOTO having TYPE as JPG

I am able to get the URL of photo,but not aware how to use this URL to show photo in Adobe Forms.

Pls. guide....

Thanks & Regards,

Dadarao.

OttoGold
Active Contributor
0 Kudos

Hello,

WD does not have any important role in passing a photo to Adobe form. I guess you want to print some "personal card" type form, right? I have developed many of these. A good source of information is How Tou2026 Integrate ADOBE form on WebdynPro for ABAP and Deploy it on portal by Bhawanidutt Dabral. Not because of the WD part, but because the way how to send the photo into the form is described here. Just in case you have any difficulties in finding it, I can copy the important part for you here:))

Currently we will Hard Code the fields Vorna and Nachn and will use the standard method to get the photographs form SE78 (Form Graphics). Add this piece of code

CONSTANTS: c_graphics TYPE tdobjectgr VALUE 'GRAPHICS',

c_bmap TYPE tdidgr VALUE 'BMAP' ,

c_bcol TYPE tdbtype VALUE 'BCOL'.

      • Get the Photographs.

lv_pernr1 = '00000028'. " Employee Number

CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp

EXPORTING

p_object = c_graphics

p_name = lv_pernr1

p_id = c_bmap

p_btype = c_bcol

RECEIVING

p_bmp = ls_z_if_test_cv-im_photo

EXCEPTIONS

not_found = 1

internal_error = 2

OTHERS = 3.

You need to use the XSTRING type variable in your form interface/ context and use Image field component (not only Image!!) in your Adobe form. If you don´t like this solution (which is simple and really nice) you can work with the URLs of the pictures and pass these URLs into the form, but that would be troublesome because there is a problem to include the picture into the form, how to get the pictures URL etc.

I hope this solves your problem, Otto