‎2007 Apr 10 9:10 PM
Hello SAPients!
I'm a little confused with a situation I have, I have to modify SAPScript MEDRUCK (ZMEDRUCK in fact) and print program SAPFM06P (ZSAPFM06P) I wanted to modify the ENTRY_NEU subroutine but there I can only see this 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.
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.
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.
endform.
-
According to the development standards for this project, the SAPScript should not have PERFORM sentences, all the processing and calculating functionality should be in the print program, does that mean I have to modify the Function modules? Do you know other way of doing it? What would you recommend?
Thanks
‎2007 Apr 10 9:13 PM
You will have to copy the entire standard program and make the changes.
Thanks,
SKJ
‎2007 Apr 10 9:15 PM
In reality, the print program that you mention is really just an "in between" driver, the actually printing goes on in the function group MEDRUCK or ZMEDRUCK. You must copy the function group MEDRUCK to a "Z" version called ZMEDRUCK, this will then allow you to copy the function modules within, one of wich being the ME_PRINT_PO function module, copy this into Z_ME_PRINT_PO. Now in this function module is where you will make you modifications. There are lot so includes in there where you will need to copy them as well and comment out the old include name and include the "Z" version. Also, you will need to change the call in the mentioned program above so that it calls the "Z" version of your print function module.
call function 'Z_ME_PRINT_PO' "<-- Like So
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.
endform.REgards,
Rich Heilman
‎2007 Apr 11 5:52 PM
Thanks for your reply, as always, very good information.
I have one more question: What would you say is the best way of changing all those includes and the calls?
‎2007 Apr 11 6:05 PM
‎2007 Apr 11 6:06 PM