Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Can't create a database view using MKPF & MSEG

jesse_ma
Product and Topic Expert
Product and Topic Expert
9,014

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

9 REPLIES 9
Read only

sdsunny372
Active Participant
7,960

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.

Read only

Sandra_Rossi
Active Contributor
0 Likes
7,960

That should work without any problem, I can't tell why it doesn't work for you.

Read only

FredericGirod
Active Contributor
0 Likes
7,960

Check the standard view V_MKPF

You could compare all the tabs, especialy if you have set something in the Selection criteria tab

Read only

0 Likes
7,960

The V_MKPF view is redirected to replacement object NSDM_E_V_MKPF in S/4HANA.

Read only

0 Likes
7,960

it is not specify we are speaking about S/4 😉

Read only

vijay_hariharan
Contributor
0 Likes
7,960

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

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
7,960

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

Read only

jesse_ma
Product and Topic Expert
Product and Topic Expert
7,960

Yes, I am on S4H now and the view is working in ECC. you are right.

many thanks.

Read only

Huiying
Explorer
0 Likes
7,960

we can use the CDS view : nsdm_e_mseg & nsdm_e_mkpf