cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot create Custom Fields for Material Document Header in S/4HANA Cloud Public Edition

LBONAR22
Explorer
0 Likes
315

Hi SAP Community,

We are working on an SAP S/4HANA Cloud Public Edition environment under SAP GROW, and we have encountered a limitation regarding Custom Fields at the Material Document Header level.

Our scenario:

We have a custom Fiori freestyle application that posts Material Documents via the I_MaterialDocumentTP RAP BO. In this application, the user enters an "Ingress ID" which is stored in the Reference Document / Material Document Header Text field (XBLNR / MaterialDocumentHeaderText). This Ingress ID is a key to a custom Z table that holds carrier/transport information (driver name, vehicle plate, tare weight, and gross weight). We need to display these four fields on an Adobe Form associated with the Material Document printout.

The problem:

To achieve this, we need to create four Custom Fields at the Material Document Header level so they can be populated during posting and later consumed by the Adobe Form. However, when we go to the Custom Fields app, the Business Context "Inventory Management: Material Document" (header level) is not available. We can only find "Inventory Management: Material Document Item", which only allows creating custom fields at the item level.

We also explored the available BAdIs:

  • MMIM_ITEM_PROVIDE_DATA — This BAdI works at the item level. We can successfully enrich item-level custom fields, but it does not give us access to header fields like the Reference Document or Header Text.
  • MMIM_HEAD_PROVIDE_DATA — This BAdI works at the header level and provides access to header data. However, since we cannot create custom fields at the header level (due to the missing Business Context), there is no target field to write the transport information to.

What we need:

We need a way to create custom fields at the Material Document Header level, or an alternative approach that allows us to store four carrier-related fields (transport name, driver, plate number, tare weight) at the header level so they can be consumed by an Adobe Form during the Material Document printout.

Our questions:

  1. Is the Business Context "Inventory Management: Material Document" (header level) planned for a future release? If so, which release or timeline?
  2. Is there an alternative extensibility approach to add custom fields to the Material Document Header in S/4HANA Cloud Public Edition while remaining Clean Core compliant?
  3. Has anyone faced a similar requirement and found a supported workaround?

Any guidance would be greatly appreciated. Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi LBONAR22,

This questioned sounded familiar, in doing some research, seems I answered it last year 🙂 

Add Custom Field in Material Document Header Level

In that answer, I suggested to the OP to file an influence request.

We also suggested to consider another object like Journal Entry, but in your case, maybe the delivery or delivery item?

In your case, could you make use of the Material Item and create your fields there.

How many Material Items do you typically have on the Material Doc? if you have typically 1, there is not much difference from having the field defined on the header.

You can use the BADI "MMIM_ITEM_PROVIDE_DATA" to update the custom fields. It also seems to have already the fields you need to reference (reference and header fields, etc.) to pull your data.

You want to modify the MMIM_GR_LABEL_E form correct? That form has the Item node, and the Custom Field can already populate there.

I hope this helps

Thank you

Jerry