Saving the Text using save_text FM
Hi Abap gurus,
i have to save the text in FB03 transaction. i found the option called in the menu bar EXTRAS - > TEXTS. i have written the code as :
*UPDATING THE DOCUMENT NUMBER
l_header-tdobject = c_object.
CONCATENATE s_bukrs w_output-belnr s_gjahr INTO l_name SEPARATED BY space.
l_header-tdname = l_name.
l_header-tdid = c_id.
l_header-tdspras = sy-langu.
CONCATENATE 'GR NUMBER'
'GR ITEM NO'
'GR QTY'
'GR ASSIGN QTY'
'RUN DATE'
'LTL DATE'
INTO l_notes
SEPARATED BY space.
ULINE.
CONCATENATE w_output-mblnr
w_output-buzei
* w_output-gr_qty
* w_output-gr_assign_qty
sy-datum
t_ltldate
INTO l_notes
SEPARATED BY space.
t_line_save-tdformat = '*'.
t_line_save-tdline = l_notes.
APPEND t_line_save.
* CLEAR t_line_save.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_header
* INSERT = ' '
savemode_direct = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
lines = t_line_save
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDLOOP.
my requirement is that
i have to save header as GR NUMBER', 'GR ITEM NO' , 'GR QTY', 'GR ASSIGN QTY' , 'RUN DATE', LTL DATE'
10 20 30 15 02..3.2012 03..03.2012
20 40 50 13 02..3.2012 03..03.2012
how to print the header ? i am not able to geting using the concatenate statement.
should be done like the below, shouldn't it?
data: lv_Gr_qty type char15,
lv_gr_assign_qty type char15,
lv_today type char10,
lv_ltldate type char10.
CONCATENATE 'GR NUMBER'
'GR ITEM NO'
'GR QTY'
'GR ASSIGN QTY'
'RUN DATE'
'LTL DATE'
INTO t_line_save-tdline
SEPARATED by space.
t_line_save-tdformat = '*'.
APPEND t_line_save.
loop at some table into w_output.
lv_gr_qty = w_output-gr_qty." (put it into char 15 or so).
lv_gr_assign_qty = w_output-gr_assign_qty. "conver to char field
write: sy-datum to lv_today mm/dd/yyyy, "put into correct format.
w_output-ltldate to lv_ltldate mm/dd/yyyy.
CONCATENATE w_output-mblnr
w_output-buzei
lv_gr_qty
lv_gr_assign_qty
lv_today
lv_ltldate
INTO t_line_save-tdline
SEPARATED BY space.
t_line_save-tdformat = '*'.
APPEND t_line_save.
CLEAR t_line_save.
endloop.
then call your save_text.
Similar Messages
-
When texting with other iphone users, the text used to be in a blue bubble. Now it's green. What happened? Am I being charged for these text messages now? I'm with Verizon if that matters.
Thanks for the help, Allan Sampson.
I updated itunes, shut the phone off and on, it still didn't give me blue bubbles. Kept following the suggestions on the page ... I didn't know there was an IMessaging switch, but, shoot, it was OFF. Anyway, I toggled it on and now the text bubbles are blue again. -
Also the tab key ti jump from one form window to the next to fill them in, does not work anymore.
It is especially annoying typing emails using webmail. I can only navigate trough the text using my mouse.
I am sorry to post in here but I was not able to give feedback on the blog. Maybe I need to be logged in??Create a new profile as a test to check if your current profile is causing the problems.
See:
* [https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile Basic Troubleshooting: Make a new profile]
If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
See:
* http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox -
Unable to create text using SAVE_TEXT FM
Dear Experts,
I' m trying to automaticly create a text in Create measurement Document (IK11 in PM) when notification is created . For this in program IMRC0004 on exit i put FM SAVE_TEXT but its not working as it should.
BAPI_ALM_NOTIF_CREATE & BAPI_ALM_NOTIF_SAVE is used to create notification & in order to create text SAVE_TEXT is used.
But when the document is saved the specific text is not created. In debug the FM returns with no error.
Can anyone help me?Hi,
try to check the FM READ_TEXT by passing the same parameters used in SAVE_TEXT and check.whether read text is working.
if read text is workingthen save text is working.
and also see the parameter SAVEMODE_DIRECT import parameter in save_text if it is X it will save every tiome if it is space it will save at LUW(when Logical unit of work executes)
Prabhudas -
Upload Task List Operation long Text using SAVE_TEXT-Urgent
Hi ,
I am trying to create Task List Operation Long text using the function module ..
SAVE_TEXT .I am passing the following keys
Text Name 300ATEST057 0000000900000009
Language EN
Text ID PLPO Long Text
Text Object ROUTING Texts for task list types
But the long texts are not getting updated in the Task lists operations .
Can anyone please suggest whether SAVE_TEXT will work for Operation long Texts or not Are we missing something
.This is pretty urgent requirement .Award points are assured.
Regards
Samhi,
use function module create text
check the sample code
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.
in text file give first field records in capitals
regards
siva -
Saving the text in text editor changes text line format
In my program I have an output witha text editor box where
we type in text and save , and if we want to print it it prints it out
on a smartform. When I type in a text on the text editor box for example :
"This will include a policy and best practice for
what files can be stored on the server and where
they should reside. The policy will include
required ownership of each folder and required
authorizations for access to folders. Also
included in the policy will be a section describing
best practices on the file and folder naming
conventions. Anew file struicture of the drive that
better aligns with the business. An drive with only
four folders at the root level also will be de"
After I type in this text in teh text editor and try saving it
, it save sthe text but shows up with lots of gaps like below.
"This will include a policy and best practice for
what files can be stored on the server and
where
they should reside. The policy will include
required ownership of each folder and
required
authorizations for access to folders. Also
included in the policy will be a section
describing
best practices on the file and folder naming
conventions. Anew file struicture of the drive
that
better aligns with the business. An drive with
only
four folders at the root level also will be de"
I am not preety sure why on saving teh typed text it chnages to this format.
I would like to have my program save it as is typed. Is this possible to do so
and how?
Thanks.Hi Aarav,
Check the internal table used to store the text is having line length 100. Change that to 200 or more . You can see the difference . If still the problem persists, enter each line in the text editor and conclude each line with a carriage return( ENTER )
key press.
Hope this will help you.
Regards,
Smart Varghese -
Append text using SAVE_TEXT
I'm trying to append text lines to the existing data for a given text id. And it seems to replace it each time.
Is there a way to do it?
This did not work....call replaces the text data.
call function 'SAVE_TEXT'
EXPORTING
header = thead
insert = 'I'
TABLES
lines = tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
others = 5.
if sy-subrc <> 0.
endif.
CALL FUNCTION 'COMMIT_TEXT'.
COMMIT WORK.
Thank you,
PamHi Pam,
You need to use FM READ_TEXT and FM EDIT_TEXT then use FM SAVE_TEXT.
Hope this will help.
Regards,
Ferry Lianto -
RickTextbox - getting and saving the text to and from SQL server database
I have no trouble saving the data to an SQL Server database. Here is a sample of what is saved.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 testing the\par
rich\par
text box\par
when I retrieve the text from the database, I end up with exactly what is shown above. I am retrieving the text with a SqlDataReader. here is the code that I am using;
while (sqlDataReader.Read())
string special_Instructions = ""; //first I was using this line but both lines have the same result // special_Instructions = sqlDataReader["Special_Instructions"].ToString();
special_Instructions = sqlDataReader.GetString(5);
special_InstructionsRichTextBox.Rtf = special_Instructions;
any guidance or help will be greatly appreciated.
daveMichael,
Lets begin with, 'Thanks for your guidance'. With your last run of questions, I was able to figure it out.
Here is what I learned, (by the way, this is in Winforms):
When I checked the properties of the RichTextBox control, I saw and then remembered that the control was bound to the form. First thing I did was comment out the code I was using (above) to fill the control and tested the program. I actually
received the same issue with the contents of the control as before.
I then dropped a new RichTextBox control from the tool box to my form and positioned it next to the original control. I un commented the above code and used it to fill the new
richTextBox1.Rtf and ran the program. The original control that was bound to the form still gave the incorrect result but the new control worked perfectly.
I hope this helps others and Thanks again for your guidance. If there is anything else you think could be added to this reply please let me know.
dave -
Help needed in formating the text using HTML tags in reports 10g
Hi all,
I have a situation here. We have an application which prints out Reports with a few lines of text in it. This text is entered by the user through our forms application in a field. That particular text is stored in each row of a particular long column. Here I want to modify the text, while printing, on the report like underline, bold, italics etc,.
As of now I am using the HTML tags, in the forms, to do so as most the times the text in the report is same.
I want to know if this can be done by the user itself while he is entering the data in the field through the form.
Thanks in advance . I will explain you more clearly if you need.Hi,
The code did work. But I am not sucessfully able to display the values entered in 2nd page in the 3rd page.Please find the code below:
<html>
<head>
<script language="LiveScript">
function WinOpen() {
if (document.form1.cap.value == "")
alert("Enter value in text box");
return;
msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
msg.document.write('<BODY><form name="form2">');
for(var i =0; i < document.form1.cap.value; i++)
msg.document.write("<INPUT type=text name=tbAlphaNumeric>");
msg.document.write("<br>");
msg.document.write('<input type="button" name="Button2" value="Steal" onClick="javascript:window.opener.WinShow();">');
msg.document.write('</form></BODY></HTML>');
function WinShow() {
msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
msg.document.write('<BODY><form name="form3">');
for(var j =0; j < document.form1.cap.value; j++)
msg.document.write(document.form2.tbAlphaNumeric[j].value);
msg.document.write("<br>");
msg.document.write('</form></BODY></HTML>');
</script>
</head>
<body>
<form name="form1">
<INPUT type= "text" name=cap>
<input type="button" name="Button1" value="Push me" onClick="WinOpen()">
</form>
</body>
</html> -
Why does the text used in Flash file gets cut off in swf?
Please help.
I am using some text in FLA and when I test movie or publish swf. I see the end of the last word in the text line cut off.
I tried putting extra space after that and that solved the problem yesterday but today again I face the same problem and the problem is not getting solved with the same solution.
Does anybody know why it's happening?
Please let me know.
Thanks in advance.one query: if file is created relative to Java and Tomcat starts from bin directory, them
file should have been created in c:\tomcat6\bin\abc.txt,
NOT at c:\tomcat6\abc.txt
Am I write?
--Sujoy -
What does the text used for in Sales and Distribution?
In Sales and Distribution, we enter the text for customer master, sales order, delivery document, billing document. what is the main purpose of the text? Where can it be displayed?
Hi Lili,
For the fallowing purpose you can use the text.
-->Shipping Instructions
-->Warrenties
-->Terms of delivery
-->Order conformation details
-->Product ctelogs
-->Handling details
-->Packing details
-->LR no details.
-->Transaporter details.
Some data if you want in the output of the sales documents you can maintain in text tab then you can capture that in to output.
I hope it will help you,
Regards,
Murali.
Edited by: Murali Mohan.Tallapaneni on Jul 7, 2008 6:32 AM -
How do I save a document without it saving the text/object box outlines?
Is it because I'm using the trial that I can't save a document without it showing the outline of every text/object box? I've not selected all, but that's what the saved document looks like...
You want Pages, not workstations, and you might want to bookmark Lion and MacBook Pro fora.
http://www.apple.com/support/pages/
http://www.apple.com/support/lion/
http://www.apple.com/support/macbookpro/ -
Saving the text in an email attachment
I would like to store several word documents now on my MacBookPro on my iPhone for reference when I am travelling. I can open the documents as email attachments without difficulty, but can find neither a "save" button on my iPhone or any mention of this is the PDF user's manual. Solutions?
There is no way to save attachments on the iPhone separate from the email. The iPhone security model only allows files to be read by their respective applications; so the attachment is only accessible by the email program.
The ony 2 choices you have are:
1. Create some type of saved mail folder and move the email and attachment there, this depends on the type of email (POP/Exchange/Imap) and may not be an option
2. Forward your email to somewhere else and let the MacBook pull it down. -
Dispaly standard text in SAP SCRIPT which content saved using SAVE_TEXT FM
I want to display one standard text content in SAP SCRIPT and want to store content of it during run time.
For that, first I have created one standard text using SO10.Named the standard text as Z_TEST_WRITE. Initially it was empty.
In my SAP SCRIPT, I try to display the content of the standard text using below given SAP SCRIPT code and report program. Although I am able to store text in Standard text
Z_TEST_WRITE but in first display of the SCRIPT it is not displaying against the include command of SAP SCRIPT. But when I see the content of Z_TEST_WRITE through SO10 transaction, I can see the content with new text which was previously empty.
Now if I do the same transaction newly (suppose second time), then text stored in standard text Z_TEST_WRITE is displaid against includes command of SAP SCRIPT.
My print program is a SAP STANDARD which one can be changed.
/: DEFINE &NAME& = ''
/: PERFORM TEST IN PROGRAM Z_SAVE_TEXT
/: CHANGING &NAME&
/: ENDPERFORM
<B>&NAME&</>
/: INCLUDE Z_TEST_WRITE OBJECT TEXT ID ST
REPORT Z_SAVE_TEXT.
FORM TEST TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA IT_HEADER LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: LS_HEADER LIKE THEAD,
LT_LINES TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.
OUT_PAR-NAME = 'NAME'.
OUT_PAR-VALUE = 'Sample text for Test'.
APPEND OUT_PAR.
*-Populate Header Text details
LS_HEADER-TDOBJECT = 'TEXT'.
LS_HEADER-TDNAME = 'Z_TEST_WRITE'.
LS_HEADER-TDID = 'ST'.
LS_HEADER-TDSPRAS = SY-LANGU.
*-Populate details of Text
CONCATENATE 'Shipment No :' 'RM Ship No' INTO LT_LINES-TDLINE
SEPARATED BY SPACE.
LT_LINES-TDFORMAT = '*'.
APPEND LT_LINES.
CONCATENATE 'Bill of Lading:' '1234567' INTO LT_LINES-TDLINE
SEPARATED BY SPACE.
APPEND LT_LINES.
*-Save Text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = LS_HEADER
SAVEMODE_DIRECT = 'V'
TABLES
LINES = LT_LINES
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
COMMIT WORK and WAIT.
ENDFORM. "TESTHi,
If the text is getting displayed the second time, then this should be due to delay in saving the text.
After your COMMIT WORK AND WAIT in your report program, just put a WAIT FOR 2 SECS and check again.
Regards,
Suganya -
Using SAVE_TEXT in VF01 for item texts
Hi guys,
A colleague wants to save an item text in the billing process (VF01 transaction). As you should know, there is no billing document number yet when we are creating the invoice using that transaction. He is programming at RV60AFZZ include, FORM userexit_save_document_prepare. This is his try:
LOOP AT xvbrp.
CONCATENATE xvbrp-vbeln xvbrp-posnr INTO lw_thead-tdname.
* CONCATENATE c_objectname xvbrp-posnr INTO lw_thead-tdname.
lw_thead-tdid = 'ZZZZ'.
lw_thead-tdobject = 'VBBP'.
lw_thead-tdspras = 'E'.
lw_thead-tdfuser = sy-uname.
lw_thead-tdfdate = sy-datum.
lw_thead-tdftime = sy-uzeit.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = lw_thead
savemode_direct = 'X'
TABLES
lines = t_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc = 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = lw_thead-tdobject
NAME = lw_thead-tdname
ID = lw_thead-tdid
LANGUAGE = lw_thead-tdspras
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
ENDIF.
CLEAR: lw_thead-tdname.
ENDIF.
ENDLOOP.
But he is not saving the text, we dont know why. Constant c_objectname has been defined so:
c_objectname TYPE vbeln_vf VALUE 'XXXXXXXXXX'.
But without success... We saw XXXXXXXXXX000010 as tdname in debugger... Do you know if the issue is the TDNAME field? What should be a correct value for LW_THEAD-TDNAME? We know the item position but not the billing document number yet, where can we get correct tdname?... or did he fail in some other point?
Thank you!Hi guys,
one of my workmates got the answer. I share that: there is a user exit call '001' in the include LV60AB07 (FORM XVBRK_KIDNO_FILL). The FM for that user exit is EXIT_SAPLV60A_001 (Billing User Exit. Processing KIDNO (Payment Reference Number)). My friend put code logic inside the include of that FM (ZXVVFU09). We used that because there the structure XVBRK already has value for the field VBELN (the number of the billing document) and we can use SAVE_TEXT and COMMIT_TEXT there without problem, concatenating billing number and item in the header. I am not sure if the billing document already was created at this point, but worked fine for us. Thanks anyway!
Maybe you are looking for
-
So it has been at least a couple of months that I've been using my laptop with only ONE working USB port. The other two do NOT work. If I go to Computer on the Start menu, and right-click on Computer, then Manage, then i go to Device Manager, there i
-
BAPI_ACC_INVOICE_RECEIPT_POST Question
Hi Guys, We are using BAPI_ACC_INVOICE_RECEIPT_POST to post vendor invoices. The invoices are getting posted correctly but the payment proposal is unable to pick up these invoices for some reason. When we manually post invoices using FB60 they get pi
-
Authorisation - Input schedule
Hello, Have a specific issue with accessing the input schedules with in our user group one can access the worksheet with in the template and one cannot. The access rights / authorisation has been given at the same level, I have deleted and recreated
-
HT3347 Scatter and line charts - multiple series?
Is there a way of having more than 1 series on a scatter chart, or a way of removing the line in a line chart, leaving only the data points?
-
Why is my new printer is unrecognised?
Hi there, I've just installed the driver CD for my new Canon MG 5350 printer and connected it to my wireless router. Everything went very well, no error messages or problems were encountered and the printer indicates a steady connection. My iBook G