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

Regarding views

sreeramkumar_madisetty
Active Contributor
0 Likes
758

Hi Folks

I was developed a report and in that I am using the mara and makt tables.

Using the following I am fetching the data:

SELECT amatnr cwerks bmaktx bspras

amatkl amtart ameins aersda

INTO TABLE i_mara

FROM ( mara AS a INNER JOIN makt AS b

ON amatnr = bmatnr )

INNER JOIN marc AS c

ON amatnr = cmatnr

WHERE a~matnr IN s_matnr

AND a~matkl IN s_matkl

AND a~mtart IN s_mtart

AND a~ersda IN s_ersda

AND b~spras = 'EN'

AND c~werks IN s_werks.

But Client is not happy with the above statement's execution time so I need to reduce the execution time.

Can anyone help me that any Existed View is there for this purpose.

It's little bit urgent.

Regards,

Sreeram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
714

Would 'JPV_MAT_ORG' this help ?

4 REPLIES 4
Read only

Former Member
0 Likes
714

Hi,

You can use the statement by joining the tables MARA and MAKT. Later on based on the records you get select data from MARC table.

Split the select statement into two as below.

SELECT amatnr bmaktx b~spras

amatkl amtart ameins aersda

INTO TABLE i_mara

FROM mara AS a INNER JOIN makt AS b

ON amatnr = bmatnr

WHERE a~matnr IN s_matnr

AND a~matkl IN s_matkl

AND a~mtart IN s_mtart

AND a~ersda IN s_ersda

AND b~spras = 'EN'.

If not i_mara[] is initial.

select matnr

werks

from AMRC

into table i_marc

for all entries in i_mara

where matnr = i_mara-matnr.

endif.

Regards,

Ram

Reward points if helpful

Message was edited by:

Ram Mohan Naidu Thammineni

Read only

Former Member
0 Likes
715

Would 'JPV_MAT_ORG' this help ?

Read only

Former Member
0 Likes
714

use

V_MATNR or

V_MATNR_HU

regards

shiba dutta

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
714

Hi

It's Answered.