cancel
Showing results for 
Search instead for 
Did you mean: 

Merging or Assemble SAP PDF forms

Former Member
0 Kudos

Hello Gurus,

I have a requirement to group all invoice forms to a single PDF.I went through the SAP program FP_CHECK_BATCH_PDF_RETURN for grouping documents.

In my case the business want to use tcode : VF31 for printing. I am using sap standard driver program : SD_INVOICE_PRINT01 for printing invoices.

What are the solutions available as I am really struggling to start.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

SandySingh
Active Contributor
0 Kudos

Hello

You are on right track by referring to SAP Program FP_CHECK_BATCH_PDF_RETURN

How to assemble PDF form pages into one file - ABAP Development - SCN Wiki

Run report  FP_CHECK_BATCH_PDF_RETURN with following

  • Bundle Mode: M
  • All forms  in one pdf - Checkbox ticked

In Program SD_INVOICE_PRINT01, refer to line no 280 and 305. Looks like this program already caters for bundling. All you need is to find where the MEMORY ID ' BUNDLING' is set.

Regards

Sandy

Former Member
0 Kudos

Hi ,

I am also working something similar to this in CRM.

I am able to bundle/merge 2 or more Adobe forms  using the above program,

But the problem is ,my adobe forms has some editable fields and when I merge and display the final PDF , its a non editable form.

Is there any way that my final PDF is still editable...

I have passed on parameters like Fillable and Dynamic... also..

Any pointers will be a great help

Thank you

Surya

Former Member
0 Kudos

Hello Sandy,

Thank you or the response.

I checked the lines for bundling in the form. When I manually set the Bundling value = 'X' to default the form for Bundling , nothing is happening.

The flow in the program FP_CHECK_BATCH_PDF_RETURN and SD_INVOICE_PRINT01 are different, do you think still I can use standard program to acheive this.

Former Member
0 Kudos

Hi Surya,

In your post you had mentioned you said 'when I merge and display the final PDF , its a non editable form.'

Can you kindly suggest how did you achieve to merge your form.

Thanks.

SandySingh
Active Contributor
0 Kudos

Hello Vishnu,

I think the SAP standard program already caters for Bundling .. You will have to debug the program and see where the MEMORY ID ' BUNDLING' is set.

Just for TESTING purpose in DEV system, you can write a code to set the Memory ID BUNDLING in BADI or usser exit or enhancement implementation and see if the sap standard program does the form bundling . Remove this code after testing.

In Program SD_INVOICE_PRINT01, refer to line no 280 and 305. Looks like this program already caters for bundling. All you need is to find where the MEMORY ID ' BUNDLING' is set.

Regards

Sandy

Former Member
0 Kudos

Hi Sandy ,

I did the same, I have set the BUNDLING value to X but there is no difference.

Thanks.

Former Member
0 Kudos

Hi Vishnu

Below are the parameters that i have passed.

     fp_outputparams-getpdf     = 'M'.

     fp_outputparams-connection = cl_fp=>get_ads_connection( )..

     fp_outputparams-bumode     = 'M'.

     fp_outputparams-assemble = abap_true.

CALL FUNCTION 'FP_JOB_OPEN'    .....

CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'    for Form1..

CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'    for form2

CALL FUNCTION fm_name1    CALL FUNCTION fm_name2   

CALL FUNCTION 'FP_JOB_CLOSE'

CALL FUNCTION 'FP_GET_PDF_TABLE'

    IMPORTING

      e_pdf_table = lt_pdf.

  DATA: e_pdf TYPE xstring.

  READ TABLE lt_pdf INTO e_pdf INDEX 1.

Using above i was able to Merge 2 or more forms ... but this was not allowing me to edit the PDF even though i had editable fields.

So i had use another way, Attach additional forms into 1 PDF  in the ATTACHMENT section of the PDF , this allowed me display the form with all properties.

After calling forms ...

   lv_des = cl_fp=>get_ads_connection( ).

* Get FP reference.

      lo_fp = cl_fp=>get_reference( ).

*     Create PDF Object.

      lo_pdfobj = lo_fp->create_pdf_object( connection = lv_des ).

*     Set document.

          lo_pdfobj->set_document( pdfdata =  lv_xdata  ).

          ls_attachment-mimetype    = 'application/pdf'.

          CONCATENATE lv_title '.' INTO ls_attachment-name    SEPARATED BY space.

          ls_attachment-description = ls_attachment-name.

          ls_attachment-data = ls_pdf-pdf .

          CONCATENATE ls_pdf-formname 'pdf' INTO ls_attachment-filename SEPARATED BY '.'.

          INSERT ls_attachment INTO TABLE lt_attachments.

          lo_pdfobj->set_attachments( attachments = lt_attachments ).

          lo_pdfobj->execute( ).

          lo_pdfobj->get_pdf( IMPORTING pdfdata = ev_pdf_xstring ).

diego_santos
Employee
Employee
0 Kudos

Hi,

Please read this SAP Help document.

Bundling Form Templates in a Call - Enabling Form-Based Processing of Business Data - SAP Library

You will find the table FPCONNECT, there the field MBATCHING. This field control Bundling in Forms Processing.

Regards,
Diego

Former Member
0 Kudos

Hello Diego,

Thank you very much for your response.

I am trying to print SD Invoices through bundling, I managed to change entries in FPCONNECT but the output condition records are ending with exceptions due to this.

Error:

Object 0020006092

Output type: Print-Epson GrossInv

Processing log for program SD_INVOICE_PRINT01 routine ENTRY

ADS: com.adobe.ProcessingException: com.adobe.Processin(200101)

Document 20006092: Serious error during message processing

Document 20006092: Serious error during message processing

Thanks.

diego_santos
Employee
Employee
0 Kudos

Hi,

Have you checked SAP_BC_FPADS_ICF in ADS_AGENT? This Role is required to make Bundling work.

Regards,
Diego