‎2007 Oct 01 9:45 AM
Hi to everybody
I have a t-code AC01 service purchase request number..
In that , I have a field "LONG TEXT"...
if i enter some data into the Long Text, it directly goes to the database ,
so How to know the Database-Table and the field...
Can you tell me the ways to find out the database table and the field....
‎2007 Oct 01 9:46 AM
Place cursor on that field & click F1 button.
GOto Technical Settings.
‎2007 Oct 01 9:47 AM
hi..
Press F1 on the Field . See the Technical info. It may give the Table name/ Structure name and the Field name.
Another options is perform SQL Trace on this Tcode .
You will be able to trace the Tables which are updated.
reward if Helpful.
‎2007 Oct 03 1:11 PM
where should i pass the parameters for read_text
where should i write the code for read_text
‎2007 Oct 01 9:48 AM
Hi
put cursur on that field or on that text (LONG TEXT)
Press on F1 button then it will some inforamtion about that
in that above you will find some options
click on <b>Technical Discripti</b>on button then it will show from which table and which field it denotes in that table
table
field
thats all
<b>Reward if usefull</b>
‎2007 Oct 01 9:48 AM
long text doesn't stored in DB u have to pickup it using function module READ_TEXT.
reward if useful
‎2007 Oct 01 9:51 AM
table name ASMD
but I think you need to fetch data with READ_TEXT function module
Check in SE37
Rewards if useful........
Minal
‎2007 Oct 03 1:21 PM
where should i pass the parameters for read_text
where should i write the code for read_text
‎2007 Oct 01 9:54 AM
Hi Ashok,
Simply go to ST05 -> Activate Trace ->
Start your transaction , save long text.
Come back -> Deactivate Trace-> Display Trace
From First menu->Summerize by SQL statements.
Check TOBJ, you will get table.
To read you have to use READ_TEXT FM
Reward if useful!
‎2007 Oct 03 1:02 PM
THANKS FOR YOUR ANSWER
WHAT ARE THE PARAMETERS TO BE PASSED IN
READ_TEXT FUNCTION MODULE
WHERE TO WRITE THE FUNCTION MODULE READ_TEXT...
WHAT IS THE CODE TO BE WRITTEN IN READ_TEXT
‎2007 Oct 01 10:11 AM
hi,
long text doesnt have any field, place where u enter long text in ac01 ,above it there is t symbol, just double click it it takes u to script editor, its shows u text id,
language, tdname,object.
u had to pass this parametrs in to function module read_text to retrive, other wise, create_text to upload,
check this tables
The text is stored in table STXH/STXL
Keys:
TDID = 'LTXT'
TDPRAS = <language>
TDNAME = nr of the service
TDOBJECT = 'ASMD'.
check this code for uploading long text.
DATA: BEGIN OF itab OCCURS 0,
asnum LIKE asmd-asnum, " Service No
text(5000) TYPE c, " Long Text
END OF itab.
*DATA: itab1 LIKE itab OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF itab1 OCCURS 0,
asnum LIKE asmd-asnum, " Service No
sequ type i, " Text Sequence
text(5000) TYPE c, " Long Text
END OF itab1.
To create Long Text lines for CREATE_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for CREATE_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras. " Language
Constants
Object ID for Long Text of Service Master
CONSTANTS:c_best TYPE thead-tdid VALUE 'LTXT',
c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
for file splitting.
DATA: start TYPE i,
len TYPE i VALUE 92,
totlen TYPE i,
n TYPE i.
PARAMETERS p_file LIKE rlgrap-filename."input file
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start Of Selection
START-OF-SELECTION.
*To Upload Flat file
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = itab
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
LOOP AT itab.
itab1-asnum = itab-asnum.
CLEAR: totlen,n, start.
totlen = STRLEN( itab-text ).
n = totlen / len.
n = n + 1.
DO n TIMES.
itab1-text = itab-text+start(len).
itab1-sequ = sy-index.
start = start + len.
APPEND itab1.
ENDDO.
ENDLOOP.
delete itab1 where text is initial.
SORT itab1 BY asnum sequ.
LOOP AT itab1.
dt_lines-tdformat = '*'.
dt_lines-tdline = itab1-text.
APPEND dt_lines.
Call the Function Module to Create Text
AT END OF asnum.
dl_lan = sy-langu.
WRITE : / itab-asnum.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = itab1-asnum
IMPORTING
output = itab1-asnum.
MOVE itab1-asnum TO dl_name.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_best
flanguage = dl_lan
fname = dl_name
fobject = c_material
save_direct = 'X'
fformat = '*'
TABLES
flines = dt_lines
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Long Text Creation failed for Service No'(001),
itab1-asnum.
ELSE.
WRITE:/ 'Long Text Created Successfully for Service No'(002),
itab1-asnum.
ENDIF.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
regards
siva.
‎2007 Oct 01 1:22 PM
Thanks for your answer,
I got the Long-Text ,it is displaying in the smart-form print preview...
The issue now is :
in my service number Header data:
There are 5 item details...
There are 5 long-texts for 5 item details...
I am getting only one Long-text for all '5' item details...
so i need to seperate the long text for all the item details...
I should get differenet long-text for different item details...
please help me out....
‎2007 Oct 01 1:43 PM
Hi,
each service master long text has a text name, for e.g
for service no. 000000000000200011
the long text will have the text name : 000000000000200011
so for each item take the service number and put it in the 'variable_name' and in the text module you placed for long text instead of writing a static value write &variable_name&.
Khusro Habib
‎2007 Oct 03 12:09 PM
Okk Thank you,
We are also trying the same, but could not get the answer...
please explain in detailed procedure....
we could not get how to pass in variable name....
‎2007 Oct 03 1:11 PM
where should i pass the parameters for read_text
where should i write the code for read_text
‎2007 Oct 03 1:12 PM
where should i pass the parameters for read_text
where should i write the code for read_text
‎2007 Oct 03 1:20 PM
where should i pass the parameters for read_text
where should i write the code for the function-module read_text
‎2007 Oct 03 1:11 PM
Hi Ashok,
click on your text and in menu bar GOTO>HEADER.. u can find the object ID , obj name etc here, Alternatively u can use Tcode SE75 to find out these details
*reward and close thread if ur problem solved*