Function REUSE_ALV_GRID_DISPLAY, events and global variables

Hi everybody,
in a report I use FM REUSE_ALV_GRID_DISPLAY with a registered callback for event 'USER_COMMAND'.
In the callback-form I want to change the internal table, which I provided for displaying to REUSE_ALV_GRID_DISPLAY.
How can I access the internal table in the callback-form without using global variables?.
Kind regards,
Hubert
Edited by: Hubert Heitzer on Feb 23, 2011 4:13 PM
This is not the solution I asked for, but I found a workaround.
I created a function group, which encapsulates the internal table.
A function provides the service for colleting data for the internal table and displays the ALV.
The callback-form is also a member of my function group and is therefore able to access the internal table.

Hi everybody,
in a report I use FM REUSE_ALV_GRID_DISPLAY with a registered callback for event 'USER_COMMAND'.
In the callback-form I want to change the internal table, which I provided for displaying to REUSE_ALV_GRID_DISPLAY.
How can I access the internal table in the callback-form without using global variables?.
Kind regards,
Hubert
Edited by: Hubert Heitzer on Feb 23, 2011 4:13 PM
This is not the solution I asked for, but I found a workaround.
I created a function group, which encapsulates the internal table.
A function provides the service for colleting data for the internal table and displays the ALV.
The callback-form is also a member of my function group and is therefore able to access the internal table.

