Application Development 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: 

What table is long text stored in for IA06

Former Member
0 Kudos

I am writing a program that reads in a file and makes a number of changes to the operation short text found in tasks (as found in IA06, PLPO-LTXAI).

When this text is longer than one line however it is stored elsewhere and I need to find what table and what the mapping is to this table such that i can make the updates.

Any help tracking this down would be appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Did you try activating an SQL trace in ST05. This is what I would do. 

Just before pressing the save button activate trace. After save, deactivate trace. Look for Update, Insert, Modify statements in the trace. Should give you an idea of the tables involved. Once you find the right table - Put a debugging point on the include where the code is present. You might be able to find the FM/subroutine to use from the call stack while debugging. 

Regards,

Shravan

10 REPLIES 10

Former Member
0 Kudos

Did you try activating an SQL trace in ST05. This is what I would do. 

Just before pressing the save button activate trace. After save, deactivate trace. Look for Update, Insert, Modify statements in the trace. Should give you an idea of the tables involved. Once you find the right table - Put a debugging point on the include where the code is present. You might be able to find the FM/subroutine to use from the call stack while debugging. 

Regards,

Shravan

0 Kudos

tried the trace, and there is a lot going on, but i cant seem to find my text. im wondering if its stored as raw bytes instead of asci or something...

0 Kudos

Yeah, agreed  there is a lot of information there and it may be stored in any format - so you may not exactly find your text. Look for update/insert/modify SQL statements - or may be your text name. If whatever it is you are doing is updating the database then it has to be present there.

Regards,

Shravan

0 Kudos

Don't update the SAPscript database tables directly (stxh,stxl). Use function module SAVE_TEXT instead, with the keys I indicated you.

0 Kudos

Hi Keith,

I just tried this on my system. The table getting updated for this is STXH - and yes I got it through ST05 . So you will have to use SAVE_TEXT. Just use below variables. TDNAME will change based on the line item and document number I guess. Debug some more - Put a break-point on FM SAVE_TEXT and see what is getting passed through. 

TDOBJECT
ROUTING
TDNAME

TDID
PLPO
TDSPRAS
E

Regards,

Shravan

0 Kudos

I found this:

http://stackoverflow.com/questions/2115170/how-to-decode-sap-text-from-from-stxl-clustd

Which actually explains why you can not edit directly, instead of just saying 'dont do it'. Based on that its going to have to be done via Read_Text and Save_text.

0 Kudos

It should be clear without mentioning to any developer: If there is an API for a function, this API should be used and not be bypassed by manipulating directly on the database level.

rdiger_plantiko2
Active Contributor
0 Kudos

Keith,

in PLPO-LXAI, you see the first lines of a SAPscript long text.

The long text can be read with function module READ_TEXT (like every SAPscript text).

A SAPscript text has four key parts - OBJECT, ID, NAME and LANGUAGE.

OBJECT and ID are from table TCA09.

The NAME key is composed of the fields PLNTY, PLNNR, PLNKN and ZAHL of table PLPO. See FM CP_TX_PROCESSING for the precise recipe how the NAME field is built from these data.

Hope this helps.

Rüdiger

0 Kudos

I need to be able to write an sql statement to update it, reading it through a FM is not the problem here.

0 Kudos

Hi Keith,

as far as I recall updates are done with FM SAVE_TEXT. It is in the same function group which Rüdiger has mentioned.

The function module have some detailed description in the function module / parameter documentation. Hope that helps.

Best regards

Thorsten