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

question on SAP query

Former Member
0 Likes
712

i am working on sap query,

my requirement is:

there is already a sap query, where MARA tabel and MARC are mapped and are working fine.

i need to drag in one more table AEOI for the purpose of finding latest revision level.

in ususal report program we can find the revision level by sending matnr as OBJKT, objtyp as 41,

and out of the list we get, we sort in descending order of date to get the latest levesion level.

can some one suggest me how to do this in SAP query.

is there a place where i can simply put in my code to call the AEOI table and sort the out put.

please help.

i am working on sap query,

my requirement is:

there is already a sap query, where MARA tabel and MARC are mapped and are working fine.

i need to drag in one more table AEOI for the purpose of finding latest revision level.

in ususal report program we can find the revision level by sending matnr as OBJKT, objtyp as 41,

and out of the list we get, we sort in descending order of date to get the latest levesion level.

can some one suggest me how to do this in SAP query.

is there a place where i can simply put in my code to call the AEOI table and sort the out put.

please help.

5 REPLIES 5
Read only

Former Member
0 Likes
667

please help..

where should i put abap code in the query.

thanks.

Read only

naimesh_patel
Active Contributor
0 Likes
667

It seems to be complex for the query. You can add a new table AEOI and you can only select the records with OBJTYP = 41 (take this field in the selection screen and put 41 in that field to restrict it by 41) but the sorting on the date and selecting only the latest record it not possible.

If possible, create a report to replace this qurey.

Regards,

Naimesh Patel

Read only

0 Likes
667

hi naimesh,

thank you for the reply,

i have one more question,

when i checked the code behind query, i found there are select stmts etc.

can i go there and change the code to get my purpose work, in dev system, and then transport it to

prod system ,

is this a right procedure ?

Read only

0 Likes
667

Hi Sanjana,

Its better not to touch the standard sap generated program for the query, better choice would be copy the program to Z program and then make the changes what ever you require.

Then create the tcode for that zreport and execute it and you can transport it to other environments.

you can directly give the tcode to the process folks.

Read only

0 Likes
667

thank you naveen,

in sq02, i see an icon saying, code,

when i click it gives me space to code,

can i write code here,

if yes,

how can i make sure it is called just before the alv_display program is called.

thanks.