Similar Messages

  • Local and global variables in ABAP Debugger

    hi guys.
    we have the following support package:
    SAP_BASIS     640     0025     SAPKB64025     SAP Basiskomponente
    I would like to use in the debugger the local and global variables tab strip, but I can not find it. Is it possible. that our support package is too low for this functionality?
    Thanks a lot.
    rudit
    Edited by: Rudolf Tremmel on Aug 17, 2010 8:35 AM

    Starting with SAP NetWeaver 6.40, SAP released a new version of the Debugger.
    The Debugger available in Release 6.40 was not considered complete (and was
    not the default debugger as a result)
    The Variable Fast Display tool currently has four tabs . The first
    two are provided empty, and you can either type or double click a name in the
    source code to add it to the list. The third tab (Locals) shows all local variables
    for the current program modularization unit, and the fourth (Globals) shows all
    global variables in the current program.

  • What is the difference between Instance variable and Global variable?

    Hi folks,
    Could you please explain me, "what is the difference between Instance variable and Global variable?"
    Are they really same or not?
    --Subbu                                                                                                                                                                                                                                                                                                               

    Hi flounder,
    I too know that there is no such a term GLOBAL in java.
    generally people use to say a variable which is accessible throught out the class or file has global access
    and that will be called as a global variable...
    my point is very much similar to what Looce said.
    In simple that is not a technical term, but just a causual term.
    In technically my question is, "What is the difference between a instance variable and public variable?".
    Hi looce,
    Thanks for the reply. even thats what my understanding too....in order to confirm that i raised this question..
    Your reply has given a clear answer...... thanks again.
    --Subbu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Shared and Global Variable Issue with Motor VI

    Hello,
    I have written a VI that will command a stepper motor to follow the desired profile and loop the profile until the user pushes the stop button. I modified the state machine example from LV to achieve this. I now want to connect a linear potentiometer to the linear actuator to verify that the distance I commanded the motor to travel is the actual distance that it traveled. I am using a NI 9219 module to collect the data from the potentiometer.
    When I added the potentiometer to the program, the cRIO-9073 chassis that I am using immediately crashes and looses connection with the computer when I click the Run VI button. I looked into this a little more and it seems that the chassis will crash only when I add shared and global variables to the VI. I think it has something to do with the Network Variable Engine; I don’t have it installed on the chassis because the motor program alone will not run if it is installed on the chassis. Also, I have the chassis configured to the RT setting and not the FPGA setting.
    I have attached a snippet of the code. I am using LV 2014 SP1 along with the SoftMotion module. The motor is connected to LV through a P70530 stepper drive which is connected to a NI 9512 module with the proper connectivity bundle. Is there something wrong with the VI that would cause the chassis to crash? Why will the simple motor VI not work when the Network Variable Engine is installed on the chassis? Thank you in advance for your help!

    Follow up to this post:
    Sometimes when I try to connect the project to the chassis I get the following error: "Failed to load shared library taggerrt.out. Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom librarier to the RT target."
    I have tried re-installing the NI Device Drivers and reconfiguring the software on the cRIO chassis using MAX; however, the error keeps showing up. I read somewhere that the taggerrt.out library is a part of the Network Variable Engine but I don't know why it wouldn't be found when the NVE software is installed on the chassis. This message only comes up when I also have the SoftMotion Module software installed on the chassis. Has anybody else encountered this problem or know why this could be happening? Any ideas would be greatly appreciated! Thanks!

  • FixValues and Global Variable

    hi,
    Is there a functionality which does exactly like FixValues but stores the value thorugh out the mapping?
    I have a requirement where i have to map 2 different values to other values but i have to repeat this for all the fields using FixValue instead if there would be a Global Variable i could use that instead.
    Any ideas.
    Thanks,
    KP

    Hi Tirumal,
    For your requirement you can define a HashMap in Java Sections Tab of Graphical mapping and refer the values from UDF.
    Steps
    1. Goto MessageMapping (Design TAB)-> Edit JAVA Sections (Found on top-right side)
    2. Declare a HashMap in Global variables section.
        Eg.
    HashMap materialNumMap = null;
    3. Initialize the same variable and fill some values.
        Eg.
    materialNumMap = new HashMap();
                materialNumMap.put("MAT-01","10001");
                materialNumMap.put("MAT-02","10002"); 
                materialNumMap.put("MAT-03","10003");
                materialNumMap.put("MAT-04","10004");
    4. Write UDF to retrieve value from Global container
    public void chkExists(String materialNUM,ResultList result,Container container){
      String valueFrmMap = (String)materialNumMap.get(materialNUM);
      return valueFrmMap;
    Hope this solves your problem.
    Regards,
    Ananth

  • Problem with .DLL and global variables

    Hi,
    I need some helps to figure out my problem.
    I wrote a .dll file to open and run a GUI. When I run it at the first time, it is ok. When I call it again, there is an error "Pointer to free memory passed to library. It will be ok if I completely exit the program that calls the .dll before re-call it. I think there is some problems with global variables when I call another thread. How can I free global variables between threads. Is there any solution for this problem?
    Thanks

    Vinh Pham:
    Are you doing anything intentionally that frees your globals?
    CVI ships with an example program that demonstrates calling a DLL to create a user interface: guidll.cws.
    I made two simple modifications to guidll.cws.
    1. In guidll.c, I made hpanel global by moving its declaration from RunDLLUI() to right below the #include statements.
    2. In useguidll.c, I duplicated the lines calling RunDLLUI () and MessagePopup() to call the DLL gui twice.
    I built the project and ran it.  I had no problems with free'ed globals.
    Take a look at the guidll example.
    Can you either post your code or a modification to guidll that demonstrates the problem you're having?

  • Import/export to memory and global variables

    Hi,
    Im working on some functionality using import/export to memory. One of the statements is:
    import gf_memid_exit = g_exit_flag gf_memid_result = t352r from memory id 'ZREV_EXT'.
    Im using global variables to contain the cluster names. But this is not working. When I change the global variables into local variables, it works. It this normal? Because I would like to have global variables (even better I would like to have global constants) to declare in order to use them within the program.
    Any ideas?
    With regards,
    Mike

    Hi Mike...
    I think with import u can use global or local variables..in debug mode pl. check when u r using global variables..whether it is getting cleared or overwritten by some other values or not. Or try with global constants..it should work...
    Regards,
    Joy.

  • DASYLAB QUERIES on Sampling Rate and global variable

    hola
    i'm new user of dasylab and i would like to manipulate the sample rate through a layout ;
    using global variable seems good idea but the adress of sample rate is unknown .
    Hope that someone would be able to help.!
    also other small things when i use coded swich and i want modify  the text in the Switch Window i don't know how
    Lots of thanks!

    Hi,
    There is a dedicated place in this forum where you'll certainly get more answers than here :
    http://forums.ni.com/t5/DASYLab/bd-p/50
    Regards,
    Da Helmut

  • Forms personalization and global variable

    Hi,
    I'm trying to call a procedure in forms personalization and using a defined global variable. The data in the global variable is number. In the procedure, some of the parameter has a number datatype and I'm converting the global variable using to_number eg (to_number(:global.XX_LINE_NUM). This fails with error message ora-01403 no data found. I've tried putting the above into a variable with datatype number in the declare statement, and it errors as well.
    Does anyone knows the syntax to convert the global variable to number datatype in personalization.
    Thanks

    Ask in this forum : OA Framework

  • Web Services: runBatchJob and global variables

    Dear all,
    I'm facing a problem when I try to call web method runBatchJob defined by port BatchJobAdmin of the Web Service interface published by DS. 
    I have defined a job TestWSCall characterized by global variable $G defined as varchar(50) and I have written the following code to invoke job  TestWSCall with variable $G set to a given value (e.g. u2018Testu2019):
    RunBatchJobRequest runBatchJobRequest = new RunBatchJobRequest();
    runBatchJobRequest.setJobName(jobNameCall);
    runBatchJobRequest.setRepoName(repoName);
    GlobalVariables variables = new GlobalVariables();
    Variable gvariable=new Variable();
    gvariable.setName(varName);
    gvariable.setValue(varValue);
    variables.getVariable().add(gvariable);           
    runBatchJobRequest.setGlobalVariables(variables);
    BatchJobResponse res = batchJobAdmin.runBatchJob(runBatchJobRequest);
    After running this code, the job is executed with the default value and not with value u2018Testu2019. Since the variable type is varchar, I've also tested with value Test written between '', but it is ignored as well.
    When I check the XML generated by my call, I obtain the following XML code:
    <globalVariables><variable name="$G">'Test'</variable></globalVariables>
    or without ''
    <globalVariables><variable name="$G">Test</variable></globalVariables>
    which seems to comply with the description provided by the WSDL.
    Notice that job TestWSCall (and in particular the value of variable $GVAR) works as expected when I launch it from Designer or the web interface.
    Any idea?

    Hi,
    I have done the same scenario as you.
    For e.g.
    If your global variable is $gv, then your java code would be use gv as the global variable name (without the $)
    You would also emit the '' from the value in the global variable text.

  • DTEXEC and Global Variable

    Hi,
    I have written a stored procedure where I want to call/execute a DTSX. In SQL2000 this was possible using DTSRun /A [GlobalVariable]=[Value] . How to in SQL2005 (DTEXEC /[?] , what is the parameter for the ? for a global variable?
    Thx for your help,
    Johan

    Found the answer, it should be:
    /Set PropertyPath;Value
    Thx for looking into it (if you did)!
    Ps: if you have more info, please let me know anyway

  • Dynamic event with global variable (vi)

    I have registered a dynamic event to fire when a control in a global vi value changes. All works fine when I open the global vi and change the value of the control manually. When I have another vi modify the value of the global, the dynamic event does not fire.
    I have tried leaving the front panel of the global vi open and observed the value being changed...
    Any help appreciated...

    Hi,
    Please refer to the following document that explains why programmatic changes to the global doesn't get detected.
    Event Structure Does Not Capture the Value Changed Event...
    I hope this helps.
    Sincerely,
    Feroz
    National Instruments

  • Shell script: function doesn't set global variable when piped

    Hey there, just started to play around with some bash scripting and I bumped into this issue today.
    My code:
    #!/bin/sh
    MY_VAR=0
    echo "First: $MY_VAR"
    my_func() {
    MY_VAR=1
    my_func | grep "Fail"
    echo "Pipe: $MY_VAR"
    my_func
    echo "Func: $MY_VAR"
    Result:
    First: 0
    Pipe: 0
    Func: 1
    I assume that bash is starting a subshell to run my function when piping the result to grep. Is there any way to set the variable and pipe the output at the same time?

    Thanks, that does confirm why it doesn't work as expected. At the moment my only solution is something along the lines of:
    #!/bin/sh
    MY_VAR=0
    my_func() {
    MY_VAR=1
    #echo "Some Text"
    MY_OUTPUT="Text that I was going to echo"
    my_func
    echo $MY_OUTPUT | grep "Text"
    This sets MY_VAR to 1 as expected and I can still pipe the output to some other application but it looks awfully hackish, not to mention that it requires me to change every 'echo' to some var...
    If anyone comes up with a better solution I'll be glad to hear it.

  • Can not use Global Variable in Event Structure

    I am using LabVIEW 2009.
    In my LabView project I have a Boolean Global variable called EStop. I can read and write the Global variable. If I double click on the Global variable, it takes me to EStop.vi which includes a Text Button. EStop.vi is part of my Project.
    In one of my VIs, I have an Event Structure. If I go to one of the Event Handlers in that Event Structure and right click and then select Add Event Case, I get a list of possible events. But that list does not include EStop or an EStop events.
    I want to Add an Event Case for EStop: Value Changed.
    Why can't I Add events to an Event Case that include events on Global Variables like value changed?
    How do I add EStop: value changed event to my Event Structure.
    Solved!
    Go to Solution.

    dbaechtel wrote:
    I have many events throughout the system that might need to cause the system to do an Emergency Stop action. So I want ro use a Global variable that is accessible from anywhere in the system. Any action or condition that occurs anywhere in the system can activate the emergency Stop condition by setting the boolean EStop Global variable to True. When the Global bolean variable goes true(value changed), I want to detect that event in an Event Structure and do the actions necessary to accomplish a system Emergency Stop.
    Sorry, I am not familiar with your terminologies. What is your definition of a "system".
    One big VI with many parallel loops?
    Several VIs running in parallel?
    LabVIEW Champion . Do more with less code and in less time .

  • Global and Local Variable

    Hi Gurus, I was unable to see where I can define local and global variables? I see that help.sap.com documentation but where do I create. All variables that I create, are global because, they are visible to all and they all can use it? Any help would be greatly appreciated.

    As far as I know, Variables are re-usable objects that are not dependent upon InfoProvider. When I look at this link
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db07d555411d189660000e829fbbd/frameset.htm
    it talks about Global and Local variable? Is this different than what we use in Query Designer?

Maybe you are looking for

  • Deleted contacts from my phone & they auto deleted from other phone. How do I get them back?

    Just updated my iPhone 4 and my GF's iPhone 4 to the new OS, we share the same Apple ID and subsequently linked both phones to the same iCloud account (I will be using separate clouds from this point forward). However, after the update all of her con

  • My ipod touch flashed once and wont turn back on

    I was on the schools wifi getting on youtube and my ipod screen flashed once and then went blank and will not turn on to charge (i had it plugged into the wall and the computer 2 different times for almost 2 hours each and nothing happened), will not

  • Outlook 2010 - share contacts - read only ?

    I have shared my contacts by using the Share Contacts tool. When I did this Outlook displayed a message about giving read only access - I clicked Yes. The other user can access my contacts but can modify the list.  I don't know why this is happening

  • Query in mysql

    how to write a query for identifying the capital letter int he first inserted value. to be clear, I have two values Microsoft and microsoft now I have to create a query to get 'Microsoft'.how is this possible? thank you in advance.

  • PO history update

    Hi, I would just like to ask how PO history in ME23N is udpated? We have scenario wherein PO history was not updated after parked invoice has been posted. It is expected that no parked document should be seen after the document has been posted. Do yo