‎2006 Sep 20 3:58 PM
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
‎2006 Sep 20 4:06 PM
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
‎2006 Sep 20 3:59 PM
sorry please guide me how and where i nedd to pass parameters in FM
Regards,
Divya
‎2006 Sep 20 4:08 PM
I think you need to set the parameter in the structure
SSFCOMPOP-TDCOPIES for the number of copies
‎2006 Sep 20 4:06 PM
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
‎2006 Sep 20 4:07 PM
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.
‎2006 Sep 20 4:08 PM
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.
‎2006 Sep 20 4:10 PM
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^