Creating long number issue
I am trying to run an infinite loop to create an extremely long number that is written to a single text file.
Here is what i have:
package count;
import java.io.*;
* Summary description for Program
public class Program
public static void IO(int a)
FileOutputStream out; // declare a file output object
PrintStream p; // declare a print stream object
try
String filename = "Numbers";
int filecontent;
filecontent = a;
// Create a new file output stream
// connected to "myfile.txt"
out = new FileOutputStream(filename + ".txt");
p = new PrintStream(out);
p.println(filecontent);
p.close();
catch (Exception e)
System.err.println("Error writing to file");
public static void main(String[] args)
int x = 1;
System.out.println(x);
FileOutputStream out; // declare a file output object
PrintStream p; // declare a print stream object
String filename = "Numbers";
int filecontent = x;
// Create a new file output stream
// connected to "myfile.txt"
out = new FileOutputStream(filename + ".txt");
p = new PrintStream(out);
while (0 < x) {
try {
filecontent = x;
p.println(filecontent);
p.close();
catch (Exception e)
System.err.println("Error writing to file");
x++;
}Help please.
I am trying to run an infinite loop to create an
extremely long number that is written to a single
text file.why do you want to do this? infinte loop implies an infinite number, or in the very least a method that will make java crash.
Similar Messages
-
Interval 01 was not created for number range object HRTEM_REFN
Dear expert!
Now, I'm getting some issues in Training and event management module.
- The first, I created business event
- Second, I process to book for business event by tcode: PSV1 --> book --> book/payment info --> activity allocation.
But when I was booking, the system displayed error: "Interval 01 was not created for number range object HRTEM_REFN"
Help me, please!
Best regards, Huy!Go to the customization as below
Training and event mgt>Basic settings>Number range maintanence>Define number ranges for External operation
and maintain number ranges as 01 Internal
Hope ur problem will solve
with regards
partha -
Create document number range 22 using internal number assignment
Hi friends,
now i am working upgradation project from 4.7 to 6.0. sandbox i created one Asset, After that i posed amount to that asset by using f-90.now i run depreceation in ABAF T code the bellow issue is comming
Create document number range 22 using internal number assignment
Message no. AA776
Diagnosis
Processing terminated because the document number range 22 for year 2011
was set up with external number assignment.
System Response
For periodic posting of depreciation, you have to create a document
number range with internal number assignment, since the document numbers
are assigned from Financial Accounting.
Procedure
Change the number assignment for the number range 22 from external to
internal in Customizing for Asset Accounting. See SAP Note 890976 for
more information.
But no ranges for that particular year having, if any changing that one it s not come edit or deleating
ple any one help me
Regards
Gangadhar reddyHi Gangadhar,
after 4.6C the Internal Number Range was changed into external Number Range due to technical requirements.
As the error messages due to posting manual into the affected number ranges could not be hindered in this case with ERP2005 the desicion was made to rechange to internal number range. Note 890976 describe what to do here.
regards Bernhard -
How to use SNRO to create daily number range?
Dear all,
I would like to know how to use SNRO to create a daily number range.
We would like to have the following sequence. The first 8 digits are date and the last 2 digits are number sequence. Each day, the last 2 digits will start from 01 again. i.e. <8-digits date><2-digit sequence>
For example, today is 22 May 2006,
2006052201
2006052202
2006052203
Tomorrow will have sequence like this:
2006052301
2006052302
2006052303
Thanks!Thomas,
I don't there is a automated way of doing as the dates do NOT follow a numbering sequence. What you can do is to create a number range for getting the last two digits every day and manually concatenate the date with the serial number.
However, as you have to reset the counter every day that might be a issue.
Regards,
Ravi -
Create long text for network activity
Hello,
I'll create a long text for a network activity, but I found no BAPI for that.
When I create long text for an order activity I use the BAPI BAPI_ALM_ORDER_MAINTAIN. There it is possible to specifiy the long text lines.
In the BAPI BAPI_NETWORK_MAINTAIN there ist no table for specifying long text.
Did anyone know how to create a long text for an network activity?Hello Vivek,
I'll tried this too. My problem was, if I add long text to a existing network activity, everything works well. But in my programm I create a new network plan with one network activity (0010). After commit I become the correct network plan number. Then I try to add long text to the network activity. I get correct return codes but if I look in the transcation CJ20N I could not see some text. If I use the READ_TEXT function with the key I insert the text, I see the text, but not with the transaction CJ20N.
I compared the key I used in my program with the key if I insert text with transaction CJ20N. I could'nt found some differences.
SELECT SINGLE afvcp~mandt afvcp~aufpl afvcp~aplzl
INTO (mandant,aufpl,aplzl)
FROM afvcp INNER JOIN
afko ON
afko~mandt = afvcp~mandt
AND afko~aufpl = afvcp~aufpl
AND afko~aufnr = ordernumbernew.
"*Create Identifier
CONCATENATE
mandant aufpl aplzl
INTO lv_name.
header-tdobject = 'AUFK'.
header-tdname = lv_name.
header-tdspras = sy-langu.
header-tdform = 'SYSTEM'.
header-tdid = 'AVOT'.
header-mandt = sy-mandt.
header-TDLINESIZE = '079'.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = header
insert = 'X'
savemode_direct = 'X'
owner_specified = ' '
local_cat = ' '
IMPORTING
function = func
newheader = newheader
TABLES
lines = lines
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = header-tdobject
SAVEMODE_DIRECT = 'X'
IMPORTING
COMMIT_COUNT = commit_count
COMMIT WORK AND WAIT.
For example in the debug the header ist filled with:
1 TDOBJECT C 10 AUFK
2 TDNAME C 70 210000044156300000001
3 TDID C 4 AVOT
4 TDSPRAS C 1 D
5 TDTITLE C 50
6 TDFORM C 16 SYSTEM
7 TDSTYLE C 8
8 TDVERSION N 5 00000
9 TDFUSER C 12
10 TDFRELES C 4
11 TDFDATE D 8 00000000
12 TDFTIME T 6 000000
13 TDLUSER C 12
14 TDLRELES C 4
15 TDLDATE D 8 00000000
16 TDLTIME T 6 000000
17 TDLINESIZE N 3 079
18 TDTXTLINES N 5 00000
19 TDHYPHENAT C 1
20 TDOSPRAS C 1
21 TDTRANSTAT N 1 0
22 TDMACODE1 C 16
23 TDMACODE2 C 16
24 TDREFOBJ C 10
25 TDREFNAME C 70
26 TDREFID C 4 4
In CJ20N the header is filled with
1 TDOBJECT C 10 AUFK
2 TDNAME C 70 210000044156300000001
3 TDID C 4 AVOT
4 TDSPRAS C 1 D
5 TDTITLE C 50
6 TDFORM C 16 SYSTEM
7 TDSTYLE C 8
8 TDVERSION N 5 00000
9 TDFUSER C 12
10 TDFRELES C 4
11 TDFDATE D 8 00000000
12 TDFTIME T 6 000000
13 TDLUSER C 12
14 TDLRELES C 4
15 TDLDATE D 8 00000000
16 TDLTIME T 6 000000
17 TDLINESIZE N 3 079
18 TDTXTLINES N 5 00007
19 TDHYPHENAT C 1
20 TDOSPRAS C 1
21 TDTRANSTAT N 1 0
22 TDMACODE1 C 16
23 TDMACODE2 C 16
24 TDREFOBJ C 10
25 TDREFNAME C 70
26 TDREFID C 4 -
Serial number issue in STO PGR
HI
I am facing serial number issue after doing PGR
i am into STO process . Oce PGI for outbound delivery is created and then MIGO (PGR) will happen at recveing pant
issue is after MIGO (PGR) the serial number status must be in AVLB ..but it is still in EDEL ESTO ...
The AVLB status must come automatically in the equipment master.Hi
I am doing through PO...we don't have inbound delivery process ... so i do MIGO with reference to PO
We have equipment master IE01/2.. plant is assigned after MIGO reeving plant is getting updated in the equipment master but the serial number status is not getting changed to AVLB.... also the serial number profile is with MMSL procedure. -
AFAB:AA776 "Create document number range ## using internal number assignmen
Good afternoon
I ask for your guidance to see if anyone knows me that is generating errors in the transaction AFAB AA776 "Create document number range ## using internal number assignment", the peculiarity of this is that I'm in an environment that is proving to migrate V5 to V6 ranges in environment QAS is marked as external and no problems to run on v6 change in SAP itself. Test by removing the flag marking for external control and run, causing an alarm is that it does not work as in my QAS v 5 and that I should remove this flag is removed and remove it in all the years this range of numbers is that it can hurt if you make this change.
Can anyone guide me please.
Thanks for the support.
good dayHello ,
Kindly have a look at the below notes that will help you resolve the
issue :
890976 - Converting closing report to internal doc number assgnmnt
If note 890976 has been applied in your system already (package
level is = or > SAPKH60005), so what you need to check is the
following :
In transaction FBN1, in your company code you should see that the
period and number range in question is ticked as external.
Please untick the indicator for "External" and press enter. If this
box happens to be uneditable then untick the number range for the
previous year and press enter. All other entries will update
automatically.
Here is a brief explaination to why this change has been made:
Before ERP2005(RAPOST2000 exists as of release 4.70)the number usage
was external, because RAPOST2000 internally managed the document number
handling. As this was not possible any more with the New General Ledger
functionality, and as the usage of internal number ranges is much
simpler and more efficient, we changed the number range management
inside RAPOST2000 (and by the way also the new periodic posting report
RAPERB2000).
Please kindly check the attached notes 683313 for your reference.
I hope this provides some clarification.
regards
Ray -
How to create long text in production order?
Hi,
i have found that i could only change long text in the
production order by 'SAVE_TEXT'.
but i want to create long text and any advice?DATA:TEXT_HEADER LIKE THEAD.
DATA:TEXT_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
data: t_ponum like BAPI_ORDER_KEY-ORDER_NUMBER.
t_ponum = '000040000068'.
TEXT_HEADER-TDID ='KOPF'.
TEXT_HEADER-TDOBJECT = 'AUFK'.
TEXT_HEADER-TDSPRAS = sy-LANGU .
CONCATENATE SY-MANDT t_ponum INTO TEXT_HEADER-TDNAME.
clear text_lines.
refresh text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = '12567'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'lg'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'prh'.
append text_lines.
text_lines-TDFORMAT = '*'.
text_lines-TDLINE = 'ueue'.
append text_lines.
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
FID = TEXT_HEADER-TDID
FLANGUAGE = sy-LANGU
FNAME = TEXT_HEADER-TDNAME
FOBJECT = TEXT_HEADER-TDOBJECT
SAVE_DIRECT = 'X'
FFORMAT = '*'
TABLES
FLINES = text_lines
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = TEXT_HEADER
INSERT = ' '
SAVEMODE_DIRECT = 'X'
TABLES
LINES = text_lines.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = TEXT_HEADER-TDOBJECT
NAME = TEXT_HEADER-TDNAME
ID = TEXT_HEADER-TDID
LANGUAGE = sy-LANGU
SAVEMODE_DIRECT = 'X'. -
Windows 7 Boot fails on Mac Pro 1,1 (long-standing issue)
i am having a long-standing problem on my first generation (1,1) mac pro where i have an installation of Windows 7 "under" boot camp. this installation involved some kind of minor mac hack that involved writing something to ISO and/or a CD Rom and then getting the installation onto my hard drive.
right now i am not sure if i should get rid of my tech guy, buy the new mac pro as soon as it comes out, boot into safe mode, re-install windows 7 or all of the above. help please?
lately if i try and Option Boot into this volume i get a Windows closed down incorrectly error and then i hit start windows normally it will crash out and restart the computer in mac OS (i.e. in another option boot volume).
at one point the windows 7 boot was not working at all and we discovered that i had to TURN OFF my G-Tech 3 TB backup drive in order to get the Mac to boot into Windows.
i am wondering if i should focus my energies by trying to boot into Safe Mode (and if so what to do if/when i get there) but also whether this appears to be an issue with the Mac Pro, the G-Tech external, Windows or some combination of all plus some user error thrown in for good measure.
i absolutely need to have a volume of windows 7 running and this is a long-standing issue at this point.
i am also running a Carbon Copy Cloner of this volume (the one that has all my OS's) on a daily basis to another internal hard drive (which i assume does not matter but i figure to mention it).
any ideas on what to do??
i am planning at some point to buy the next release of the Mac Pro so i can upgrade the desktop to Mountain Lion to match the laptop but it seems like i should be able to get this working on my end now...
TIA
P.S. I /am/ also noticing that my User Photo periodically drops off and i just see two blank icons (one for me and one for Guest) when i have to login. i set it to a photo and then a week or two or a boot or two later it will disappear.hi all,
a report back after hacking my way through siberia over here:
turns out there are bad sectors on my drive that some third party program discovered.
the disk is on it's way back to WD with a replacement in the works.
fortunately my internal cloned backup got me back up to speed with mac os but unfortunately i was not yet setup to clone my windows boot camp backup so i will be installing windows 7 boot camp one more time on this drive... -
HOW TO CREATE EXTERNAL NUMBER RANGE IN OM
HI ALL
HOW TO CREATE EXTERNAL NUMBER RANGE IN OM
PLEASE GIVE ME SPOON FEEDING
IT IS VERY URGENT FOR ME
PLEASE PLEASE AND PLEASE
REGARDSok i understood u want the img path for maintaing
positions ,jobs , Org units
Path:IMG->Personnel Mgmt->OM->Basic Setting->Maintain Number ranges.
IMG go to Personnel Management -> Organizational Management -> Basic Settings
-> Maintain Number Ranges.
Select subgroup $$O to maintain number range for Org Unit and click on Number range Maintenance. Then click on change Intervals. Now you can create both internal and external number range for Org Unit according to your requirement.
Similarly for Position select subgroup $$S and follow the same process.
Edited by: Sikindar on Feb 7, 2008 11:23 AM
Edited by: Sikindar on Feb 7, 2008 11:28 AM -
Create Sequence Number with Select Query
Hi All,
I would like to create a sequence number in oracle but instead of hard coding the "start with" I want to select the max value of the primary key of a table and add 1 and use this instead:
So what I want is:
CREATE SEQUENCE crg_mrec_seq
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH select max(primarykey)+1 from table1
INCREMENT BY 1
CACHE 20;I'm guessing I need to pass this max value as a variable into the create sequence number but I'm not sure what syntax to use.
Thanks,
Edspalato76 wrote:
Hi All,
I would like to create a sequence number in oracle but instead of hard coding the "start with" I want to select the max value of the primary key of a table and add 1 and use this instead:
So what I want is:
CREATE SEQUENCE crg_mrec_seq
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH select max(primarykey)+1 from table1
INCREMENT BY 1
CACHE 20;I'm guessing I need to pass this max value as a variable into the create sequence number but I'm not sure what syntax to use.
Thanks,
Edconstruct SQL statement & then EXECUTE IMMEDIATE -
Long number in CSV file appearing in scientific notation by default
Hi,
How can I stop a long number in a CSV file that is opened in excel from appearing in scientific notation by default?
eg.
"hello","778002405501 ", "yes"
becomes:
hello | 7.78002E+11 | yes
I have tried wrapping the data in quotes in the csv but to no avail.
Thanks in advance,
AlistairYou can change the extension from ".csv" to ".xls" and use table to form the data and use
style=”mso-number-format:\@;”
Please read the sample code below in Classic ASP:
You can also read in my blog http://sarbashish.wordpress.com/2012/11/30/export-to-excel-how-to-prevent-long-numbers-from-scientific-notation/
<%
Response.Clear
Response.CacheControl = “no-cache”
Response.AddHeader “Pragma”, “no-cache”
Response.Expires = -1
Response.ContentType = “application/vnd.ms-excel”
Dim FileName
FileName = “TestDB Lookup-” & month(now)&”-”&day(now)&”-”&year(now)&”.xls”
Response.AddHeader “Content-Disposition”, “inline;filename=” & FileName
%>
<html xmlns:o=”urn:schemas-microsoft-com:office:office” xmlns:x=”urn:schemas-microsoft-com:office:excel” xmlns=”http://www.w3.org/TR/REC-html40″;>
<head>
<meta http-equiv=Content-Type content=”text/html; charset=UTF-8″>
<!–[if gte mso 9]>
<xml>
<x:ExcelWorkbook>
<x:ExcelWorksheet>
<x:WorksheetOptions>
<x:DisplayGridlines/>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
<![endif]–>
</head>
<body>
<table border=”0″>
<tr>
<td>ID</td>
<td>Name</td>
</tr>
<tr>
<td style=”mso-number-format:\@;”>01234567890123456567678788989909000030</td>
<td>Sarbashish B</td>
</tr>
</table>
</body>
</html>
Sarbashish Bhattacharjee http://sarbashish.wordpress.com -
Default latest created PO Number in the screen
Hi,
I have one Z program developed for PO print.
It is very much similar to standard ME9F transaction / program.
In ME9F transaction, as soon as we execute a transaction. The latest created PO number will appear onthe PO document filed.
The same is expected to do in Z developed print transaction.
Becaz it won't display newly / latest created document number.
Any one helps me how to make a field with the default value of newly created PO document number.
Your help is appreciated and Awarded suitably for helpful answers.
Thanks in advance.
GiriTry this:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
PARAMETER: p_ebeln LIKE ekpo-ebeln MEMORY ID bes.
Rob -
Steps to create a Number Range.
Can anyone please send me the steps to create a Number Range..Thanks in Advance
Hi,
1) Goto Tcode SNRO
2) select ur concerned OBJECT there.
3) Click on Number Ranges Push Button.
4) then click on Display Interval Button over there.
*****************************************************Other code
Create number range object using OYSN.
Then call the following function modules.
FORM get_next_id CHANGING p_discrep.
DATA: last_id LIKE zrecaudit-discrep,
quant LIKE inri-quantity, "dummy
code LIKE inri-returncode. "returncode
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRECAUDIT'
IMPORTING
number = last_id
quantity = quant
returncode = code
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
ENDIF.
ENDFORM. " get_next_id
Don't forget to reward if useful.. -
Error when creating a Number Range
When I use transaction ZNRO to create a number range, I get an error message:
"Invalid call sequence for interfaces when recording changes".
All I did was enter the text and a domain for the numbers. There was an earlier error regarding buffering. It said that I should not use buffering for accounting documents. I am not using this for accounting documents and do not care if numbers get skipped. So I continue through that error.
But after that, the "Invalid call sequence . . ." error pops up.
I searched this forum generally, and with portions of the error text, and do not find any discussion of problems creating number ranges.
The number range I'm created is very simple. I just need "one up" numbers for a custom database used to store custom schedule information.
I'm at release 4.6c.Here is the error message and text.
I have no idea what it means by "interfaces".
When at release 3.1i, I had no trouble creating number ranges.
<b>Message no. TK 425
Diagnosis
The function you selected uses interfaces to record changes made to your objects in requests and tasks.
Before you save the changes, a check needs to be carried out to establish whether the objects may be changed. This check must be performed before you begin to make changes.
System Response
The function terminates.
Procedure
The function you have used must correct the two Transport Organizer interfaces required. Contact your system administrator.</b>
Maybe you are looking for
-
Hi, Hopefully someone can help. I have the application "djay" and in two different menus there is the action "Eject". I was wondering if it's possible to apply different keyboard shortcuts to those actions with the same name? I can't see how to do it
-
IStat doesn't show fan section
I wake up my lovely Imac MC813 today and noticed iStat doesn't show fan section at all (see screenshot): So what happened? How I can fix this? Didn't find anything about this problem.
-
I have duplicated files on my Harddrive. I want to delte them, it is to messy to find them all individually. So i want to delte them through itunes using the "send to reycele bin thing" so s0ngs i have 4 copys off will just DISSAPPEAR of my HDD. How
-
hi guru's, there is requirement from the client that while make the entry for down payment from customer thru Tcode : F-29, Sales order number should be obligatory. currently sales order filed is not appearing any where in the document. please help t
-
How use ASR9001 DPI with Assurance Manager
Hi, The ASR9001 has DPI features that allow it to detect and count how often URLs are hit. In addition the normal Netflow will account all traffic to/from ports 80 and 443. Question is how can we collect all this in Assurance Manager that is now pa