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

Problem with RFC_READ_TABLE

Former Member
0 Likes
1,444

Hi Experts-

I am using the FM 'RFC_READ_TABLE' to read data from a table on CRM called 'CRMD_ORDERADM_I'. The field I am trying to select is 'HEADER'. The field is of the type '' and that is an ABAP type 'X' with a length of 16.

Everytime I run this FM, I am getting a truncated value back from the table. If the field in the table contains the value 'CFC6D923F005FB41A655CF81677C0F12', I am getting back the value 'CFC6D923F005FB41' in my RFC_READ_TABLE exporting table.

How can I fix this problem? Your help will be greatly appreciated.

Thanks,

- Vik.

1 ACCEPTED SOLUTION
Read only

juan_suros
Contributor
0 Likes
995

You can not get the result you want using FM RFC_READ_TABLE because the MOVE statement on line 188 of the FM's source code is converting your 16 byte hexadecimal field to a character field of length 32, and then outputting the first 16 characters only because the data dictionary tells it that is the length of the field.

The FM only pays attention to the FIELDS-FIELDNAME field, so you cannot override the length there ... The call to DDIF_FIELDINFO_GET sets the length of the output character field in table WA.

Looks like you are going to need a custom RFC function.

3 REPLIES 3
Read only

juan_suros
Contributor
0 Likes
996

You can not get the result you want using FM RFC_READ_TABLE because the MOVE statement on line 188 of the FM's source code is converting your 16 byte hexadecimal field to a character field of length 32, and then outputting the first 16 characters only because the data dictionary tells it that is the length of the field.

The FM only pays attention to the FIELDS-FIELDNAME field, so you cannot override the length there ... The call to DDIF_FIELDINFO_GET sets the length of the output character field in table WA.

Looks like you are going to need a custom RFC function.

Read only

0 Likes
995

Hi Juan-

Thank you for your informative response.

I noticed that it was a data type conversion issue.

Since this was a time critical issue, I went ahead and created a view on the CRM system that provisioned me the content in the format that I desired.

Thank you,

- Vik.

Read only

0 Likes
995

Hello vik,

How are you...

we are also trying to pull some hexadecimal format data from CRM. could you please give me some idea how you did that through views..

it will be very helpful to me.

Regards,

Ala.