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

general

Former Member
0 Likes
713

i have created two tables ie zstudent and zstudentmarks and i have maintained data by using table maintanence generator if we want to combine the fields can we use only maintanence view (i know how to creat eusing database view)?if so how plz reply to me. points will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
693

hi,

maintainance views can used for a sigle table only.you cant use maintainainance views for two tables.

with regards,

suresh babu

5 REPLIES 5
Read only

Former Member
0 Likes
693

Hi,

for combining fields from more than one tables we can use database view also.but maintainance is not possible with database view.

rgds,

bharat.

Read only

Former Member
0 Likes
693

Correct me if I'm wrong: you want to create a custom view for the mentioned custom tables? If so, this can be done with SE11. Create a view then maintain it with short description, table selection and join definition.

Read only

Former Member
0 Likes
693

hi

good

go through this link ,this ll give you complete idea about the maintenance view,

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm

thanks

mrutyun^

Read only

Former Member
0 Likes
693

To combine the fields we can do some codings and do join the fields from two different tables .But we can't store the fields which is being joined in any table .But in maintainence view we can store the fields which is being joined from two tables .When we use the JOIN operation we can view the fields only in runtime which is being joined .

There are two types of joins:

Inner join

Outer join

When we use inner join,it is based on common fields from both tables . According to ur tables ,it will consider the studentid from student table and marks table,if there is a studentid (001) in student table and also in marks table ,then it will show the other corresponding fields ,related to that id .

Suppose if that id (001) is not present in the marks table ,then it will not display any of the related field for that id .

Ex: Create one table YCL_EMPPER with employee id ,name and another table YCL_EMPPAY with salary field .

REPORT YCL_SELECT_JOINS .

DATA: begin of wa_tab,

empid like YCL_EMPPer-empid,

name like YCL_EMPPER-name,

sal like YCL_EMPPAY-sal,

end of wa_tab,

it_tab like table of wa_tab.

select pempid pname q~sal into table it_tab

FROM YCL_EMPPER as p INNER JOIN YCL_EMPPAY as q

ON pempid = qempid.

loop at it_tab into wa_tab.

WRITE: / wa_tab-empid, wa_tab-name, wa_tab-sal.

endloop.

Read only

Former Member
0 Likes
694

hi,

maintainance views can used for a sigle table only.you cant use maintainainance views for two tables.

with regards,

suresh babu