How to store long text in db
Hello experts,
I want to store long text field into database using abap oops, any valuable inputs?
I guess i can use internal table and breakup lines to multiple lines, but not sure this would help, any suggestions?
Thanks in advance.
Viral
hii,
SELECT single tdtxtlines
from stxh
into v_textline
where tdid = 'Z01A'
and tdname = p_vbeln
and tdobject = 'VBBK'.
if v_textline ne 0.
L_NAME = P_VBELN.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'Z01A'
LANGUAGE = SY-LANGU
NAME = L_NAME
OBJECT = 'VBBK'
TABLES
LINES = IT_TLINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
ENDIF.
If you want continous text u can use Loop under this.
Regards,
Sridhar.V
Similar Messages
-
How to store long text in Rich Text Format in custom table
Hi
I have a requirement to store long text in the RTF in custom table.. Is this possible..
I am aware of a way to store them as Standard texts (SO10).. But not sure on if we can store them in tables..
Plz advise
Thanks
GeethaNot that familiar with RTF, but you could try and create a field of type (x)string in your table and store the data there.
-
How to store long text in transaction f-65
Hi all,
I need to add long text in the transaction f-65 for a particular document number. I have used the FM CREATE_TEXT. There are no errors but the text is not getting updated.
Pointers on this will be really helpful.
Regards,
PraveenNot that familiar with RTF, but you could try and create a field of type (x)string in your table and store the data there.
-
How to create Long Text in Module Pool Program
Hi all,
I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
Thanks & Regards
NirmalHai ,
here you have to use custom control, for this
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
1) Create custom control in your screen
2) CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT', "--> (this is custom control name in screen)
editor EXPORTING parent = container.
3) CALL METHOD editor->get_text_as_stream "This method reads data from custom control , inserts into itab 'text_tab'
IMPORTING
text = text_tab. "
READ TABLE text_tab INTO line INDEX 1. read the text into wa 'line'
if you want more clarity , see 'ABAPDOCU' >ABAP USER DIALOGS> COMPLEXSCREEN ELEMENTS--> DEMO CUSTOM_CONTROL -
How to print long text in scripts
plzzzzzzzzz answer this qestion
how to print long text in scriptsHi Kranthi,
You can create Text Id and include that in your script.
For example:
/E TEXT
/: INCLUDE ZTEXT OBJECT TEXT ID ST
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa -
Tcode FV50: How to find long text in FI Document line item Before Saving.
Hi,
How to find long text in FI Document line item.
During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
I would like to validate the Long Text Before Saving in user exit "U300" under the "Sunstitution" .
Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
Please give me the answer as soon as possible .
Note:- Read_Text function module is not useful. Because Read_text useful after saving document.Hi Amit,
In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
Just try to explore in your system how the other validations are maintained.
After you are done with all your code, you have to run the regeneration program RGUGBR00.
Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS & TRACE PROG. GENERATE CALLS .
Hope this make your doubt clear.
Regards
Abhii -
How to read long text in Document line item
Hi,
How to read long text in FI Document line item.Use Read_text function module.
you need to pass
ID
LANGUAGE
NAME
OBJECT to the function moduel
To find the Text id name language and object these are the following steps. Example: FB02
1. goto FB02, Enter Document number
2. from menuselect Goto>Header-->header Text..... New window will be displayed
3. select the Header Text. here you can see all the text.
4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper.
5. in the Next window you will find Text Name. Text ID, Language. etc...
Regards,
Lalit Mohan Gupta. -
How to insert long text data in oracle for LONG column type??
Anybody who can tell me what is best way to store long text (more than 8k) in Oralce table.
I am using Long datatype for column but it still doenst let me insert longer strings.
Also I am using ODP.Net.
Anybody with a good suggestion???
Thanks in advanceHi,
Are you getting an error? If so, what?
This works for me..
Greg
create table longtab(col1 varchar2(10), col2 long );
using System;
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
using System.Text;
public class longwrite
public static void Main()
// make a long string
StringBuilder sb = new StringBuilder();
for (int i=0;i<55000;i++)
sb.Append("a");
sb.Append("Z");
string indata = sb.ToString();
Console.WriteLine("string length is {0}",indata .Length);
// insert into database
OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
con.Open();
OracleCommand cmd = new OracleCommand();
cmd.CommandText = "insert into longtab values(1,:longparam)";
cmd.Connection = con;
OracleParameter longparam = new OracleParameter("longparam",OracleDbType.Long,indata .Length);
longparam.Direction = ParameterDirection.Input;
longparam.Value = indata ;
cmd.Parameters.Add(longparam);
cmd.ExecuteNonQuery();
Console.WriteLine("insert complete");
//now retrieve it
cmd.CommandText = "select rowid,col2 from longtab where col1 = 1";
OracleDataReader reader = cmd.ExecuteReader();
reader.Read();
string outdata = (string)reader.GetOracleString(1);
Console.WriteLine("string length is {0}",outdata.Length);
//Console.WriteLine("string is {0}",outdata);
reader.Close();
con.Close();
con.Close();
} -
How to use long texts in explanation tool tip?
Hi ,
Can anyone tell me how to add long text in Explanation tool tip?
I am able to use short OTR texts in explanation tool tip but not able to use long OTR texts.
Thanks and regards,
Vivek Shetty.For long text
method1
Create TEXT node- general attributes change text type to include text
then you can input text name/text object/text id/language
method2
create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
then use LOOP or TABLE node to display it
For TEXT module(For foreign language)
Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
then enter smartform Create TEXT node- general attributes change text type to text module
input the text module name which created by above
btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10 -
INSPECTIONPLAN_CREATE01: to store long text
Dear QM Gurus,
Here is my scenario:-
We have an external database which stores all the master inspection plans, master inspection characteristics and inspection methods. SAP QM is used to perform all the QM transactional data only. How we intend to bring the QM Master data over to QM is via BAPI or IDOC (not confirmed on the method yet)
We have a scenario whereby we need to replicate the test instructions from the external database into SAP master inspection characteristics. The test instructions are stored under the test plans in the external database. In INSPECTIONPLAN_CREATE01, we need to set the CHA_MASTER_IMPORT_MODUS = N - meaning we will not refer to the inspection characteristics into the inspection plan. Why? - because each inspection characteristics defers from each material in each plant. Thus we are not allowed to copy all the values from the inspection characteristics into the inspection plan in SAP
Is there a way for us to store the test instructions in the SAP inspection plan without copying over from the inspection characteristics via BAPI?
Please do let me know if the situation is unclear.Dear Lyn
By using BAPI_INSPECTIONPLAN_CREATE you can create long texts in the header of the inspection , at the operation level Inspection plan header or at the Inspection characteristics level.
Suppose you need to put the text in the Header of the inspection plan, Please follow the below steps
1) In the TEXTALLOCATION - a) maintain object Type as 10 . These are the other option available for you
10" Inspection plan header
"13" Operation
"15" Reference for reference operation set
"17" Production resource/tool
"19" Inspection characteristics
b) maintain the language & LINE_FROM and LINE_TO
The attributes LINE_FROM and LINE_TO are pointers to the corresponding text table, in which the current long text lines are to be transferred. LINE_FROM defines the first line of the long text. LINE_TO represents the last line.
2) in the TEXT field of the BAPI
You can maintain Line from to Line to for eg
1 The test method number is xyZ1234
2 The tedt to be conducted is at 100 C
...... so & so
40 Test is concluded with this step
so in the TEXTALLOCATION you can maintain LINE_FROM as 1 and LINE_TO as 40
Hope this helps you
Regards
Gajesh -
i want to print a description in text mode which is 5-6 lines some times it have a blank line also so
how to print in ALV .i m using READ_TEXT function but sumtime it not works when text exceed 4-5 lines
what i sud do.hi,
there is another way u can use yours internal table field like long text field. that is.
parameters: salno type vbak-vbeln.
data: begin of itab occurs 0,
vbeln type vbak-vbeln,
matnr type vbap-matnr,
longtext type thead occurs 0,
end of itab.
data: itabstxl type standard table of stxl with header line.
select single vbakvbeln vbapmatnr into (itab-vbeln, itab-matnr)
from vbak inner join vbap
on vbakvbeln = vbapvbeln
where vbak~vbeln = salno.
select single tdobject tdname tdid tdspras from stxl
into (itabstxl-tdobject,itabstxl-tdname,itabstxl-tdid,itabstxl-tdspras)
where relid = 'TX'
and tdobject = 'VBBK'
and tdname = salno "YOUR OWN TDNAME e,g
and tdid = 'Z003'
and tdspras = 'EN'.
call function 'READ_TEXT'
exporting
CLIENT = SY-MANDT
id = itabstxl-tdid
language = itabstxl-tdspras
name = itabstxl-tdname
object = itabstxl-tdobject
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = itab-longtext
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
break abaper.
I HOPE THIS WILL SOLVE THIS WILL SOLVE THE PROBLEM OF THE OTHERS AS WELL. -
How to display long text in smartforms
Hi experts,
Iam trying to display long text into smartforms.I got the long text into ITAB frm database
in the abap program.In the form interface how to define the variable?In the long text i have 6 lines.
points guaranteed
cheers
kakiKaki,
Delcare a table and getting the LONG TEXT is not the right way of doing this.
You create a TEXT object and change the TYPE to INCLUDE TEXT. Once that is done all you have to do specify the parameters of your long text - TEXT ID, TEXT OBJECT and TEXT NAME. These are the same parameters that you use for READ_TEXT funciton. You don't have to fetch the text manually, it happens automatically.
Make sure this is a part of the main window as this might run into multiple pages.
Regards,
Ravi
Note : Please reward the posts that help you. -
How to update long text in symptoms/problems ?
Hi All,
Can anybody help me regarding how to update the long text of a symptom/problem?
Please help.
Regards,
JeetuHi Jeetu,
Can you Please elaborate your query.
Are you talking about Problem/solutions created using Tcode: IS01( used in service scenario)
Or
The Text Management i.e. Text Types
Regards.
Shalini Chauhan -
How to display Long text in a JLabel with multiline??
Hi,
Suppose I have a label that displays a long text....
""This is an example label that displays long text, how to break the line????.........""
how to display it like below with one label?
""This is an example label
that displays long text, how
to break the line????.........""
Thanksso basically do this
JLabel myLabel = new JLabel();
String theText = "<html>This is an example label<br>
that displays long text, how<br>
to break the line????.........</html>";
myLabel.setText(theText);Obivously, u dont have to use a separate string, u could just call setText or pass it into the JLabel constructor, i just separated it to make it easier to see what your supposed to do.
GOod Luck -
How to display Long text in alv output
Hi,
I have developed an ALV report.It is displaying the output.
There is another requirment for alv output text field as below
From the long text fields show only the first 20 characters and afterwards the long text icon. If the icon is clicked open the long text display screen.
Please give your suggestion how to work on this requirement.
Thanks in advanceHi,
Create a hotspot for the long text column of ALV.
When user clicks on the hotspot, handle the event to display long text screen.
You may refer sample program of hotspot ALV :
Goto SE38
Type BCALV*
Click F4
search for HOTSPOT or EVENTS & you will get a sample program.
Best regards,
Prashant
Maybe you are looking for
-
Re: HP Deskjet 6540 drivers for Windows 7
I am trying to install the hp6540 onto my computer that uses windows 7. When I hooked up the printer it did not automatically install. I went to add printer, and it is not listed as an option to install. If you have any suggestions I would appreciate
-
How do I get to the Volume Limit again (iPod Red Nano)
I set this under Volume Limit in the Settings section but then when I went to change it, my thumb slipped and I accidentally set the 4 digit number for the Screen Lock (which I have not set) which was the 1st option. Now when I go back to Volume Limi
-
How to embed a signature in the PDF file with Java?
Hello All! There is no problem to sign a PDF with Java for me. But how to embed this signature in the PDF. I really don't know. I've found the PdfSignature class in the iText lib. But it is poor. I've read on the another forum: "If you want to do ser
-
Hi, Would like to have a report on Lead time between PO Date & GR date. Ideally the report should show the PO Number, Date,Material, Mat. Doc Number & GR Date. Though ME80FN shows by clicking the PO history, But our user would like to have in a singl
-
Error when SIS info structure is generated
Hi All, I have created in info structure for SIS. I am trying to generate it in MC24 transaction. I get the below error. Message no. M2078 Diagnosis The sum of the offset and length (=52) exceeds the length of the start (=44) of Can anybody help me h