06-03-2014 10:46 AM
Dear Experts,
I need to copy the standard smartform to a customized one and make some changes and attach it. The already attached form is a PM_COMMON which is a script.
1. Is there any smarform, if yes then what?
2. How can I attach standard driver program with the customized form? Will it get attached automatically if the write customized smartform name in the form below?
Regards
Mani
06-03-2014 11:13 AM
Hi Mani,
if you create new smartfrom to replace exisiting PM_COMMAN then you can copy your driver program to custom and add smartform relevant code in your custom program.
As my suggestion , If you want to small change in layout then please copy your existing SAP Script and modify accordingly and pass subroutine if any code related changes are required.
and add the same in config.
Regards,
Prasenjit
06-03-2014 11:13 AM
Hi Mani,
if you create new smartfrom to replace exisiting PM_COMMAN then you can copy your driver program to custom and add smartform relevant code in your custom program.
As my suggestion , If you want to small change in layout then please copy your existing SAP Script and modify accordingly and pass subroutine if any code related changes are required.
and add the same in config.
Regards,
Prasenjit
06-03-2014 11:50 AM
Hi,
I appreciate your reply. I am not comfortable in SAP Scripts. Is there any BTE for this or any driver program to call smartform. Also the standard smartform?
If I want to do it using smartform, then I have to create from the scratch? I don't think converting script to smartform will work.
Regards
Mani
06-03-2014 12:08 PM
Hi Mani,
you can copy driver program RIPRCT00 to zRIPRCT00 something. and comment
PERFORM main_print. from this driver program. once you comment this Perform then your SAP script part will be disconnect from this.
you can add new perform after PERFORM order_data_import and add your SSF code here like below reference code.
-tdcopies = wworkpaper-tdcopies. " copies
lwa_outputop-tdnewid = wworkpaper-tdnewid. " new spool entry
lwa_outputop-tdimmed = wworkpaper-tdimmed. " immediately
lwa_outputop-tddelete = wworkpaper-tddelete. " delete after
lwa_outputop-tdcover = wworkpaper-tdcover. " cover page
lwa_outputop-tdcovtitle = wworkpaper-tdcovtitle. " title for cover
lwa_outputop-tdreceiver = wworkpaper-tdreceiver. " report to ->
lwa_outputop-tdarmod = wworkpaper-tdarmod. " Archive mode
lwa_outputop-tdtelenum = wworkpaper-tdtelenum.
lwa_outputop-tdteleland = wworkpaper-tdteleland.
IF NOT wworkpaper-print_lang IS INITIAL.
*... reset the default print_language with a specific language
*... if it was set in t390_u or set on the paper selection screen
print_language = wworkpaper-print_lang.
ELSE.
print_language = original_print_language.
ENDIF.
*... should a print record be written later.
IF device = c_screen
OR device = c_preview.
dont_log = yes.
ELSE.
dont_log = space.
ENDIF.
IF device = c_preview. " special print preview option
* itcpo-tdpreview = yes.
* itcpo-tdnoprint = yes. " no sneaky printing from SAPSCRIPT
lwa_outputop-tdnoprev = ''.
lwa_outputop-tdnoprint = 'X'.
ELSE.
* itcpo-tdpreview = space. " make sure preview is off otherwise
lwa_outputop-tdnoprev = 'X'.
ENDIF.
*$*$ ARCHIVE LINK
g_toa_dara_tab-function = c_dara. "archive function
g_toa_dara_tab-sap_object = archive_type. "Order or Notification
g_toa_dara_tab-ar_object = t390-ar_object. "arch object
g_toa_dara_tab-object_id = object_id. " order or notif number
g_toa_dara_tab-mandant = t390-mandt.
g_arc_params_tab-sap_object = archive_type. "Order or Notification
g_arc_params_tab-ar_object = t390-ar_object.
g_arc_params_tab-mandant = t390-mandt.
g_arc_params_tab-report = t390-abapname.
*-> SY fields not available in update task
g_arc_params_tab-arcuser = sy_uname.
g_arc_params_tab-datum = sy_datum.
lwa_ssfctrlop-no_dialog = 'X'.
lwa_ssfctrlop-preview = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lc_fname "'ZPMEU_MAINTN_JOB'
IMPORTING
fm_name = lw_fmname
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.
CALL FUNCTION lw_fmname
EXPORTING
archive_index = g_toa_dara_tab
archive_parameters = g_arc_params_tab
control_parameters = lwa_ssfctrlop
output_options = lwa_outputop
* USER_SETTINGS = 'X' "space'
caufvd = caufvd
riwo1 = riwo1
iloa = iloa
iviqmel = iviqmel "FSTS1628
TABLES
iaffhd = iaffhd
op_print_tab = op_print_tab
kbedp_tab = kbedp_tab
ihpad_tab = ihpad_tab
ihsg_tab = ihsg_tab
ihgns_tab = ihgns_tab
iafvgd = iafvgd
iripw0 = iripw0
iresbd = iresbd.
same reference code you can call in your samrtform.
Please try to this way for your development. It may be helpful for you.
Regards,
Prasenjit
06-03-2014 12:18 PM
Hi,
Thanks for the precious reply. First of all, please correct me the first statement. Its giving syntax error.
-tdcopies = wworkpaper-tdcopies. " copies
Secondly, in this case, I have to create my own smartform from the scratch. Anyway, still not an issue. Will do it.
Let me first try to attach the smartform with the driver program.
06-03-2014 12:22 PM
Hi,
Please find the attached screenshot:
I am getting syntax error.
06-03-2014 12:24 PM
06-03-2014 4:41 PM
06-04-2014 5:46 AM
Hi Mani,
I was added previously from other layout code but related to IW32.
you can add or modify your code according your need. you can collect all kind of data in driver prpgram and pass the same in the layout better you can debug your driver program and identify what kind of data need to be display in layout.
I think you can get all required data in existing PERFORM ORDER_DATA_IMPORT.
once you create your custom program and your samrtform, Please replace standard program and layout with new program& layout.
According your data you can do the design your smart forms.
Regards,
Prasenjit