02-07-2005 1:04 PM
Hi all,
I want to implement a RFC-Call from one SAP-System to another (ABAP to ABAP) with the SAP standard function module GET_BACKUP_HISTORY_ADA. This uses the internal table BACKUP_HISTORY, which in turn refers to the table SDBAADAHIS. Unfortunately the width of fields in this table varies between different SAP Releases. So if I do the call e.g. from 6.20 to 4.6C I only get a "data-mess" back in my internal table.
I assume this is a rather general problem and there should be solution. Does anybody know?
thanks in advance
Richard
02-07-2005 1:45 PM
Hello Richard,
I don't know if there's a <i>standard</i> way to handle this kind of a situation, but I guess you can circumvent the problem by declaring an internal table with the structure as in the destination system and then use that internal table in the RFC.
Regards,
Anand Mandalika.
02-07-2005 2:19 PM
I would suggest to use structured string fields. An example will do the trick.
Let say you have a table from your FM. This table Z_SOME_TABLE contains the following fields
- key type char3
- some_struct type char 160
In this field you put all your data.
Then you read your FM and put the result in a work area. The you create a second wa which consists of the real structure od some_struct.
wa type z_some_struct. (=structure of Z_SOME_TABLE)
wb type realstructure (of some_struct).
loop at Z_SOME_TABLE into wa.
wb = wa-some_struct.
write wb-field1.
write wb-field2.
...
endloop.
02-07-2005 2:48 PM
Check these weblogs:
/people/thomas.jung3/blog/2004/06/23/bsp-150-a-developer146s-journal-part-iv-rfcs-and-the-bapi-browser
/people/thomas.jung3/blog/2004/06/24/bsp-150-a-developer146s-journal-part-v-xml-for-rfcs
Peter