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

fetch data..

Former Member
0 Likes
699

Is it possible to fetch data from client 100 to client 200.?

and can we see the program i.e; created in client 100 from client 200.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
677

Hi Sriram,

It is posssible using the RFC Concept.

Just refer it once.

Hope this resolves your query.

Reward all the helpful answers.

Regards

6 REPLIES 6
Read only

Former Member
0 Likes
678

Hi Sriram,

It is posssible using the RFC Concept.

Just refer it once.

Hope this resolves your query.

Reward all the helpful answers.

Regards

Read only

Former Member
0 Likes
677

Hi,

If the clients 100 and 200 both are in the same boxmeans in the DEV system, yes you can see the program in other client, if you create in one client.

because programs are client independent.

You can't simply fetch data from one client to other client,

You can use ALE or RFC like things to get data from one client to other.

Regards,

Anji

Read only

Former Member
0 Likes
677

hi

Is it possible to fetch data from client 100 to client 200.? <b>YES</b>

and can we see the program i.e; created in client 100 from client 200. <b>PROGRAM ARE CLIENT INDEPENDENT</b>

**Please reward suitable points***

With Regards

Navin Khedikar

Read only

Former Member
0 Likes
677

Hi

Yes it is possible.

You have to write WHERE condition 'MANDT = 200' in select query.

Thanks

sasmita

Read only

Former Member
0 Likes
677

I think you don't need to create a new function to do it, you can use the std fm RFC_READ_TABLE.

You can do it something like this:

DATA: T_OPTIONS LIKE STANDARD TABLE OF RFC_DB_OPT,
T_FIELDS LIKE STANDARD TABLE OF RFC_DB_FLD,
T_DATA LIKE STANDARD TABLE OF TAB512 WITH HEADER LINE.

DATA: WA TYPE REF TO DATA.

DATA: BEGIN OF MY_TABLES OCCURS 1,
TABNAME LIKE DD02L-TABNAME,
END OF MY_TABLES.


FIELD-SYMBOLS: <WA> TYPE ANY.



LOOP AT MY_TABLES.

CREATE DATA WA TYPE (MY_TABLES-TABNAME).
ASSIGN WA->* TO <WA>.

CALL FUNCTION 'RFC_READ_TABLE' DESTINATION ....
EXPORTING
QUERY_TABLE = MY_TABLES-TABNAME
* DELIMITER = ' '
* NO_DATA = ' '
* ROWSKIPS = 0
* ROWCOUNT = 0
TABLES
OPTIONS = T_OPTIONS
FIELDS = T_FIELDS
DATA = T_DATA
* EXCEPTIONS
* TABLE_NOT_AVAILABLE = 1
* TABLE_WITHOUT_DATA = 2
* OPTION_NOT_VALID = 3
* FIELD_NOT_VALID = 4
* NOT_AUTHORIZED = 5
* DATA_BUFFER_EXCEEDED = 6
* OTHERS = 7
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

LOOP AT T_DATA.
MOVE T_DATA TO <WA>.
UPDATE (MY_TABLES-TABNAME) FROM <WA>.
ENDLOOP.


ENDLOOP.

Read only

Former Member
0 Likes
677

Programs are client independent, so you can view the programs in any client onthe system. But the data selected in the clients will be different as different clients have different data.

Coming to the data transfer, yes it can be done. There are many way to do it, like RFCs, ALE/IDOCs, etc...