Skip to Content
0

PO preview get display again and again in ME22N

Nov 15, 2016 at 03:32 PM

114

avatar image

When I open PO and check print preview of PO, it get displayed.

But after displaying PO if I click on any button of PO like change, new, other PO, back, exit, Taxes, or tried to change tab in item details then also PO print preview screen gets displayed automatically. This happens only when PO print once displayed on screen. If print not displayed then this error not occurs.

Could you help to resolve this error in system ?

I am facing the same issue.

FCODE value is not correct.

getting same PREVOUTPUT instead of MEBACK FCODE value.

Please suggest.

Thanks,

Darshan

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

11 Answers

Jelena Perfiljeva
Nov 15, 2016 at 05:46 PM
0

Very much confused by this question... Who else is "facing the same issue"? Is this some kind of Jekyll & Hyde situation?

Anyway, for assistance with standard SAP transaction open an incident with SAP Support. You can also search in the Support Portal for existing notes (or use ANST transaction). If this is caused by some kind of customization / enhancement in your system then we don't know anything about it either.

Share
10 |10000 characters needed characters left characters exceeded
Darshan panchal Nov 16, 2016 at 07:54 AM
0

Hi Jelena,

Thank you for your reply.

I am facing this issue.

I debugged the scenario and found that FCODE value is not correct,

getting same PREVOUTPUT instead of MEBACK FCODE value.

It is a standard behavior.

Thanks,

Darshan

Share
10 |10000 characters needed characters left characters exceeded
max bianchi Nov 16, 2016 at 10:12 AM
0

Hi

You mean the FCODE has always the same value: PREVOUTPUT, don't you?

If it's so, of course it's not a standard behavior, but something has bad influence, I don't know if it's a bug in the standard (but it should be strange, because it's first time I read about this problem) or it's a custom modification (a user-exit or print routine)

Try to check where the FCODE gets the value PREVOUTPUT again by debug

Max

Share
10 |10000 characters needed characters left characters exceeded
max bianchi Nov 16, 2016 at 10:37 AM
0

Can you post where that call is?

In which include?

Share
10 |10000 characters needed characters left characters exceeded
Darshan panchal Nov 16, 2016 at 10:26 AM
0

Hi Max,

Thanks for your reply.

CALL METHOD fw->get_fcode
IMPORTING ex_fcode = fcode.

above method is putting incorrect value.

Share
10 |10000 characters needed characters left characters exceeded
max bianchi Nov 16, 2016 at 10:57 AM
0

Anyway, this is the PAI of main dynpro 14 (SAPLMEGUI

PROCESS AFTER INPUT.
MODULE GET_FCODE.
*
MODULE EVENT_PAI.
*
MODULE EVENT_PAI_SUBSCREEN.
CALL SUBSCREEN SUB0.
MODULE EVENT_PAI_POPSUBSCREEN.
*
module event_pai_finished.
MODULE FCODE_EXIT.
*odule test_tree.
MODULE CLEAR_OKCODE.

In the module GET_FCODE the ok-code is transfered to class CL_FRAMEWORK_MM

MODULE get_fcode INPUT.
  CALL METHOD cl_framework_mm=>get_instance
                 IMPORTING ex_instance = global_framework.

  CALL METHOD global_framework->set_fcode
            EXPORTING im_fcode = sy-ucomm.

  CLEAR ok-code.
ENDMODULE.

So the ok-code is stored in CL_FRAMEWORK_MM=>FCODE by method SET_FCODE, the method GET_FCODE returns the stored value

Share
10 |10000 characters needed characters left characters exceeded
Darshan panchal Nov 16, 2016 at 10:56 AM
0

Hello

In include LMEVIEWSF01

In this method, another method i.e.

CALL METHOD fw->get_fcode
IMPORTING ex_fcode = fcode. is called. in which fcode is filled.


ss.png (24.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Darshan panchal Nov 16, 2016 at 11:05 AM
0

Hi max,

Thanks for reply.

When I am pressing back button it is directly coming to MODULE FCODE_EXIT.

Not starting from MODULE GET_FCODE.

But when i see the preview and press cancel button or back button, it is starting from MODULE GET_FCODE.

Why it happening like that ??

Show 5 Share
10 |10000 characters needed characters left characters exceeded

In which dynpro?

0

in main dynpro 14 (SAPLMEGUI)

darshan

0

Very strange

module GET_FCODE is the first one, it can't skip it

0

Hi Max

Thank you for your time.

i dont knw why it is happening.

The small pop-up in which we select output-type was not coming for some PO's.

How to bring this small pop-up in all po's??

Other po's in which this small pop-up is coming are working fine. exiting correctly.

Thanks

Darshan

ss2.png (28.3 kB)
0

if you click print preview from the main window and you have several output messages then the user gets this pop-up to select the output which he wants to see in the preview.

You do not get this pop-up if you have only a single output message, since then SAP is able to decide by itself what it shall show

0
Darshan panchal Nov 16, 2016 at 11:14 AM
0

Hi Max,

what is the issue is,

I am pressing print preview and canceling the pop-up.

till this it is wrking fine. but if i want to close the tcode and go out it is not allowing.

control is again going to the driver program. because of incorrect fcode i.e. PREVOUTPUT.

this incorrect fcode is already available in method call view -> handle_event. as shown in above SS.

Share
10 |10000 characters needed characters left characters exceeded
max bianchi Nov 16, 2016 at 11:05 AM
0

Try to set a break-point in the following two methods of class CL_FRAMEWORK_MM:

  • SET_FCODE
  • GET_FCODE

Max

Share
10 |10000 characters needed characters left characters exceeded