Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Params for CALL FUNCTION '/1BCDWB/SM00000205'

8it8
Explorer
0 Likes
3,674

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

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

9 REPLIES 9
Read only

abo
Active Contributor
0 Likes
3,531

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.

Read only

Sandra_Rossi
Active Contributor
0 Likes
3,531

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.
Read only

8it8
Explorer
3,531

Hope now it's good...

Read only

FredericGirod
Active Contributor
0 Likes
3,531

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

Read only

8it8
Explorer
0 Likes
3,531

Thank you.

That solve the problem -> CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'

Read only

RaymondGiuseppi
Active Contributor
3,531
Read only

Sandra_Rossi
Active Contributor
0 Likes
3,531

A few things to clarify:

  • The transaction code SFP is about Adobe Forms, it's NOT about Smart Forms (SMARTFORMS)
  • SSF_FUNCTION_MODULE_NAME is for Smart Forms
  • FP_FUNCTION_MODULE_NAME is for Adobe Forms
Read only

Sandra_Rossi
Active Contributor
0 Likes
3,531

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?

Read only

FredericGirod
Active Contributor
0 Likes
3,531

I think your previous comment is the answer sandra.rossi