Problem in loading the long text in bdc.
Hai Friends,
I am uploading the material master using bdc, Here i need to upload the long text field. so am using the separate report for upload the long text field using the create_text function module. but the problem is the long text field only accepting 132 charactors. but i need to upload the 500 charactors. what i want to do now ?
Regards ,
Sathis Kumar R
Hi Sathis,
What u do is that while recording the text part in bdc , click on the first delete button, and then create button and after that double click on the editor or click on the text-editor change button, a window will get opened , then click go-to menu -> change editor.
there u can use loop the text table and wirte it according .
eg
PERFORM bdc_dynpro USING 'SAPMV45A' '4002'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TP_DELETE'. "first delete
PERFORM bdc_dynpro USING 'SAPMV45A' '4002'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TP_CREATE'. " then create
PERFORM bdc_field USING 'LV70T-SPRAS'
sy-langu.
PERFORM bdc_dynpro USING 'SAPMV45A' '4002'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TP_DETAIL'. "if not double click then click on change button after the delete button and then click on the change-editor menu .
PERFORM bdc_field USING 'LV70T-SPRAS'
sy-langu.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RSTXT-TXLINE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXVB'.
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(02)'
PERFORM bdc_field USING 'RSTXT-TXPARGRAPH(03)'
PERFORM bdc_field USING 'RSTXT-TXLINE(02)'
wa_itab-htext1.
PERFORM bdc_field USING 'RSTXT-TXLINE(03)'
wa_itab-htext2.
PERFORM bdc_dynpro USING 'SAPLSTXX' '1100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RSTXT-TXLINE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=TXBA'.
PERFORM bdc_dynpro USING 'SAPMV45A' '4002'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/EBACK'.
regards,
Santosh Thorat
Similar Messages
-
Entering long text in BDC on QM01
Hi
Can anybody tell me, how to enter the long text in bdc.
i am doing bdc on QM01 transaction in which i need to upload the long text.
can any body tell me how to do that.
RegardsHi
First do recording from SHDB transaction... After u enter the transaction click on new recording,give a name and the tcode..then the tcode will open..
Give one value in the fields and also in the long text and then save it..
Now, come back to the recording....select the recording and then click on Program tab...to generate a program, in that select option transfer from recording..
Now, upload the flat file into SAP, using GUI_UPLOAD or ALSM_EXCEL_TO_INTERNAL_TABLE.
Then pass the internal table using LOOP-ENDLOOP to the subroutines..
Regards,
VIshwa. -
Object ID for PO long text for BDC of material master
Hi all,
we are working on BDC of material master:
I have given some technical specifications in the P O text view of Material Master, i want to assign an object id for this long text , how to assign an object id for the long text?
regards,
urendraHi
thanku for quick response,,, i had checked the textid,
my problem was resolved, i have awarded some points
thank u
regards,
urendra -
How to keep long text in bdc using create_text function module
hi,
ihave bdc in that i having field like long text i have to upload the long text using create_text function module how to use and where to use in bdc. wat parameters i have to pass exactly.
i need some other information like how can i pass this to BDC i got like this .
can u plz check it.
its a length of 255 chaters
perform bdc_field using 'RSTXT-TXLINE(02)'
'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
& 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'.
perform bdc_field using 'RSTXT-TXLINE(03)'
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
& 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
perform bdc_field using 'RSTXT-TXLINE(04)'
'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
& 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'.
perform bdc_field using 'RSTXT-TXLINE(05)'
'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
& 'hhhhhhhhhhhhhhhhhhhhhh'.Hi,
Use this coding where do u want,
data: begin of textline occurs 10.
include structure tline.
data: end of textline.
start-of-selection.
textline-tdformat = '*'.
textline-tdline = 'TESTING FOR CREATION OF TEXT'.
append textline.
clear textline.
call function 'CREATE_TEXT'
exporting
fid = '0013'
flanguage = sy-langu
fname = '0095000501'
fobject = 'VBBK'
tables
flines = textline
exceptions
no_init = 01
no_save = 02.
end-of-selection. -
How to add long text in bdc for transaction fb01 ?
IN the existing program of bdc fb01
i have to add a long text field
but it gets stuck while i process in sm35
is there a fm to add the field directly
thanks in a advanceHi
You can upload the Long texts separately into the transaction using the CREATE_TEXT fun module
Need to pass the correct parameters like OBJECT,ID, OBJECTNAME and LANGuage with the proper declarations.
see the sample code and do accordingly
REPORT zmm_longtext_sm
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Description : This Program is used to Upload the Service Master
: Long Texts using the Fun Module CREATE_TEXT
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab OCCURS 0,
asnum like asmd-asnum, " Service No
text LIKE tline-tdline, " Long Text
END OF itab.
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
CONSTANTS:
Object ID for Long Text of Service Master
c_best TYPE thead-tdid VALUE 'LTXT',
c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
Parameters
PARAMETERS p_file LIKE rlgrap-filename.
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.
Upload the Texts
SORT itab BY asnum.
LOOP AT itab.
dt_lines-tdformat = 'ST'.
dt_lines-tdline = itab-text.
APPEND dt_lines.
dl_lan = sy-langu.
concatenate '00000000000' itab-asnum into dl_name.
Call the Function Module to Create Text
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),
itab-asnum.
ELSE.
WRITE:/ 'Long Text Created Successfully for Service No'(002),
itab-asnum.
ENDIF.
AT END OF asnum.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
<b>Reward points for useful Answers</b>
Regards
Anji -
How to add the long text in Production order through FM
Hi,
Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in Background.
Now client wants to add the Long text (seperate TAB in production order and they want to update the VC details of Sales order in the Long text area).
One option is after creation of Production order, through BDC(calling CO02 and update the long text) we can update the long text and client doesn't want this option.
Another option is after creation of Production order, using Function module SAVE_TEXT, Update the Long text in Production Order and this is not working in Production order (already my ABAP consultant checked it ).
If any one of you came across this requirement, pl share with me how you addressed it.
Regards
A.SureshbabuHi,
The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
Order No.
Line - 1
Line - 2
Line - 3
Line - 4
Line - 5
12345
txt - 1
txt - 2
txt - 3
txt - 4
txt - 5
67890
txt - a
txt - b
txt - c
txt - d
txt - e
Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
Regards,
Vivek -
Problem in formatting of long text -- line break not recognized.
Hi ,
We have a PO smartform in our SRM system and we are facing problem with formatting of long text on the smartform for long texts maintained for the PO.
for ex, we maintain the long text as --
"this is long text for item 1.
1. this is line 1.
2. this is line 2."
On the smartform it is displayed as --
this is long text for item 1. 1. this is line 1. 2. this is line 2.
So basically, the line breaks in the text are not considered in the smartform .
Any suggestions on how to fix this issue ??
Thanks.Hello Harmeet,
Which Std. FM are you using to fetch the PO texts? If the PO doesn't exist in your system, i'm afraid you cannot use Include Texts as mentioned by Harsh.
As an alternative you'll have to create a table & pass the text lines to it! I don't think SmartForms are not smart enough to identify new-line character.
BR,
Suhas -
Saving/Commiting the Long Text
Hi,
I am trying to save the long text created in a Z Transaction (Table Control). While saving it, I am getting the message as Text Saved". But It is not actually stored in SAP. I am not sure, what is that I am missing. I am using the SAP Standard Routine to Save the Long Text. I am also calling the FM: COMMIT_TEXT explicitly after the long text is saved. Can any one please suggest me, what should I do to commit the long text in SAP?
Appreciate Your Help.
Thanks,
KannanMay be my earlier post was confusing, I was asking you to set the Insert parameter to SPACE and the Savemode_direct to 'X' and see if it works or not. I had the same issue and resolved it using the above parameters. Also try and see if Srinivas's suggestion in the following thread:
Problem with SAVE_TEXT FM
hith
Sunil Achyut -
I have a Problem in print the long description data through EDI.
I have a Problem in print the long description data through EDI:Actually we want to print the long description data through EDI, but it not handling our huge long description data. Here is the example of that>We can print the first two lines into EDI output, but it is failing to print the below text:
<B>EPSON, TM-U590 Series: </B> Reliable 88 column slip printer. Operator friendly dot matrix impact printing. Ideal for hotel, bank, restaurant and many more applications .<br><BR> Includes: Printer, Black ribbon & a Connect-It Interface. Power Supply & interface cable sold separately. All printers are RoHS compliant & have a standard 1 year depot warranty. <BR> <BR>
-------------------------------------Failing to print this lines------------------------------------------------------------------
<b>COLORS:</b> Epson Cool White (ECW) Only<BR><BR><B><FONT COLOR=#FF0000#>Click links below for helpful Information</FONT><b><br><table border="0" bordercolor="" style="" width="100%" cellpadding="5" cellspacing="5"><tr><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2605" target="_blank"><b>Spec Sheet</b></a></CENTER></FONT></td><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2606" target="_blank"><b>MSRP Price List</b></a></CENTER></FONT></td><TD><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2868" target="_blank"><b>Product Information Guide</b></a></CENTER></FONT></TD></TR><TR><td><FONT SIZE="2" COLOR=#0000FF><B>Warranty Information</B></FONT></td></tr><Tr><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2554" target="_blank"><b>Depot Warranty</b></a></CENTER></FONT></td><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2555" target="_blank"><b>Spare In the Air Warranty</b></a></CENTER></FONT></td><td></td></tr></table><br>
Please provide some useful thoughts on this EDI issue.
Thanks
AmeerTry using the FM:
ENQUE_READ2
Passing the follwing values:
GNAME --> VBAK (Sales Order header table)
GARG --> The lock argument
(This will be a combination of client number anb Sales Order No.
Eg: '3001210000054' where the first three digit i,e 300 is the client No
and 1210000054 is the sales order no.)
Regards,
Firoz. -
Error while reading the Long text Using READ_TEXT
Hi friends,
Right now I am working with Smartforms.While I am reading the Long text of the material using function module READ_TEXT I am getting the following error if the text is not there.
OUT_PURCH_PO ID GRUN language EN not found.
I should not get this error Instead I should get the blank value.
OUT_PURCH_PO - my material name.
Following is my code.
IF WA_EKPO-KNTTP = 'F' AND WA_MTART-MTART = 'ZMSC'.
READ TABLE IT_SGTXT INTO WA_SGTXT WITH KEY MATNR = WA_EKPO-MATNR.
WA_EKPO-TXZ01 = WA_SGTXT-SGTXT.
NAME = WA_EKPO-MATNR.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = ID
LANGUAGE = SY-LANGU
NAME = NAME
OBJECT = OBJECT
IMPORTING
HEADER = THEAD
TABLES
LINES = LTEXT.Hi,
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = id
language = sy-langu
name = name
object = object
TABLES
lines = ltext
EXCEPTIONS " --> have this
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.
Edited by: Avinash Kodarapu on Jun 5, 2009 7:32 PM -
Get the long text into BADI from text editor
hi all,
I implemented BADI ME_PROCESS_PO_CUST, before saving the purchase order i am calling the text editor where i am writng
the long text . but when save the text from the text editor the long text in the editor is not updating to the BADI.
Can anybody help how can i get the long text to the BADI.
Regards,
MadhaviHi
Have you tried with interface 'IF_PURCHASE_ORDER_MM' with these methods in the BADI?
IF_LONGTEXTS_MM~GET_TEXTOBJECT
IF_LONGTEXTS_MM~GET_TYPES
IF_LONGTEXTS_MM~GET_TEXT
IF_LONGTEXTS_MM~SET_TEXT
IF_LONGTEXTS_MM~ADOPT_TEXT
IF_LONGTEXTS_MM~DELETE_TEXT
IF_LONGTEXTS_MM~EDIT_TEXT
Regards
Eduardo -
I get the long text description 0f transaction fb03
Hi Gurus,
How can I get the long text description in the information view (field <b>ZEILE</b>,
data element EENO_ZEILE) on the G/L account documet overview(transaction Fb03)?
My prob is, This field stored in a structure called
Thanks in ad.
Regds,
BalaHi,
a) Find out for which <b>table</b> this long text is linked.
b) Go to <b>TTXOB</b> table and in the field <b>TDOBJECT</b>, check whether this entry is present.
c) If present, then use FM READ_TEXT, to get the long text value.
Important parameters to be passed in READ_TEXT
a) ID
b) Language (EN??)
c) Name ( I believe in this case it would be ZEILE)
d) Object (TTXOB-TDOBJECT value)
Regards,
Subramanian V. -
Get the long text from Text Editor
Hi,
I am using text editor to enter the long text, after entering the text in the text editor
when press the save button i am getting the long text into the internal table . this is working fine till here.
But when press SAVE button , i want the text into the internal table and the text editor to be closed.
but here i am not able to get the data into internal table as it is again creating text editor .
Can anyboby help me .Hi,
Refresh the table. -
Problem in reading the modified text from text editor
Hi all,
Im using text editor for saving the long text entered in the text editor as standard text in So10 tcode.
Here im facing an issue in reading the text from text editor. That is, when the text is entered by the user for first time, then the below method reads the text successfully. But when i do some changes in the existing text present in the text editor and try to read, then the modified text is not returned by the below method.
I use the "CALL METHOD g_editor_ftext1->get_text_as_stream" to read the text. Given below is my code.
CALL METHOD g_editor_ftext1->get_text_as_stream
IMPORTING
text = ig_text_table
is_modified = g_xthead_updkz
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
The return value of "is_modified" is always returned as 0.
Could anyone pls help how to read the modified text using the above method?Check if this works and if it works then there should be some mistake in your coding
REPORT abc.
PARAMETERS:pa1 TYPE bwart.
DATA: container TYPE REF TO cl_gui_docking_container,
editor TYPE REF TO cl_gui_textedit,
report TYPE syrepid,
mod TYPE i,
modon TYPE i.
DATA:tlines TYPE TABLE OF tdline,
wa_tlines TYPE tdline.
AT SELECTION-SCREEN OUTPUT.
report = sy-repid.
IF container IS INITIAL.
CREATE OBJECT container
EXPORTING repid = report
dynnr = sy-dynnr
side = container->dock_at_left
extension = 1070.
CREATE OBJECT editor
EXPORTING
parent = container.
ENDIF.
wa_tlines = 'This is test before a change'.
APPEND wa_tlines TO tlines.
CALL METHOD editor->set_text_as_r3table
EXPORTING
table = tlines
EXCEPTIONS
OTHERS = 1.
CALL METHOD editor->go_to_line( 1 ).
START-OF-SELECTION.
CLEAR tlines[].
CALL METHOD editor->get_text_as_stream
EXPORTING
only_when_modified = '1'
IMPORTING
text = tlines
is_modified = modon
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF modon = 1.
WRITE 'Changed'.
ELSE.
WRITE 'Not changed'.
ENDIF.
WRITE modon. -
Unable to upload RTF file in the long text
Hi all,
Could you please help me out in this issue. I am trying to upload the RTF file in the long text editor through this menu path Text-> Upload->RTF file.The RTF file is about only 56 KB memory size consists only texts.
I could able to select the file and when i am executing , ABAP dump is showing as follows:
Runtime error : TABLE_INVALID_INDEX
abap program : SAPLSTXK
Whether any SAP notes to be applied for this ?
Please throw you ideas
Regards,
Suresh.try this.
REPORT YCMTESTE LINE-SIZE 255 MESSAGE-ID TD.
PARAMETERS:
TEXTNAME LIKE THEAD-TDNAME DEFAULT 'SAPSCRIPT-DRUCKERTEST',
FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\temp\'.
DATA: TEXTHEADER LIKE THEAD.
DATA: TEXTLINES LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING NAME = TEXTNAME
LANGUAGE = SY-LANGU
OBJECT = 'TEXT'
ID = 'ST '
IMPORTING HEADER = TEXTHEADER
TABLES LINES = TEXTLINES
EXCEPTIONS OTHERS = 1.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'EXPORT_TEXT'
EXPORTING CODEPAGE = '1133'
FILE = FILE
FORMATWIDTH = 132
FORMAT_TYPE = 'RTF'
HEADER = TEXTHEADER
SSHEET = ' '
WITH_TAB = ' '
TABLES ITF_LINES = TEXTLINES
EXCEPTIONS DOWNLOAD_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_WRITE_ERROR = 3.
CASE SY-SUBRC.
WHEN 0. MESSAGE S807 WITH FILE.
WHEN 1. MESSAGE E815 WITH FILE.
WHEN 2. MESSAGE E811 WITH FILE.
WHEN 3. MESSAGE E814 WITH FILE.
ENDCASE.
Reference::[http://help.sap.com/saphelp_sm32/helpdata/en/d6/0db7f3494511d182b70000e829fbfe/content.htm]
<removed_by_moderator>
Edited by: Juan Reyes on May 16, 2011 12:05 PM
Maybe you are looking for
-
Where is Adobe's Flash Player Update reminder hiding?
within a flash click the opposite mouse button and you may change some Adobe flash settings like allowing camera and microphone access. but once you've done that Adobe dumps a kind of version checker on your system. you'll see that after the next boo
-
When i click on the mozilla icon on the desktop the arrow will spin (VISTA) and will then disappear. Mozilla will not enable or even pop up or anything. I am still looking at the desktop and not mozilla. I lick on the icon many times and nothing ever
-
COMBINING COMMON COLUMNS IN SELECT QUERY
hi all, While make inner join between two tables how to link more than one common colums , which operator i want to use, shall anybody give me one ex. Thanks in advance. R.Vijai
-
Urgent: Duplicate Message and Duplicate idoc ..
Hi All, need help. I have file(Asynchronous ) to Idoc scenario. We are processing file and creating idoc. in file adpater : we have confguration 1) Exactly once. 2) File content conversion/ 3) Processing mode : Archive 4) Add time stamp It wa
-
What RAID setups work for each setup?
Can anyone point me to a source that can give me detailed information about what RAID setups are best for each situation. Our current situation is that we have: 2x Xserve RAID running on Xsan with two Xserve G5 servers, one for media and the other fo