Tuesday, May 21, 2024

Create manual Transition Code in SAP

With tcode RE_RHMOVE30 you can create a request and transport them.

All you have to do is to choose the plan version, object types, objects. If you want all relations to be transported you can write A* in field evaluation path but if you want you can transport specific relations.

Select transport objects box.

In field task you can press f4 and then you can create a new request for the transport. After this press F8.

There will be a new screen. In this screen select the objects to be transported and then press F8.

After that you will release the request and transport it to the other system via using SE09 and STMS 

How to Create Project in SAP Fiori to Migrate data

SAP S/4HANA Migration Cockpit Transport concept between Directly from SAP vs staging tables

LTMC deprecated and moved to Fiori successfully.

please check updates here about LTMC different versions:

SAP Data Migration – SAP LTMC and LTMOM / LSMW vs LTMC:

https://blogs.sap.com/2021/08/08/sap-data-migration-sap-ltmc-and-ltmom-lsmw-vs-ltmc/

Migrate your data – Fiori / LTMC / Migration cockpit Decommissioned? or replaced?

https://blogs.sap.com/2021/08/15/ltmc-migration-cockpit-decommissioned-or-replaced/

Migrate your Data – Migration Cockpit / LTMC on SAP Fiori

https://blogs.sap.com/2021/09/26/migrate-your-data-migration-cockpit-ltmc-on-sap-fiori/

 

Before 2020 version, the transport is based on export and import between clients and environments.

Now with SAP S/4HANA, 2020 release SAP has bought Transport Concept into Migration Tools.

Transport concept for 2 different ways

·        

    • SAP S/4HANA Migration Cockpit – Migrate Data Directly From SAP
    • SAP S/4HANA Migration Cockpit – Migrate Data Using Staging Tables

1. Transport Concept, SAP S/4HANA Migration Cockpit – Migrate Data Directly From SAP

  1. The transport functionality used in the migration cockpit is designed to transport from one system to another.
  2. Introduced with SAP S/4HANA 2020.
  3. You assign a development package while creating a project (SAP Fiori app). Note that it is not possible to change this assignment later.
  4. You have the possibility to add projects, migration objects, and rules to a transport request in transaction LTMOM.
  5. It is not possible to create or edit projects in non-modifiable systems, they can only be executed. Usually, non-modifiable systems are quality and production systems.


LTMC

Allowed Activities in DEV and QAS/PRD Systems:



Allowed Activities in DEV and QAS/PRD Systems

 

Allowed Activities in DEV and QAS/PRD – Details



Allowed Activities in DEV and QAS/PRD – Details

Transport Between Clients:

The SAP S/4HANA migration cockpit does not support transaction SCC1 or
SCC1N for transporting content from one client to another.

If you want to distribute a project within a system from one client to another, e.g. for testing purposes, proceed as follows :
1. Create transport in client A. You can use category “Workbench” or “Transport of copies”.
2. Add relevant project to the transport (see function in transaction LTMOM).
3. Inform the system administrator to release the transport request in client A.
4. Ask the system administrator to import the transport request manually in client B (e.g. via transaction STMS).

 

System Modifiability:

Connected to the transport functionality (since 2020), configuration is only possible in modifiable environments. This includes
project creation, adding a migration object to a project and all configurations in the migration object modeler (LTMOM).

Projects can only be created with the following settings:
1. Changes must be permitted for objects in the system at global level, cross client level, and client-specific level.
2. The assigned development package must itself be assigned to a modifiable software component and a modifiable namespace.

Check for client-specific and cross-client object changes
in transaction SCC4


2. Check for general system change options => transaction SE06 (button “System Change Option”)



Check for general system change options – transaction SE06 (button System Change Option)

 

Now, lets discuss about Staging tables:

