cancel
Showing results for 
Search instead for 
Did you mean: 

Display many letters in One form

Former Member
0 Kudos

Hi Experts,

My goal is to display a single PDF that will contain several letters to customers.

Let me explain: for each client I will show him :

In the header : his Familly name and his First name

In the body of the letter : his products from the table 'Z_BUYPRODUCTS' by passing the Client_ID

In the footer : the signature

This letter is based on a single table that'll be repeated for each client ID of the table 'Z_BUYPRODUCTS'.

is it possible to do this in the same interactive form?

Any issues please of how can i do this ... it will help, Thanks in advance

Best regards

Accepted Solutions (1)

Accepted Solutions (1)

jagdishwar_b
Active Participant
0 Kudos

all of your requirements can be addressed in interactive forms, without any issues.

the table 'Z_BUYPRODUCTS', put it as import parameter in the associated Interface Object. then it gets displayed in the DataView in the form layout.

drag the table from data-view to the Bodypage, playaround with tableObject properties in the layout.

to pass teh table data to the form, you may need to write an abap program that will fetch table data based on client-id, and generate the pdf for you.

see this tutorial [Offline Interactive Forms Using ABAP|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d] or search in sdn incase for more details.

greetings,

BJagdishwar.

Former Member
0 Kudos

Thank you a lot for replying !

Actually that answer is for a single client. I can do for one client,.

but the problem is that I want to repeat the call of the interractive forme by sending all of ID_CLIEN of existing customers.

--> so that in the end i will have all the letters of each client with his products and that in the same pdf.

i am ready for further clarification.. any ideas

Best regards

Former Member
0 Kudos

Hi i m using this code to generate one PDF :

CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
      ie_outputparams = fp_outputparams
    EXCEPTIONS
      cancel          = 1
      usage_error     = 2
      system_error    = 3
      internal_error  = 4
      OTHERS          = 5.

  DATA fp_form_out TYPE fpformoutput.


  CALL FUNCTION '/1BCDWB/SM00000008'
    EXPORTING

      z_data          = lt_data
    IMPORTING
      /1bcdwb/formoutput = fp_form_out
    EXCEPTIONS
      usage_error        = 1
      system_error       = 2
      internal_error     = 3
      OTHERS             = 4.



  CALL FUNCTION 'FP_JOB_CLOSE'
    EXCEPTIONS
      usage_error    = 1
      system_error   = 2
      internal_error = 3
      OTHERS         = 4.

  DATA pdf_stream TYPE  fpcontent.
  pdf_stream = fp_form_out-PDF.

  cl_wd_runtime_services=>attach_file_to_response(
  i_filename      = 'PDF.pdf'
  i_content       = pdf_stream
  i_mime_type   =   '/Dsktop').

Is there any issue to incorporate many pdf_strem (type fpcontent) in the same PDF File (PDF.pdf)

I ve tested to concatenate two variable (type fpformoutput-PDF) in the same pdf_stream but its not working.

Any idea Please .. will be helpful

Best regards

OttoGold
Active Contributor
0 Kudos

The only way how to do this is to use a 3rd party tool outside SAP/ABAP program.

Check this thread for details:

Regards Otto

p.s.: I think SAP+Adobe tandem is going to make this possible in some new versions... Maybe it was already published but I am not aware of it.

Answers (0)