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

Function Module for get data from mkpf mseg.

Former Member
0 Likes
3,313

Hi Experts,

In sap any function module to get data from mkpf and mseg

or BAPI module to get above details on posting date/ Plant/ storage location.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,693

Hi,

SELECT MBLNR

MJAHR

FROM MSEG

INTO TABLE I_MKPF

WHERE MBLNR IN S_MBLNR AND

MJAHR IN S_MJAHR.

IF I_MKPF IS NOT INITIAL.

SELECT * FROM MSEG INTO TABLE O_MSEG FOR ALL ENTRIES IN I_MKPF

WHERE MBLNR = I_MKPF-MBLNR

AND MJAHR = I_MKPF-MJAHR

AND MATNR IN I_MATNR

AND WERKS IN I_WERKS

AND LGORT IN I_LGORT.

ENDIF.

ALSO CHECK FM u2018/BEV2/ED_REA_MSEG_MKPFu2019.

Regards,

Deepa Kulkarni

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,693

Try [BAPI_GOODSMVT_GETITEMS|https://forums.sdn.sap.com/search.jspa?objID=c42&q=BAPI_GOODSMVT_GETITEMS].

Regards,

Raymond

Read only

Former Member
0 Likes
1,694

Hi,

SELECT MBLNR

MJAHR

FROM MSEG

INTO TABLE I_MKPF

WHERE MBLNR IN S_MBLNR AND

MJAHR IN S_MJAHR.

IF I_MKPF IS NOT INITIAL.

SELECT * FROM MSEG INTO TABLE O_MSEG FOR ALL ENTRIES IN I_MKPF

WHERE MBLNR = I_MKPF-MBLNR

AND MJAHR = I_MKPF-MJAHR

AND MATNR IN I_MATNR

AND WERKS IN I_WERKS

AND LGORT IN I_LGORT.

ENDIF.

ALSO CHECK FM u2018/BEV2/ED_REA_MSEG_MKPFu2019.

Regards,

Deepa Kulkarni

Read only

Former Member
0 Likes
1,693

hi,

you can use view

WB2_V_MKPF_MSEG2

chek tis link

Read only

Former Member
0 Likes
1,693

Hi

Look this FM FU_READ_MKPFMSEG

Regards

Gregory

Read only

Former Member
0 Likes
1,693

I HAVE BUILD OWN FM USING INNER JOIN QUERIES.