on 01-04-2010 5:33 AM
Hello All,
I am am calling the smartform FM in a loop and endloop.. i know it will give a performance problem, but i have no option left.. so.. how to get a single spool for the output.. as if it is in loop .. endloop there will be one spool for each loop pass. i dont want that..
please help me with a solution for this
Th
There is a example program calling smartform in loop and also print in 1 spool.
Check this program in SE38 "SF_EXAMPLE_03".
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your quick help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dont pass anything.just call these function modules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use function module SSF_OPEN before ur loop and after ur loop use SSF_CLOSE.
create a strucutr of type SSFCTRLOP.
fill it with SSFCTRLOP-NO_OPEN = 'X'.
SSFCTRLOP-NO_CLOSE = 'X'.
Pass it to the CONTROL_PARAMETERS of smartfrom of function module.
CONTROL_PARAMETERS = SSFCTRLOP.
it will generate the one spool request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have a field like new_spool_id ...
Set that to 'X' in the parameters.
You shall get a new spool for every call.
Thanks,
Bhupal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is the way i am calling the samrtform in a loop.. see the code and let me know how i can generate the single spool for multiple outputs
loop at pi_fackop into pwa_fackop.
function to call SMARTFORM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = cc_formname
IMPORTING
fm_name = l_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.
*Calling the smartform Function Module
break ramarajg.
CALL FUNCTION '/1BCDWB/SF00000156'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
wa_fackop = pwa_fackop
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
tables
i_facpos = pi_facpos1
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.
endloop.
Hi Abaper,
Check these links. You need to use the parameter 'CONTROL_PARAMETERS' of your function module '/1BCDWB/SF00000156'
Also from SAp Help:
http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm
You use these parameters to include several forms into one print request. When calling the generated functions modules, set the parameters as follows:
1st call: NO_OPEN = SPACE.
NO_CLOSE = 'X'.
nth call: NO_OPEN = 'X'.
NO_CLOSE = 'X'.
last call: NO_OPEN = 'X'.
NO_CLOSE = SPACE .
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Jan 4, 2010 10:06 AM
Hi ,
Check the parameters in the FM for the smartform .
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.