‎2013 Aug 16 11:09 AM
TABLES:vbrp.
*
TYPES:BEGIN OF ty_vbrp,
VBELN TYPE VBELN_VF,
POSNR TYPE POSNR_VF,
SGTXT TYPE SGTXT,
FKIMG TYPE FKIMG,
END OF TY_VBRP.
data: wa_vbrp type ty_vbrp,
it_vbrp type standard table of ty_vbrp,
fm_name type rs38l_fnam.
selection-screen begin of block b1 with frame title text-001.
SELECT-OPTIONS:s_vbeln for vbrp-vbeln.
selection-screen end of block b1.
START-OF-SELECTION.
SELECT VBELN POSNR SGTXT FKIMG FROM vbrp into TABLE it_vbrp
WHERE vbeln IN s_vbeln.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSD_FORM'
* VARIANT = ' '
* DIRECT_CALL = fname
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
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 fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
* s_vbeln =
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
my error:
Short text
Incorrect parameter with CALL FUNCTION.
‎2013 Aug 16 11:33 AM
Try passing the VBELN to S_VBELN.
Also you are not passing anything in the FM ????
‎2013 Aug 16 11:45 AM
Hi,
whatever variable you have declared in the form interface of your smart form , pass those parameters to the second FM.
Regards,
Priyaranjan
‎2013 Aug 16 11:52 AM
‎2013 Aug 17 7:34 AM
‎2013 Aug 16 12:01 PM
‎2013 Aug 16 1:40 PM
Hi,
Please pass s_vbeln and also pass control parameter and output option.
Regards,
Sujeet Mishra
‎2013 Aug 16 3:41 PM
Hi,
Be sure to pass all mandatory parameter of your smartforms' interface when you're call the function module.
Martin
‎2013 Aug 17 11:12 AM
Hi ,
goto your smart form and activate it.
Check the function module name by clicking on Environment à Function Module Name.
copy the fm Name.
now in your driver program, instead of second FM , call the copied FM via 'PATTERN" tab.
now in the generated code , see what all parameters are not commented , and pass values for these parameters.
hope this will help you.
later on you can replace the generated FM name with variable fm_name.
regards,
Priyaranjan
‎2013 Aug 17 1:16 PM
In your call function fm_name remove the * from s_vbeln and
put s_vbeln = s_vbeln
‎2013 Aug 17 2:34 PM
Hi,
If you get this error in any Function Module, you should check what are the mandatory parameters of that Function Module.
You can go to se37 and find the parameters which are mandatory and optional.
Every parameter which is not stated as optional is mandatory. In your case your FM of smartforms, has a mandatory parameter as s_vbeln.
So uncomment the s_vbeln from your FM and put s_vbeln = s_vbeln.
Regards,
Sumit
‎2013 Aug 18 4:26 AM
Hi,
As others suggested first uncomment the parameter s_vbeln and try to pass the value for it.
And also i would like to add few points,
S_VBELN in the smatform is a paramater which can hold only one value,
S_VBELN in your driver program is a select-option which can hold multiple values.
So try passing the value s_vbeln-low.
If you want to pass select-option values do a little search on SCN you can find it.
Regards,
Anil.
‎2013 Aug 18 7:46 AM
Try this,
Create a structure ( through SE11) equal to the types used in your driver program:
i.e.,
TYPES:BEGIN OF ty_vbrp,
VBELN TYPE VBELN_VF,
POSNR TYPE POSNR_VF,
SGTXT TYPE SGTXT,
FKIMG TYPE FKIMG,
END OF TY_VBRP.
say ZSTRU:
Use this structure for data declaration both in driver program and SF interface.
-Jogeswara Rao K
‎2013 Aug 19 4:45 AM
Hi
In your program you are getting data to internal table it_vbrp via select options s_vbeln but in your smart form again you are referring s_vbeln.
Please create table type like ty_vbrp in SE11 and assign this in your smart form like
delete s_vbeln in your smart form.
TABLES:vbrp.
*
TYPES:BEGIN OF ty_vbrp,
VBELN TYPE VBELN_VF,
POSNR TYPE POSNR_VF,
SGTXT TYPE SGTXT,
FKIMG TYPE FKIMG,
END OF TY_VBRP.
data: wa_vbrp type ty_vbrp,
it_vbrp type standard table of ty_vbrp,
fm_name type rs38l_fnam.
selection-screen begin of block b1 with frame title text-001.
SELECT-OPTIONS:s_vbeln for vbrp-vbeln.
selection-screen end of block b1.
START-OF-SELECTION.
SELECT VBELN POSNR SGTXT FKIMG FROM vbrp into TABLE it_vbrp
WHERE vbeln IN s_vbeln.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSD_FORM'
* VARIANT = ' '
* DIRECT_CALL = fname
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
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 fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
s_vbeln = s_vbeln
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
it_vbrp = it_vbrp
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.