Wednesday 18 April 2018

S/4HANA Conversion – Error in display material Document by MIGO transaction

If the environment you are migrating from ECC to S / 4HANA has additional fields in the CI_COBL (coding block) include, you most likely have an error in the MIGO transaction. There are two paths to fix this error. One way would be to undo all CI_COBL configuration, but this is not always possible either because you still need the field in the S / 4 environment, or because it is more complex to undo the configuration.

The other solution is to follow the guidelines in note 2240878 – MM-IM: Add customer include CI_COBL to MATDOC. The note has all the steps to solve the problem, but the challenge is that it requires knowledge in some new SAP tools. The idea here is not to explain each of these new SAP solutions, but to show a very detailed step-by-step how to go about fixing the problem.

First we will show an image here with the dump that usually happens with this problem.

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

In agrement of SAP Note 2240878 the Reason and Prerequisites:

Background information:

The MM-IM data model in S/4HANA has been changed compared to ERP/SoH. Actual stock data will not be stored anymore in the former key figure material master data tables and the material document will not be stored anymore in the tables MKPF (header data) and MSEG (item data). Instead the single table MATDOC has been introduced which stores the material document and from which the actual stock data will be calculated on-the-fly because each material document is a change of stock.

Before to start to fix you need to check all these Pre-requisites:

1. SAP GUI installed in your workstation;
2. Full abap rights into the environment where you need to fix the error;
3. Eclipse or Hana studio installed in your workstation;
4. To install ADT (Abap Development Tools) into the Eclipse or Hana Studio (appendix 01)

Step 01 – To download and read the SAP note 2240878 – MM-IM: Add customer include CI_COBL to MATDOC

It’s very important to read this SAP note, because for each S/4 version has different way to solve the issue. Here I’ll talk about S/4HANA 1709 SP 01.

Step 02 – Run Eclipse

Step 03 – open or create a new project

Step 04 – Create a new Extension View (Like you can see here in the picture below)


SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Step 05 – select the option below (Core Data Services –>  Data Definition)

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Step 06 – Fill the fields with something like you can see below:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Step 07 – Select one change request or create a new one:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Select Next

Step 08 – Select Extend View:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Press “Finish”.

After Finish you’ll can see the screen as below:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Now you need to create this code (the example below is from the real case, because that some fields it is not look like exactly how I’m explaining here):

@AbapCatalog.sqlViewAppendName: 'Z_CI_COBL'
@EndUserText.label: 'Extension view for Append CI_COBL'
extend view nsdm_e_mseg with Zci_Cobl_Dll {
    zturno
}

In my scenario the field that is configured at Coding Block is only “ZTURNO”. You need to update with all fields that you have inserted into your coding blocking enhancement.

Just to double check below you can see some pictures:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

SPRO a Financial Accounting (New) -> Financial Accounting Global Settings (New) -> Ledgers  -> Fields àStandard Fields -> Customer Fields àEdit Coding Block

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Step 10 – SAVE (press right bottom)

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Step 11 – Activate (Press right bottom)

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

Now you can go to next step only after “ACTIVATE” you don’t have any error messages.

Step 12– In order to fix this we need to run program NSDM_PROXY_SUBSTITUTION

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP S/4HANA, SAP ABAP Learning

After run you need to see a log with all signs equal green. That means everything works well.

Now you can test again MIGO transaction.

1 comment: