2021 Nov 23 3:50 AM
Hi ,
I created a database view using table MKPF & MSEG, the join condition is
MKPF-MANDT = MSEG-MANDT
MKPF-MBLNR = MSEG-MBLNR
MKPF-MJAHR = MSEG-MJAHR
but I can't get any records from this view, and there are a lot of records in both MKPF and MSEG.
then I created a new database view using MARA & MAKT, the condition is MARA-MATNR = MAKT-MATNR, this view is working well, I can get the records from this view.
so could you confirm that if I can't create a database view using MKPF & MSEG ?
thanks
Hi ,
I created a database view using table MKPF & MSEG, the join condition is
MKPF-MANDT = MSEG-MANDT
MKPF-MBLNR = MSEG-MBLNR
MKPF-MJAHR = MSEG-MJAHR
but I can't get any records from this view, and there are a lot of records in both MKPF and MSEG.
then I created a new database view using MARA & MAKT, the condition is MARA-MATNR = MAKT-MATNR, this view is working well, I can get the records from this view.
so could you confirm that if I can't create a database view using MKPF & MSEG ?
thanks
2021 Nov 23 5:57 AM
Hi Jesse,
I have created DB view using same joining key between MKPF and MSEG and it's working fine for me.
I am curious why data is not coming in your case.
2021 Nov 23 6:52 AM
That should work without any problem, I can't tell why it doesn't work for you.
2021 Nov 23 7:09 AM
Check the standard view V_MKPF
You could compare all the tabs, especialy if you have set something in the Selection criteria tab
2021 Nov 23 8:29 AM
2021 Nov 23 12:11 PM
2021 Nov 23 7:58 AM
Hello Jesse,
I am also unable to see any entries for the custom View created while the V_MKPF view mentioned by Frederic above displays value so i ran an ATC check and it looks like this maybe due to the migration to S/4 HANA.. You'll need to check if this is your issue as well atc-check-view.jpg
The check refers to SAP Note:
2206980 - Material Inventory Managment: change of data model in S/4HANA
https://launchpad.support.sap.com/#/notes/2206980
Certainly not sure but this is most likely the reason and the MATDOC table has now replaced MKPF/MSEG is what i could observe..
PS: For me BKPF, BSEG view is giving some Internal error.. not sure how that works(new table ACDOCA) for you and this doesn't..
Regards,
Vijay
2021 Nov 23 8:15 AM
Hello jesse.ma
I suppose you are already on S/4HANA. If so, MKPF and MSEG tables are no longer there, they are replaced with MATDOC table - that's one of the most significant change that S/4HANA brings. MKPF and MSEG are "simulated" with replacement objects i.e. CDS views NSDM_E_MKPF and NSDM_E_MSEG respectively. Therefore you can still use MKPF and MSEG in SELECT statements. However when you create a database view of MKPF and MSEG, it won't yield any result as the underlying MKPF and MSEG tables are just simulated, they are not there in the database.
See the note 2206980 - Material Inventory Managment: change of data model in S/4HANA
1.3.1 Customer views on MKPF/MSEG
Views are database objects and thus a view is executed on the database. Because the table MKPF and MSEG will not contain data anymore (except legacy data from migration) such a customer view will never return any record. Such views have to be either adjusted by fetching data from table MATDOC or to be created new as DDL source with a different name. In the last case all usages of the old DDIC SQL view must be replaced by the new CDS view.
Best regards
Dominik Tylczynski
2021 Nov 23 9:07 AM
Yes, I am on S4H now and the view is working in ECC. you are right.
many thanks.
2022 Aug 10 9:30 AM