Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HRFORMS_CALL_PDF using form_object_list

Former Member
0 Likes
1,291

hi,

Im trying to call the FM HRFORMS_CALL_PDF using an hrform ref table but i only get the pdf from one of the hrforms. My code is parcilally this:

lo_hrform             TYPE REF TO object,
lt_hrform_list        like TABLE OF lo_hrform


(...)

loop on pernr.

(...)

     CALL FUNCTION 'HRFORMS_CALL_PERNR'
              EXPORTING
                form_object        = lo_hrform


     append lo_hrform to lt_hrform_list.

endloop.

(...)

CALL FUNCTION 'HRFORMS_CALL_PDF'
         EXPORTING
"          form_object = lo_hrform
            form_object_list = lt_hrform_list

IMPORTING
           pdf_xstring = ls_pdf

(...)


Ls_pdf always return the pdf belonging to only one of the hrform. The lt_hrform_list seems to have all the several hrforms inside. Even if i call 'HRFORMS_CALL_DISPLAY'

     IMPORTING

     FORM_OBJECT_LIST  = lt_hrform_list'

i can see all the hrform pdfs. Can anyone help me understand this?

3 REPLIES 3
Read only

Florian
SAP Champion
SAP Champion
0 Likes
1,101

Hi Miguel,

I'm not really into HR. But I think, the logic behind is that you should see all Forms in a row, if you are in preview-mode and if are going to send them to the printer or even as FAX or mail you get one per one in a row, so that you can handle the pdf correct to the medium.

But that is just a suggestion because I do not got access to a system at the moment.

Regards

Florian

Read only

Former Member
0 Likes
1,101

Thanks for the reply Florian,


The FM HRFORMS_CALL_PDF has a form_object_list  importing parameter and a pdf exporting parameter.

Since im using the import parameter to pass several hrforms i would expect one (or at least several pdfs form_object_list ) with the passed content. But what is happening is the return of one of the HRFORMS in an PDF. All the others are just ignored.

If this is an error it migth deserve a sap note for correction.

Regards

Read only

MatthiasBoensch
Newcomer
0 Likes
1,101

Hi Miguel,

we got the same problem. Have you found a solution yet?

Regards

Matthias