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

Why 'CLIENT SPECIFIED' doesn't works?

BergOff
Explorer
0 Likes
2,263

Hi, experts.
Why client specified doesn't work.
I'm sure that i'm having roles for updating values in system and that table is not initial.
When i try to remove WHERE statement - it's just getting a values from current system.

 

data : lt_tab type table of mara.
select  * from mara CLIENT SPECIFIED
      into CORRESPONDING FIELDS OF TABLE lt_tab
  where mandt = '500'.
write : '123'

 

Current mandt EGD - 300. I want to get values from EGP 500.
I think it's just ignores 'CLIENT SPECIFIED' for some reasons.

And sy-subrc = 4.
Here's trace

trace.jpg

5 REPLIES 5
Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
2,239

Hello @BergOff 

I don't think CLIENT SPECIFIED is ignored. Look at your trace. The last lines show variable value = 500, which is the client number you have specified in the query.

Best regards

Dominik Tylczynski

Read only

0 Likes
2,157

I would be having same value for the variable if i remove 'client specified'. It would be trying to find records with another mandt field, as i think it does now and just ignores 'client specified'. Sy-subrc = 4.

And as i told, if not to specify mandt field - it will collect data from current mandt not from all of them.

Read only

RobertVit
Active Contributor
0 Likes
2,168

Hi,

i think using client is missing

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm

 

Kind regards
Robert
Read only

RaymondGiuseppi
Active Contributor
2,141

Client specified will read data from current system for another client, not from another system

  • Don't expect to read data from system EGP client 500, but from current system EGD client 500. 
  • To read from another system consider RFC enabled FM such as RFC_READ_TABLE  
Read only

0 Likes
2,136

That's spot on! I've not noticed that OP wants to read from another system.