How to get variant of SUBMIT program to the main program.
Hi!
In my ZFRFI00R_PRINT_DOCUMENTS program i am using
SUBMIT zfrfi01r_alv_fi_document
using SELECTION-SET sp_vari
with p_comp = gw_bkpf_key-bukrs
with p_year = gw_bkpf_key-gjahr
with p_doc = gw_bkpf_key-belnr
and return.
So in the main program i created one layout field to get the what are all the layouts in the SUBMIT program.
I am using FMs 'REUSE_ALV_VARIANT_DEFAULT_GET' , 'REUSE_ALV_VARIANT_F4' to get default layout from the SUBMIT program.
It is not showing the layouts which are in the SUBMIT program when i press F4 in the layouy input field in the selection screen of the main program.
Can anyone help in this regard?
Thank you in advance for ur help.
Regards,
Raj
Hi,
IN the disvariant parameter are you populating the correct program name..meaning the submitted program name..
Thanks,
Naren
Similar Messages
-
Issue in connecting sub VI programs through the main program
Sir/Madam,
I have made a few sub VI programs of 'Keithley 2400', but I am having problem in connecting them together through the main program. Actually the created sub VI programs are not showing any activation button when I connect 'action.vi' file in 'read.vi' file (attachted).
Please give suggestions.
Regards
Yachika Manglik
Solved!
Go to Solution.
Attachments:
action.vi 24 KB
read.vi 14 KB
write.vi 24 KBHello
Thanks for your suggestion.
I have successfully implemented connections in my code according to your given suggestion .
Now I am facing problem to link a file named 'control1.ctl'(attached) that I have made for selecting option 'select type of action' and need to add' control1.ctl' in 'read.vi' file. It is showing following error( below).
Error: " required input ' GPIB action' is not wired.
OR
"Enumeric conflict"
So can you please suggest how this error can be removed?
Attachments:
Control 1.ctl 5 KB
read.vi 13 KB -
How to get return values from a button to main program.
hello,
I have a main program which has a button Authenticate. On click of authenticate open a form for auth which has USERNAME FIELS AND PASSWORD.
If entered fields are true then enable editing of jtable in main program..
Basically something like this :
//main program
Authenticate.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
UpdateAuth ua=new UpdateAuth();// opens form which has username and pass for authentication
ua.setVisible(true);
//need code here for enabling table
if(s=="mactus")
enable table editing
//table.repaint();
// form open for auth..(class UpdateAuth )
private String SigninMouseClicked(java.awt.event.MouseEvent evt) {
String aname=Aname.getText();
String apass=Apassword.getText();
if(aname.equals("") && apass.equals(""))
JOptionPane.showMessageDialog(null,"Enter login name or password","Error",JOptionPane.ERROR_MESSAGE);
if(!(aname.equals("") && apass.equals("")))
if(aname.equals("harshil") && apass.equals("harshil123"))
String s="mactus"; /// if username and password is success enable table editing in main program
return s;
else if (!aname.equals("mactus") && !apass.equals("mactus123"))
Aname.setText("");
Apassword.setText("");
return null;
}986154 wrote:
hello,
I have a main program which has a button Authenticate. On click of authenticate open a form for auth which has USERNAME FIELS AND PASSWORD.
If entered fields are true then enable editing of jtable in main program..Well, you might be in over your head.
//need code here for enabling table
if(s=="mactus") If you don't know how to correctly test for String equality, you will have no chance of getting this to work.
You need to hit the tutorials. First the basic one, then the Swing one. -
How to get variant of SUBMIT program
Hi!
In my ZFRFI00R_PRINT_DOCUMENTS program i am using
SUBMIT zfrfi01
with p_comp = gw_bkpf_key-bukrs
with p_year = gw_bkpf_key-gjahr
with p_doc = gw_bkpf_key-belnr.
The selection screen for both the reports are different. Now my requirement is like when it calls the ZFRFI01 it should ask for variant.When i choose the variant with that the report ZFRFI01 should run.
Any suggestions appreciated
Thanks.
RajaHi,
Try this way,
SUBMIT <report> WITH <p_parameter> EQ <value>
USING SELECTION-SET <variant>
AND RETURN.
Regards.
Marcelo Ramos -
How to get the output of a program into the email program.
hi
i had created a java mail program and the keygeneration program.seperately.
i want to get the keygeneration into my email program.that should be sent along with the text message.so pls help me in this regared.
i had pasted my coding her
email pgm.
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
To use this program, change values for the following three constants,
SMTP_HOST_NAME -- Has your SMTP Host Name
SMTP_AUTH_USER -- Has your SMTP Authentication UserName
SMTP_AUTH_PWD -- Has your SMTP Authentication Password
Next change values for fields
emailMsgTxt -- Message Text for the Email
emailSubjectTxt -- Subject for email
emailFromAddress -- Email Address whose name will appears as "from" address
Next change value for "emailList".
This String array has List of all Email Addresses to Email Email needs to be sent to.
Next to run the program, execute it as follows,
SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
public class SendMailUsingAuthentication
private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
private static final String SMTP_AUTH_USER = "xxxx";
private static final String SMTP_AUTH_PWD = "xxxx";
//private static final String emailMsgTxt = "Online Order Confirmation Message. Also include the Tracking Number.";
private static final String emailSubjectTxt = "Order Confirmation Subject";
private static final String emailFromAddress = "[email protected]";
private static String emailMsgTxt = "I am unable to attend to your message, as I am busy sunning"
+ "myself on the beach in Maui, where it is warm and peaceful."
+ "Perhaps when I return I'll get around to reading your mail."
+ "Or perhaps not.";
private static final String[] emailList = { "[email protected]","[email protected]"};
public static void main(String args[]) throws Exception
SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
System.out.println("Sucessfully Sent mail to All Users");
public void postMail( String recipients[ ], String subject,
String message , String from) throws MessagingException
boolean debug = true;
Properties props = new Properties();
props.put("mail.smtp.host", SMTP_HOST_NAME);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.protocol","smtp");
props.put("mail.debug", "true");
Authenticator auth = new SMTPAuthenticator();
Session session = Session.getDefaultInstance(props, auth);
session.setDebug(debug);
// create a message
Message msg = new MimeMessage(session);
// set the from and to address
InternetAddress addressFrom = new InternetAddress(from);
msg.setFrom(addressFrom);
InternetAddress[] addressTo = new InternetAddress[recipients.length];
for (int i = 0; i < recipients.length; i++)
addressTo[i] = new InternetAddress(recipients);
msg.setRecipients(Message.RecipientType.TO, addressTo);
// Setting the Subject and Content Type
msg.setSubject(subject);
msg.setContent(message, "text/plain");
Transport.send(msg);
private class SMTPAuthenticator extends javax.mail.Authenticator
public PasswordAuthentication getPasswordAuthentication()
String username = SMTP_AUTH_USER;
String password = SMTP_AUTH_PWD;
return new PasswordAuthentication(username, password);
keygeneration program:
import java.io.Serializable;
import java.security.Security;
import com.sun.net.ssl.*;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
public class Eval {
public static void main(String args[]) throws Exception {
String inputString ="0x0b0b0b0b";
KeyGenerator keyGen = KeyGenerator.getInstance("HMACMD5");
SecretKey secretKey = keyGen.generateKey();
Mac mac = Mac.getInstance(secretKey.getAlgorithm());
mac.init(secretKey);
byte[] byteData = inputString.getBytes("UTF8");
byte[] macBytes = mac.doFinal(byteData);
String macAsString = new sun.misc.BASE64Encoder().encode(macBytes);
System.out.println("Authentication code is: " + macAsString);I'm not sure what's confusing you. Just generate a String (using a StringBuffer)
with the data you need and use it as the content of the mail message. If each
recipient needs different content, they'll each need a different MimeMessage
object. -
How to add a code TestIfElse(10) to the Main method of the Program.cs class?
How to add a code TestIfElse(10) to the Main method of the Program.cs class?
Here is my code and I have copied from the Wiley book for Microsoft certification page 14,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ifelse_Statement
class Program
static void Main(string[] args);
TestIfElse(10);
public static void TestIfElse(int n);
if(n < 10)
Console.WriteLine("n is less than 10");
else if(n < 20)
Console.WriteLine("n is less than 20");
else if(n < 30)
Console. WriteLine("n is greater than or equal to 30");
Here is the error list I am getting,
Error 1 Method must have a return type C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\switch_Statement\Program.cs
12 13
switch_Statement
Error 2
Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\switch_Statement\Program.cs
12 24
switch_Statement
Error 3
Method must have a return type C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
12 9
ifelse_Statement
Error 4
Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
12 20
ifelse_Statement
Error 5
Invalid token 'if' in class, struct, or interface member declaration
C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
16 9
ifelse_Statement
Error 6
Invalid token '10' in class, struct, or interface member declaration
C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
16 16
ifelse_Statement
Error 7
Type expected C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
16 16
ifelse_Statement
Error 8
Invalid token '(' in class, struct, or interface member declaration
C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
18 35
ifelse_Statement
Error 9
A namespace cannot directly contain members such as fields or methods
C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
20 10
ifelse_Statement
Error 10
Type or namespace definition, or end-of-file expected
C:\Users\PVS\documents\visual studio 2013\Projects\Lesson01\ifelse_Statement\Program.cs
30 1
ifelse_Statement
Error 11
The type or namespace name 'n' could not be found (are you missing a using directive or an assembly reference?)
c:\users\pvs\documents\visual studio 2013\projects\lesson01\ifelse_statement\program.cs
16 12
ifelse_Statement
Error 12
'System.Console.WriteLine(string, params object[])' is a 'method' but is used like a 'type'
c:\users\pvs\documents\visual studio 2013\projects\lesson01\ifelse_statement\program.cs
18 26
ifelse_Statementstatic void Main(string[] args){
TestIfElse(10);
public static void TestIfElse(int n)
if (n < 10)
Console.WriteLine("n is less than 10");
else if (n < 20)
Console.WriteLine("n is less than 20");
else if (n < 30)
Console.WriteLine("n is greater than or equal to 30");
Fouad Roumieh -
How to get relationship between two views in the reports
How to get relationship between two views in the reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports
Hi,
Please explain your question in detail...what do you want to read ?
If you want to know about the navigation links between the views then you can use APIs like
wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
Iterate through the navigationLinkInfo from above collection and can read the other properties .
I haven't tried the above , but it should work !!!
Regards,Anilkumar -
How to pass the caught exception in Thread.run back to the main program?
I have following three Java files (simplified from a real world application I am developing, see files at the end of this posting):
1. ThreadTest.java: The main program that invokes the Manager.run()
2. Manager.java: The manager that creates a thread to execute the Agent.run() for each agent
3. Agnet.java: The run() method can throw Exception
My goal is twofold:
1. To execute the run() method of an Agent in a thread (the reason for this is there are many Agents all managed by a Manager)
2. To catch the exception thrown by Agent.run() in the main program, ThreadTest.main() -- so the main program can alert the exceptions
My problem:
Bottomline: I cannot pass the exception thrown by Agent.run() in the Thread.run() back to the main program.
Explanation:
The signature of Thread.run() (or Runnable.run()) is
public void run();
Since it does not have a throws clause, so I have to try/catch the Agent.run(), and rethrow a RuntimeException or Error. However, this RuntimeException or Error will not be caught by the main program.
One work-around:
Subclass the ThreadGroup, override the ThreaGroup.uncaughtException() methods, and spawn the threads of this group. However, I have to duplicate the logging and exception alerts in the uncaughtException() in addition to those already in the main program. This makes the design a bit ugly.
Any suggestions? Am I doing this right?
Thanks,
Xiao-Li "Lee" Yang
Three Java Files:
// Agent.java
public class Agent {
public void run() throws Exception {
throw new Exception("Test Exception"); // Agent can throw execptions
// Manager.java
public class Manager {
public void run() throws Exception {
try { // <=== This try/catch is virtually useless: it does not catch the RuntimeException
int numberOfAgents = 1;
for (int i = 0; i < numberOfAgents; i++) {
Thread t = new
Thread("" + i) {
public void run() {
try {
new Agent().run();
} catch (Exception e) {
throw new RuntimeException(e); // <=== has to be RuntimeException or Error
t.start();
} catch (Exception e) {
throw new Exception(e); // <== never got here
// ThreadTest.java
public class ThreadTest {
public static void main(String[] args) {
try {
Manager manager = new Manager();
manager.run();
} catch (Throwable t) {
System.out.println("Caught!"); // <== never got here
t.printStackTrace();The problem is, where could you catch it anyway?
try {
thread.start();
catch(SomeException e) {
A thread runs in a separate, er, thread, that the catch(SomeException) isn't running within. Get it?
Actually the Thread class (or maybe ThreadGroup or whatever) is the one responsible for invoking the thread's run() method, within a new thread. It is the one that would have to catch and deal with the exception - but how would it? You can't tell it what to do with it, it (Thread/ThreadGroup) is not your code. -
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar -
How to get my macbook to connect to the Apple TV?
How to get my macbook to connect to the Apple TV in a strange apartment? I am housesitting for someone for a few months. They mentioned that i would be able to use their Apple TV to play stuff from my macbook. I am using their basic wifi in the apt, which works fine on my macbook and iphone, but see no Apple TV icon appearing on macbook screen, nor any connection happening. (nor is there anything connection w my iPhone). What gives? How can I establish a connection?
See
http://support.apple.com/kb/ts4215 -
How to get latest record on top of the result list
Hi Gurus,
How to get latest record on top of the result list when you open the record.
saved data method in BT120H_CPL of OverView page and result list in ICCMP_INBOX.
Regards,
RaviHi
Try sort descending by on fileld "changed at ".
manipulate the sort depends on your requirement
Regards
Logu -
I have a main program where I call a sub-vi. In this sub-vi, there is a while loop that is used to wait for commands in the sub-vi. While the while loop is running, I cannot continue with normal operation of the main program. I would like get the sub-vi to run independently once it has been called, but not hold up the main program. As well, I need to still be able to send data to the sub-vi
One way is to use VI Server, which has been mentioned by others. This will allow you to start another VI (by name) and run it entirely independently of the calling VI. This is a good way to start various independent VIs from a main menu, for example. None of the VIs thus called need have any connection to the others.
Another way it to have the SubVI in a separate while loop on the calling VI's BD. Then, use a local var to start this sub VI from the main loop. The calling VI sets a local START bit and continues running. The sub VI's while loop watches for this START bit to go true, and then runs the Sub VI. The advantage here is that one can more easily pass arguments to the SubVI when it is started, using local vars, which are preferable to globals. Once the Su
bVI is running, however, you must use a global Stop Bit, set in the calling VI, to stop it when the calling VI exits, or the calling VI will hang up, waiting for the Sub VI to close and exit its while loop.
If you need an example of this, email me. ([email protected]). I can also recommend Gary W. Johnson's excellent book which discusses this. ("LabVIEW Graphical Programming", 2nd Ed).
Note: Where possible, I try to call a subvi from within the main VI, wait till it is done, then continue. It avoids the use of locals & globals, and results in cleaner code, with fewer "race" conditions. However, the main VI stops until the subVI is done, hence one should make the subVI modal. -
I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?
Do you have the email & password of the old Apple ID?
-
How do I set Adobe Flash Player as the default program to open SWF files?
Basic Overview
I have this working fine at my home laptop, however I need this working for projects at school.
Whenever I want to open an SWF file at home, I simply double click it and open it in Adobe Flash Player (Adobe Flash Player 10.0 r22) and I have no problems!
However, when I am at school I have to run SWF files within Internet Explorer, Adobe Flash Player IS installed, but the SWF files are not opened in that directly, they are opened within Internet Explorer.
At Home
If I right click an SWF file at home and select "Open With" and then "Choose Default Program...", Adobe Flash Player is already there under the name 'Adobe Flash Player 10.0 r22', so I can simply select it as the default. (On my home laptop)
At School
At school if go to "Open With" and then "Choose Default Program...", Adobe Flash Player IS NOT there, only Internet Explorer and some other programs in the other programs box. (On my school laptop)
Question
How can I assign Adobe Flash Player as the default program for opening SWF files (on my school laptop)? If I select "Browse..." and go to C:\WINDOWS\System32\Macromed\Flash there is no file with a description of 'Adobe Flash Player 10.0 r22', is the file for the actual program located somewhere else or have I just no looked properly in the folder?
I really need these files opening in Adobe Flash Player directly and not in Internet Explorer (I know you can set the view to 100% and have it sized correctly)
Thanks you to everyone who helps!
-Charlie! (Yes I know I don't need to write this in a forum)The standard Flash Player is a browser add-on, and not a standalone player. So what actually opens when you open an SWF file at home? Flash Player Projector?
If so, you also need to download it at your school, from http://www.adobe.com/support/flashplayer/downloads.html, then do the file association. -
A few days ago I started getting the following message EVERY time I try to log on:
"Do you want to allow the following program to make changes to this computer: It lists FF and Mozilla Corp.
I have to click "Yes" EVERY time and then it my Comcast homepage appears.
I have a PC using Windows 7.
In addition, when my homepage does appear, the 3 little icons in the upper right do not appear. (Minimize, X)A possible cause of this error is that Firefox is set to run as Administrator.
Check that Firefox isn't set to run as Administrator.
Right-click the Firefox desktop shortcut and choose "Properties".
Make sure that all items are deselected in the "Compatibility" tab of the Properties window.
* Privilege Level: "Run this program as Administrator" should not be selected
* "Run this program in compatibility mode for:" should not be selected
Also check the Properties of the firefox.exe program in the Firefox program folder (C:\Program Files\Mozilla Firefox\).
Maybe you are looking for
-
Hello my fellow Apple product user's. My problem has been going on for about a month and half with my laptop locking up, file folders on my desktop loading slowly and my sleep button and other buttons on my dash board not responding. Where to being w
-
Connection between iphone and i-tunes
When I try to connetc my iphone to i-tunes appears this message, unable to connect you iphone unknow error no. 0xE800000A?
-
Why Is The Tool So Lame with AVIs
Hi, I am using CS4 on XP. I imported an avi file from my Casio Elixim camera. I moved or dragged the avi around the time line a little, deciding where I wanted it. 1) The clip won't play through it's entirety. For some reason CS4 won't play the last
-
Sorting vendor checks by vendor name
Client wants checks from payment wizard run to print sorted by vendor name. Any way to do it? TIA. Cindy Lange
-
Timesheet entry form that auto-fills the Date ranges?
I currently have a ColdFusion form & need to add a "Week Selector" drop-down above my table so that: - when the week is chosen from the drop-down, (how do I generate these weeks drop-down values?) - the correct dates are added to the date fields in t