selecting data from MVKE

Hi,

I need to fetch the value of field MVGR3 from table MVKE for some MATNR.

I am using the FM "MVKE_READ_WITH_MATNR" to fetch the value for the field MVGR3 .

I have written something like this :

LOOP AT t_ltap INTO w_ltap.

CALL FUNCTION 'MVKE_READ_WITH_MATNR'

EXPORTING

matnr = w_ltap-matnr

TABLES

mvke_tab = t_mvgr3

EXCEPTIONS

not_found = 1

lock_on_mvke = 2

lock_system_error = 3

enqueue_mode_changed = 4

OTHERS = 5.

endloop.

t_ltap table contains values for material no.So looping at that tableIm fetcing the MVGR3 field for each matnr.

However when i run this FM explicityly in SE37,I can get the values for each material.However When i call the FM through my program ,i get the exception 1 ie. SY-SUBRC = 1.

How is this?Please help.

Thanks!

Archived discussions are read-only. Learn more about SAP Q&A.

Not what you were looking for? Ask a question on this topic