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

Runtime Error

Former Member
0 Likes
432

Hi Frds

Im displaying the material details based on Plant and Storage.

while executeing the program ,its taking too much time to select the material .

I hv put inner join for the table MARA,MARD,MAKT,MARC,MLGN. For displaying ROL,UOM,Warehouse,Material Code,Material Desc.,

This is my select statement ,pls correct my mistake.

SELECT MARAMATNR MARAMEINS

MAKT~MAKTX

MARC~MINBE

MARDWERKS MARDLGORT

MLGN~LGNUM

INTO CORRESPONDING FIELDS OF TABLE IMAT

FROM MARA INNER JOIN MAKT ON MAKTMATNR = MARAMATNR

INNER JOIN MARC ON MARCMATNR = MARAMATNR

INNER JOIN MARD ON MARDMATNR = MARAMATNR

INNER JOIN MLGN ON MLGNMATNR = MARAMATNR

WHERE MARA~MATNR IN MATERIAL AND

MARD~WERKS IN PLANT AND

MARD~LGORT IN STORAGE.

IF SY-SUBRC <> 0.

message 'No data Found for the selection ' type 'E'.

EXIT.

ENDIF.

Thanks

Pari

2 REPLIES 2
Read only

Former Member
0 Likes
409

Hi,

are you sure, that you have datas inside MLGN?

Regards

Nicole

Read only

Former Member
0 Likes
409

first u use inner join for 2 table MARA,MARD and then for other table use for all entries in i_mara_mard( join of 2 table nmara & mard)

it will solved ur problem and improve the performance also