08-21-2013 2:44 PM
Hi Experts,
Please let me know the initial set up and parameters to be passed to smartforms, so that i could archive the form generated?
I have no idea on how archiving is done.
Thanks in Advance,
Regards,
Sunil
09-03-2013 8:15 AM
Hello Sunil,
Below parameters need to be filled :-
Pass values to the following parameters while calling smart form in the Z program:
ARCHIVE_INDEX
ARCHIVE_INDEX_TAB
ARCHIVE_PARAMETERS
CONTROL_PARAMETERS
Check below code for reference:
l_control_param-device = ld_device.
l_control_param-no_dialog = 'X'.
l_control_param-preview = xscreen.
l_control_param-getotf = getotf.
l_control_param-langu = nast-spras.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
Also please go through the below link :
https://scn.sap.com/thread/1279622
Hope this will help you .
Thanks
Romit Raina
09-03-2013 7:53 AM
Thank You Resolved!!!!!
Define content repositories in transaction SPRO (sap netweaver->application server->basis service->archive link->basic customising)
Define document type.
Then create links using ( edit links under the same), here define the business object type, document type, CP)
Now use the function module ARCHIV_CREATE_OUTGOINGDOCUMENT
to archive.
In the smartform parameters make sure the below is done
control_parameters
-getotf = abap_true.
control_parameters-no_dialog = 'X'.
control_parameters-preview = 'X'.
09-03-2013 8:15 AM
Hello Sunil,
Below parameters need to be filled :-
Pass values to the following parameters while calling smart form in the Z program:
ARCHIVE_INDEX
ARCHIVE_INDEX_TAB
ARCHIVE_PARAMETERS
CONTROL_PARAMETERS
Check below code for reference:
l_control_param-device = ld_device.
l_control_param-no_dialog = 'X'.
l_control_param-preview = xscreen.
l_control_param-getotf = getotf.
l_control_param-langu = nast-spras.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
Also please go through the below link :
https://scn.sap.com/thread/1279622
Hope this will help you .
Thanks
Romit Raina
09-03-2013 9:04 AM
Thanks Romit,
Since i wanted to archive in PDF format, i have converted the otf format from smartform output to pdf using FM SX_OBJECT_CONVERT_OTF_PDF, then to Xstring using FM SCMS_BINARY_TO_XSTRING. After this i used the FM ARCHIV_CREATE_OUTGOINGDOCUMENT, passing the archive parameter, THIS worked.
.
09-03-2013 1:37 PM
Great Sunil.
If you have got your objective, can you please mark this thread as completed.
It would be good if we closed this thread.
Thanks Again!!!
Romit Raina