2. SAP S/4HANA Migration Cockpit – Migrate Data Using Staging Tables

  1. The transport functionality used in the migration cockpit is designed to transport content from one system to another.
  2. The functionality is available with SAP S/4HANA 2021 onwards for the approach Migrate Data Using Staging Tables.
  3. You assign a development package while creating a project (SAP Fiori app). This assignment cannot be changed later.
  4. You can add projects, migration objects, and rules to a transport request in transaction LTMOM.
  5. It is not possible to create or edit projects in non-modifiable systems, they can only be executed.
  • Instances already uploaded to the staging tables will not be transported.
    Only the definition of a rule, fixed value, translation object or variable is added to a transport request and transported. No values, for example mapping values, are included.

Transport Functionality (Migrate Data Using Staging Tables) Concept:



Transport Functionality (Migrate Data Using Staging Tables) Concept

Allowed activities in DEV and QAS/PRD systems:



Allowed activities in DEV and QAS/PRD systems

Allowed activities in DEV and QAS/PRD systems – Details:



Allowed activities in DEV and QAS/PRD systems – Details

 

System Modifiability (Migrate Data Using Staging Tables):

As of SAP S/4HANA 2020 configuration is only possible in modifiable environments.

This includes project creation, adding a migration object to a project and all configurations in the migration object modeler (LTMOM).

Projects can only be created with the following settings:
1. Changes must be permitted for objects in the system at global level, cross client level, and client-specific level.
2. As of SAP S/4HANA 2021, the assigned development package must itself be assigned to a modifiable software component and a modifiable namespace.

  1. Check for client-specific and cross-client object changes in transaction SCC4:



Check for client-specific and cross-client object changes

2. Check for general system change options in transaction SE06 (button “System Change Option”)



Check for general system change options in transaction SE06 (button System Change Option)

 

The conclusion is:

Overview About Options for Transferring Projects:



Conclusion Overview

 

 

Saturday, May 11, 2024

Nesting ALV / Linked Line Item report

 REPORT Ztest.


tablesekkoekpo.
type-poolsslis.

typesbegin of ty_ekko,
        ebeln 
type ekko-ebeln,
        bukrs 
type ekko-bukrs,
        lifnr 
type ekko-lifnr,
       
end of ty_ekko,

       
begin of ty_out_ekko,
        sel
,
        ebeln 
type ekko-ebeln,
        bukrs 
type ekko-bukrs,
        lifnr 
type ekko-lifnr,
       
end of ty_out_ekko,

       
begin of ty_ekpo,
         ebeln 
type ekpo-ebeln,
         ebelp 
type ekpo-ebelp,
         matnr 
type ekpo-matnr,
         werks 
type ekpo-werks,
         lgort 
type ekpo-lgort,
         menge 
type ekpo-menge,
         meins 
type ekpo-meins,
       
end of ty_ekpo,

       
begin of ty_out_ekpo,
         sel
,
         ebeln 
type ekko-ebeln,
         ebelp 
type ekpo-ebelp,
         matnr 
type ekpo-matnr,
         werks 
type ekpo-werks,
         lgort 
type ekpo-lgort,
         menge 
type ekpo-menge,
         meins 
type ekpo-meins,
       
end of ty_out_ekpo.

datawa_ekko type ty_ekko,
      wa_ekpo 
type ty_ekpo,
      it_ekko 
type standard table of ty_ekko,
      it_ekpo 
type standard table of ty_ekpo,

      wa_out_ekko 
type ty_out_ekko,
      wa_out_ekpo 
type ty_out_ekpo,
      it_out_ekko 
type standard table of ty_out_ekko,
      it_out_ekpo 
type standard table of ty_out_ekpo,

      wa_fcat_ekko 
type slis_fieldcat_alv,
      wa_fcat_ekpo 
type slis_fieldcat_alv,
      it_fcat_ekko 
type slis_t_fieldcat_alv,
      it_fcat_ekpo 
type slis_t_fieldcat_alv,

      wa_layout 
type slis_layout_alv,

      wa_top_ekko 
type slis_listheader,
      wa_top_ekpo 
type slis_listheader,
      it_top_ekko 
type slis_t_listheader,
      it_top_ekpo 
type slis_t_listheader,

      wa_event_ekko 
type slis_alv_event,
      wa_event_ekpo 
type slis_alv_event,
      it_event_ekko 
type slis_t_event,
      it_event_ekpo 
