cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with "pdfSource" attribute in Adobeform scenario

Former Member
0 Kudos

Hello,

Scenario:

I am calling an interactive form from my webdynpro application , wherein the user enters many details and finally presses on Submit.

In the OnSubmit method , I validate the data and send email with my form as attachment.

To make this attachment , I use the "pdfSource" attribute to get the latest form data . But this attribute has the initial form data sent and no updated one.

I checked the SAP note 1120324 & corrections 967024 , 967025 .. which is same as the problem I am facing.

But these are already in place.

Kindly help in this.

Thanks in advance,

Omkar Mirvankar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Omkar,

What do you mean by updated data? can you explain your scenario clearly...

Basically when you are displaying form in webdynpro you are already filling some data and rest of the fields you are filling and submit? And those fields data is missing??

But I think, instead of getting PDFSource, it's better to create PDF objet by passng your template source name using standatd SAP classes.. on submit. In this case you will always get updated pdf..

No need to bind pdfsource attribute to xstring..

Regards,

Ravi.D

Former Member
0 Kudos

Hi Ravi,

Yes you are right in understanding the scenario . Updated data means the user entered data other than the defaulted values.

I want something which will help me create attachment in email with all the user entered data filled. Thats why I went for pdfSource.

You are saying like by passing the template name and the context to the class I can create a pdf object ?

Thats sounds great.Can you help me finding the class?

Thanks ,

Omkar Mirvankar.

Former Member
0 Kudos

Hi Omkar,

you can use class cl_wd_adobe_services and it's methods:

First create object type refering to cl_wd_adobe_services by exporting your form name, then , call the following methods

get_wd_context_as_xml(data_source = Node name which is binded)

create_pdf(enabled = 'X' data_source = Node name which is binded)

you will get the xstring. This will contain your complete data.

Regards,

Ravi.D

Former Member
0 Kudos

Hello Ravi,

This looks like a saviour to me. I am trying this now. Will get back with the results.

Thanks a ton.

Regards,

Omkar Mirvankar.

Former Member
0 Kudos

Hi Omkar,

Here you go..


*@# PDF Creation data.
  data :lv_xml type xstring,
                lv_adobe type ref to cl_wd_adobe_services,
                lv_pdf type xstring.
*@#End PDF.


*Create PDF on Submit.
                create object lv_adobe
                  exporting
                    i_form_name = 'your form name'.

                lv_xml = lv_adobe->get_wd_context_as_xml( data_source = lo_nd_nodename ).
                lv_pdf = lv_adobe->create_pdf( enabled = 'X' data_source = lo_nd_nodename data_xml = lv_xml ).
*@#End PDF creation.

you can use lv_pdf for your rest of the process...

Regards,

Ravi.D

Former Member
0 Kudos

Hey Ravi,

Thanks a lot. This solution works perfectly for my requirement.

Thanks & Regards,

Omkar Mirvankar.

Answers (0)