cancel
Showing results for 
Search instead for 
Did you mean: 

Buttons to print ADOBE Form on CRM Webclient UI

Former Member
0 Kudos

Hello,

i´m new with ADOBE Forms in SAP CRM.

I created a ADOBE Form in transaction SFP to printout the CRM 7.0 service order.

But i do not know how to trigger the printout. I want to have two buttons on the webclient UI:

1. print

2. print preview

In the post processing framework i found under external communication PDF-Form. Here i need a implementation of BADI DOC_PERSONALIZE_BCS.

Is this the right point to trigger the printout of ADOBE pdf in CRM?

Or ist there a better solution?

If yes, could somebody provide a working example for this BADI implementation which i can adjust for my needs please.

Thank you

Best regards

Manfred

Accepted Solutions (1)

Accepted Solutions (1)

CarstenKasper
Active Contributor
0 Kudos

Hi Mannfred,

I had this problem last year when we decided to use Adobe Forms instead of Smartforms: We were able to put out Smartforms using the "Druck Vorschau" button in the WebClient but not Adobe Forms.

My approach is as follows:

1. I created the Adobe Form plain and simple.

2. I create a dummy Smartform with no logic.

3. I created a new class inheriting from CL_SF_PROCESSING_PPF. Implementing the EXEC_SMARTFORM method to call the Adobe Form.

4. In customizing I gave the dummy Form and the class and method.

Now the tricky part: I created a new class and inherited from the handler in /default_host/sap/crm/crm_pdf_print To call my adjusted methdod for Adobe forms. After that I put it in as the handler.

Now we can use the "Druck Vorschau" button for Adobe forms.

I do not know if this is the best approach, but it works for my client and was quite smooth to implement and reusable.

cheers Carsten

Former Member
0 Kudos

Hello Carsten,

could you please give me your contact details.

I need help in this point - maybee you / syskoplan can help.

Thank you

Best regards

Manfred

Former Member
0 Kudos

Hi,

maybe a little bit late. I added the button and PDF without a Dummy smartfrom:

1. Create Adobe form with SFP

2. Copy service default_host/sap/crm/crm_afs_print

2. copy handler class CL_CRM_AFS_PRINT and assign to service

3. In IF_HTTP_EXTENSION~HANDLE_REQUEST in your custom class.

Copy module CRM_UIU_BP_PRINT_BACKGROUND, delete all the smart form related stuff and add you printing module for the Adobe form.

4. ev_bin_file in ZCRM_UIU_BP_PRINT_BACKGROUND is your pdf (gs_formputout-pdf), use SCMS_XSTRING_TO_BINARY to get the pdf_length.

5. Modify IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS of BP_HEAD to get to your service and create the URL.

Basically copy the code from standard and exchange the class name

Former Member
0 Kudos

Hi Mannfred,

Could you share your solution with us, as I am looking for the same solution, I want to print and preview the Adobe form from Service order screen.

Regards,

S Reddy

Former Member
0 Kudos

Hi,

we implemented a consulting solution (own handler class) to realize this.

The consultant was Carsten Kasper. You will find his details in this threat - see his answer.

Best regards

Manfred

Former Member
0 Kudos

Hi Carrston,

I have the same issue in my project where I need to use adobe forms and assign them to action profile.

I have a question regarding your solution below :

After creating a new class in step 3, are you again creating another class as mentioned under the tricky part?? I am confused.

A detailed process steps would be apprecaited. Thanks in Advance

My approach is as follows:

1. I created the Adobe Form plain and simple.

2. I create a dummy Smartform with no logic.

3. I created a new class inheriting from CL_SF_PROCESSING_PPF. Implementing the EXEC_SMARTFORM method to call the Adobe Form.

4. In customizing I gave the dummy Form and the class and method.

Now the tricky part: I created a "new class" and inherited from the handler in /default_host/sap/crm/crm_pdf_print To call my adjusted methdod for Adobe forms. After that I put it in as the handler.

CarstenKasper
Active Contributor
0 Kudos

Hi,

everything until step 4 seems to be clear.

We can not put the Adobe Form directly into the customizing, it just will not let us. Therefore the dummy SmartForm.

The handler class created in Step 3 is clear. It is the same class used in step 4 in the customizing.

The tricky part is, as the name suggests, the tricky part

The standard WebService will only work with the SmartForm interface. Our AdobeForm does not have such an interface, neither does the handler class we created in Step 3.

When calling an AdobeForm in the well known way (FP_JOB_OPEN, etc..) we get a XSTRING with PDF content as result.

The reasson why I changed changed the handler class is that I adjusted the interface of the method called by the framework in there. In gets an additional XSTING parameter.

In a standard call it calls the SmartForm handler created in Step 3. Next thing it does: Convert the result to an XSTRING. With AdobeForms we directly get the XSTRING.

It is kinda hard to explain. Have a look at the class, you will see what I mean.

Maybe an additon: For AdobeForms you have got the option to create it with a SmartForm Interface! This might be callable by the Framework directly. Never tried, as I had to call my forms by WebService as well.

cheers Carsten

Note: I am not very often in this forums anymore. Might take some time for me to see questions posted in threads.

hassan_zahid
Explorer
0 Kudos

Hello Carsten,


Can you please define more steps in detail. Many step are based on assumed like your tricky part.


Regards,

Hassan Zahid

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Carsten Kasper,

Hats off to your solution & its explanation..!

It works for me too...!

Cheers,

Satish

0 Kudos

Hi Satish and Carsten Kasper,

Nice blog.........

I am able to do print preview of adobe form but i am stuck with direct print of adobe form can you please me on this.

Regards,

Raju Prasad.

Former Member
0 Kudos

Hi Manfred,

You have to enhance the BSP application where you want to put those buttons and then create the buttons in the application. In the event handler of the buttons you have to trigger the print & preview.

Have a look of the [Thread|]

In this thread I have given the link for some of my blogs which might help you to add the buttons and how to capture the event on those buttons.

Hope this will help.

Thanks,

Vikash.