Posted: Mon Oct 01, 2007 1:00 pm Post subject: Smartform print program for goods return
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>'.
Using transaction OMBO to assign Form and Output program.
Code:
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.
* 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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.