cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rename filename of Data Overview PDF

Former Member
0 Likes
1,135

Hi,

Using E-Recruiting, when the user opens a BSP to see a Data Overview (SmartForm), it opens up Adobe Acrobat to view it. However, the filename is 'dummy.pdf' when it opens up. The client would like it to be something else, but I can't find out where the filename gets populated!

I have checked the controller for the BSP, as well as the function module for the SmartForm, but I still can't find out where this name is being populated. I check this forum often for other problems, and you guys are great!! Please help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Joe,

Whenever I did these smartforms, I find them in the BSP controller. one thing to do is as follows:

see the smart form name from customizing i.e SPRO- system parameters ...

From there go to transaction SMARTFORMS. Enter the name of this form there. Then in the initialization section of the smart form , generally some methods are called. You check out for them, place a break point in that method. May be you comeout with something from there.

In any case, you need to customize the smartform, as of what I see for the clients requirement.

So it should be easy if you go just from the SMARTFORMS transaction code.

I think you will solve it now.

In case you find some trouble, please do get back to me. I will tell u things in more detail.

Ps. assign points if helpful.

Regards,

bharat

Former Member
0 Likes

Bharat,

Thanks very much for your help! Unfortunately, the Initialization section of my forms contain only the data within the forms (such as name, address, etc.), and some forms have no code at all in the Initialization.

All of the SmartForms that display in PDF format default to 'dummy.pdf' for some reason. This leads me to believe it may be some value in the program/function that converts the SmartForm to PDF format (I have also looked in the OTF program with no luck).

Thank you VERY much for assisting me with this problem! I'll continue to give points for the help!

Former Member
0 Likes

Well,

Then there is some generic error in the system. Not much to do with Smartforms transaction or customizing.

Then you try to see the code where smart form is generated. I mean in DO_INIT or DO_REQUEST. Then there should a function module generating smart form. Here the parameters you pass are very important. What I can suggest is look at following examples, I am sure you get some way out there.

SF_WEBFORM_0*

I have no E-rec. installed now on my system. Otherwise I would have seen myself.

Regards,

Bharat

Former Member
0 Likes

Thanks alot for your help!

I am still digging through code to find out where this could be. There is only one function that has WEBFORM in it (SWU_WEBFORMS) and I don't think that the 'dummy' filename is anywhere in there.

If you have any other suggestions, it would be very helpful!

Former Member
0 Likes

Joe,

can you check out in the corresponding BSP application if there is a page or view with name <b>dummy.pdf</b>.

If so , it is called everytime. Then you need to figure out why it is called.

Regards,

Bharat

Former Member
0 Likes

Bharat,

Again, thanks for helping. There is no view or controller named 'dummy' within any of the BSP applications.

In the BSP, it seems to be calling a URL to be put in an iFrame. And, within the iFrame, the overview appears.


<!-- BSP_Application = HRRCF_PROFILE - HRRCF_Viewname = dataoverview_m.bsp -->
<phtmlb:matrix width  = "100%"
               height = "600px" >
  <phtmlb:matrixCell vAlign="top" />
  <hrrcf:iFrame url       = "<%= controller->cand_prev_url %>"
                scrolling = "<%= controller->scroll_type %>" />
</phtmlb:matrix>

When the overview opens within the browser (i.e. the iFrame) it displays fine, and the filename is 'application.pdf'. It is when Adobe Acrobat gets triggered to open the overview that it changes the name to 'dummy.pdf'. I thought it was a problem with Adobe, but I tested other PDF's to open (outside of e-recruiting) , and their names are fine.

Also, I have tried to debug through the cand_prev_url and it returns a hashed PARAM in the URL, so I can't trace exactly where the PDF is coming from.

Thank you VERY much for assisting me!!!

Former Member
0 Likes

Joe,

can you check this!

In the web application I mean when you login as Manager or recruiter to the BSP application, there is an option called settings. There you can select date format and also the pdf or html format. Just see if it is pdf.

I think it helps a bit. But in anycase one more thing I want to know is if there are any changes done to the BSP application or it is as in standard only!

Just try this out.

Regards,

Bharat

Former Member
0 Likes

Joe,

In this sample BSP application SF_WEBFORM_04 I see the following code, which might be of interest, just check out.

*----


  • Conversion of output format OTF into PDF format

*----


  • now convert the final document (OTF format) into PDF format

call function 'CONVERT_OTF'

exporting

format = 'PDF'

  • MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '

  • COPYNUMBER = 0

importing

bin_filesize = l_pdf_len

bin_file = l_pdf_xstring " binary file

tables

otf = ls_output_data-otfdata

lines = lt_lines

exceptions

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

err_bad_otf = 4

others = 5

.

if sy-subrc <> 0.

  • error handling

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

Former Member
0 Likes

Bharat,

EXCELLENT information!! I will check into the form_name attribute.

However, the SF_WEBFORMs seem to be for trainings. This code:

*-----------------------------------------------------------------------
* Fill HTTP request
*-----------------------------------------------------------------------
  response->set_header_field( name  = 'content-type'
                              value = 'application/pdf' ).

* response->delete_header_field( name = 'pragma' ).
* response->delete_header_field( name = 'expires' ).
* response->delete_header_field( name = 'cache-control' ).

* some Browsers have caching problems when loading PDF format
 response->set_header_field(
                    name  = 'cache-control'
                    value = 'max-age=0' ).

* start PDF viewer either in the Browser or as a separate window
  if pdf_in_browser is initial.
     response->set_header_field(
                        name  = 'content-disposition'
                        value = 'attachment; filename=webforms.pdf' ).
  endif.

seems to be very interesting. Hopefully, in one of the OnInitializations (in one of my BSP applications) this code will show up, along with a default 'dummy.pdf' name next to it!!

This is very useful information, and I will look into it! I will let you know what I come up with!!

Thanks again

Former Member
0 Likes

Check Method

SET_RESPONSE in controller CL_HRRCF_APPLICATION_DOVR_CTRL.

This methods sets the output for all overviews (cand, requisition, posting, etc... ).

Regards

Former Member
0 Likes

Hi Joe,

Could you solve the problem with "dummy.pdf".

I am also looking for a possibility to rename it.

cheers

Wolf

NashT
Participant
0 Likes

Hi Joe,

Did you find a solution ? we have a similar question from our users. Is it depenent on the adobe version ?

Thanks

Nash

Answers (0)