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

Former Member
0 Likes
731

Hi Experts,

I am doing custom print program and custom smart form.

my selection screen contains one parameter p_no_copies

here my doubt is how can we set or write code in se38 print program for that variable(no of copies to be print)

here when we enter no of copies in selection screen that many times samrt form will be printed

so plz help me on this

Regards,

Divya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

in the smartform's function module there wil be an exporting parameter for option of structure itcpo.

pass the number of copies to options-TDCOPIES

Regards,

ravi

6 REPLIES 6
Read only

Former Member
0 Likes
698

sorry please guide me how and where i nedd to pass parameters in FM

Regards,

Divya

Read only

0 Likes
698

I think you need to set the parameter in the structure

SSFCOMPOP-TDCOPIES for the number of copies

Read only

Former Member
0 Likes
699

in the smartform's function module there wil be an exporting parameter for option of structure itcpo.

pass the number of copies to options-TDCOPIES

Regards,

ravi

Read only

Former Member
0 Likes
698

as you are calling smartform Function module,

just say

P_NO IS your parameters

data : count type i.

while count <= p_no .
 count  = count + 1. <--these many times this will comes in to the loop.
 place total logic here....like calling the smartform function module etc.. here

endwhile.

Read only

Former Member
0 Likes
698

Hi

You can pass values to a smartform through Form Interface.

Regards,

Raj

For eg:

  • Fetch the name of the function module

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = 'ZSMART1'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

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.

Am passing MATNR, MAKTX and BATCH to smartform

  • Call the retrieved function module

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'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

P_MATNR = P_MATNR

V_MAKTX = V_MAKTX

P_BATCH = P_BATCH

  • TABLES

  • GS_MKPF = IT_INFO

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 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.

Read only

Former Member
0 Likes
698

hi

good

in the print program you have to declare the parameter statement,

the value that you r passing into the parameter must be storing in a variable, that variable you have to pass in the smartform using the FORM_INTERFACE tab.

you ll find out a function module after activating the function module from Environment->Function Module Name

that function module name you have to pass in your driver program.

thanks

mrutyun^