‎2009 Jun 19 9:23 AM
Hello.
We have a big issue sending a string value via RFC.
We need to send some infotype data via RFC to the target system and what we do is encapsulate this data within a PRELP structure, just like this:
CALL METHOD cl_hr_pannnn_type_cast=>pannnn_to_prel_db
EXPORTING
pannnn = <fs_wa>
IMPORTING
prel_db = l_wa_prelp.
data: string type string.
string = l_wa_prelp.
and what we send via RFC is the string value...
The problem is the following: when we try to rebuild the structure with the data in the target system, all decimal values are set incorrectly, as if the string had been corrupted on the way there...
The wierdest thing is that we tried to test it with the same target system (DESTINATION 'NONE') and it worked! So we are thinking that it can be a coding issue, but we are not sure...
Is there any way to avoid this and make it work?
Thank you all.
Edited by: Miguel Ortega on Jun 19, 2009 11:05 AM
‎2009 Jun 19 10:30 AM
Hi Miguel,
CALL METHOD cl_hr_pannnn_type_cast=>pannnn_to_prel_db
EXPORTING
pannnn = <fs_wa>
IMPORTING
prel_db = l_wa_prelp.
data: string type string.
*string = l_wa_prelp.
Move l_wa_prelp to string. " Try thisI hope the variable in the receiving system is also having STRING data type. If not, then that could be the possible reason for corrupted data.
Would suggest to use declaration as follows in both system :-
data : lv_string(30) type c. " You may change the value depending on your requirementThanks,
Best regards,
Prashant
‎2009 Jun 19 10:58 AM
Hello.
We tried using char data types but still doesn't work well, in fact we started using string values because, char format was 'corrupted' during the RFC
Any ideas?