on 01-18-2007 2:42 PM
i had written an smartform print program for goods return it is like this
i want my output to be triggered by t-code migo but i am not able to get the print out.
if i am executing the print program and giving purchase doc number it is showing me the print out.but through it is showing me the script or giving error no form routine entry_we01.
this is first time i am writting the print program for smartforms looking forward for your help.as this is urgent
please help me out
REPORT ZCS_GOODS.
*tables: mseg.
include zM07DRTOP.
data : begin of XEKPO occurs 0.
include structure EKPO .
data: end of XEKPO.
data : begin of xT157E occurs 0.
include structure T157E .
data: end of xT157E.
data : begin of xAM07M occurs 0.
include structure AM07M .
data: end of xAM07M.
data : begin of xMKPF occurs 0.
include structure MKPF .
data: end of xMKPF.
data : begin of xT159P occurs 0.
include structure T159P .
data: end of xT159P.
data : begin of xT001W occurs 0.
include structure T001W .
data: end of xT001W.
data : begin of xEKKO occurs 0.
include structure EKKO .
data: end of xEKKO.
data : begin of xT024 occurs 0.
include structure T024 .
data: end of xT024.
data: begin of xnast occurs 0.
include structure nast.
data: end of xnast.
data: fm_name type rs38l_fnam,
l_errtab type tsferror.
parameters: s_MBLNR like mseg-MBLNR.
PARAMETERS: p_form TYPE tdsfname OBLIGATORY DEFAULT 'ZCS_GOODSRECEIPT'.
select * from nast into TABLE xnast where kappl = 'ME' AND KSCHL = 'WE01'.
select * from mseg into table xmseg
WHERE MBLNR = S_MBLNR .
SELECT * FROM MKPF INTo TABLE xmkpf.
SELECT * FROM EKKO INTO TABLE XEKKO.
select * from ekpo into table xekpo.
loop at xmseg.
read table xmkpf with key mblnr = xmseg-mblnr.
read table xekko with key ebeln = xmseg-ebeln.
read table xekpo with key ebeln = xmseg-ebeln.
endloop.
form entry_we01 USING ent_retco ent_screen.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = P_FORM
importing fm_name = fm_name
exceptions no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
* error handling
message id sy-msgid type sy-msgty number
sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3
sy-msgv4.
endif.
*
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'
MSEG = XMSEG
EKPO = XEKPO
T157E = XT157E
AM07M = XAM07M
MKPF = XMKPF
T159P = XT159P
T001W = XT001W
EKKO = XEKKO
T024 = XT024
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
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.
* analyse internal error table of Smart Forms
call function 'SSF_READ_ERRORS'
importing
errortab = l_errtab.
if not l_errtab is initial.
* add your handling
endif.
Hi,
Did you set the print program and Form in SPRO (IMG).
If it is defined there for MIGO, I think your SF will work.
-Bansi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI bala,
You developed a Custome Smartform, it will give the output when you execute that Program, How come it is possible to give a output if you run MIGO transaction. for this you need to configure a output type and the need to do the config in NACE transaction code. this probebly do by the functional people.
if you still want to run this without the above once, then write a Exit over there to trigger this program, i mean write a User exit for the SAVE button, whenever the user press the SAVE button, trigger the user exit, under that exit, you need to write as 'SUBMIT PROGRAM <Program name and Return>'.
Regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bala,
have u configured ur print program and smartform and joined the same with the trnsaction in se93
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.