In PAI module call a method and send reference to module.
Hi,
In object oriented languages like Java you can send the reference to an object to a method, something like: object1.callFunction(me)
where "me" is the reference to the object calling the function. So the "object1" can call methods inside "me".
I want to do the same in a screen. I want to do the following. In the PBO module when the screen initializes I want to do:
PROCESS BEFORE OUTPUT.
MODULE init_screen_0100.
CALL FUNCTION some_function
EXPORTING me
where me is the reference to the screen.
Is this possible, and if yes, how to do this?
After this I am going to from another object trigger events in this screen, thats why I want the reference to it.
regards
Baran
Hi Baran,
This thing is not possible with module pool program.......
In case you want to do something like this do it with call screen or leave to screen so that you are you can go to next screen...
Thanks and Regards,
Kunjal Patel
Similar Messages
-
How to call Instance Methods and set property values in BAPI?
In Project systems, for the three business objects viz.
Network, ProjectDefinition and WBS, there are two kinds of methods which are available : class methods and instance methods. We have tried calling some instance methods, for instance, BAPI_PROJECTDEF_GETDETAIL to get details pertaining to a project. While importing this BAPI, it shows two elements for mapping i.e. Current Internal Project(string) and Current External Project(string). We supplied these values for an existing project. Upon running this call through an XML client at our end, it
returned an error "Module Unknown Exception". This general message is present on every instance method thus far. Upon searching in BAPI Explorer for Project System->ProjectDefinition->GetDetail, we found that this BAPI didn't take any input parameter.
Following message was displayed in BAPI Exlorer for this BAPI:
"... Obligatory import parameters are the external and internal keys CURRENTEXTERNALPROJE and CURRENTINTERNALPROJE of the project definition.The system reads parameters contained in the structure
BAPI_PROJECT_DEFINITION_EX ..."
i) How to supply the values of Obligatory import parameters.
ii) What are the possible causes of this exception.
iii) How to call an instance method. We are using same mechanism for calling class as well as instance methods so far, we have been to call only class level methods successfully. Is there anything special that we
need to do to call instance methods.Hi,
what version is the SAP PS running? If WebAs or higher, create an inbound synch interface containing your two parameters in the request structure and as many as you require in your response structure. Generate an Inbound ABAP proxy, where you can plug in some code, i.e. create and instantiate an object of the required type and make the call to the BAPI.
If SAP PS on lower than WebAs, then create a wrapper function module and make it RFC enabled. Then plug your code in here and do the same thing.
Watch out for commits!
Cheers,
Mark -
How many reocrds update in call transaction method and session method
The flat file having the 10 records but the flat file having the 5 th record is error so in session method how many records will update and in call transaction how many records will update.
can you provide with detailed information like in synchrnous mode and asynchronous mode
Regards
reddyhi,
session method :up to 4 records will be updated as it is in synchronus mode.
Call transaction method : except 5 th all 9 records will be updated as it is assyncronous method.
Regards
sandeep Reddy -
Difference between calling static method and not static method?
Hi,
Suppose i want to write a util method, and many class might call this method. what is better? writing the method as static method or not static method. what is the difference. what is the advantace in what case?writing the method as static method or not static
method. what is the difference.The difference is the one between static and non-static. Any tutorial or the JLs will clarify the difference, no need to repeat it here.
what is the advantace in what case?It's usually not like you have much of a choice. If you need access to an instance's attributes, you can't make it static. Otherwise, make it static. -
Where can i find the method and property reference?
hello,
i am now writing ActivX for C++ and LabView ( as container). However, I cant find the detail description of all properties and methods of the exported class from LabView. Can you suggest me some reference of it? thanks so much of it!
CowCowHello
Open up The LV Help and goto the search tab to look for ActiveX Server Virtual. You should find a page called ActiveX Server Virtual Instrument Class Properties and Methods. This lists all the methods and properties of the Virtual Instrument object.
Bilal Durrani
NI -
Call tp EP and sending multiple rows of records
Hello friends,
I am creating a screen and am sending back to EP an user ID.
However I would like to send Multiple User-Ids.
Below is the code of what AM I doing.
str = userid. " NOTE - I would like to send Multiple IDS.
lv_value_label->set_string_struct_element( element = str
label_name = 'MAINTID' ).
it_result_state-result_state = 'APPROVED'.
APPEND it_result_state TO it_result_states.
CALL METHOD eup_structure_factory=>pack_value_label_to_xml
EXPORTING
iv_value_label = lv_value_label
IMPORTING
ev_xml = str.
CALL FUNCTION 'EUP_STORE_BSP_OUTPUT_DATA'
EXPORTING
iv_process_id = process_id
iv_task_id = task_id
iv_output_value = str
TABLES
it_result_states = it_result_states.Dear Ster,
I think you are having all the user id's in an internal table.
Why dont you loop your internal table and pass those values in the standard FM you represented ('EUP_STORE_BSP_OUTPUT_DATA').
I'm not aware that, whether there is any Standard FM's to be used for sending multiple user ID's. Will check and let you know.
Hope this will be helpful.
Regards,
Gokul.N -
I have an IPhone 4 , which is on a Vodafone network, when I try and make outgoing calls it says 'call failed' . I am still able to send/receive SMS and IM and receiving calls is also so problem, does anyone have any solutions?
You need to contact Vodafone.
-
Calling a method and setting an ImageIcon with source from anoth class
I am trying to make a simple game, first I am trying to set up a game board, and make it possible to place units on the board. (This game will probably never be possible to play, I am just using it to try to understand Java, GUI, Swing, and using more than one class).
So far I have 4 classes: Board (extends JFrame, sets up a gameboard, on which to place the pieces), Unit (a class from which the specific units types will inherit), Horse (my only type of unit, which extends the Unit class), and Game (which calls methods from the other classes).
(These don't do much now.. this is what they will do, hopefully).
All these classes are in a package called Gamev1.
In the main method of Game, I do:
---code--
public static void main (String[]args){
new Board().show();
Horse horseUnits[] = new Horse[1];
horseUnits[0] = new Horse();
horseUnits[0].moveUnit(squares[0]);
end of code--
when I debug it I get:
myjava/FirstGraphics/Gamev1/Game.java [25:1] cannot resolve symbol
symbol: variable squares
location: class.myjava.FirstGraphics.Gamev1.Game
horseUnits[0].moveUnitsquares[0]);
1 error
---code----
moveUnit(JLabel moveTo)
is a method in Unit class:
public void moveUnit(JLabel moveTo){
target=moveTo;
target.setIcon(this.image);
if (this.position !=null)
this.position.setIcon(noUnit);
this.position=moveTo;
---end of code---------
squares[] is an array of JLabels which is set up in the Board class, whenever a new Board is created:
---code---
JLabel squares[] = new JLabel[100];
for (int s=0; s<100; s++){
squares[s] = new JLabel();
---end of code---
I tried changing the reference from squares[0] to Board.squares[0] but I got the same error message in debug.
Any idea what is wrong?
I have another problem, which is probably similar.
in the Board class I call:
squares[s].setIcon(Unit.noUnit);
and in the Unit class I have:
static ImageIcon noUnit = new ImageIcon("images//none.gif");
I don't get an error message mentioning it, but (without the attempt to place the horse on the board) the program compiles, but doesn't put this image on the labels. Any idea what is the porblem here?
If I have not given enough information for anyone to help me, please tell me what further information I should give.
Thanks to anyone who answers.I got it to work with
Board board = new Board();
horseUnits[0].moveUnit(board.squares[0]);To use Board.squares[0], squares would have to be static.
The ImageIcon seemed to work okay. I noticed that your post had two slashes in the url [/] - that might throw things off . . .
The code below has the icon call at the end of setLabeLProperties.
I got carried away playing with the graphics so the squares don't work very well.
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class HumaniBlue {
public static void main(String[] args) {
Board board = new Board();
board.show();
JLabel label5 = board.getLabel(5);
//System.out.println("label5 name = " + label5.getText());
Horse[] horseUnits = new Horse[1];
horseUnits[0] = new Horse();
horseUnits[0].moveUnit(board.squares[0]);
class Unit {
static ImageIcon noUnit = new ImageIcon("images/bclynx.jpg");
public void moveUnit(JLabel square) {
class Horse extends Unit {
public Horse() {}
class Board {
JFrame f;
JPanel gameBoard;
int labelSize;
JLabel[] squares = new JLabel[16];
GridBagConstraints gbc = new GridBagConstraints();
public Board() {
gameBoard = new JPanel(new GridBagLayout()) {
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
double width = getSize().width;
double height = getSize().height;
g2.setPaint(Color.white);
g2.fill(new Rectangle2D.Double(0, 0, width, height));
g2.setPaint(Color.black);
Shape line;
double
gridSize = (width < height ? width : height) * 0.8,
gridUnit = (width < height ? width : height) / 5,
x = (width - gridSize) / 2,
y = (height - gridSize) / 2;
labelSize = (int)gridUnit;
for(int j = 0; j < 5; j++) {
line = new Line2D.Double(x, y, x, y + gridSize);
g2.draw(line);
x += gridUnit;
x = (width - gridSize) / 2;
for(int j = 0; j < 5; j++) {
line = new Line2D.Double(x, y, x + gridSize, y);
g2.draw(line);
y += gridUnit;
//System.out.println("width = " + width + "\theight = " + height + "\n" +
// "x = " + x + "\ty = " + y + "\n" +
// "gridSize = " + gridSize + "\tgridUnit = " + gridUnit);
f = new JFrame();
f.getContentPane().add(gameBoard);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setSize(400,400);
f.setLocation(600,200);
//f.setVisible(true);
setLabelProperties();
private void setLabelProperties() {
int
r = 30,
g = 30,
b = 0,
inc = 55;
//System.out.println("labelSize = " + labelSize);
for(int j = 0; j < squares.length; j++) {
squares[j] = new JLabel("Square " + j, JLabel.CENTER);
squares[j].setOpaque(true);
squares[j].setPreferredSize(new Dimension(73, 73));
// add labels
int index = 0;
gbc.gridx = 0;
gbc.gridy = 0;
for(int y = 0; y < 4; y++) {
for(int x = 0; x < 4; x++) {
index = y * 4 + x;
squares[index].setBackground(new Color(r,g,b,90));
gameBoard.add(squares[index], gbc);
gbc.gridx++;
r += inc;
gbc.gridy++;
gbc.gridx = 0;
r = 90;
g += inc;
squares[9].setIcon(Unit.noUnit);
public void show() {
f.setVisible(true);
public JLabel getLabel(int index) {
return squares[index];
} -
With my Nokia I can call another mobile with a text like this: #status or #confort etc...
I need it for an Allarm of the mountain's house.
How can I do the same thing with my iphone?
Thanks
MikyHi Joe,
Yeah, that's been the method I've been testing with. Is there a way for AIR to access the Intent API?
Android code:
final Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra("sms_body", msgText);
i.putExtra(Intent.EXTRA_STREAM, imageUri);
i.setType("*/*");
startActivity(i);
Thanks -
LV 2012 Calling FPGA method node with reference 0x000000 does not return error
Why is it the case that when an FPGA reference is initialised with a constant (resulting in it having the value 0x000000), it doesn't return an error when passed to a method node?
I'm having some weird behaviour in my code where 99% of the time when run, it doesn't function correctly (the reference is deemed valid despite being 0x000000) and then when initialised to an actual running FPGA, the FPGA doesn't seem to respond to commands.
Edit: Further to the message, linking the reference to a NaN/Reference comparison returns true. So it's detected as being not a reference, but yet the method node doesn't see this as an error.Hi Alex,
Can you please post a screenshot of the portion of your Host vi where you are creating the FPGA reference?
Thanks,
Allie -
VI Server and "this" reference
Hallo LabVIEWers,
not a real problem (at the moment so far, but who knows ?). Is there a
G-construct similar to the "this" reference in Java or C++, so that a VI can
act on its own methods or property via the VI-Server. For example open
reference to itself, modify some properties, call some methods, and close
reference ?
Best regards
OliSure, place a property node or invoke mode on the block diagram and right
click it. Select "Select VI Server Class >" and click on "VI". you can
then select properties and methods for that VI. By not wiring a reference
in, the node refers to the vi it resides in.
Jared
"Oliver Friedrich" wrote:
>Hallo LabVIEWers,>>not a real problem (at the moment so far, but who knows
?). Is there a>G-construct similar to the "this" reference in Java or C++,
so that a VI can>act on its own methods or property via the VI-Server. For
example open>reference to itself, modify some properties, call some methods,
and close>reference ?>>Best regards>>Oli>> -
How to call a method in bean from application module Impl?
i have to call a method which is in a bean from AppmoduleImpl class. Is it possible ?
The model layer should never depend on a specific view layer - this breaks reusability.
What you need to do is expose a service method on your AM. Then your view can call this method and pass a parameter into the model layer. -
Error while calling Proxy Method
Hi All,
I am trying to call aproxy method to send some information.
However it raises an exception...The details of the exception are as follows:
CX_SXML_PARSE_ERROR:Exception CX_SOAP_ROOT occurred (program: CL_SOAP_RUNTIME_ROOT==========CP, include: CL_SOAP_RUNTIME_ROOT==========CM004, line: 110)..Exception CX_SOAP_ROOT occurred (program: CL_SOAP_MESSAGE_NEW===========CP,include: CL_SOAP_MESSAGE_NEW===========CM00R, line: 39)..Error while parsing an XML stream: 'BOM / charset detection failed'.
Any idea of what could be the problem...
NOTE: I had generated the Proxy using the WSDL file...Hi Hanife,
My report using the client proxy failed with the error 'BOM / charset detection failed' while trying to pass string value to the generated variable.
I solved this issue by converting the string to an xstring either by function module SCMS_STRING_TO_XSTRING or xslt function call transformation ID
After that the proxy call was successful. Test if the webservice could deal with the result created by the proxy runtime have not been done yet.
Hope this helps.
Kind regards,
Jochen -
HCM P&F: Check and Send won't update back end fields?
Hi All,
Here is my issue: I have a field that is not editable on the screen - we manipulate it using a generic service that is called when the user presses a button.
Of course, as we know, all services are called every time 1 service is called, so it ALSO gets called at check and send.
This would be fine, except P&F appears to not actually change the field value at check and send.
So for instance - I click the button and it puts a value of 1.05 in the field. Great - works fine.
If I don't click the button and instead only click check & send - I can see in debugger that it is doing the calculation and putting the correct value in the service_datasets table, but when the form loads the value is not updated on the screen and it is not passed to the next step.
Should check and send manipulate that value? If not, is there a way to force the user event to be called? Sadly, I can't set the field as required, because the required check passes before P&F ignores the new value...
Alternatively, I suppose if there were a way to know the difference between check & send and a user event in the code, that would be good enough."Check" should change it just like your User Event does. Is your User Event set to do "check" operation too or is it doing "initialize"? That might be a difference. But yes....the check/send should be changing it on the form to reflect the new value. I do it all the time (for example, in on of my processes right now I have a table of wage types and when the user adds a new wage type to the table, another field is triggered that shows the calculated annual salary in an non-edit form field.....same kinda idea as you are trying).
-
How is call web method in application?.
Hi,
I have created java web application(Web Service).
I want to call the setName() method in java application(GUI).
how is call web method in application?.
package sv;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService()
public class MyService {
@WebMethod(operationName = "setName")
public String setName(@WebParam(name = "name")
String name) {
return "my string is "+ name;
}The model layer should never depend on a specific view layer - this breaks reusability.
What you need to do is expose a service method on your AM. Then your view can call this method and pass a parameter into the model layer.
Maybe you are looking for
-
Reading from graph to text file in labview 7.0
Hi Guys! I am doing a project which reads analog values from a microprocessor board and I am using the Labview example Cont Acq&Graph Voltage-Int Clk.vi. I am getting an analogue graph using this VI. is there any way I can convert the values on the g
-
Why is it such a pain to create playlists?
On the mac you can use commandshiftN to create a playlist from a selection, but for some reason there's no shortcut for this on the pc, and it's a pain. I transfered all my music to my PC b/c it's better than my aging powerbook, but I was too lazy to
-
Security deposit contract creation
Hi Gurus, while creating security deposti contract(z001 contract type) it asking contract number to enter even though we have given internal number range. We have implemented EHP5.I am testing in quality. we given internal number range in contract n
-
I mean exactly the same. Like down to the last detail!
-
My canon EOS DIGITAL ver 24.0 in not working with mac pro os x
MY CANON EOS DIGITAL SOFTWARE VER 24.0 IS NOT WORKING WITH THIS VERSION OF MAC OS X