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

smartform driver program error?

Former Member
0 Likes
2,595

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.

13 REPLIES 13
Read only

Former Member
0 Likes
2,443

Try passing the VBELN to S_VBELN.

Also you are not passing anything in the FM ????

Read only

Former Member
0 Likes
2,443

Hi,

whatever variable you have declared in the form interface of your smart form , pass those parameters to the second FM.

Regards,

Priyaranjan

Read only

Former Member
0 Likes
2,443

Please show me your smartform's interface

Read only

0 Likes
2,443

Read only

Former Member
0 Likes
2,443

your sf interface asking something for s_vbeln

Read only

SujeetMishra
Active Contributor
0 Likes
2,443

Hi,

Please pass s_vbeln and also pass control parameter and output option.

Regards,

Sujeet Mishra

Read only

Former Member
0 Likes
2,443

Hi,

Be sure to pass all mandatory parameter of your smartforms' interface when you're call the function module.

Martin

Read only

Former Member
0 Likes
2,443

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

Read only

venkateswaran_k
Active Contributor
0 Likes
2,443

In your call function fm_name  remove the * from s_vbeln  and

put  s_vbeln                    = s_vbeln

Read only

Former Member
0 Likes
2,443

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

Read only

anilkumar_kalkivai
Active Participant
0 Likes
2,443

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.

Read only

jogeswararao_kavala
Active Contributor
0 Likes
2,443

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

Read only

former_member209120
Active Contributor
0 Likes
2,443

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.