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

CLIENT SPECIFIED globally

Former Member
0 Kudos
824

Hi there,

Is there a way to specify a MANDT globally for all SELECT statements in the report?

Cheers,

Bart

5 REPLIES 5
Read only

Former Member
0 Kudos
413

Run it in that particular client.

Rob

Read only

Former Member
0 Kudos
413

SYST-MANDT (aka sy-mandt) is set globally at log on, and is inserted into the Native SQL generated by your SAP ABAP SELECT..WHERE statements. Generally, then, we don't use the CLIENT SPECIFIED addition, at least not without including an explicit value for the MANDT/CLIENT table in our where clause.

What are you trying to do, actually?

Read only

Former Member
0 Kudos
413

If i understand correctly, you are looking to fetch the data from another clients also with the same select statements. If so you can try below: CLIENT SPECIFIED

Below code copied from SAP HELP: http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb39c4358411d1829f0000e829fbfe/content.htm

REPORT demo_select_dynamic_database.

DATA wa TYPE scarr.

DATA name(10) TYPE c VALUE 'SCARR'.

SELECT  *
  INTO  wa
  FROM  (name) CLIENT SPECIFIED
  WHERE mandt = '000'.

  WRITE: / wa-carrid, wa-carrname.

ENDSELECT.

Read only

Former Member
0 Kudos
413

Hi,

I have test data on client 300 whereas I can write/edit reports only on client 200.

I know 2 things:

- I can use CLIENT SPECIFIED in SELECT to be able to put MANDT in WHERE clause

- I can be logged on two clients simultaneously and switch between windows

But I'm trying to make my life simpler. Instead of switching windows or adding MANDT=XXX to every SELECT clause I'd like to specify it globally for whole report and it would cause all selects to work on a specified client.

Edited by: Bartosz Bijak on Feb 8, 2010 3:56 PM

Read only

0 Kudos
413

It may not possible since you already have MANDT field inthe table from where you are trying to fetch the data.