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

ABAP and PHP field table length problem

Former Member
0 Likes
352

Hi

I have SAPRFC and in ABAP I call FM from PHP but I have a problem with field INT2 and LCHAR in ABAP table.

I definied in SAP table:

MANDT: CHAR 3

ID: NUMC 11

LEN: INT2 5

QUEST LCHAR 4096

in PHP:

$fields = array(

array ('name'=>'MANDT','abap'=>'C','len'=>3,'dec'=>0),

array ('name'=>'ID','abap'=>'N','len'=>11,'dec'=>0),

array ('name'=>'LEN','abap'=>'I','len'=>5,'dec'=>0,"offset"=>14),

array ('name'=>'QUEST','abap'=>'C','len'=>4096,'dec'=>0,"offset"=>19)

);

in PHP var I have $table['QUEST'] = 'TEXT';

but ABAP FM return data from PHP like this:

itab-QUEST: '##TEXT'

I think that this bad chars '##' are affected probably bad length or offset in PHP array but I have combined many lengths

and nothing help resolve problem.

Edited by: Kosmo on Nov 6, 2009 8:29 PM

Edited by: Kosmo on Nov 6, 2009 8:30 PM

1 REPLY 1
Read only

johna69
Product and Topic Expert
Product and Topic Expert
0 Likes
320

Hi Kosmo,

this may have been better posted in the PHP scripting forum .

The first thing I would check is that you are using matching PHPRFC libraries and system when it comes to unicode. If they do not match you see problems like this.

Cheers

JohnA