Importance of field MANDT in Custom SAP Table

It is important to use the field \’MANDT\’ when creating table because all information available in the table will only available in the specify MANDT only.

But the rule specify above is not applicable for cross clients tables, that is tables where we want the content to be available in all available clients. For example, the transaction code \’FILE\’ which uses a cross client table does not need the field \’MANDT\’ because the data must be available in all the clients.

Information:

If we need to retrieve data from another MANDT, we should specified the option \’CLIENT SPECIFIED\’ in the select statement.

REPORT demo_client_specified.

DATA wa TYPE scarr.

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

  SELECT  *
  INTO  wa
  FROM  (name) CLIENT SPECIFIED
  WHERE mandt = \'400\'. \'We are retrieving data from the client(MANDT)\"400\".

  WRITE: / wa-carrid, wa-carrname.

ENDSELECT.