Application Development 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: 

PO preview get display again and again in ME22N

former_member219850
Participant
0 Kudos

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

17 REPLIES 17

Jelena
Active Contributor
0 Kudos

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.

former_member219850
Participant
0 Kudos

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

Former Member
0 Kudos

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

former_member219850
Participant
0 Kudos

Hi Max,

Thanks for your reply.

CALL METHOD fw->get_fcode
IMPORTING ex_fcode = fcode.

above method is putting incorrect value.

Former Member
0 Kudos

Can you post where that call is?

In which include?

former_member219850
Participant
0 Kudos

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.

Former Member
0 Kudos

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

former_member219850
Participant
0 Kudos

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 ??

0 Kudos

In which dynpro?

0 Kudos

in main dynpro 14 (SAPLMEGUI)

darshan

0 Kudos

Very strange

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

  • SET_FCODE
  • GET_FCODE

Max

former_member219850
Participant
0 Kudos

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.

Former Member
0 Kudos

Hi

As ModeratorJürgen L has written, if you PO has only one message, that popup is not called, so if you've the problem for the PO having only one message, I believe the issue is in the print program

Max

beyhan_meyrali
Active Contributor
0 Kudos

Hi,

Even after clear im_fcode, it remains PREVOUTPUT.

Create an enhancement on top of method and place the code.

if im_fcode eq 'PREVOUTPUT'.
im_fcode = sy-ucomm.
endif.