Skip to Content

I recently wrote how I go about Appending MARA (adding custom fields) (in S/4HANA and elsewhere)- as this is kind of the prequel to this blog, you probably want to read it.

 

Now lets do something a little more complicated: Appending MBEW!

SE11, MBEW, Navigate to EMBEW, Append Structure….

 

Create an append, in it create an include with a dummy field.

 

Activate the include;

Activate the append.

 

But what is this? We get an error when activating the append!

 

2016-07-11 14_23_29-S4H_MBEW_error_Popup.jpg

 

Here’s the error:

2016-07-11 14_24_21-S4H (1)MBEW_Error_Log display.jpg

 

 

In SE11 everything looks just fine: the table is active, our field is there:

2016-07-11 17_14_40-S4H (3) se11_MBEW_Append_Field.jpg

 

 

But we had the error on activation, and we also can see that there’s a problem in the application e.g. when trying to call MEBW in SE16n, we get a dump:

2016-07-11 14_35_52-S4H (4) 100 MBEW_ Runtime Error - Description of Exception.jpg

 

So, what is to do now?

 

Note 2242679 kind of helps us on that topic, it tells us to create an EXTEND VIEW

 

But actually, I had to create as many as 4 extend views, just to get that 1 dummy field working (display it in SE16n) in MBEW:

 

extend view mbv_mbew_ext

extend view Mbv_Mbew_Basis

extend view mbv_mbew_case

extend view mbv_mbew

 

(I also noticed, that in the first two I had to give the tablename MBEW.[Fieldname], while in the last two just [Fieldname] worked ).

 

 

I did NOT have to use report NSDM_PROXY_SUBSTITUTION – after I created the 4 append-views, SE16n is working, and when checking MBEW in SE11 I get “No inconsistencies found” -> just like it should be.

 

 

Conclusion:

This really was a lot of work to do, just to add one filed – on the positive side, I think it hepled my understaning of the CDS-paradigm and how it is used in the S/4HANA data model a little.

 

Smal sidenote:

For appending MARC you just need 1 extend view, but there you do utilize report NSDM_PROXY_SUBSTITUTION. Maybe I write more about that some other day.

 

 

Have you already appended some tables or structures, and found strange behavior? Let us know about it!

 

Best

Joachim

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Horst Keller

    Seems that you stumbled over replacement objects (the term proxy object is also in use but rejected in STERM).

    Using Extras -> Proxy Object in SE11 you can find out whether a CDS view is replacing a database table. If this is the case, Open SQL accesses the CDS view instead of the table itself. That’s why after appending the table, you also have to EXTEND the view in order to match the corresponding requirements. In ABAP Release 7.50, the order of the columns in database table and replacement object have to be the same. In ABAP Release 7.51 at least this restriction is suspended.

    But I wouldn’t say that this is general for “Appending tables in S/4 HANA” and it isn’t the “CDS-paradigm” at all. Replacement objects should rather be an exception, where S/4 HANA application development has decided that it is feasible to use those instead of rewriting all the code in a way that the CDS views are accessed directly.

    Cheers

    Horst

    (1) 
    1. Joachim Rees Post author

      Thank you very much for your insight, Horst!

      I knew about the proxy object, and that I have to extend the respective CDS view (a colleague did it with MARC allready). 

      What really surprised me, is that in the case of MBEW I not only had I to extend mbv_mbew but another 3 CDS views it is build upon. Isn’t there an easier way?

      Good to learn that from NW 7.51 the order of the columns can be different, so we will then no longer need report NSDM_PROXY_SUBSTITUTION, I guess.

      Also good that you point out that equipping a table with a proxy object is a design decision to be able to have old code work without altering it (to much), and other decisions (rewriting the code to match the new data model e.g. MATDOC) could be taken in the future!

      What I meant to say with ” CDS-paradigm” is that a CDS-View (mbv_mbew) is build on top of another one (mbv_mbew) which again is build on top of yet  another one (mbv_mbew_basis) and so on.

      best

      Joachim

      (0) 
  2. SW KaoOat

    Hello,

    I need add some field in table ‘MARC’ but it’s error on SE16 / SE16N .

    but I don’t know how to create view, and how to run NSDM_PROXY_SUBSTITUTION.

    (0) 
      1. Ganimede Dignan

        Hi,

        have you already try to delete and append to MARC on a S/4 SP2 system?

        I’ve already add an append with 3 new custom fileds but I want also try to delete…

        Regards.

        (0) 
        1. Joachim Rees Post author

          Hi Ganimede,

          no, I have not tried to delete any appends in S/4HANA yet…

          What behaviour do you experience when trying?

          (I guess you also have to delete the extend view, to make it consisten again…)

          best

          Joachim

          (0) 
          1. Ganimede Dignan

            >(I guess you also have to delete the extend view, to make it consisten again…)

            but… from Hana or from ABAP DDIC?

            Because I see that if I delete the append from MARC table on SE11 the append’s fileds are deleted from MARC… but when I check NSDM_V_MARC view the append’s fields still exist

            (0) 
            1. Joachim Rees Post author

              Again, only guessing:

              – Delete the Append-View in SE11
              AND
              – Delete the Extend-View in Eclipse/AdT*.

              (*I don’t like to say “delete from HANA”, as I never had to log on to the HANA database directly. With (ABAP-)CDS-View, all is done in AdT (ABAP development Tools -> Eclipse)

              best
              Joachim

              (0) 
  3. James Jiang

    @Joachim Rees

    Hi.Joachim.  I have a requirement that Add custom field ZZCF to Table MSEG,Include CI_COBL in S/4HANA OP1511.

    When i preview mseg data in se16, the system dumped.
    Error:
    DBSQL_REDIRECT_INCONSISTENCY
    A table could not be redirected.

    I followed the note 2242679 – Redirect inconsistency – Proxy Substitution.
    but I can’t create an extend view.

    @AbapCatalog.sqlViewAppendName: 'ZADD_V'
    @EndUserText.label: 'ADD mesg'
    extend view NSDM_E_MSEG with ZADD_E {
        MATDOC.zzcf
    }
    

    The error is “View field ZZCF-NSDM_DDL_MSEG already exists in parent object(DDL source)”

    I confused, What should i do. Please help.
    Best regards.

    (0) 

Leave a Reply