How to define and populate value to a variable in a text file
hi all,
i have a text file on unix server, when i read it through open dataset, is it possible to populate dynamic value to a variable in the text file. and is it possible to define a variable at any place in the text file?
after this the program will send the internal table for emailing.
thanks.
Hi, If this file on server is a email template you can put some tags / marks and you can change it after you read it with OPEN DATASET / READ...
Sample:
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
CHECK sy-subrc EQ 0.
DO.
READ DATASET p_file INTO lv_string.
IF sy-subrc EQ 0.
EXIT.
ENDIF.
REPLACE ALL OCCURENCES OF '((SYSTEM_ID))' WITH sy-sysid.
APPEND input_file_tab.
ENDDO.
CLOSE DATASET p_file.
on file there's a line with:
This email was generated on server ((SYSTEM_ID))
It will be translated to (sy-sysid = DEV):
This email was generated on server DEV
This is a "variable" like that you can use.
Similar Messages
-
How to populate values to the variables in standard text
Hi friends,
I have maintained a standard text in So10 like this invoice number&vbeln&.
Inside a function module i want to read this text and populate the value to the variable &vbeln&.How to achive this.
Rgds.Thanks Simon but i didn't understand your answer but i will tell you the problem that i want to solve with foreach or iterator
i have a view that have employeeId and employeeName and ManagerID
create table employeesView
EmployeeId Number,
EmployeeName varchar2(100),
ManagerId Number
}i want to make a foreach or Iterator to make
every Employees with the same manager id to be in the same <af:panelGroupLayout>
i mean
<af:foreach or af:Iterator >
<af:panelGroupLayout >
<af:commandButton id="cb1" text="All Employees With Manager Id 1" />
</af:panelGroupLayout >
<af:panelGroupLayout >
<af:commandButton id="cb1" text="All Employees With Manager Id 2" />
</af:panelGroupLayout >
<af:panelGroupLayout >
<af:commandButton id="cb1" text="All Employees With Manager Id 3" />
</af:panelGroupLayout >
</af:foreach or af:Iterator >How can i do this -
How to extend the IDoc ORDERS05 and populate values?
Hi,
My requirement is to add few fields to the standard IDoc ORDERS05 and populate values to the newly added fields.
Please let me know how to extend the standard IDoc ORDERS05.
Regards,
Balaji. RHi balaji,
you can try to google for SAP R/3 IDoc Cookbook for EDI and Interfaces by Axel Angeli et.al.
Although Axel refers primarily to MATMAS Idoc the technique of extending IDOCs is explained very well.
Also very good is the search function here on SCN, I just found
[Some Experience on IDoc Enhancement|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID0711317150DB10743789739220747754End?blog=/pub/wlg/8285]
Blogs and Wikis here are the best source for general questions like yours, usually of much more value than forum answers
Regards,
Clemens -
How to Define and Use Formatted Search in Sap Business One 2007
Hi
Any Document on How to Define and Use
Formatted Search in Sap Business One 2007.
ThanksHi Manish,
It is Very simple Procedure of defining FMS(Formatted Search)
in SAP 2007B Same as SAP 2005B & SAP8.8 Version
Do this,
->> Open the require Document.
for ex. IF you add the UDF in Marketing Document(Sales/Purchase)
1. Goto the UDF (or) any Default(Original) Field and Click ShiftAltF2.
2. Select the SEARCH BY SAVED QUERY.
3. Assign the FMS Query.
4. Select the AUTO REFRESH WHEN FIELD CHENGES.
5. Select the require Auto refresh field
6. Check the Refresh Regularly (or) Display Saved Values.
Regards,
Madhan. -
How to define and use cookies so that same login is used on all application
Hi
I have 3 apps in a single workspace and all of them SSO enabled
However when I go from one apps to other, it ask for login again
I have read in the forum that we can use cookies so that we use the single login on all apps within the same workspace
But I'm not sure how to define and use cookies.Please assistSee this presentation:
http://www.sumneva.com/apex/f?p=15000:395:0::NO::P395_PRESENTATION_KEY:MANY_TO_ONE -
How to defined data carrier valued for Linux?
Hi,
I am Defining Data Carrier. But I don't understand "Data carrier type" value. Is this PC value data carrier type for window? So If I want to define value data carrier for Linux. How to defined data carrier valued for Linux?
Please advise,
DuypmHi Nikita,
Refer the below mentioned links for your requirement.
http://forums.sdn.sap.com/thread.jspa?threadID=412923
http://forums.sdn.sap.com/thread.jspa?threadID=1639500
Both have good guidelines on coding as well as configuration part.
Regards,
Deepak Kori -
How to Assign a Field value to a Variable??
Dear All,
Kindly let me know, if <b>"HOW TO ASSIGN A FIELD VALUE TO A VARIABLE????"</b>
Situation is, we have a Field (OBJK-TASER) in which 2 tables (SER01 & SER03) are stored. And we want to access names of the Tables which are there in the field(TASER) in (OBJK) table to a variable and then passing that variable to the sql query as a table name to get data accessed dynamicaly.try this
select TASER from OBJK into table it_table.
loop at it_table.
select field1 field2 from (it_table-table) into table it_fields.
endloop -
How I can save the value of a variable in a database?
hello,
how I can save the value of a variable in a database? I need to keep the # of times you press click animation. to know how many times it has been seen.
I connect to msql database, using php, javascript, ajax and jquery, but not how to save the variable counter clicks from adobe edge Animate
appreciate your help so I can connect to the database from adobe edge animate.
thank you very much
Luis Felipe Garcia
[email protected]Hi, all-
This isn't an Animate-specific issue, but I thought I'd take a stab at it anyway. As with anything else on the web, you need to have a server script to handle incoming data, so it's all back end work. Your page will need to call that script and provide parameters to that script that it can read.
The easiest way I can think of to do this (and this is all highly theoretical, so please make sure it's secure before you implement it) is to create a 1px div that has visibility off. Whenever you click, you can load your URL in that div, which then increments your counter on your db.
Hope that helps inspire some interesting solutions!
-Elaine -
Hi,
In Sap Script:
7 digit Value(1234567) how to move each digit value in each variable( 7 variablesvar1,var2,var3,....var7).
How it is possible in SAP Script..What is the Logic?
Thanks and Regards,
Prabhakar Dharmala
like this
Move 1 - var1, 2 - var2, 3 - var3 , 4 - var4, 5 - var5, 6 - var6, 7 - var7.
Edited by: Prabhakar Dharmala on Mar 31, 2008 11:01 AMHi,
var = '1234567'.
var1 = var1+0(1).
var2 = var1+1(1).
var3 = var1+2(1).
var4 = var1+3(1).
var5 = var1+4(1).
var6 = var1+5(1).
var7 = var1+6(1).
Regards,
V.Balaji
Reward if Usefull...
Edited by: Balaji V on Mar 31, 2008 7:59 AM -
How can detect and remove scanned white pages in an OCRd pdf file?
How can detect and remove scanned white pages in an OCRd pdf file?
Acrobat does not support an automated way of doing this directly. You can
remove completely blank pages (pages that don't have any "marking
objects"), but a scanned page does contain an image, so Acrobat won't help
you here. There are a number of 3rd party applications and plug-ins
available. Try a Google search for
remove blank pages from scanned
pdf<http://www.google.com/search?client=safari&rls=en&q=removeblankpagesfromscanned+pdf&ie=UTF-8&oe=UTF-8>
This will bring up a few different solutions.
Another way is to use JavaScript to find text. You say that these documents
are OCRed, so if you have a blank page, it should not have any text on it.
With some JavaScript, you can identify pages that don't contain text. This
may however fail if you have a page that contains just e.g. a photographic
image. There won't be any text, but the page is certainly not blank.
Karl Heinz Kremer
[signature removed by host] -
How can I use Automator to extract specific Data from a text file?
I have several hundred text files that contain a bunch of information. I only need six values from each file and ideally I need them as columns in an excel file.
How can I use Automator to extract specific Data from the text files and either create a new text file or excel file with the info? I have looked all over but can't find a solution. If anyone could please help I would be eternally grateful!!! If there is another, better solution than automator, please let me know!
Example of File Contents:
Link Time =
DD/MMM/YYYY
Random
Text
161 179
bytes of CODE memory (+ 68 range fill )
16 789
bytes of DATA memory (+ 59 absolute )
1 875
bytes of XDATA memory (+ 1 855 absolute )
90 783
bytes of FARCODE memory
What I would like to have as a final file:
EXCEL COLUMN1
Column 2
Column3
Column4
Column5
Column6
MM/DD/YYYY
filename1
161179
16789
1875
90783
MM/DD/YYYY
filename2
xxxxxx
xxxxx
xxxx
xxxxx
MM/DD/YYYY
filename3
xxxxxx
xxxxx
xxxx
xxxxx
Is this possible? I can't imagine having to go through each and every file one by one. Please help!!!Hello
You may try the following AppleScript script. It will ask you to choose a root folder where to start searching for *.map files and then create a CSV file named "out.csv" on desktop which you may import to Excel.
set f to (choose folder with prompt "Choose the root folder to start searching")'s POSIX path
if f ends with "/" then set f to f's text 1 thru -2
do shell script "/usr/bin/perl -CSDA -w <<'EOF' - " & f's quoted form & " > ~/Desktop/out.csv
use strict;
use open IN => ':crlf';
chdir $ARGV[0] or die qq($!);
local $/ = qq(\\0);
my @ff = map {chomp; $_} qx(find . -type f -iname '*.map' -print0);
local $/ = qq(\\n);
# CSV spec
# - record separator is CRLF
# - field separator is comma
# - every field is quoted
# - text encoding is UTF-8
local $\\ = qq(\\015\\012); # CRLF
local $, = qq(,); # COMMA
# print column header row
my @dd = ('column 1', 'column 2', 'column 3', 'column 4', 'column 5', 'column 6');
print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
# print data row per each file
while (@ff) {
my $f = shift @ff; # file path
if ( ! open(IN, '<', $f) ) {
warn qq(Failed to open $f: $!);
next;
$f =~ s%^.*/%%og; # file name
@dd = ('', $f, '', '', '', '');
while (<IN>) {
chomp;
$dd[0] = \"$2/$1/$3\" if m%Link Time\\s+=\\s+([0-9]{2})/([0-9]{2})/([0-9]{4})%o;
($dd[2] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of CODE\\s/o;
($dd[3] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of DATA\\s/o;
($dd[4] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of XDATA\\s/o;
($dd[5] = $1) =~ s/ //g if m/([0-9 ]+)\\s+bytes of FARCODE\\s/o;
last unless grep { /^$/ } @dd;
close IN;
print map { s/\"/\"\"/og; qq(\").$_.qq(\"); } @dd;
EOF
Hope this may help,
H -
How to get the source code of an HTML page in Text file Through J2EE
How to get the source code of an HTML page in Text file Through J2EE?
Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
- Saish -
How to get the source code of an HTML page in Text file Through java?
How to get the source code of an HTML page in Text file Through java?
I am coding an application.one module of that application is given below:
The first part of the application is to connect our application to the existing HTML form.
This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
Could any body provide coding hint for thatYou're welcome. How about awarding them duke stars?
edit: cheers! -
How can I find out the number of lines in a text file?
How can I find out the number of lines in a text file?
java.io.BufferedReader in = new java.io.BufferedReader( new java.io.FileReader( "YourFile.txt" ) );
int lineCount = 0;
while( in.readLine() != null )
lineCount ++;
System.out.println( "Line Count = " + lineCount ); -
How to define maximum base value for vehicle.
Hi.
Could you clearify me why I can't fix maximum value for vehicles (1,000,000)
I already did configure as below:
IMG>> FI >> Asset Accounting >> Depreciation >> Valuation methods >> Dep key >> Caculation method >> Define maximun amount method
then assign to asset class by
IMG>> FI >> Asset Accounting >> Depreciation >> Valuation methods >> further setting >> Define maximun base value
after that I test maximum value and display value but I found that amount that use to calculate dep dosen't be 1,000,000
where is the mistake and how can I fix it ?
Thank you in advance
Best regards,
Utarat.Hi Utarat,
I assume you have linked this maximum amount methods to the depreciation key > AFAMA (V_T090NA-METHBT).
Please check also the amounts entered as maximun amount and if you have flagged the fiels XKUMU (read the documentation on it F1)
Have you set any maximun base value that can affect the calculations (Transaction OAW2)?
Note 1048448 could be helpful.
regards Bernhard
Edited by: Bernhard Kirchner on Sep 29, 2010 8:51 PM
Maybe you are looking for
-
How do I make a custom Forward button and Back button?
I've got an almost completely custom theme and it's working great with one exception: The forward and back buttons (used to move between menu pages) are from the original theme I based mine on, and they are now white on white = invisible. I tried sho
-
About 'External data' and 'Procedure' option in PLD
Hi all, Can u please tell me what is the use of 'procedure' option in PLD.we can get this option when we select any text then in the genral tab of properties if we select field type as 'EXTERNAL DATA' then in the content tab we get source type 'PROCE
-
Upgrade 3.0B to NW04s - Existing variant missing in new frontend!
Hi all We have upgraded our system from BW 3.0B to Netweaver 2004s BI with Support Package 12 installed. On the frontend, we are using the new BEx Analyzer with SP14 (rev 797). Our existing query variants from 3.0B are no longer visible in the new BE
-
Forms 10g only one item allowed to have a value
Hi all, I was wondering. What is the best way to make sure that only one of my items has a value? I have a couple of textboxes with different meaning but want to restrict the user to only be available to fill in one of them. I suppose the best thing
-
I want to download adobe photoshop elements 11 but does not work?
I want to download adobe photoshop elements 11 but does not work?