cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Long Text with PHP

Former Member
0 Kudos

Hi Guys,

I've successfully used SAPRFC and RFC_READ_TABLE to fetch confirmation data from table AFRU and am trying to retrieve the associated long texts fom tables STXH and STXL.

However, I've discovered the actual texts are stored in Interchange Text Format (ITF) rather than plain text (table STXL, field CLUSTD).

On the systems I use, function module READ_TEXT is not remote-enabled, so it's not an option. I don't know of any other function modules that can read long text.

Does anyone know of an alternative function module for reading long text or has anyone developed a PHP function to convert ITF into plain text or have a link to the ITF spec so I can write one myself?

Thanks!

Jim

Edited by: Jim Wolfe on Jun 11, 2009 8:26 AM

Accepted Solutions (1)

Accepted Solutions (1)

Flavio
Active Contributor
0 Kudos

Hi Jim,

I have just tried with RFC_READ_TEXT (that is remote enabled) and it appeared to work.

With RFC_READ_TEXT, just pass

TDOBJECT as READ_TEXT-OBJECT

TDNAME as READ_TEXT-NAME

TDID as READ_TEXT-ID

TDSPRAS as READ_TEXT-LANGUAGE

Hope this could help.

Flavio

Former Member
0 Kudos

Hi Guys,

Sorry for the delayed reply. 'Just recently got back onto working through this.

I'd rather not create another FM if I don't have to.

(I read through Blag's SO10 "how to" with much interest. Very good PHP example.)

Fortunately, Flavio found the FM "RFC_READ_TEXT" which works very well.

Thanks,

Jim

Former Member
0 Kudos

Thaks Flavio, could you paste an php example ?

I found it sorry:

/people/flavio.ciotola3/blog/2005/12/08/sap-and-php-a-practical-example

Edited by: Miyagin on Nov 17, 2010 6:41 PM

Former Member
0 Kudos

mistake... sorry

Answers (1)

Answers (1)

former_member583013
Active Contributor
0 Kudos

Sorry to ask for this...but can't you just create an "Z" READ_TEXT?

[SO10 on PHP/SAP|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6416] [original link is broken] [original link is broken] [original link is broken];

Greetings,

Blag.

Edited by: Alvaro Tejada Galindo on Jun 11, 2009 10:28 AM (Forgot to put the link)...

Former Member
0 Kudos

Yes Jim,

- Create "Z" Function module.

- Pass the same parameters.

- Make it Remote Enabled.

Regards,

RH