on 12-18-2008 1:53 AM
Hi,
I have developed Z smartform by copying from standard form and tried to call from standard program only but here I am not able to call my Z smartform and I am able to call only Z SAPSCRIPT from this standard program.
I have done all the necessary changes in NACE transaction but then also only when I keep the script name its working fine but when I replace this by smartform name the driver program is not calling smartform .!! why?
Please do let me know why is it like this?
Thanks
Sudharshan
Did you check in the driver Program is there a call for SMARTFORM.
Check for this FM in the driver program -
SSF_FUNCTION_MODULE_NAME
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
PO driver program is written to support only SAPSCRIPT. So if you want to assign smartform in NACE, you should take a Zcopy of the driver program SAPFM06P with its include FM06PE02 as ZFM06PE02. And give the zprogram against the driver program field in NACE.
Then you need to replace the entry_nue subroutine in ZFM06PE02 with the below code.
form entry_neu using ent_retco ent_screen.
data: l_druvo like t166k-druvo,
l_nast like nast,
l_from_memory,
l_doc type meein_purchase_doc_print.
* Data Declaration for PO smartform Modification
DATA: fname TYPE rs38l_fnam,
xkomk TYPE TABLE OF komk,
gs_output TYPE ssfcompop,
gs_dialog TYPE ssfctrlop.
clear ent_retco.
if nast-aende eq space.
l_druvo = '1'.
else.
l_druvo = '2'.
endif.
call function 'ME_READ_PO_FOR_PRINTING'
exporting
ix_nast = nast
ix_screen = ent_screen
importing
ex_retco = ent_retco
ex_nast = l_nast
doc = l_doc
changing
cx_druvo = l_druvo
cx_from_memory = l_from_memory.
check ent_retco eq 0.
IF tnapr-sform NE ' '.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = tnapr-sform
IMPORTING
fm_name = fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc EQ 0.
gs_dialog-no_dialog = 'X'.
gs_dialog-preview = 'X'.
gs_output-tddest = 'LP01'.
gs_output-tdnoprev = ' '.
gs_output-tdnoprint = ' '.
gs_output-tdimmed = 'X'.
gs_output-tdnewid = 'X'.
CALL FUNCTION fname " modify the interface as per your needs
EXPORTING
control_parameters = gs_dialog
output_options = gs_output
user_settings = ' '
zxekko = l_doc-xekko
zxpekko = l_doc-xpekko
TABLES
l_xekpo = l_doc-xekpo
l_xekpa = l_doc-xekpa
l_xpekpo = l_doc-xpekpo
l_xeket = l_doc-xeket
l_xtkomv = l_doc-xtkomv
l_xekkn = l_doc-xekkn
l_xekek = l_doc-xekek
l_xkomk = xkomk
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ELSE.
CALL FUNCTION 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
ENDIF.
ELSE.
CALL FUNCTION 'ME_PRINT_PO'
EXPORTING
ix_nast = l_nast
ix_druvo = l_druvo
doc = l_doc
ix_screen = ent_screen
ix_from_memory = l_from_memory
ix_toa_dara = toa_dara
ix_arc_params = arc_params
ix_fonam = tnapr-fonam "HW 214570
IMPORTING
ex_retco = ent_retco.
ENDIF.
endform.
While calling the smartform modify the fm interface to your needs.
This will solve your problem.
Regards
Karthik D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
create ur driver program by using these 2 standard includes which are used for PO smartforms
INCLUDE /SMB40/FM06TOP.
INCLUDE /SMB40/FM06PE02.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
first get Function Module name from 'Environment' tab in your Smartform than in your program call this Function Module name through 'Pattern' tab and give that name.
Follow this procedure..
hope it will work.
Regards:
Alok
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
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.