type slis_t_event,

      r_ucomm     
type sy-ucomm,
      rs_selfield 
type slis_selfield,
      v_selfield  
type slis_selfield-value,
      v_ebeln 
type ekko-ebeln,
      v_prog  
type sy-repid,
      v_name  
type sy-uname.

initialization.
  v_prog 
sy-repid.
  v_name 
sy-uname.

  
selection-screen begin of block b1 with frame title text-001.
  
select-options   s_ebeln for ekko-ebeln obligatory.
  
selection-screen end of block b1.

start-of-selection.
  
perform get_ekko.
  
perform fieldcat_ekko.
  
perform layout.
  
perform event_ekko.
  
perform grid_ekko.
  
perform ucomm_ekko using r_ucomm
                     
changing rs_selfield.

top-of-page.
  
perform top_ekko.

top-of-page during line-selection.
  
perform top_ekpo.

*&---------------------------------------------------------------------*
*&      Form  ucomm_ekko
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->R_UCOMM      text
*      -->RS_ESLFIELD  text
*----------------------------------------------------------------------*
form ucomm_ekko using    r_ucomm_ekko     type sy-ucomm
                
changing rs_selfield_ekko type slis_selfield.

  
case r_ucomm_ekko.
    
when '&IC1'.
      
if rs_selfield_ekko-fieldname 'EBELN'.
        
clear v_selfield.
        v_selfield 
rs_selfield_ekko-value.
        
perform conversion_po.
        
perform get_ekpo.
        
perform fieldcat_ekpo.
        
perform layout.
        
perform event_ekpo.
        
perform grid_ekpo.
        
perform ucomm_ekpo using r_ucomm
                           
changing rs_selfield.
      
else.
        
message 'Invalid Field' type 'S'.
      
endif.
  
endcase.
endform.                    "ucomm_ekko
*&---------------------------------------------------------------------*
*&      Form  GET_EKKO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form get_ekko .

  
refresh it_ekko.
  
select ebeln bukrs lifnr
    
from ekko into table it_ekko
    
where ebeln in s_ebeln.

  
if sy-subrc 0.
    
sort it_ekko by ebeln.
    
refresh it_out_ekko.

    
loop at it_ekko into wa_ekko.
      wa_out_ekko
-ebeln wa_ekko-ebeln.
      wa_out_ekko
-bukrs wa_ekko-bukrs.
      wa_out_ekko
-lifnr wa_ekko-lifnr.
      
append wa_out_ekko to it_out_ekko.
      
clearwa_out_ekkowa_ekko.
    
endloop.

  
else.
    
message 'Purchase Order doesn''t exist' type 'I'.
  
endif.

endform.                    " GET_EKKO
*&---------------------------------------------------------------------*
*&      Form  FIELDCAT_EKKO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form fieldcat_ekko .

  
clear wa_fcat_ekko.
  
refresh it_fcat_ekko.

  
if it_out_ekko is not initial.
    
data lv_col type i value 0.

    lv_col                 
+ lv_col.
    wa_fcat_ekko
-col_pos   lv_col.
    wa_fcat_ekko
-fieldname 'EBELN'.
    wa_fcat_ekko
-tabname   'IT_OUT_EKKO'.
    wa_fcat_ekko
-seltext_l 'Purchase Order'.
    
append wa_fcat_ekko to it_fcat_ekko.
    
clear wa_fcat_ekko.

    lv_col                 
+ lv_col.
    wa_fcat_ekko
-col_pos   lv_col.
    wa_fcat_ekko
-fieldname 'BUKRS'.
    wa_fcat_ekko
-tabname   'IT_OUT_EKKO'.
    wa_fcat_ekko
-seltext_l 'Company Code'.
    
append wa_fcat_ekko to it_fcat_ekko.
    
clear wa_fcat_ekko.

    lv_col                 
+ lv_col.
    wa_fcat_ekko
-col_pos   lv_col.
    wa_fcat_ekko
-fieldname 'LIFNR'.
    wa_fcat_ekko
