cancel
Showing results for 
Search instead for 
Did you mean: 

How can we all the Adobe Forms into one PDF file in WDP Application.

Former Member
0 Kudos

How can we all the Adobe Forms into one PDF file in WDP Application.

Accepted Solutions (0)

Answers (1)

Answers (1)

sahai
Contributor
0 Kudos

How can we all the Adobe Forms into one PDF file in WDP Application.

hi,

to convert it into pdf from wda i used the following FM in case of smartform you can use the same fm for your purpose for information i am sharing the piece of code below.

  • convert otf to pdf

CALL FUNCTION 'CONVERT_OTF'

DATA:  JOB_OUPUT TYPE SSFCRESCL,
        LT_OTFDATA TYPE TABLE OF ITCOO,
L_DUMMY TYPE STANDARD TABLE OF TLINE,
  PDF_DATA TYPE XSTRING,
  PDF_SIZE TYPE I.
  CLEAR: PDF_DATA, PDF_SIZE.
** Spool Parameters
  LA_OUTPUT_OPT-TDIMMED = 'X'.
  LA_OUTPUT_OPT-TDDELETE = 'X'.
  LA_OUTPUT_OPT-TDLIFETIME = 'X'.
  LA_OUTPUT_OPT-TDDEST = 'LOCL'.

*    ****************************************************************************
* Parameters passes to get the output in PDF format
****************************************************************************
  LA_CTRL_FORM-NO_DIALOG = 'X'.
  LA_CTRL_FORM-PREVIEW = 'X'.
  LA_CTRL_FORM-GETOTF = 'X'.
  LA_CTRL_FORM-LANGU = 'EN'.
  LA_CTRL_FORM-DEVICE = 'PRINTER'.

  CALL FUNCTION adobe_form "call your adobe form and pass these parameters
    EXPORTING
     CONTROL_PARAMETERS         =  LA_CTRL_FORM
     OUTPUT_OPTIONS             = LA_OUTPUT_OPT
*      BILLABLE_LOT               = A "ls_ctx_vn_inp-BILLABLE_LOT
*      SECTION                    = B "ls_ctx_vn_inp-SECTION
*      PROJECT                    = PROJECT
*      MGROUP                     = MGROUP
       DESC                       = DESC
       NAME                       = NAME
   IMPORTING
     JOB_OUTPUT_INFO            = JOB_OUPUT
     TABLES
       IT_ZJOBCARD              = IT_ZJOBCARD
   EXCEPTIONS
     FORMATTING_ERROR           = 1
     INTERNAL_ERROR             = 2
     SEND_ERROR                 = 3
     USER_CANCELED              = 4
     OTHERS                     = 5
            .
  REFRESH LT_OTFDATA.
* convert otf to pdf
  CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      FORMAT                = 'PDF'
      MAX_LINEWIDTH         = 255
    IMPORTING
      BIN_FILESIZE          = PDF_SIZE
      BIN_FILE              = PDF_DATA
    TABLES
      OTF                   = LT_OTFDATA[]
      LINES                 = L_DUMMY
    EXCEPTIONS
      ERR_MAX_LINEWIDTH     = 1
      ERR_FORMAT            = 2
      ERR_CONV_NOT_POSSIBLE = 3
      OTHERS                = 4.

  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE(
*    *path to the word file
    I_FILENAME = 'JobCard.pdf'
*     String Variable
    I_CONTENT =  PDF_DATA
*     File Type
    I_MIME_TYPE = 'PDF' ).

in case of further query in this pls inform

regards,

Sahai.S

Former Member
0 Kudos

this is ok, if i have a 3 adobe forms , how can i add all the 3 adobe forms in one pdf file.if is there any fm .what it is,and which parameters i need to pass...

Former Member
0 Kudos

I'm sorry but, this is wrong.

We don't have the GETOFT option in Adobe Forms parameters (SFPOUTPUTPARAMS).