1. Preface
I started writing this blog (working title: „Appending tables in S/4HANA – easy! (or is it?)”) with the intention to shown (and try out) how under S/4HANA 1511 appending the tables MARA and MARC with customer fields show different levels of complexity. (Hint: MARA is the easy one!)
Then I noticed, that the first part of that (adding fields to MARA), might actually be worth a blog post on it’s own.
So while I have done the example under S/4HANA 1511 FPS02, I think it can be easily applied to Business Suite (on anyDB) as well.
I’m writing this in a “matter-of-fact”-style, but I’m actually hoping on some corrections, questioning of the reasons I take certain steps or criticism from the experts!
One last thing to note:
I chose not to over-simplify, imagining there is just SAP and the (End-)customer. Rather, I took the position of the IT of a large organization, rolling out it’s enhancements into different sub-organizations and therefore using their own Namespace (“/SOMETHING/”). Or a SAP-partner, who has similar things to consider (appends you create might have to be appended themselfs in another system/another organistaion, software logistics and so on).
So let’s start:
2. Appending MARA
We want some extra fields in MARA, so what we do is this:
SE11, MARA, Navigate to EMARA (the “Data Division” of MARA).
Click Append Structure and New Append.
- Create the append
- In that, create an include (it needs to have some field in it, that’s why you need a dummy field)
- Now, in that include you can add appends for the different products you have (don’t have different products yet? Well, maybe you will in the future?!).
- In those "2nd level"-Appends, finally add the fields you need.
- Set the enhancement category for all those appends/includes (I’m using the same one as EMARA has).
And this is how our MARA looks like now:
(Please note that I was sloppy with the two fields for this example: of course usually you would use data elements specifically created for this purpose.)
Conclusion:
Seems like a lot of effort, just for adding 2 fields on a SAP-Standard table, but as it is ever so often: investing some time to do things right™ at the start might save time and hassle during the whole lifetime of the extension.
Things to note:
- Use the right namespace, not only for the appends and includes, but also for the filed names!
-> note how I did not call the filed SOME_FLAG but /MYNAMESPACE/SOME_FLAG; SOME_FLAG is in SAPs namespace, so they might ship a filed with that name in the future.
- Don’t append MARA directly, but append EMARA instead. Honestly I don’t have a real good explanation here: someone told me once this is the right thing to do, and it made sense to me. I think it hast to do with EMARA being part of [something] (BAPIS? IDOCS?...), where MARA is not, and we want our fields to be available in [that something] as well.
As stated initially, I’m hoping for some comments and criticism!
Best
Joachim