-tabname   'IT_OUT_EKKO'.
    wa_fcat_ekko
-seltext_l 'Vendor'.
    
append wa_fcat_ekko to it_fcat_ekko.
    
clear wa_fcat_ekko.
  
endif.

endform.                    " FIELDCAT_EKKO
*&---------------------------------------------------------------------*
*&      Form  LAYOUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form layout .

  wa_layout
-zebra 'X'.
  wa_layout
-colwidth_optimize 'X'.
  wa_layout
-box_fieldname 'SEL'.

endform.                    " LAYOUT
*&---------------------------------------------------------------------*
*&      Form  EVENT_EKKO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form event_ekko .

  
refresh it_event_ekko.

  
call function 'REUSE_ALV_EVENTS_GET'
*  EXPORTING
*    I_LIST_TYPE           = 0
   
importing
     et_events             
it_event_ekko
   
exceptions
     list_type_wrong       
1
     
others                2.

  
if it_event_ekko is not initial.
    
clear wa_event_ekko.
    
read table it_event_ekko into wa_event_ekko
    
with key name 'USER_COMMAND'.

    
if sy-subrc 0.
      wa_event_ekko
-form 'UCOMM_EKKO'.
      
modify it_event_ekko from wa_event_ekko
      
index sy-tabix transporting form.
    
endif.

    
clear wa_event_ekko.
    
read table it_event_ekko into wa_event_ekko
    
with key name 'TOP_OF_PAGE'.

    
if sy-subrc 0.
      wa_event_ekko
-form 'TOP_EKKO'.
      
modify it_event_ekko from wa_event_ekko
      
index sy-tabix transporting form.
    
endif.
  
endif.

endform.                    " EVENT_EKKO
*&---------------------------------------------------------------------*
*&      Form  GRID_EKKO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form grid_ekko .

  
if    it_out_ekko is not initial
    
and it_fcat_ekko is not initial.

    
call function 'REUSE_ALV_LIST_DISPLAY'
     
exporting
*      I_INTERFACE_CHECK              = ' '
*      I_BYPASSING_BUFFER             =
*      I_BUFFER_ACTIVE                = ' '
       i_callback_program             
v_prog
*      i_callback_pf_status_set       = ' '
       i_callback_user_command        
'UCOMM_EKKO'
*      I_STRUCTURE_NAME               =
       is_layout                      
wa_layout
       it_fieldcat                    
it_fcat_ekko
*      IT_EXCLUDING                   =
*      IT_SPECIAL_GROUPS              =
*      IT_SORT                        =
*      IT_FILTER                      =
*      IS_SEL_HIDE                    =
*      I_DEFAULT                      = 'X'
*      I_SAVE                         = ' '
*      IS_VARIANT                     =
       it_events                      
it_event_ekko
*      IT_EVENT_EXIT                  =
*      IS_PRINT                       =
*      IS_REPREP_ID                   =
*      I_SCREEN_START_COLUMN          = 0
*      I_SCREEN_START_LINE            = 0
*      I_SCREEN_END_COLUMN            = 0
*      I_SCREEN_END_LINE              = 0
*      IR_SALV_LIST_ADAPTER           =
*      IT_EXCEPT_QINFO                =
*      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
*    IMPORTING
*      E_EXIT_CAUSED_BY_CALLER        =
*      ES_EXIT_CAUSED_BY_USER         =
     
tables
       t_outtab                       
it_out_ekko
     
exceptions
       program_error                  
1
       
others                         2.

  
endif.

endform.                    " GRID_EKKO
*&---------------------------------------------------------------------*
*&      Form  top_ekko
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form top_ekko.

  
clear wa_top_ekko.
  
refresh it_top_ekko.

  
data date type char12.

  
call function 'CONVERT_DATE_TO_EXTERNAL'
    
exporting
      date_internal            
sy-datum
    
importing
      date_external            
date
    
exceptions
      date_internal_is_invalid 
1
      
others                   2.

  wa_top_ekko
-typ 'H'.
  wa_top_ekko
-info 'Purchase Order Header'.
  
append wa_top_ekko to it_top_ekko.
  
