on 09-13-2012 7:33 AM
hi good day,
i have created a program to generate the PDF FORM and send mail with attached pdf form.
i have sucessfully created PDF FORM and could send the mail with attachement.
the issue is it DOES NOT CREATE THE SPOOL.
Please see my code if have gone wrong.
TRY.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = lp_form"p_form
IMPORTING
e_funcname = fm_name.
CATCH cx_fp_api_repository cx_fp_api_usage cx_fp_api_internal.
MESSAGE ID 'FPAPIGENERIC' TYPE 'E' NUMBER '000' WITH lp_form.
ENDTRY.
*---> Set output parameters and open spool job.
fp_outputparams-nodialog = 'X'.
fp_outputparams-getpdf = 'X'.
fp_outputparams-preview = ' '."abap_false.
* fp_outputparams-nodialog = 'X'."abap_true.
fp_outputparams-reqnew = abap_true. "New spool request
fp_outputparams-reqimm = abap_true. "Print immediately
CALL FUNCTION fm_name "'/1BCDWB/SM00000107' " gform_v1
EXPORTING
/1BCDWB/DOCPARAMS = fp_docparams
T_RE_ITEMS = T_RE_ITEMS
INV_NO = INV_NO
GT_ADDRESS1 = GT_ADDRESS1
vatnumber = vatnumber
IMPORTING
/1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 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.
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc IS NOT INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
where do you think i might have gone wrong?
thank you,
kata
thank you guys its been sorted.
solution is :
if we maintain just 3 output parameters
fp_outputparams-nodialog = 'X'.
fp_outputparams-dest = 'PDF1'. "connection = p_conn.
fp_outputparams-nopreview = 'X'.
it creates the spool for you.
thank you,
kata.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.