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

can it is possible to call two smartforms using single program.

Former Member
0 Likes
1,854

i am doing identification tag form. i wanted to display the output of program seperate for accepted qty. and rejected qty.By running program only one time.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,277

Hi Vikram,

Yes, you can call two separate Smartforms from the same print program.

Regards,

Saurabh

7 REPLIES 7
Read only

Former Member
0 Likes
1,277

Hi Vikram,

Yes it is possible to call multiple smartforms from a single driver program.

Consider the conditions for which you want to call a particular smartform and then use the corresponding smartform call.

Regards,

Ajay Kodali

Read only

Former Member
0 Likes
1,277

yes it is possible.In your driver program just pass the corresponding form name in the function "SSF_FUNCTION_MODULE_NAME"

Read only

Former Member
0 Likes
1,278

Hi Vikram,

Yes, you can call two separate Smartforms from the same print program.

Regards,

Saurabh

Read only

anversha_s
Active Contributor
0 Likes
1,277

hi vikram,

its possible using the below FM.

SSF_FUNCTION_MODULE_NAME - > Function module

rgds

anver

mark helpful answers

Read only

0 Likes
1,277

Call function module SSF_FUNCTION_MODULE_NAME . It returns the name of the generated function module:

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = '<form name>'

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

regards

<b>reward points for all the useful answers</b>

Read only

Former Member
0 Likes
1,277

Hello!

We made this code at a customer to call several different SAMRTFORMS from the printer program, like this.



* SmartForm from customizing table TNAPR
  IF NAST-LDEST <> 'ZEP2' and NAST-LDEST <> 'ZEPH'.
    LF_FORMNAME = TNAPR-SFORM.
  ELSE.
    IF NAST-KSCHL = 'LD00'.
      LF_FORMNAME = 'ZSMARTFORM1'.
    ELSEIF NAST-KSCHL = 'LD99'.
      LF_FORMNAME = 'ZSMARTFORM2'.
    ELSE.
      LF_FORMNAME = TNAPR-SFORM.
    ENDIF.
  ENDIF.

...Additional program lines...

* determine smartform function module for delivery note
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
         EXPORTING  FORMNAME           = LF_FORMNAME
*                 variant            = ' '
*                 direct_call        = ' '
         IMPORTING  FM_NAME            = LF_FM_NAME
         EXCEPTIONS NO_FORM            = 1
                    NO_FUNCTION_MODULE = 2
                    OTHERS             = 3.
    IF SY-SUBRC <> 0.
*   error handling
      CF_RETCODE = SY-SUBRC.
      PERFORM PROTOCOL_UPDATE.
    ENDIF.
  ENDIF.

Regards

Tamá

Read only

Former Member
0 Likes
1,277

Thanks