clear wa_top_ekko.

  wa_top_ekko
-typ 'S'.
  wa_top_ekko
-info 'Report: '.
  
concatenate wa_top_ekko-info v_prog
  
into wa_top_ekko-info.
  
append wa_top_ekko to it_top_ekko.
  
clear wa_top_ekko.

  wa_top_ekko
-typ 'S'.
  wa_top_ekko
-info 'User Name: '.
  
concatenate wa_top_ekko-info v_name
  
into wa_top_ekko-info.
  
append wa_top_ekko to it_top_ekko.
  
clear wa_top_ekko.

  wa_top_ekko
-typ 'S'.
  wa_top_ekko
-info 'Date: '.
  
concatenate wa_top_ekko-info date
  
into wa_top_ekko-info.
  
append wa_top_ekko to it_top_ekko.
  
clear wa_top_ekko.

  
call function 'REUSE_ALV_COMMENTARY_WRITE'
    
exporting
      it_list_commentary       
it_top_ekko
*     I_LOGO                   =
*     I_END_OF_LIST_GRID       =
*     I_ALV_FORM               =
            
.

endform.                    "top_ekko
*&---------------------------------------------------------------------*
*&      Form  CONVERSION_PO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form conversion_po .

  
clear v_ebeln.

  
call function 'CONVERSION_EXIT_ALPHA_INPUT'
    
exporting
      
input  v_selfield
    
importing
      
output v_ebeln.

endform.                    " CONVERSION_PO
*&---------------------------------------------------------------------*
*&      Form  GET_EKPO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form get_ekpo .

  
if v_ebeln is not initial.
    
refresh it_ekpo.
    
select ebeln ebelp matnr werks lgort menge meins
      
from ekpo into table it_ekpo
      
where ebeln v_ebeln.

    
if sy-subrc 0.
      
sort it_ekpo by ebelp.
      
refresh it_out_ekpo.

      
loop at it_ekpo into wa_ekpo.
        
at new ebeln.
          wa_out_ekpo
-ebeln wa_ekpo-ebeln.
        
endat.
        wa_out_ekpo
-ebelp wa_ekpo-ebelp.
        wa_out_ekpo
-matnr wa_ekpo-matnr.
        wa_out_ekpo
-werks wa_ekpo-werks.
        wa_out_ekpo
-lgort wa_ekpo-lgort.
        wa_out_ekpo
-menge wa_ekpo-menge.
        wa_out_ekpo
-meins wa_ekpo-meins.
        
append wa_out_ekpo to it_out_ekpo.
        
clearwa_out_ekpowa_ekpo.
      
endloop.
    
endif.
  
endif.

endform.                    " GET_EKPO
*&---------------------------------------------------------------------*
*&      Form  FIELDCAT_EKPO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form fieldcat_ekpo .

  
clear wa_fcat_ekpo.
  
refresh it_fcat_ekpo.

  
if it_out_ekpo is not initial.
    
data lv_col type i value 0.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'EBELN'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'Purchase Order'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'EBELP'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'PO Item'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'MATNR'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'Material'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'WERKS'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'Plant'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'LGORT'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'Storage Location'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'MENGE'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'PO Quantity'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.

    lv_col                 
+ lv_col.
    wa_fcat_ekpo
-col_pos   lv_col.
    wa_fcat_ekpo
-fieldname 'MEINS'.
    wa_fcat_ekpo
-tabname   'IT_OUT_EKPO'.
    wa_fcat_ekpo
-seltext_l 'Unit of Measure'.
    
append wa_fcat_ekpo to it_fcat_ekpo.
    
clear wa_fcat_ekpo.
  
endif.

endform.                    " FIELDCAT_EKPO
*&---------------------------------------------------------------------*
*&      Form  EVENT_EKPO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form event_ekpo .

  
refresh it_event_ekpo.

  
call function 'REUSE_ALV_EVENTS_GET'
* EXPORTING
*   I_LIST_TYPE           = 0
   
importing
     et_events             
it_event_ekpo
   
exceptions
     list_type_wrong       
1
     
