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

problem with view

Former Member
0 Likes
2,720

Hi all, im having a problem with a view i created, this view has 2 tables and i have made the table/join conditions.

the problem is that when i try to run the view it is displaying all the values in all mandants, i dont know why this is happening...

i already tried to add the field mandt in my tab: table/joi conditions and select it as sy-mandt but its not working...

any body can help me out please? how do i restrict the view to only show me the values for the mandant that im working on?

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,071

does both tablse have mandt fields?

if yes..

in the join conditions.. add

TABLEA-MANDT = TABLEB-MANDT

11 REPLIES 11
Read only

Former Member
0 Likes
2,072

does both tablse have mandt fields?

if yes..

in the join conditions.. add

TABLEA-MANDT = TABLEB-MANDT

Read only

0 Likes
2,071

i also tried the join condition, but it keeps showing me all the values for all mandants, im working on mandand 100 (which is the mandant for development) and im getting values for mandants 110, and 120

Read only

0 Likes
2,071

Is it possible that you did not declare the MANDT key fields in the two tables properly? Did you use data element MANDT? If not, which one did you use? It is essential that the data type of the client field is CLNT.

Thomas

Read only

awin_prabhu
Active Contributor
0 Likes
2,071

Hi Pizza Girl,

'Table/Join Conditions' tab is used for selecting common fields in both the tables.

I think u have to give ur ur conditions for MANDT in 'Selection Conditions' tab like below.

Table1 MANDT EQ '011' AND

Table2 MANDT EQ '011'

But its not possible, because when u set a 'Selection Conditions' for field MANDT, system will throw below error

'Selection condition not permitted for client'

Thanks,

Read only

0 Likes
2,071

@SAP FAN,

you just need to bind the two mandt fields. no need of passing any value to it..

Read only

0 Likes
2,071

Hi Soumyaprakash Mishra,

I think problem is all common values getting displayed from all clients for table join on MANDT.

Its not about getting common values from two tables based on MANDT for a particular client.

Thanks,

Read only

0 Likes
2,071

MANDT is always taken care by SAP iteslf, no need to wwory about it.. you just need to bind.

tke some standard tabe/view examples

Read only

0 Likes
2,071

i tried to do this

ausp mandt eq '110' and

cabn mandr eq '110'

but when i try to activate it im getting an error saying that i can have selection for the field mandt

=(

Read only

Former Member
0 Likes
2,071

Hi Friend

What type of View you are creating ?

Please see the definition & purpose of different types of View in this link

[http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm]

if you are creating a database view or Maintaince View , then please do the Table maintaince generation . so that using the

table maintainence generator Events you can achevie your client /mandt data to display .

For table maintainance generator event implementing , please see this link

[https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=93454609]

or

you can try write abap program using the SAP Function Module, please see this link

[http://help-abap.blogspot.com/2008/09/capture-changed-content-after-fm.html]

Regards ,

Read only

0 Likes
2,071

The best way is you can define the constant value of your Mandt in the filter/constant tab in the view creation.

Regards,

Read only

Former Member
0 Likes
2,071

so, this is what i did,

in the tab table conditions i had to declare all the key fields in both tables, this way im still getting all values for all mandants, but they're not repeating.. 😃