Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Debugging Preview/Print in ME23N

JoseMunoz
Active Participant
0 Likes
5,669

Hi everyone,

I'm having problems with preview/printing a formular when I'm in transaction ME23N. I modified the standard program SAPFM06P to decide in witch language it would be shown.

I made the changes before function 'OPEN_FORM' and i export the language parameter.

My problem is that this goes well with preview, when I try to print, the program didn't arrives to that point. The problem didn't executes any OPEN_FORM function or some functions related with SapScript...

What's going on?

Thanks a lot

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,068

Hi,

You need to create the message for the print.

In ME22N,click the button Messages & attach the output type & its details & then do the printing.

Hi everyone,

I'm having problems with preview/printing a formular when I'm in transaction ME23N. I modified the standard program SAPFM06P to decide in witch language it would be shown.

I made the changes before function 'OPEN_FORM' and i export the language parameter.

My problem is that this goes well with preview, when I try to print, the program didn't arrives to that point. The problem didn't executes any OPEN_FORM function or some functions related with SapScript...

What's going on?

Thanks a lot

13 REPLIES 13
Read only

Former Member
0 Likes
4,069

Hi,

You need to create the message for the print.

In ME22N,click the button Messages & attach the output type & its details & then do the printing.

Read only

0 Likes
4,068

The message is created, I just print but the problem is that the changes I did in the source code doesn't take affect to the language of the formular printed...

Read only

0 Likes
4,068

Hi Jose,

Make sure that the program & script you changed is used for printing the PO.

check the program name & script in the table TNAPR first,for the output type you are trying to print.

Read only

0 Likes
4,068

Yes, there is an entry for my message/program/sapscript.

I confirmed that all is ok in NACE transaction.

Any other solution?

Thanks

Read only

0 Likes
4,068

Now try to put the break point at your changes & see whether the program is reaching that point.Due to some conditions ,it may not reach your new logic right.

Read only

0 Likes
4,068

SAPFM06P is the entry program which calls the function module to print the PO. The function module is ME_PRINT_PO or ZME_PRINT_PO. I assume that you must have copied the function group and modified.

Please check to make sure that the function group MEDRUCK(standard) or ZMEDRUCK(copied version) is fully activated.

If you copied/modified the function module, you must change the call to the function module in SAPFM06P to call ZME_PRINT_PO.

Regards,

Rich Heilman

Read only

0 Likes
4,068

I created the ZME_PRINT_PO, the ZMEDRUCK and all the calls. But I think that the problem isn't that, I create break-points to all calls of that functions and noone stops.

It's something like it generates de formular by other way...

Is that correct?

Read only

0 Likes
4,068

Did you directly modify the SAPFM06P program to call the Z version of ZME_PRINT_PO. Or did you copy the SAPFM06P and modify. If you copied and modified, then your program name is probablly SAPF<b>Z</b>M06P, if so, make sure that this is the program name in configuration

REgards,

Rich Heilman

Read only

0 Likes
4,068

Hi

- You have created a copy of program SAPFM06P and function group MEDRUCK and in ZAPFM06P replaced the call of std fms ME_READ_PO_FOR_PRINTING and ME_PRINT_PO with your ZME_READ_PO_FOR_PRINTING and ZME_PRINT_PO;

- You have updated the customizing for NEU message

Haven't you?

Now if it's so the call of fm OPEN_FORM is in routine prepare_formular at the beginning of ZME_PRINT_PO, so try to set a break-point before calling that form.

Max

Read only

0 Likes
4,068

Hi,

I copied the program to a ZSAPFM06P. In the routine I configured on NACE I call to ME_READ_PO_FOR_PRINTING, and my modified version of ME_PRINT_PO, ZME_PRINT_PO. All goes well when I preview the formular. When I print the formular it doesn't execute any of that functions...

It seems that it doesn't execute any of my code.

It's strange..

Read only

0 Likes
4,068

Hi

You should call your versio of ME_READ_PO_FOR_PRINTING (ZME_READ_PO_FOR_PRINTING I suppose) too.

Max

Read only

0 Likes
4,068

Problem solved.

When printing the debugging is disabled.

The error was in the source code and all my functions are executed.

Thanks to all

Read only

Former Member
0 Likes
4,068

Hello Jose,

You have copied the program SAPFM06P which is the main program which is executed for printing the PO. This program is copied as ZSAPFM06P and the same entry has been made in the customisation for message of PO.

Next the entry point in this program is also maintained in the customisation which is usually ENTRY_NEU and which I believe u have not changed. From this FORM the call to ME_READ_PO_FOR_PRINTING and ME_PRINT_PO or Z_PRINT_PO is made. Did u check if while printing an entry is made to the FORM routine?

Check the printing procedure it might just be skipping ur printing option altogather... Check through customisation. WHat is the status shown in PO when u go to messages section?