others                2.

  
if it_event_ekpo is not initial.
    
clear wa_event_ekpo.
    
read table it_event_ekpo into wa_event_ekpo
    
with key name 'USER_COMMAND'.

    
if sy-subrc 0.
      wa_event_ekpo
-form 'UCOMM_EKPO'.
      
modify it_event_ekpo from wa_event_ekpo
      
index sy-tabix transporting form.
    
endif.

    
clear wa_event_ekpo.
    
read table it_event_ekpo into wa_event_ekpo
    
with key name 'TOP_OF_PAGE'.

    
if sy-subrc 0.
      wa_event_ekpo
-form 'TOP_EKPO'.
      
modify it_event_ekpo from wa_event_ekpo
      
index sy-tabix transporting form.
    
endif.
  
endif.

endform.                    " EVENT_EKPO
*&---------------------------------------------------------------------*
*&      Form  GRID_EKPO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
form grid_ekpo .

  
if    it_out_ekpo is not initial
    
and it_fcat_ekpo is not initial.

    
call function 'REUSE_ALV_LIST_DISPLAY'
     
exporting
*      I_INTERFACE_CHECK              = ' '
*      I_BYPASSING_BUFFER             =
*      I_BUFFER_ACTIVE                = ' '
       i_callback_program             
v_prog
*      I_CALLBACK_PF_STATUS_SET       = ' '
       i_callback_user_command        
'UCOMM_EKPO'
*      I_STRUCTURE_NAME               =
       is_layout                      
wa_layout
       it_fieldcat                    
it_fcat_ekpo
*      IT_EXCLUDING                   =
*      IT_SPECIAL_GROUPS              =
*      IT_SORT                        =
*      IT_FILTER                      =
*      IS_SEL_HIDE                    =
*      I_DEFAULT                      = 'X'
*      I_SAVE                         = ' '
*      IS_VARIANT                     =
       it_events                      
it_event_ekpo
*      IT_EVENT_EXIT                  =
*      IS_PRINT                       =
*      IS_REPREP_ID                   =
*      I_SCREEN_START_COLUMN          = 0
*      I_SCREEN_START_LINE            = 0
*      I_SCREEN_END_COLUMN            = 0
*      I_SCREEN_END_LINE              = 0
*      IR_SALV_LIST_ADAPTER           =
*      IT_EXCEPT_QINFO                =
*      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
*    IMPORTING
*      E_EXIT_CAUSED_BY_CALLER        =
*      ES_EXIT_CAUSED_BY_USER         =
     
tables
       t_outtab                       
it_out_ekpo
     
exceptions
       program_error                  
1
       
others                         2.
  
endif.

endform.                    " GRID_EKPO

*&---------------------------------------------------------------------*
*&      Form  top_ekpo
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form top_ekpo.

  
clear wa_top_ekpo.
  
refresh it_top_ekpo.

  wa_top_ekpo
-typ 'H'.
  wa_top_ekpo
-info 'Purchase Order Item wise Display'.
  
append wa_top_ekpo to it_top_ekpo.
  
clear wa_top_ekpo.

  
call function 'REUSE_ALV_COMMENTARY_WRITE'
    
exporting
      it_list_commentary       
it_top_ekpo
*   I_LOGO                   =
*   I_END_OF_LIST_GRID       =
*   I_ALV_FORM               =
            
.

endform.                    "top_ekpo
*&---------------------------------------------------------------------*
*&      Form  UCOMM_EKPO
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_R_UCOM  text
*      <--P_RS_SELFIELD  text
*----------------------------------------------------------------------*
form ucomm_ekpo  using    r_ucomm_ekpo      type sy-ucomm
                 
changing rs_selfield_ekpo  type slis_selfield.

  
case r_ucomm_ekpo.
    
when '&IC1'.
      
if rs_selfield_ekpo-fieldname 'EBELN'.

        
set parameter id 'BES' field v_ebeln.
        
call transaction 'ME23N'.

      
else.
        
message 'Invalid Field' type 'S'.
      
endif.
  
endcase.


endform.                    " UCOMM_EKPO