Skip to Content

PO preview get display again and again in ME22N

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

11 Answers

  • Nov 15, 2016 at 05:46 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 07:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 10:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 10:37 AM

    Can you post where that call is?

    In which include?

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 10:26 AM

    Hi Max,

    Thanks for your reply.

    CALL METHOD fw->get_fcode
    IMPORTING ex_fcode = fcode.

    above method is putting incorrect value.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 10:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 10:56 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2016 at 11:05 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Nov 16, 2016 at 11:14 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2016 at 11:05 AM

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

    • SET_FCODE
    • GET_FCODE

    Max

    Add comment
    10|10000 characters needed characters exceeded