Having your program output to a separate console window
I'm looking for a way to run my program(its just a console application)in a separate black console window(similar to Visual Studio). I'm looking on this forum. Someone said to go into Project Properties and hit a radio button that says "send output to console..." but I don't see it.
I'm using JDeveloper 10.1.3.3
Andre,
You were completely right. I'm embarassed to say that I outright forgot to add the fwsgood.close(); statement. Wasn't showing up as an error, so I missed it. Thanks for the answer, it really helped me out.
Similar Messages
-
Want to hide Java Console Window when launching apps on Solaris 9.
Hi,
I am working in a Solaris environment with Solaris 9.
When I launch any of my applications, the java console window appears.
I want to hide this window.
The java version that I am using is JDK 1.3.1_01.
I found this link that shows you how to configure your java settings to hide the console window.
http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/properties.html
1. I placed the deployment.config file in the appropriate directory:
${deployment.java.home}/lib/deployment.config (${deployment.java.home} is the location of the jre from which the deployment products are run.
Deployment products include Java Web Start, Java Plug-in, Java Control Panel...)
In this file I have the following:
deployment.system.config=/.java/.deployment/deployment.properties
deployment.system.config.mandatory=false
deployment.console.startup.mode=HIDE 2. The /.java/.deployment/deployment.properties file is not created by default.
So I created it but still the java console window appeared.
The above configuration is the system level settings taken from the webpage I specified above.
I have also tried the user level settings but to no avail.
Any ideas what I may be doing wrong?
Rgds,
Adrian.Hi all,
Thanks Jacky, the Control Panel is the best way to �hide� the console window.
I have achieved this when using java 1.4.2.
But when using java 1.3.1_09, the control panel does not give me the option to "Hide console" or "Do not start console� as is the case when using java 1.4.2.
What it goes give is �Show Java Console� checkbox which I have unchecked and minimises the console on the desktop as a result.
Perhaps the functionality to hide (ie: not display) the console window is not available in the java 1.3.1_09 version? -
Outputing the results of your programs
In C++ I always output the results of my programs to the screen. Because I was always making just console programs I would use cout like this:
int main( )
int product = 2;
while(product <= 1000)
cout << 2 * product;
return 0;
Now I have a 5 year old Deitel book that I've been looking through and it appears that they rely more on using some GUI components. They will mostly output the results to dialog boxes or message boxes.
I was wondering is that the only way in Java to output the results of your programs? For example how could I write the above program in Java outputing the results to the console window?public class MyOutput{
public static void main(String args[]){
System.out.println("Hello World"); // <<-- Output to a console.....
} -
Console window shows previous program output
I am new in VS 2010 express c#. I have been trying few program. But recently after trying one mathematical console application code. My output window shows same result for every program.
I have changed code and saved by writing other code. I have deleted and tried new code as well.
Everytime i run program my console window shows same output for my previous mathematical program.
any help would be really appreciate
thanks in advance
I am new in VS 2010 express c#. I have been trying few program. But recently after trying one mathematical console application code. My output window shows same result for every program.
I have changed code and saved by writing other code. I have deleted and tried new code as well.
Everytime i run program my console window shows same output for my previous mathematical program.
any help would be really appreciate
thanks in advance
Hello,
To confirm whether this issue is related to Visual Studio or your project, I would recommend you follow these tips below.
Clear all code and just place one line to output, then clean and rebuild your project, next debug it to see the result.
1. If it prints the same result, then I would recommend you check whether the project is set as startup project, you could right click on that project and then select "Set as StartUp project", and then debug it to test.
2. If it prints the right result for that line, maybe you could narrow down it to see whether your code always print the same result. If possible, you could share the code or even the project with us by removing all sensitive data.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Remotely view output on a separate Linux console
I am wondering if anybody knows of a way to view output on one Linux console from another Linux console. Here is an example. I have an Arch Linux desktop machine and a server machine. I usually use my server remotely through ssh to compile software. Some software takes forever to compile, and I will go somewhere to work on something. I then remotely login from another machine, but I want to see the output from the compiling that is being output to my desktop at home. Does anybody know of a way to grab that output so I can view it from a new console session?
-ChrisGNU screen is fantastic for stuff like this. There are plenty of forum threads out there that talk about setting it up and configuring it (this is a good place to start).[/url]
-
What to do when your program doesn't work.
A huge number of posts here seem to relate to code that has been written (one presumes by the poster), but which doesn't work.
I get the impression that people don't know what to do next.
It's really not that difficult. When you're writing your program you constantly have in mind what you expect will happen as a result of each bit of code that you put.
If at the end of the day, the program as a whole doesn't behave as you expected, then somewhere in there there must be a point at which the program starts doing something that doesn't correspond to what you anticipated. So, you add some System.err.println statements to test your beliefs.
Consider this program that tests whether a number is prime.
public class Test
public static void main(String args[])
// Get the number to test.
int number = Integer.parseInt(args[0]);
// Try each possible factor.
int factor;
for(factor = 2; factor < number; factor++)
// See whether it is really a factor.
if(number / factor == 0)
break;
if(factor == number)
System.out.println("Number is not prime.");
else
System.out.println("Number is prime.");
}Straight forward enough, but it doesn't actually work :( It seems to say that every number is not prime. (Actually, not quite true, but I didn't test it that carefully, since it didn't work).
Now, I could scrutinise it for errors, and then, having failed to find the problem, I could post it here. But let's suppose I'm too proud for that.
What might be going wrong. Well, how sure am I that I'm even managing to capture the number of interest, number. Let's put in a System.err.println() to test that.
Is the program in fact trying the factors I expect? Put in System.err.println() for that.
Is the program correctly determining whether a number is a factor? Need another System.err.prinln (or two) for that.
public class Test
public static void main(String args[])
// Get the number to test.
int number = Integer.parseInt(args[0]);
System.err.println("Number to check is " + number);
// Try each possible factor.
int factor;
for(factor = 2; factor < number; factor++)
System.err.println("Trying factor " + factor);
// See whether it is really a factor.
if(number / factor == 0)
System.err.println(factor + " is a factor.");
break;
System.err.println(factor + " is not a factor.");
if(factor == number)
System.out.println("Number is not prime.");
else
System.out.println("Number is prime.");
}Let's try with on the number 6.
The output is:
Number to check is 6
Trying factor 2
2 is not a factor.
Trying factor 3
3 is not a factor.
Trying factor 4
4 is not a factor.
Trying factor 5
5 is not a factor.
Number is not prime.
Whoah! That's not right. Clearly, the problem is that it's not correctly deciding whether a number is a factor. Well, we know exactly where that test is done. It's this statement:
if(number / factor == 0)Hmm.... let's try 6 / 3, 'cos 3 is a factor.
6 / 3 = 2.
But that's not zero. What the.... Oh - I see, it should have been number % factor.
Ok - let's fix that, and run it again.
Now the output is:
Number to check is 6
Trying factor 2
2 is a factor.
Number is prime.
Not the right answer, but at least it's now figured out that 2 is a factor of 6. Let's try a different number.
Number to check is 9
Trying factor 2
2 is not a factor.
Trying factor 3
3 is a factor.
Number is prime.
Again, got the right factor, but still the wrong answer. Let's try a prime:
Number to check is 7
Trying factor 2
2 is not a factor.
Trying factor 3
3 is not a factor.
Trying factor 4
4 is not a factor.
Trying factor 5
5 is not a factor.
Trying factor 6
6 is not a factor.
Number is not prime.
Aagh! Obvious - the final test is the wrong way round. Just fix that, remove that System.err.println()s and we're done.
Sylvia.Consider this program that tests whether a number is
prime.
[attempt to divide by each integer from 2 to n-1]At risk of lowering the signal to noise ratio, I
should point out that the algorithm given is just
about the worst possible.
I know that the point was to illustrate debugging
and not good prime test algorithms, and I disagree
with the correspondent who thought the post was
condescending.
Anyway, the java libraries have good prime testing
methods based on advanced number theory research that the
non-specialist is unlikely to know. Looking at the java
libraries first is always a good idea.
Even with the naive approach, dramatic improvements
are possible.
First, only try putative divisors up to the square root
of the number. For 999997 this is about 1000 times faster.
Next only try dividing by prime numbers. This is about
7 times faster again. The snag, of course, is to find the
prime numbers up to 1000, so there might not be much
advantage unless you already have such a list. The sieve
of Erastosthenes could be used. This involves 31 passes
through an array of 1000 booleans and might allow an
improvement in speed at the expense of space.
Sorry if I've added too much noise :-) -
Directing std output to the console window
I am trying to direct the standard output from a separately executed console program to the console window belonging to the running application. How can I do this?
For example, in the following code, if I execute the simple Windows 'dir' command using .exec, how can I make the output go to the application's console instead of going to a separate window?
import java.io.*;
class dir
public static void main(String[] args)
try
Process runprogram = Runtime.getRuntime().exec("cmd.exe /C start dir");
catch(IOException e){}
}First I will post the mandatory link for everybody who asks about Runtime.exec():
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Read that and notice the bit about getting data from the process's output stream. You can copy that data to the console. -
Getting Error While Attaching Concurrent Program Output PDF file for POAPPRV Workflow
Hi All,
I am getting the below error when I am trying to attach concurrent program output to the PO Approval Notification.
An Error occurred in the following Workflow.
Item Type = POAPPRV
Item Key = 1040589-528378
User Key =945871
Error Name = WF_ERROR
Error Message = [WF_ERROR] ERROR_MESSAGE=3835: Error '-20002 - ORA-20002: [WFMLR_DOCUMENT_ERROR]' encountered during execution of Generate function 'WF_XML.Generate' for event 'oracle.apps.wf.notification.send'. ERROR_STACK=
Wf_Notification.GetAttrblob(3604701, ZZ_PREVIOUS_PO_COMPARE, text/html)
WF_XML.GetAttachment(3604701, text/html)
WF_XML.GetAttachments(3604701, http://oraerp.am.corp.xxxx.com:8099/pls/DEV, 11283)
WF_XML.GenerateDoc(oracle.apps.wf.notification.send, 3604701)
WF_XML.Generate(oracle.apps.wf.notification.send, 3604701)
WF_XML.Generate(oracle.apps.wf.notification.send, 3604701)
Wf_Event.setMessage(oracle.apps.wf.notification.send, 3604701, WF_XML.Generate)
Wf_Event.dispatch_internal()
Error Stack =
Activity ID = 190844
Activity Label = AL_NOTIFY_APPROVER_PROCESS:ZZ_PO_PO_APPROVE_ATTCH
Result Code = #MAIL
Notification ID = 3604701
There are several threads for this error however I cannot find any specific solution to the problem.
Please find the code below -
wf_engine.setitemattrdocument(itemtype=>itemtype,
itemkey=> itemkey,
aname=>'ZZ_PREVIOUS_PO_COMPARE',
documentid =>'PLSQLBLOB:zz_po_reqapproval_init1.xx_notif_attachments/' || to_char(l_request_id_prev_po)||':'||to_char(l_document_num));
-- here l_request_id_q_and_s is the request id of the program and l_document_num is the PO document number
PROCEDURE xx_notif_attachments(p_request_id IN VARCHAR2,
p_document_num IN VARCHAR2,
p_document IN OUT BLOB,
p_document_type IN OUT VARCHAR2) IS
v_lob_id NUMBER;
v_document_num VARCHAR2(15);
v_document_prefix VARCHAR2(100);
v_file_name VARCHAR2(500);
v_file_on_os BFILE;
v_temp_lob BLOB;
v_dest_offset NUMBER := 1;
v_src_offset NUMBER := 1;
v_out_file_name VARCHAR2(2000);
v_conc_prog_name VARCHAR2(500);
v_conc_req_id NUMBER;
CURSOR get_output_file(p_concurrent_request_id NUMBER) IS
SELECT cr.outfile_name, cp.concurrent_program_name
FROM fnd_concurrent_requests cr, fnd_concurrent_programs_vl cp
WHERE request_id = p_concurrent_request_id
AND cp.concurrent_program_id = cr.concurrent_program_id;
BEGIN
-- set_debug_context('xx_notif_attach_procedure');
v_conc_req_id := to_number(substr(p_request_id,
1,
instr(p_request_id, ':') - 1));
v_document_num := substr(p_request_id,
instr(p_request_id, ':') + 1,
length(p_request_id) - 2);
OPEN get_output_file(v_conc_req_id);
FETCH get_output_file
INTO v_out_file_name, v_conc_prog_name;
CLOSE get_output_file;
v_out_file_name := substr(v_out_file_name,
instr(v_out_file_name, '/', -1) + 1);
v_file_name := to_char(v_document_num) || '-Previous_PO_Rev.pdf';
utl_file.fcopy(src_location => 'APPS_OUT_DIR',
src_filename => v_out_file_name,
dest_location => 'PO_DATA_DIR',
dest_filename => v_file_name);
-- v_lob_id := to_number(v_document_id);
v_file_on_os := bfilename('PO_DATA_DIR', v_file_name);
dbms_lob.createtemporary(v_temp_lob, cache => FALSE);
dbms_lob.fileopen(v_file_on_os, dbms_lob.file_readonly);
dbms_lob.loadblobfromfile(dest_lob => v_temp_lob,
src_bfile => v_file_on_os,
amount => dbms_lob.getlength(v_file_on_os),
dest_offset => v_dest_offset,
src_offset => v_src_offset);
dbms_lob.fileclose(v_file_on_os);
p_document_type := 'application/pdf;name=' || v_file_name;
dbms_lob.copy(p_document, v_temp_lob, dbms_lob.getlength(v_temp_lob));
EXCEPTION
WHEN OTHERS THEN
wf_core.CONTEXT('ZZ_PO_REQAPPROVAL_INIT1',
'xx_notif_attachments',
v_document_num,
p_request_id);
RAISE;
END xx_notif_attachments;
Please help me find a to the above mentioned error.
Thanks,
SuvigyaThere are two ways to look at what error the PLSQLBLOB API is throwing.
1) Call your PLSQLBLOB API GNE_PO_CREATE_FILE_ATTACHMENT.Gne_Create_File_Attachment directly from a PLSQL block and verify that it returns the BLOB data successfully.
You could also call another WF API that in turn executes the PLSQLBLOB API internally. For example,
<pre>
declare
l_document blob;
l_doctype varchar2(240);
l_aname varchar2(90);
begin
dbms_lob.CreateTemporary(l_document, true, dbms_lob.Session);
-- 207046 - This is the notification id of your failed workflow
-- PO_REPORT - Document type attribute
-- 'text/html' - Content Type being generated for
Wf_Notification.GetAttrBLOB(207046, 'PO_REPORT', 'text/html', l_document, l_doctype, l_aname);
-- Print the size of the document here to verify it was fetched correctly
end;
</pre>
2) Turn on log for SYSADMIN user with following attributes.
Log Enabled = TRUE
Log Level = ERROR
Log Module = wf.plsql%
Restart the Workflow Deferred Agent Listener and Workflow Notification Deferred Agent Listener and run your workflow process. Search for log messages written for above context and you can identify the error at wf.plsql.WF_XML.GetAttachment module with message starting as "Error when getting BLOB attachment ->"
Hope this helps.
Vijay -
BI Publisher Charts not getting displayed in concurrent program output
Hi,
I am using BI Publisher version 11.1.1.3.0 on Windows 7 with word 2007. After creating the Bar chart in RTF template of BI publisher when I load sample XML data and check it in "Preview" is displays the output correctly.
My requirement is to print the charts in concurrent program's output on EBS version 12.1.1. (preferably HTML but PDF will also do) However when I run the concurrent program which processes the data definition and the RTF template registered for this report, the output is just an image of the chart. The XML output generated by the program is not reflected in the chart display at all. (I have verified that XML is generated properly)
Can someone please let me know if there is some setup required to make the charts display properly in concurrent program output?
I have also tried BI publisher version 10.1.3.2.1 for this. With this the concurrent program output is just blank. Not even an image is displayed.
p.s. The program uses standard executable XDODTEXE (which is normally used to run BI publisher reports)
Thanks,
ArchanaHi,
I have finally found solution to this issue....
Two setups are required to display the charts in the concurrent program's PDF output:
1. We need to edit the variables CLASSPATH and AF_CLASSPATH. These variables should have the complete path added for the xdoparser.zip file on the server.
2. The DISPLAY variable should be correctly setup to direct the server output.
Also as per my findings so far, the BI (XML) publisher version 11.1.1.3.0 (or any 11g) does not work with EBS (at least for charts). We need to use BI publisher version which is XML 5.6.3 compatible for EBS. This version is 10.1.3.2.1. (patch 12395372) Now this 10g version does not work on Windows 7 so you need to use Windows XP!
With this... finally... your charts should be getting displayed in EBS output...
Cheers!! :-)
Archana -
How do I recover the program for Photoshop Elements 12 that was wiped off my computer when they removed some viruses? I no longer have the program because I bought it on-line and downloaded it instead of having the program disc. I bought it last year and can't seem to contact anyone at Adobe or find out who to call.
You can download it here:
http://prodesigntools.com/photoshop-elements-12-direct-download-links-premiere.html
Follow the Very Important Instructions exactly, even when they don't seem to make much sense. Of course you will need your serial number. -
Dialog Programing: Output screen layout is different from actaul layout
Hi,
I have developed screen layout in SE51 and same is used in my program.Program is working fine but the problem is in column order.I designed layout in SE51 by copying structure from ABAP dictionary and same has been used in my program but output layout column order is completely different from SE51 screen layout.When i check this on Se51,everything is in order.
My program is referring the same screen number and program.there is only one screen i.e 100.
How do we fix this problem.
Regards,Looks like, your table settings got changed for the table control on the screen.
Run your program.
Now, on the screen you can find out the "Table Settings" in the Top Right corner of the Table control as ICON.
Press the Icon and it will bring the Table Settings screen.
In the Current Settings, choose the Basic Settings ... save and close.
Regards,
Naimesh Patel -
Program output on mobile phone
Hi friends,
Iam working for CMM Level 5 company in ABAP and i have no idea about XI and MI.
My requirement is:
One program is running in background at 01:30 in the morning every day.
Requirement is that " i need to show the output of that program on mobile as an SMS in background".
Need to send that program output as SMS to a mobile numbers.
I know it is possible using MI and SAP-BASIS.
Can anyone have any idea on this type of requirement.
Good answers, max points.
Thanks,
Vamsykrishna.hi friend,
first you have to configure your mobile with your sevice provider for this
step1 : type SUB (in caps) in your airtel mobile and send that to number 52600 (only for Tamilnadu users )
step2 : you will recive a confirmation message like "9894243935 @ serviceprovder. com"
step2 : give this in receiver list
step3 : the airtel provider checks for loop backing so please specify a valid sender id
*& Report ZEPM_PRODCUTIONVALUE_SMS
*&created by Mr vijaybabu
**modified for sending sms by E.peachimuthu
*&Requirement by Mr. murugesh Senior manager
REPORT ZEPM_PRODCUTIONVALUE_SMS NO STANDARD PAGE HEADING LINE-SIZE 172..
TABLES: MSEG , MKPF , QAMB , MAKT , MBEW , MARA , T001L , MVKE, ZSD_MOD,SPELL,
MARD.
SELECT-OPTIONS : SO_WERKS FOR MSEG-WERKS OBLIGATORY ,
SO_VKORG FOR MVKE-VKORG OBLIGATORY DEFAULT '1000' ,
SO_BUDAT FOR MKPF-BUDAT OBLIGATORY ,
SO_MATNR FOR MSEG-MATNR ,
SO_FROM FOR MSEG-LGORT ,
P_TO FOR MSEG-LGORT OBLIGATORY.
*parameter : p_to like mseg-lgort obligatory.
*****MAIL/SMS DECLARATIONS ********
data : plant(35) type c,
storage_loaction(35) type c,
Sale_organisation(35) type c,
ltext(105) type c,
text(15) type c.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX,
w_sent_all(1) type c.
DATA L_NUM(3).
DATA : SUB(80) TYPE C.
data p_sender likE somlreci1-receiver.
*******ENDMAIL******
DATA: RET_RATE LIKE KONP-KBETR.
DATA: CHANNEL LIKE TVTWT-VTWEG.
DATA: BEGIN OF ABS OCCURS 0,
WERKS LIKE MSEG-WERKS ,
LOC LIKE MSEG-LGORT ,
VALUE TYPE P DECIMALS 2,
END OF ABS.
DATA: WS_LOT LIKE QAMB-PRUEFLOS.
DATA: SL TYPE P DECIMALS 0.
DATA: WS_RATE LIKE MBEW-VERPR.
DATA: WS_VALUE TYPE P DECIMALS 2.
DATA: WS_CHANNEL(02) TYPE C.
DATA: WA_VKORG LIKE MVKE-VKORG.
data: wa_bwkey like mbew-bwkey.
DATA: T_VALUE TYPE P DECIMALS 2.
DATA: MOD_DATE(6) TYPE N.
DATA: BEGIN OF ITAB OCCURS 0,
MBLNR LIKE MSEG-MBLNR ,
MJAHR LIKE MSEG-MJAHR ,
ZEILE LIKE MSEG-ZEILE ,
MATNR LIKE MSEG-MATNR ,
BUDAT LIKE MKPF-BUDAT ,
BWART LIKE MSEG-BWART ,
WERKS LIKE MSEG-WERKS ,
MENGE LIKE MSEG-MENGE ,
LOC LIKE MSEG-LGORT ,
END OF ITAB.
INITIALIZATION.
P_TO-SIGN = 'I'.
P_TO-OPTION = 'EQ'.
P_TO-LOW = '1200'.
APPEND P_TO.
P_TO-LOW = '3200'.
APPEND P_TO.
P_TO-LOW = '4200'.
APPEND P_TO.
SO_WERKS-SIGN = 'I'.
SO_WERKS-OPTION = 'EQ'.
SO_WERKS-LOW = '1000'.
APPEND SO_WERKS.
SO_WERKS-LOW = '3000'.
APPEND SO_WERKS.
SO_WERKS-LOW = '4000'.
APPEND SO_WERKS.
SO_BUDAT-SIGN = 'I'.
SO_BUDAT-OPTION = 'EQ'.
SO_BUDAT-LOW = SY-DATUM.
SO_BUDAT-HIGH = SY-DATUM.
APPEND SO_BUDAT.
START-OF-SELECTION.
SELECT MSEGMBLNR MSEGMJAHR
MSEGZEILE MSEGMATNR MKPF~BUDAT
MSEGBWART MSEGWERKS MSEG~MENGE
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM MKPF INNER JOIN MSEG
ON MKPFMBLNR = MSEGMBLNR
AND MKPFMJAHR = MSEGMJAHR
AND MKPFMANDT = MSEGMANDT
WHERE BUDAT IN SO_BUDAT
AND MATNR IN SO_MATNR
AND WERKS IN SO_WERKS
AND BWART = '321'
AND UMLGO IN P_TO. " FIELD NAME CHANGED FROM LGORT TO UMLGO WEF 03-01-08 01:00pm SRINI / G.RAJENDRAN
*{ DELETE D01K903932 1
*\ AND XAUTO = 'X' "INSERTED ON 17-12-2007 BY ARUN / SRINIVASAN
*} DELETE
AND LGORT IN P_TO.
PERFORM HEADER.
SL = 0.
LOOP AT ITAB.
WS_LOT = 0.
SELECT SINGLE PRUEFLOS INTO (WS_LOT) FROM QAMB
WHERE MBLNR EQ ITAB-MBLNR AND
MJAHR EQ ITAB-MJAHR AND
ZEILE EQ ITAB-ZEILE AND
TYP = '3'.
IF SY-SUBRC NE 0.
DELETE ITAB .
CONTINUE. ENDIF.
SELECT SINGLE * FROM QAMB
WHERE PRUEFLOS EQ WS_LOT AND
TYP = '1'.
IF SY-SUBRC NE 0.
DELETE ITAB .
CONTINUE. ENDIF.
SELECT SINGLE * FROM MSEG
WHERE MBLNR EQ QAMB-MBLNR AND
MJAHR EQ QAMB-MJAHR AND
ZEILE EQ QAMB-ZEILE AND
WERKS IN SO_WERKS AND
LGORT IN SO_FROM.
IF SY-SUBRC NE 0.
DELETE ITAB .
CONTINUE. ENDIF.
MOVE MSEG-LGORT TO ITAB-LOC.
MODIFY ITAB.
ENDLOOP.
SORT ITAB BY LOC MATNR BUDAT MBLNR MJAHR.
T_VALUE = 0.
LOOP AT ITAB.
SELECT SINGLE * FROM MARA WHERE MATNR EQ ITAB-MATNR.
IF SY-SUBRC NE 0. DELETE ITAB. CONTINUE. ENDIF.
SELECT SINGLE * FROM MAKT WHERE MATNR EQ ITAB-MATNR.
IF SY-SUBRC NE 0. DELETE ITAB .CONTINUE. ENDIF.
*===========================================================
In Material master accounting rate fetch organization
check added on 06.05.2004 as per instruction by Mr.Ariyanayagam.
if itab-werks = '2000'.
clear: wa_bwkey.
wa_bwkey = '2000'.
SELECT SINGLE * FROM MBEW WHERE MATNR EQ ITAB-MATNR and
bwkey = wa_bwkey.
IF SY-SUBRC NE 0. DELETE ITAB . CONTINUE. ENDIF.
else.
SELECT SINGLE * FROM MBEW WHERE MATNR EQ ITAB-MATNR.
IF SY-SUBRC NE 0. DELETE ITAB . CONTINUE. ENDIF.
endif.
Rate fetch org check ends.
*=================================================================
SELECT SINGLE * FROM MARD WHERE MATNR EQ ITAB-MATNR AND
LGORT EQ '1200'.
IF SY-SUBRC NE 0. MARD-LGPBE = SPACE. ENDIF.
Defence Auto components Added on 19/02/2002
*============================================
IF ITAB-LOC = '1200'. DELETE ITAB. CONTINUE. ENDIF.
IF ITAB-LOC = '1042' AND MARA-MATKL NE 'AUTDEF'.
PERFORM MODULE_FETCH.
DELETE ITAB. CONTINUE.
ENDIF.
IF MARA-MATKL = 'AUTDEF'.
ITAB-LOC = '1042'.
MODIFY ITAB.
PERFORM MODULE_FETCH.
ENDIF.
IF ITAB-LOC = '1041'.
PERFORM MODULE_FETCH.
DELETE ITAB. CONTINUE.
ENDIF.
WS_RATE = 0.
IF MBEW-VPRSV = 'V'.
MOVE MBEW-VERPR TO WS_RATE.
ELSEIF MBEW-VPRSV = 'S'.
MOVE MBEW-STPRS TO WS_RATE.
ENDIF.
a.tamilselvi for correction vkorg for rate fetching.
if itab-werks = '1000' or itab-werks = '3000' or itab-werks = '4000' or itab-werks = '1004'.
wa_vkorg = '1000'.
else.
wa_vkorg = itab-werks.
endif.
*IF ITAB-WERKS = '2000'.
WA_VKORG = '2000'.
*elseif itab-werks = '5000'.
wa_vkorg = '5000'.
*elseif itab-werks = '6000'.
wa_vkorg = '6000'.
*ELSE.
WA_VKORG = '1000'.
*ENDIF.
FROM SALES DATA.
CALL FUNCTION 'ZSDF_GETPRDRATE'
EXPORTING
PM_MATNR = ITAB-MATNR
PM_VKORG = WA_VKORG
PM_DATE = ITAB-BUDAT
IMPORTING
CHANNEL = CHANNEL
RET_RATE = RET_RATE
EXCEPTIONS
OTHERS = 1.
IF RET_RATE > 0.
MOVE RET_RATE TO WS_RATE.
MOVE CHANNEL TO WS_CHANNEL.
ELSE.
MOVE ' ' TO WS_CHANNEL.
ENDIF.
IF WS_CHANNEL = '20' or ws_channel = '21' or ws_channel = '23'.
SELECT SINGLE * FROM MVKE WHERE MATNR EQ ITAB-MATNR AND
VTWEG in ('20','21','23').
IF MVKE-KONDM = '01'.
WS_RATE = WS_RATE - ( WS_RATE * '0.30' ) .
WS_RATE = WS_RATE * '0.9324'.
ELSEIF MVKE-KONDM = '02'.
WS_RATE = WS_RATE - ( WS_RATE * '0.4091' ).
WS_RATE = WS_RATE * '0.9324'.
ELSEIF MVKE-KONDM = '03'.
WS_RATE = WS_RATE - ( WS_RATE * '0.3637' ).
WS_RATE = WS_RATE * '0.9324'.
ELSEIF MVKE-KONDM = '04'.
WS_RATE = WS_RATE - ( WS_RATE * '0.20' ).
WS_RATE = WS_RATE * '0.9324'.
ENDIF.
ENDIF.
COMPUTE WS_VALUE = ITAB-MENGE * WS_RATE.
COMPUTE T_VALUE = T_VALUE + WS_VALUE.
SL = SL + 1.
if itab-loc = '1170' and mara-spart eq '60'.
perform mat_txt.
endif.
WRITE:/ '|' NO-GAP ,
(5) SL NO-GAP , '|' NO-GAP ,
ITAB-LOC NO-GAP , '|' NO-GAP ,
ITAB-MBLNR NO-GAP , '|' NO-GAP ,
ITAB-MJAHR NO-GAP , '|' NO-GAP ,
ITAB-ZEILE NO-GAP , '|' NO-GAP ,
ITAB-BUDAT NO-GAP , '|' NO-GAP ,
ITAB-MATNR NO-GAP , '|' NO-GAP ,
(15)MARA-BISMT NO-GAP , '|' NO-GAP ,
(30)MAKT-MAKTG NO-GAP , '|' NO-GAP ,
(12)ITAB-MENGE NO-GAP , '|' NO-GAP ,
(10)WS_RATE NO-GAP , '|' NO-GAP ,
(15)WS_VALUE NO-GAP , '|' NO-GAP,
*{ INSERT D01K903779 1
(02) mara-spart no-gap, '|' no-gap,
*} INSERT
(02)WS_CHANNEL NO-GAP , '|' NO-GAP,
(10)MARD-LGPBE
READ TABLE ABS WITH KEY WERKS = ITAB-WERKS
LOC = ITAB-LOC.
IF SY-SUBRC EQ 0.
ADD WS_VALUE TO ABS-VALUE.
MODIFY ABS INDEX SY-TABIX.
ELSE.
MOVE ITAB-LOC TO ABS-LOC.
MOVE ITAB-WERKS TO ABS-WERKS.
MOVE WS_VALUE TO ABS-VALUE.
APPEND ABS.
ENDIF.
CLEAR ABS.
PERFORM MODULE_FETCH.
MOVE itab-budat+0(6) TO mod_date.
SELECT SINGLE * FROM zsd_mod WHERE matnr = itab-matnr AND
monyr = mod_date.
IF sy-subrc NE 0.
zsd_mod-matnr = itab-matnr.
zsd_mod-monyr = mod_date.
PERFORM module_update.
INSERT INTO zsd_mod VALUES zsd_mod.
COMMIT WORK.
ELSE.
PERFORM module_update.
MODIFY zsd_mod.
COMMIT WORK.
ENDIF.
ENDLOOP.
ULINE.
WRITE:/ 'Total value : ' , T_VALUE.
ULINE.
WRITE:/ , /.
WRITE:/ 'ABSTRACT' COLOR 3.
WRITE:/ SY-ULINE(46).
T_VALUE = 0.
SL = 0.
LOOP AT ABS.
SELECT SINGLE * FROM T001L WHERE WERKS EQ ABS-WERKS AND
LGORT EQ ABS-LOC.
IF SY-SUBRC NE 0. CLEAR T001L. ENDIF.
SL = SL + 1.
WRITE:/(5) SL NO-GAP , '|' NO-GAP ,
ABS-LOC NO-GAP , '|' NO-GAP ,
T001L-LGOBE NO-GAP , '|' NO-GAP ,
ABS-VALUE NO-GAP , '|' NO-GAP.
T_VALUE = T_VALUE + ABS-VALUE.
ENDLOOP.
WRITE:/ SY-ULINE(46).
WRITE:/ 'Total value : ' , T_VALUE.
WRITE:/ SY-ULINE(46).
perform send_sms.
FORM HEADER.
ULINE.
FORMAT COLOR 1 ON.
WRITE:/ '|' NO-GAP ,
(5) 'Slno' NO-GAP , '|' NO-GAP ,
'SLoc' NO-GAP , '|' NO-GAP ,
'Material Document ' , '|' NO-GAP ,
'Post.date ' NO-GAP , '|' NO-GAP ,
(18)'Material' NO-GAP , '|' NO-GAP ,
(15)'Old.code' NO-GAP , '|' NO-GAP ,
(30)'Description ' NO-GAP , '|' NO-GAP ,
(12)'Quantity' NO-GAP , '|' NO-GAP ,
(10)'Rate' NO-GAP , '|' NO-GAP ,
(15)'Value' NO-GAP , '|' NO-GAP,
*{ INSERT D01K903779 1
(02) 'Dv' no-gap, '|' no-gap,
*} INSERT
(02)'Ch' NO-GAP , '|' NO-GAP,
(11)'Storage Bin'
FORMAT COLOR 1 OFF.
ULINE.
ENDFORM.
*& Form MODULE_UPDATE
text
--> p1 text
<-- p2 text
FORM MODULE_UPDATE.
CLEAR : ZSD_MOD-DISPO.
IF ITAB-LOC = '1001'. MOVE '101' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1002'. MOVE '102' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1003'. MOVE '103' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1004'. MOVE '104' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1005'. MOVE '105' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1006'. MOVE '106' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1011'. MOVE '111' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1021'. MOVE '201' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1022'. MOVE '202' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1026'. MOVE '206' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1041'. MOVE '412' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1042'. MOVE '412' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1044'. MOVE '203' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1051'. MOVE '501' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1052'. MOVE '502' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1055'. MOVE '503' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1057'. MOVE '207' TO ZSD_MOD-DISPO. ENDIF.
W.e.f Apr.2004 1057 locked and 1028 activated for 207 module.
IF ITAB-LOC = '1028'. MOVE '207' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1071'. MOVE '701' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1072'. MOVE '702' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1073'. MOVE '703' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '1611'. MOVE '610' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3012'. MOVE '601' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3022'. MOVE '602' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3032'. MOVE '603' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3042'. MOVE '604' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '4052'. MOVE '605' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3052'. MOVE '605' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3062'. MOVE '606' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '4072'. MOVE '607' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3072'. MOVE '607' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '4092'. MOVE '609' TO ZSD_MOD-DISPO. ENDIF.
IF ITAB-LOC = '3112'. MOVE '612' TO ZSD_MOD-DISPO. ENDIF.
W.e.f Jan.2005 activated for 611 module.
IF ITAB-LOC = '3612'. MOVE '611' TO ZSD_MOD-DISPO. ENDIF.
ENDFORM. " MODULE_UPDATE
*& Form MODULE_FETCH
text
--> p1 text
<-- p2 text
FORM MODULE_FETCH.
MOVE ITAB-BUDAT+0(6) TO MOD_DATE.
SELECT SINGLE * FROM ZSD_MOD WHERE MATNR = ITAB-MATNR AND
MONYR = MOD_DATE.
IF SY-SUBRC NE 0.
ZSD_MOD-MATNR = ITAB-MATNR.
ZSD_MOD-MONYR = MOD_DATE.
PERFORM MODULE_UPDATE.
IF NOT ZSD_MOD-DISPO IS INITIAL.
INSERT INTO ZSD_MOD VALUES ZSD_MOD.
COMMIT WORK.
ENDIF.
ELSE.
PERFORM MODULE_UPDATE.
IF NOT ZSD_MOD-DISPO IS INITIAL.
MODIFY ZSD_MOD.
COMMIT WORK.
ENDIF.
ENDIF.
ENDFORM. " MODULE_FETCH
*& Form mat_txt
text
--> p1 text
<-- p2 text
FORM mat_txt .
data: wa_bismt like mara-bismt.
data: wa_matnr like mara-matnr.
if mara-bismt+0(1) ne 'M'.
func to rev conver
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = itab-matnr
IMPORTING
OUTPUT = wa_matnr
concatenate 'M00000' wa_matnr into wa_bismt.
mara-bismt = wa_bismt.
clear: wa_bismt,wa_matnr.
endif.
ENDFORM. " mat_txt
*& Form send_sms
text
--> p1 text
<-- p2 text
FORM send_sms .
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDMAIL'.
Mail Subject
CONCATENATE 'PDN value' '' INTO SUB SEPARATED BY SPACE.
DOC_CHNG-OBJ_DESCR = SUB.
Mail Contents
CLEAR SUB.
*DATA : SPELL(100) TYPE C.
OBJTXT = SUB.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = t_value
CURRENCY = 'INR'
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
text = t_value.
condense text.
if so_werks-high = space.
loop at so_werks.
if sy-tabix = 1.
concatenate 'plant:' so_werks-low into plant.
else.
concatenate plant so_werks-low into plant separated by ','.
endif.
endloop.
else.
concatenate 'plant:' so_werks-low '_To_' so_werks-high into plant.
endif.
concatenate plant ' __ ' 'Pdn val on :' SO_BUDAT-low6(2) '.' SO_BUDAT-low4(2) '.' SO_BUDAT-low+0(4)
into objtxt .
DATA : SPL(80) TYPE C.
*SPELL-WORD LOWER CASE
TRANSLATE SPELL-WORD TO LOWER CASE.
concatenate objtxt 'is Rs' text ':' SPELL-WORD 'Rupees only' into objtxt separated by ''.
*concatenate objtxt into objtxt separated by space.
append objtxt.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = 20.
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
CLEAR RECLIST.
read table so_werks index 1.
if so_werks-low = '1000'.
endif.
RECLIST-RECEIVER = "recv id"
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
p_sender = " sender id "
ld_sender_address = p_sender.
ld_sender_address_type = 'INT'.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = OBJPACK
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT RSCONN01 WITH MODE = 'INT'
WITH OUTPUT = ''
AND RETURN.
ENDFORM. " send_sms -
JNI: Reading Java output from console window
Hi!
Sorry if this is wrong place to put this topic, but I didn't know where to put it, so now it's here.
I'm trying to make a launcher program with C++ which would start my java program. I'm using "env->CallStaticVoidMethod (romexisClass, mid, args);" and it works perfectly. But I'd like to read the text which my java program outputs to the console window and save it into a text file. Is this possible and how? It looks like I stdout etc. won't work.
Or as other option I could use some Java Exe Wrapper, but I haven't found any which would allow passing arguments to the main() without -D option and I need to be able to read those arguments from a .ini-file. It should be a subtitute for the following command "java -Xss$var1k -Xms$var2m -classpath $var3 test.program host=$var4" in which I'd read $vars from a .ini-file.
Thx,
LassiMaybe this will do the job:
http://cboard.cprogramming.com/archive/index.php/t-86580.html -
Calculate the time spent to execute your program
Hi
I have a pgm which calculates the response time in milllisecond using method System.currentTimeMillis(). And I get answer 0.
My question is If we measure the time in terms of nanosecond, do you think we still get zero answer?and What is your explanation for that?
Waiting for reply. Thanks in Advance
Regards,
JyotiHi,
Here is the code for calculating the response time.
public class RunLinkedEvenOddList {
public static void main(String[] args) {
long time1;
long time2;
time1 = System.currentTimeMillis();
System.out.println("Program 2 output:");
LinkedEvenOddList eolist = new
ew LinkedEvenOddList();
eolist.insert(9);
eolist.insert(4);
eolist.insert(3);
eolist.insert(2);
eolist.insert(5);
eolist.print();
System.out.println("print Even:");
eolist.printEven();
System.out.println("print Odd:");
eolist.printOdd();
eolist.delete(9);
eolist.delete(1);
System.out.println("list after delete 9, 1:");
eolist.print();
System.out.print("execute isMemeber(3): ");
System.out.println(eolist.isMember(3));
time2 = System.currentTimeMillis();
System.out.println("The starting time: " + time1 +
+
" milli seconds.");
System.out.println("The ending time: " + time2 +
" milli seconds.");
Answer the following questions based on the output of
your code:
1. Calculate the time spent to execute your program
based on the value of time1 and time2; you need write
your formula first and then give the answer in
millisecond.
Answer:
time2-time1
time spent to execute your program = 0 millisec
2. If we measure the time in terms of nanosecond, do
you think we still get zero answer?
Answer:
3.What is your explanation for that?
Answer:
Pls help me in answering question 2 and 3. Thanks in
advance.Hai Ram!
Yeh homework mai hai.
Akhela mai karo. (Do your own work). -
How to Email Concurrent Program Output to Email using Shell Script
Hi All,
Have a Nice Day,
I have a tricky requirement and i was not able to achieve, let me explain my requirement
I have created a PLSQL Concurrent Program named "Approval Update". This will do update and it display the number of rows updated.
Now i need to take this concurrent program output and it needs to be send it to the person who submits this program as an email using shell scripts.
I have referred meta link note as well as some OTN posts but I was not able to achieve this.
Please help me to complete this As soon as possible, Thanks in advance for your help.
Let me know if you need more clarifications.
Regards,
CSKI don't have much idea in shell scripts all i want is, in my shell script i need to get the parent concurrent program output and that needs to be emailed to the intended person.
Please help to to get the shell script commands for this.I do not have any shell script to share, sorry! If you want the query to get the parent request_id so you can get the log/out file name/location from then please refer to:
REQUESTS.sql Script for Parent/Child Request IDs and Trace File IDs [ID 280295.1]
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONC_REQ_SUMMARY_V&c_owner=APPS&c_type=VIEW
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_REQUESTS&c_owner=APPLSYS&c_type=TABLE -- LOGFILE_NAME & OUTFILE_NAME
Thanks,
Hussein
Maybe you are looking for
-
EPrint for HP Photosmart C4583
hi everybody, Cannot find any info about a possibility of ePrint'ing on HP Photosmart C4583. Is this printer compatible with ePrint? If it is, please, describe the process how I can print documents or photos directly from iphone/ipad by wifi. Please,
-
Jpegs flicker when exported to .mov
Media & project properties field order is set to "none" but 2 jpegs still flicker on the exported QT file. What to do?
-
My iMac 2009 model won't start.
My iMac 2009 model won't start. Was working fine the night before, tried to on it but still no response. I also tried unplugging and plugging into the main switch plus other power points several times , doesn't work either. Please assist as most of w
-
Does anyone uses cooling pad with a Mac Mini. If so, could you please provide some suggestions? I am not looking for a bigger one, rather it should occupy minimum space and fits the mac mini. Thanks.
-
I imported to library in iPhoto and now have an album called com.apple.iLifeMediaBrowser which contains a lot of pics that were deleted plus a bunch of other pics......How do I move pics from this album to their original album???