cancel
Showing results for 
Search instead for 
Did you mean: 

How to Generate PDF Based on Multiple Selection from Query's Hit List

iamjaredm021
Participant
0 Kudos

Hi All,

We have this requirement wherein user should be able to generate PDF file after selecting multiple entries from the hit list (result of a query) by ticking checkboxes. Can you please advise how could this be achieved? We have created OData Service for this one.

Thanks,

Jay

Accepted Solutions (1)

Accepted Solutions (1)

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Jay,

Is your requirement to Generate PDF Files from Application or from your oData. You have mentioned that you have your oData service ready.

Please let us know if its Web App, Native or Hybrid App. Where should the PDF be sent or saved to if its mobile device?

Regards,

Nagesh

iamjaredm021
Participant
0 Kudos

Hi Nagesh,

Actually, we are already able to generate PDF from my OData for employee's POV. We want the same thing to be achieved on manager's POV as it is applicable for him to select multiple employees then generate a single PDF for them.

Thanks,

Jay

EkanshCapgemini
Active Contributor
0 Kudos

Hi Jay,

The get_stream method supports read of only 1 file and there is no other method available in the framework which can allow you to get multiple files.

I think your requirement is to consolidate all individual pdfs for selected employees and give single pdf. There are two aspects in this:

1. Passing multiple values as filter in GET_STREAM:

you can handle this by making a generic property say 'EmpFilter' of type string. Concatenate all selected employee ids with some predefined separator(like '~' or '|') and then pass it to the EmpFilter property. You can split this string and fill an internal table in the get_stream code in order to pass to the RFC that will give you the PDF. The URI would look like:

/EmployeeIPROSet(EmpFilter='101~102~103~104')/$value

where 101, 102 etc are employee ids.

2. PDF generation:

This requirement can be handled with smartform. ABAPer can create a smartform which uses a loop and populate details of the passed employee ids. Otherwise if you want to use the existing smartforms, you can merge multiple PDFs into single PDF using ABAP. You will multiple solutions for this by googling.

Let me know if I did not get your requirement.

Regards,

Ekansh

iamjaredm021
Participant
0 Kudos

Hi Ekansh,

We are actually using existing smartforms for PDF generation as we are just rebuilding our current applications from WebDynpro to SAPUI5.

Thank you for your inputs. I'll take those into considerations in our development.

Regards,

Jay

Pavan_Golesar
Active Participant
0 Kudos

Hello Ekansh,

Nice !

Can you share any document for the same(for understnading GET_STREAM)


Hello Jay

Very interesting query.



Thanks,

Pavan G

Answers (0)