Skip to Content
0
Former Member
Sep 24, 2010 at 11:14 AM

Add New PO Header Screen Via BADI : ME_GUI_PO_CUST~SUBSCRIBE

428 Views

Hi All!

I am not able to See my SubScreen as part PO Header Screeen. It Seems the same is answerd many time but i Followed

the Same Steps and Still I Could not able to See. The Implemetation is getting Called But No Additional Tab Displayed.

As per My I Understanding , it is enough to Implement ME_GUI_PO_CUST~SUBSCRIBE accoring to Sample Code just see the

Subscreen without Implementing any other Methods.

method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE .

DATA: ls_subscriber LIKE LINE OF re_subscribers.

  • we want to add a customer subscreen on the item detail tab

CHECK im_application = 'PO'.

CHECK im_element = 'HEADER'.

*each line in re_subscribers generates a subscreen. We add one subscreen

*in this example

CLEAR re_subscribers[].

*the name is a unique identifier for the subscreen and defined in this

*class definition

ls_subscriber-name = subscreen1. "Decalred as Constant value PO_HEADER in theClass

  • the dynpro number to use

ls_subscriber-dynpro = '9001'. "SubScreen

  • the program where the dynpro can be found

ls_subscriber-program = 'SAPMZBADI_PO'. "Module Pool

  • each subscreen needs his own DDIC-Structure

ls_subscriber-struct_name = 'ZMEPO_BADI_PO'. "Refered by SubScreen

  • a label can be defined

ls_subscriber-label = text-001."PO_HEADER

  • the position within the tabstrib can be defined

ls_subscriber-position = 11."11th TAB

*the height of the screen can be defined here. Currently we suport two

*screen sizes:

  • value <= 7 a sevel line subscreen

  • value > 7 a 16 line subscreen

ls_subscriber-height = 7.

APPEND ls_subscriber TO re_subscribers.

endmethod.

-


Module Pool Prog

-


REPORT SAPMZBADI_PO .

  • persistent data

*DATA: gt_persistent_data TYPE SORTED TABLE OF mepo_badi_exampl

  • WITH UNIQUE KEY mandt ebeln ebelp,

*

  • actual data

  • gt_data TYPE SORTED TABLE OF mepo_badi_exampl

  • WITH UNIQUE KEY mandt ebeln ebelp.

  • DATA: call_subscreen TYPE sy-dynnr, "#EC NEEDED

    call_prog TYPE sy-repid, "#EC NEEDED

    call_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED

    call_view_stack TYPE REF TO cl_screen_view_mm OCCURS 0,"#EC NEEDED

    global_framework TYPE REF TO cl_framework_mm, "#EC NEEDED

    global_help_view TYPE REF TO cl_screen_view_mm, "#EC NEEDED

    global_help_prog TYPE sy-repid. "#EC NEEDED

    • dynpro output structure

    • definitions required for dynpro/framework integration

    DATA: ok-code TYPE sy-ucomm.

    *INCLUDE LMEVIEWSF01.

    TABLES ZMEPO_BADI_PO.

    *According to Some One Suggestion in the previous Posts

    FORM set_subscreen_and_prog USING dynnr TYPE sy-dynnr

    prog TYPE sy-repid

    view TYPE REF TO cl_screen_view_mm.

    call_subscreen = dynnr.

    call_prog = prog.

    call_view = view.

    ENDFORM.

    *Seems to be Optional

    MODULE event_pbo OUTPUT.

    CALL METHOD call_view->handle_event( 'PBO' ).

    ENDMODULE.

    *Seems to be Optional

    MODULE event_pai INPUT.

    CALL METHOD call_view->handle_event( 'PAI' ).

    ENDMODULE.

    -


    Finally Confirm , What are the Mandatory things to be Checked?

    Edited by: GaganRai on Sep 25, 2010 10:44 PM

    Edited by: GaganRai on Sep 25, 2010 10:44 PM