2012 Jun 01 4:18 AM
Hi;
i´m trying to print a smartform instead the standard sapscript from tcode MB1C (SAPM07DR, ENTRY_WE03, WESCHEINVERS3), i've already read this threads:
http://scn.sap.com/thread/2046383
http://scn.sap.com/thread/1687764
http://scn.sap.com/message/8837868#8837868
what have we done to print the smarform:
1) in NACE, select application "ME", the message class is selected "WE03"
2) change program SAPM07DR for Z program ZSAPM07DR
3) left the same ENTRY_WE03 because it's inside the Z include ZM07DRENT
3) Change the INCLUDE M07DRENT to Z include ZM07DRENT inside the program ZSAPM07DR
4) inside the ZM07DRENT create the "PERFORM zlesen_wes" and create the SELECT to fill an internal table to pass to the smartform
5) from "FORM zlesen_wes" i call "PERFORM zwe03_ausgabe TABLES itab" where ITAB is the internal table to pass to the smartform
6) in "FORM zwe03_ausgabe TABLES itab" i call the smartform
in NACE i filled the fields "form PDF/smartform: ZSF_ENTRADAS" "cl. form: SMARTFORM" and cleaned the field FORM where was the name of the sapscript "WESCHEINVERS3".
in MB1C the checkbox "PRINT" is marked and "COLLECTIVE" too.
it suposses when click SAVE in tcode MB1C to print the smartform, but it doesn't print and doesn't display any message.
any help, thanks in advance.
David Fúnez
Tegucigalpa, Honduras
2012 Jun 01 5:14 AM
Hi, The output type 'WE03' has access sequence '0003' assigned in NACE configuration.
If you want to issue this output type, the condition records need to be maintained as per the access sequence.
Hope this helps.
2012 Jun 01 4:32 AM
Hi David,
Can you put a break point at the perform routine and see if it stop at that point or not.
And then check if its is calling the smartform or not.
If it is calling the smart form then check if FM for smartform is throwing any exception or not?
Regards
Sachin
2012 Jun 01 4:53 AM
i've already place a break-point inside the PERFORM zlesen_wes and the ENTRY_WE03 but it doesn't stops at the break-point when click SAVE.
2012 Jun 01 5:14 AM
Hi, The output type 'WE03' has access sequence '0003' assigned in NACE configuration.
If you want to issue this output type, the condition records need to be maintained as per the access sequence.
Hope this helps.
2012 Jun 01 5:34 AM
in the condition records the access sequence for 0003 is in the table in NACE, so what do i have to do with it, regenerate the sequence...?
2012 Jun 01 5:47 AM
Follow the below steps for maintaining condition records.
1. Open NACE transaction
2. Select application 'ME' and click on 'CONDITION RECORDS' button.
3. Double click on your output type 'WE03'.
4. Here, you need to enter the mandatory fields 'Trans/event type' & 'Print version' .
For ex: Trans/event type = WL
Print version = 3
5. After executing, a new screen is displayed where you need to maintain the condition records as per your requirement.
Output type is triggerred automatically based on the condition records maintained.
2012 Jun 01 6:41 AM
i've setup the conditions records for WE03 with ("WE" "3" "1") and i've setup the output device to local printer, but it still doesn´t print.
2012 Jun 01 8:55 AM
2012 Jun 01 9:05 PM
SOLVED..
First of all, i placed all the configurations described above with NACE.
MM consultant forgot to place the NDR parameter to my user in SU01, now i can print my smartform.
FYI:
1) create Z program from SAPM07DR
2) create Z include from M07DRENT inside the ZSAPM07DR:
INCLUDE: ZM07DRENT. "Entries für Druck
*INCLUDE: M07DRENT.
3) create inside ZM07DRENT:
FORM zentry_we03 USING ent_retco ent_screen.
xscreen = ent_screen.
CLEAR ent_retco.
CLEAR lgortsplit.
PERFORM zlesen_wes USING nast-objky lgortsplit.
ent_retco = retco.
ENDFORM.
*** here we place the SELECT for the data to pass it to the smartform
FORM zlesen_wes USING objky lgortsplit.
DATA: tmkpf TYPE TABLE OF mkpf.
nast_key = objky.
SELECT * FROM mkpf
INTO TABLE tmkpf
WHERE mblnr = nast_key-mblnr
AND mjahr = nast_key-mjahr.
PERFORM zwe03_ausgabe TABLES tmkpf.
ENDFORM.
*** here we call the smartform
FORM zwe03_ausgabe TABLES tmkpf. "USING lgortsplit.
DATA fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_MY_SMARTFORM'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION fm_name
TABLES
itab = tmkpf
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDFORM.
4) Remember in NACE for WE03 change the programs and place the smartform's name, create the CONDITION RECORD for WE03
I think that this will help people that has the same issue...
Thanks for you time vijaymadhur papabathini ....
David Fúnez
Tegucigalpa, Honduras