Skip to Content

Extend Process Receivables (F0106) S/4 1709 (SP02)

Hi,

We are trying to enhance the "Process Receivables" (F0106) app for S/4 1709 (SP02)
( https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F0106')/S11OP )

The objective is to add several fields:

  1. into "Invoices Layout" (tab) - (BKPF- XREF1)
  2. into "Cleared items Layout" (tab) - BSEG-NEBTR, BSEG-WRBTR

The first approach was just to go to SEGW, create a new project and just use "Redefine OData Service (SAP GW).

- but the resulting "redefinition" of the service: FDMO_PROCESS_RECEIVABLES_SRV does not work and seems like the service itself designed in such a weird way that it cannot be redefined using SEGW.

Further digging helped to discover, that the service itself is like a Frankenstein of SADL on top of CDS and some custom ABAP code: the class CL_FDMO_PROC_REC_DPC has a set of entity-related methods:

  • CLEAREDITEMSET_GET_ENTITYSET
  • INVOICESET_GET_ENTITYSET

which all have just this code:

if_sadl_gw_dpc_util~get_dpc( )->get_entityset( EXPORTING io_tech_request_context = io_tech_request_context IMPORTING et_data = et_entityset es_response_context = es_response_context ).

which just envokes the if_sadl_gw_dpc_util~get_dpc( )~get_dpc() method with a code that just defines a long string variable with SADL xml in it... ???

Ok, from this text/xml:

| <sadl:dataSource type="CDS" name="ClearedItemSet" binding="I_ARLINEITEM" />| &
[...]
| <sadl:dataSource type="CDS" name="InvoiceSet" binding="FDM_COLL_INVOICES_VIEW"

I can get an idea, that, theoretically, I can try to enhance FDM_COLL_INVOICES_VIEW CDS, to add required fields. But the bad news is that FDM_COLL_INVOICES_VIEW CDS has aggregations in it and "GROUP BY" clause, which prevents it from enhancement: yes YOU CANNOT ENHCANCE CDS which has GROUP BY in it.

Ok, with implicit enhancement I was able to change the corresponding line of SADL definition to this:

| <sadl:dataSource type="CDS" name="InvoiceSet" binding="ZZFDM_COLL_INVOICES_VIEW"

and ZZFDM_COLL_INVOICES_VIEW is just a copy of FDM_COLL_INVOICES_VIEW from S/4 HANA 1809, which already has required XREF1 field.

I tried the same approach with the "ClearedItemsSet" (for the second tab) - but found myself on a dark side: implicitly enhancing the CL_FDMO_PROC_REC_MPC_EXT=>DEFINE and CL_FDMO_PROC_REC_DPC_EXT=>PREPARE_ALV because there is no logic for exposing enhanced/appended fields for the "ClearedItemsSet".

So, my question is: how can I enhance this "Process Receivables" (F0106) app?
Is it a bug that I cannot redefine oData service in SEGW? (Well, I can, but redefined and not-yet-enhanced oData service does not work the same way as the original FDMO_PROCESS_RECEIVABLES_SRV oData service).

Am I missing something?
Where the hell this SADL came from all of a sudden?
Is there a "right" way to enhance this kind of hybrid (CDS + SADL + ABAP code) apps?

How exactly the FDM_COLL_INVOICES_VIEW CDS is mapped using this SADL layer to the entity type FDMO_S_INVOICE_ALV_MD if they have different field names?

How exactly can I enhance and map I_ARLINEITEM CDS and map it to the entity type FDMO_S_CLEARED_ITEMS_ALV_MD if, again this two have absolutely different field names?

Any assistance highly appreciated =) Thanks!

Best regards, Ilia.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers