cancel
Showing results for 
Search instead for 
Did you mean: 

Odata extension Fiori PO app -Adding table Headerdetails and populate in Header Information

Former Member
0 Kudos

Hi All,

We are extending the PO approval Fiori Apps, We want to add a table to Headerdetails ( PO revision History have 2 fields revision no and revision text) .

We have implemented BADI  . I am able to add fields to  structure and populate the values for individual fields  using the below details ..

METHOD if_gbapp_ex_apv_po_mdp~enhance_gw_service_entity_mdp.

DATA: lo_property TYPE REF TO /iwbep/if_mgw_OData_property.

IF iv_entity_type_name = 'HeaderDetail' OR iv_entity_type_name = 'WorkflowTask'.

lo_property = io_entity_type->create_property( iv_property_name = 'ZPurchasingGroup' iv_abap_fieldname = 'ZZEKGRP' ).

lo_property->set_nullable( abap_true ).

ENDIF.

ENDMETHOD.

But I did not find any details  to Crete Property for Tables in this Method for example complex  structure and table.   Example..

Added a structure or  table to structure GBAPPS_PO_HEADER_DETAILS_INCL .  Then How to Create Property for fields in the table or Structure ??

Thanks in Advance for your help.

Thanks,

DD

Tags edited by: Michael Appleby

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I had to modify the standard code of CL_GBAPP_APV_PO_MDP and CL_GBAPP_APV_PO_RDP in order to include the data from an internal table into HeaderDetails. I really doubt this is a standard approach but the give Enhancement spot GBAPP_APV_PO can be used only for relatively simple tasks over the OData model.

Good luck!

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Deepanker,

You can look at SAP code and learn. PO_ACC_HEADER_DETAIL is a good reference.

Class: CL_GBAPP_APV_PO_MDP

Method: DEFINE_ENTITY_HEADER_DETAILS

lr_complex_type = model->create_complex_type( 'HeaderInfo' )

...


Please share a solution when it works. You can write a blog.

Regards,

Masa

SAP Customer Experience Group - CEG


Former Member
0 Kudos

Hi Experts,

Please provide your Input..?

Thanks in Advance for your help.

DD