2023 Nov 26 11:00 AM
Hey,
I've made a smart form (SFP) and an Abap Code for Report Program to call the form:
*&---------------------------------------------------------------------*
*& Report YTEST_SFP_FORM
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ytest_sfp_form.
INCLUDE ytest_sfp_form_cld.
INCLUDE ytest_sfp_form_cli.
START-OF-SELECTION.
DATA: fp_outputparams TYPE sfpoutputparams.
fp_outputparams-nodialog = ABAP_FALSE.
fp_outputparams-preview = 'X'.
*fp_docparams-fillable = 'N'.
fp_outputparams-device = 'PRINTER'.
fp_outputparams-connection = 'ADS'.
fp_outputparams-bumode = '-'.
*fp_outputparams-dest = 'LPDF'.
fp_outputparams-dataset = 'PBFORM'.
fp_outputparams-pdltype = 'pdf'.
fp_outputparams-xdcname = 'acrobat6.xdc'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
others = 5.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
*
* call FUNCTION '/1BCDWB/SM00000205'<br>* EXPORTING
* lv_char50_1 = lv_char50_1
* lv_char50_2 = lv_char50_2
* lv_char50_3 = lv_char50_3.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
call function 'FP_JOB_CLOSE'
exceptions
usage_error = 1
system_error = 2
internal_error = 3
others = 4.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
But I see that the pattern of /1BCDWB/SM00000205 is like this:
CALL FUNCTION '/1BCDWB/SM00000205'
* EXPORTING
* /1BCDWB/DOCPARAMS =
* ZVBAP_TAB_RP =
* DATE =
* HOUR =
* GV_LOGO =
* IMPORTING
* /1BCDWB/FORMOUTPUT =
* EXCEPTIONS
* USAGE_ERROR = 1
* SYSTEM_ERROR = 2
* INTERNAL_ERROR = 3
* OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
What pattern to use and how do I pass params and new params that coming ahead (like logo, tables, etc).
Thanks
2023 Nov 26 11:13 AM
Please edit the question and fix the code blocks.
Tip: to avoid html elements in the text, remember to switch editor back to display mode before copying.
2023 Nov 26 1:13 PM
Please edit your question (Actions>Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks!
e.g.
REPORT ytest_sfp_form.
INCLUDE ytest_sfp_form_cld.
INCLUDE ytest_sfp_form_cli.
START-OF-SELECTION.
DATA: fp_outputparams TYPE sfpoutputparams.
fp_outputparams-nodialog = ABAP_FALSE.
2023 Nov 27 7:16 AM
2023 Nov 27 7:32 AM
I am sorry, I don t understand your question.
You have the pattern of your function module.
You should use the function SSF_FUNCTION_MODULE_NAME to get the module name from the form name
2023 Nov 27 8:26 AM
Thank you.
That solve the problem -> CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
2023 Nov 27 8:51 AM
Read fist online help on Integrating the Smart Form into the Application
2023 Nov 27 9:29 AM
A few things to clarify:
2023 Nov 27 9:31 AM
Your initial question was "What pattern to use and how do I pass params and new params that coming ahead (like logo, tables, etc)."
I don't understand, could you clarify?
2023 Nov 27 9:45 AM