Classic dynpro with subscreens, alv oo, event triggerd multiple times
Dear all,
I've created a program using several subscreens displayed in 1 main screen.
On 4 of those subscreens I've included an ALV using the ALV OM model.
After navigating to several subscreens I trigger the event "on user command" in one of the ALV's.
This event is then triggerd several times, depending on how much I have been navigating between the subscreens of the program.
In the user command I eather do some database changes using several BAPI's. In the code I have made sure that the changes are executed only once, but the program slows down.
I also use the event to navigate to transactions MM03 and CG02. These transactions are also called several times.
How can I resolve this?
Cheers,
Luk
Hi Adviat,
Thanks for the hint.
I created 4 objects for the 4 differenc ALV's all having the same name. When I use different names for each alv, the problem was solved.
Luk
Similar Messages
-
Create events over multiple time zones
Hello again,
How do I create events over multiple time zones? For instance, a plane leaves on GMT time zone and lands on GMT+5.
If iCal doesn't allow this, what is your suggested approach in this case?
Thanks in advance!You're right, iCal doesn't allow this.
I just add the abbreviation for the timezone at the end of the title. For example: "AA Flight 407 - CDT", keeping in mind that the block of time for that event showing in iCal is always in that time zone.
It's not ideal, but it works for me. -
Event firing multiple times (et_Got_Focus)
Hi,
I just noticed while debugging my Add On code that the et_Got_Focus event which I have added to my event filters is triggered 64 times when I change a field value and then move to a different field. This not only happens in the matrix when changing field values and tabbing through but also in the header fields.
This has got to be a bug and it is not only slowing down the A/P Invoice form but it is potentially very dangerous to have an event firing 64 times when it should only be fired once.
To test this all one needs to do is add the et_Got_Focus event to the event filter with the A/P Invoice form, then add a debug statement to write out the itemvalue properties and you will see once you edit a value and tab you will get 64 statements that are the et_Got_Focus event, BeforeAction false for the same field or column when it should only occur once.
I have a very digrunted client that is very frustrated due to the amount this slows down data entry in the A/P Invoice. I cannot get rid of this event because there is a particular field I am monitoring for the got focus event so I can stop it under certain circumstances.
If anyone else has experienced this or knows how to resolve this please let me know. I guess if I don't find out why this is happening I will post a CSN to SAP.
Thanks very much,
David Wall
Here is a sample of my debug output messages for one update of a single field and then tabbing out:
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - False
et_GOT_FOCUS - - FalseHi David,
We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
Best Rgds.
Antoine Egeileh
President
Self Informatique
[email protected] -
How to restrict user marking same events in multiple times.
Hi,
In my online exam system, I am displaying the questions and related answer in jsp page. Once user fill all this questions, the result of these stored in final table containing column questonNo, userid, answer, testname.
Now in my application if any user goes back to the question displaying page after submitting same questions, he can change the answer selected in first attempt and submitting again the test, the result are stored in final table. I.e. for same question no. user is now able to answer in two times. I want to restrict user for answering test in second times.
How can I achieve this?
Any suggestion is highly appreciated?
Thanks and Regards
HarshalHi Hari,
with you suggested logic can i restrict user marking one question in multiple times,
My target is once user submit any questions teh control will be transferred to the next page.Now he/she could not able to submit the same questions with another answer or the same answer also which is possible in my application by going back to these page using back button .so that i can get only one record for particular questions in table final.
Thanks and Regards
Harshal
Edited by: HARSHAL_GURAV on Aug 20, 2008 12:15 AM -
One email with iPhone pic attachment is received multiple times
Searched the discussions and couldn't find this one. Problem is this:
My wife takes a picture with her iPhone and goes back to her camera roll to view it. While viewing the picture, she clicks to email the photo. She sends it out to her recipients (one time!), who are happy to get the picture the first time, but not the 3, 4 or 5 times following!
Any thoughts on what the issue here is? Recipient email addresses are in both Yahoo and AOL, so it can't be blamed on the recipient email server.
Why are these leaving the outbox multiple times?
Also, no "multiple sent" issues with emails that don't have pix attached.
Thanks! -SteveI have this exact same problem. After trying to send an email with a picture attached, the person receives it multiple times and then i will get an error on my device, stating that the email did not deliver, when in fact it did, and keeps on sending it a few more times. Between 2 and 5 times each time i send an email with a picture. This was not happening if a picture was not attached.
-
I am attempting to take a path item that is on its own layer and change its color multiple times, saving it each time.
I was able to do it with javascript however can't get it to work in applescript.
Javascript:
(Items are already selected that I intend to change.)
var iL = app.activeDocument.pathItems.length;
var colorSwatches = app.activeDocument.swatchGroups.getByName('newColors');
var allColors = colorSwatches.getAllSwatches();
var colorNames = Array();
for (var i = 0; i < allColors.length; i++){
colorNames.push(allColors[i].name);
for (x = 0; x<colorNames.length; x++)
var currentColor = allColors[x].name;
for (i=0; i<iL; i++)
var myItem = app.activeDocument.pathItems[i];
if(myItem.selected)
myItem.fillColor = app.activeDocument.swatches.getByName(currentColor).color;
(I then go on to save each one)
When trying to cross over into applescript I have the following so far:
set iL to count every path item of document 1
set colorSwatches to swatchgroup "newColors" of current document
set allColors to get all swatches colorSwatches
set swatchCount to count every item in allColors
repeat with i from 1 to swatchCount
set currentSwatch to item i of allColors
repeat with x from 1 to iL
set myItem to path item i of document 1
here is where I have no idea what I am doing... I can't figure out how to test if an item is selected
if myItem's has selected artwork is equal to true then
set fill color of myItem to {swatch:currentSwatch}
end if
end repeat
end repeat
Or better yet is there a way I can select every path item of a layer and change its color that way?
Something like the following:
set fill color of every path item of layer "art" of document 1 to {swatch:currentSwatch}
Thanks for any input!I'm throwing it into a Applescript OBJc project I am working with. I currently have it in a javascript file within the actual project however this is the slowest part of my project and I'm going to attempt to speed it up some.
Let's say I'm changing the color of a path item 35 times... this starts to eat a ton of time up.
My applescript save illustrator file as jpeg is much faster than the javascript one for some reason...
It's also something I have needed to do numerous times in the past and never got around to asking. -
JPA Lifecycle events file multiple times
I am using EclipseLink and the JPA lifecycle events like @PrePersist and @PostLoad. These events are being called multiple times during a persist cycle. When I looked at the code multiple EclipseLink events are mapped to each of the JPA events. There are also being called by 2 different functions.
I have had to create local variables to detect multiple calls and not process multiple times. Is this going to change in future?Can you open a bug against EclipseLink and provide the information you have found.
Enter Bug link.
Doug -
I am working on a C# NIDAQmx application for a hardware configuration that uses a PCIe-6321 to interface with downstream hardware. There is a DI signal from a manual switch on the downstream hardware that I must monitor for the start/stop signal for my application's data acquisition operations.
I was having inconsistent results using the ConfigureChangeDetection NIDAQmx functionality. So I used the ReadDigChan_ChangeDetection sample and using Debug.WriteLine statements have verified that when the switch on the hardware is toggled, multiple ChangeDetected events are thrown before the signal settles into the actual High or Low state.
Since I am not a hardware guru, I consulted another engineer, and was told that this is common with switches, and the signal and/or change detection needs to be "debounced".
Can this be done purely through additional configuration of the NIDAQmx DI task? I saw properties for digital filtering, but don't understand their use. I looked at the ReadDigChan_ChangeDetection_DigFilter sample, but it seems to imply that some other DI needs to be connected on the card to be used as the filter, which I don't have. Only one DI is coming from the downstream hardware.
Any help and/or advice will be greatly appreciated.I believe I have found the solution. By searching the forums I came across a couple of posts that pointed to this article
http://digital.ni.com/public.nsf/allkb/220083B08217CFD686257131007E5D2C?OpenDocument
So i started playing with the corresponding properties in the C# task, and it looks like I may have to only set the following properties:
myTask.DIChannels[0].DigitalFilterEnable = true;
myTask.DIChannels[0].DigitalFilterMinimumPulseWidth = 10.240000e-6;
According to error messages, the DigitalFilterMinimumPulseWidth for the PCIe-6321 can only be set to specific values.
Using this in the ReadDidChan_ChangeDetection_Events sample appears to be successfully debouncing the ChangeDetection events to only 1 per physical switch toggle.
If this is not the approach I should be using, please advise otherwise. -
JSF event firing multiple times?
Just upgraded our JSF app from using JBoss4.0.0 to JBoss4.0.5.
Tomcat 5 -> Tomcat5.5
Java1.4.2 -> Java5.0
Of course as a result of all these changes, some things that used to work in the app, either no longer work or work differently.
We have been using the Sun RI implementation of JSF.
Through googling, I found that Jboss installed MyFaces. That has been removed, and resolved some of our issues (mainly to do with nested tables)
The current issue is that there are instances where clicking a button seems to execute the JSF action twice. In this case it is a "process payment", so the payment ends up getting recorded twice in the database.
Potential causes I have looked at
1 - javascript submission form.submit() as well as button click. Pretty sure that this is not happening.
2 - Double clicking the submit() button? Some javascript has been written to prevent this, and it seems to be working.
Can anybody suggest ideas as to why the JSF event would be triggered twice?
Would a JSF event be triggered on a later request if it failed to complete successfully on a first try?I don't want to use immediate=true, because I need the values entered from the screen. Or are you suggesting it for another reason?
Anyway, I'm still working on this, and have been running debug logs.
Something interesting seems to be happening:
I am pretty sure I only pushed the button once.
Note however that two threads seem to be starting up, and two FacesContext objects seem to be present.
I am deducing that from
execute(com.sun.faces.context.FacesContextImpl@1ebfb58)
execute(com.sun.faces.context.FacesContextImpl@1c283b5)
There are two facesContextImpl with different addresses.
Is it normal to have two FacesContext instance objects?
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] execute(com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(APPLY_REQUEST_VALUES 2,com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] execute(com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,092 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(APPLY_REQUEST_VALUES 2,com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,123 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(PROCESS_VALIDATIONS 3,com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,138 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(UPDATE_MODEL_VALUES 4,com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,154 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(PROCESS_VALIDATIONS 3,com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,154 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@1ebfb58)
2007-05-10 09:38:00,185 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(UPDATE_MODEL_VALUES 4,com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,185 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@1c283b5)
2007-05-10 09:38:00,201 DEBUG [com.sun.faces.lifecycle.LifecycleImpl] phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1c283b5) -
Big trouble with using Find/Move/Rename Actions multiple times
Hi~
I have a folder with a lot of JPGs in it.
For simplification, let's say this folder contains exactly 1000 JPGs. The JPGs have been renamed numerically 1 through 1000 while still preserving the original order the JPGs came in straight out of Camera.
I want to separate the JPGs by putting them into different folders (i.e. "untitled folder 1", "untitled folder 2", "untitled folder 3", etc.). I want to put 20 JPGs in each folder. The first folder will contain original JPGs 1-20, the second folder will contain original JPGs 21-40, the third will have original JPGs 41-60, ...and the last folder (untitled folder 50) will have original JPGs 981-1000.
I also want to rename all of the JPGs in each folder numerically, 1 through 20. For example, untitled folder 3 will contain original JPGs 41-60, but I want to rename them to 1 through 20. This is very important - the original order must be preserved. As an example, let's look at untitled folder 3 with JPGs 41-60. "41.JPG" must be renamed as "1.JPG", "42.JPG" must be renamed as "2.JPG" ... "60.JPG" must be renamed as "20.JPG".
I want this to continue until I have 50 separate folders, with each containing 20 JPGs, all of which are sequentially numbered 1 through 20 while still preserving the original order.
I gave this a try on Automator with no solid results. The sequence of actions I put together were as follows:
1. Get Specified Finder Items (JPGs 1-20 from the folder containing the 1000 original JPGs)
2. Move Finder Items (to the new folder: untitled folder 1)
3. Get Specified Finder Items (original JPGs 1-20 that are now in untitled folder 1)
4. Rename Finder Items (The settings for rename are as follows: Make Sequential, Add number to = "new name", "item name" is deleted and then I press return, Place number = "before name", Start numbers at = "1", separated by = "nothing", and the rename Example looks like "1.xxx"
These setups are repeated again for JPGs 21-40, and again for 41-60. Importantly, I modify each action to make sure it gets the correct JPGs from the correct folder.
I wrote the action to last for the first 60 JPGs (I wanted to test it before writing the rest of it, which would take a long time!)
The results I got are as follows:
-Original JPGs 1 through 60 have been removed from the originals folder containing the 1000 Original JPGs. (so far so good)
-Original JPGs 1-20 from the originals folder have been moved to "untitled folder 1" and renamed 21-40 (not good... I wanted them to stay the same: 1-20)
-Original JPGs 21-40 were moved to "untitled folder 2" and were correctly renamed 1-20. Then, these were unexpectedly moved a second time to "untitled folder 3" (not good).
-Original JPGs 41-60 were moved to "untitled folder 3" and were renamed as 21-40.
Summary:
The final result was that Untitled folder 1 contained original JPGS 1-20, incorrectly renamed to 21-40. Untitled folder 2 is empty. Untitled folder 3 contains original JPGs 21-60. Original JPGs 21-40 were correctly renamed 1-20, whereas JPGs 41-60 were incorrectly renamed 21-40.
I feel like I have reached the limit of my knowledge with Automator, so I need your help!
Thank you very much for at least reading this!
~MichaelFirst, be careful of the forum you post in - there are Automator forums for both Tiger and Leopard. Your profile shows you running Leopard, but this reply would apply to Tiger as well.
Most actions return the results from whatever it is that they do - in the case of Move Finder Items, the action returns the items that it moved. In your example workflow, when you follow the move action with the Get Specified Finder Items, you double up the list of items to rename, so there is some extra renaming going on. Most actions have an option to ignore the input from the previous action, but getting rid of the Get Specified Finder Items action from your workflow should clear things up.
Automator will work for your workflow if there aren't too many items, but if you really have thousands of files you might have better luck with an AppleScript. -
Same calendar event displaying multiple times
Hi, I currently see the same calendar event three times in different colors. I am utiling active sync and am on firmware 2.1. This started happening recently therefore I know this is not a firmware issue.
I have blown away my account and re-established it. Anyone have any ideas.Hi, I currently see the same calendar event three times in different colors. I am utiling active sync and am on firmware 2.1. This started happening recently therefore I know this is not a firmware issue.
I have blown away my account and re-established it. Anyone have any ideas. -
JPane ancestorResized event fired multiple times
Hi,
I have a JPane which in turn contains some more controls. I'm handling "ancestorResized" event for the JPane. But, when I resize the form once, the "ancestorResized" event for the JPane is called 3 times. where as the "this_componentResized" event is called only once.
I am doing a lot of control relocation and resizing in the "ancestorResized" event handler. Since it is fired 3 times, it is making my application slow.
Can some body tell me how to come over this.
Regards.Hi David,
We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
Best Rgds.
Antoine Egeileh
President
Self Informatique
[email protected] -
ALV: data_changed event
Hi everyone!
I have the following problem:
I created a DYNPRO with one ALV grid and several "ordinary" fields. The ALV is editable.
Now I try to sum up some fields of the ALV grid and put the sum into one of the ordinary DYNPRO fields. When the <i>data_changed</i> event is fired the sum is calculated correctly and put into the global field associated with the DYNPRO field. However, the value change is not shown on the DYNPRO.
When I press <i>ENTER</i> while the cursor is in the "ordinary" DYNPRO area and not in the ALV Grid, the data change is shown correctly. Debugging shows that no PBO/PAI for the DYNPRO is executed when the data in the ALV is changed, so I assume there is no value transport between the global field and the DYNPRO.
What am I doing wrong?
Regards, JoergHi Joerg,
Here is the other way how to achieve the processing of PAI/PBO of the main DYNPRO, which contains ALV. It works fine for me, so you could consider this possibility as well. Inside the event handling method you could do this call:
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'ENTE'
IMPORTING
rc = l_rc.
You should deal rather carefully with it - put it better in a method like
HANDLE_DATA_CHANGED_FINISHED
Instead of 'ENTE' you should use the command code defined in your dynpro and better suited for such a "refresh" functionality, but I'm afraid it can not be empty code string.
Hope this helps, regards, Sergei -
Report with 5 ALV grids on 1 screen
I am trying to build a screen/report with 5 ALV grids which are interactive. One grid will display all sales order. When I click on a Sales order Hotspot, the items of the sales order would appear in the ALV grid box below.
When i click on an sales order item hotspot, i want the delivery information in another alv grid in the same screen.
There should be 2 more grids - one displaying the customer information -name,address, in one grid and one grid for open items if any. Any advice is welcome . Should I be creating a split container/docking container or multiple containers ? Sample code is welcome.
Edited by: Shareen Hegde on Apr 2, 2008 9:25 PMHello Shareen
Below I have added my sample report ZUS_SDN_THREE_ALV_GRIDS showing three interactive ALV grids. Perhaps it might be useful to you. I would prefer one or multiple splitter containers over multiple "stand-alone" containers.
*& Report ZUS_SDN_THREE_ALV_GRIDS
*& Display Customer data in three ALV lists:
*& 1st ALV: Customers
*& 2nd ALV: Sales order of selected customer (double-click)
*& 3rd ALV: Positions of selected sales order (double-click)
*& Double-click on material -> display material (MM02)
*& NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
*& Flow logic of dynpro '0100':
*&PROCESS BEFORE OUTPUT.
*& MODULE STATUS_0100.
*&PROCESS AFTER INPUT.
*& MODULE USER_COMMAND_0100.
REPORT zus_sdn_three_alv_grids.
DATA:
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_splitter_2 TYPE REF TO cl_gui_splitter_container,
go_cell_top TYPE REF TO cl_gui_container,
go_cell_bottom TYPE REF TO cl_gui_container,
go_cell_left TYPE REF TO cl_gui_container,
go_cell_right TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
go_grid3 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_vbak TYPE STANDARD TABLE OF vbak,
gt_vbap TYPE STANDARD TABLE OF vbap.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '1000'.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender. " sending control, i.e. ALV grid that raised event
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_vbak TYPE vbak,
ls_vbap TYPE vbap.
* Distinguish according to sending grid instance
CASE sender.
WHEN go_grid1.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDERS' ).
WHEN go_grid2.
READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
CHECK ( ls_vbak-vbeln IS NOT INITIAL ).
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
* IS_ROW_ID =
* IS_COLUMN_ID =
is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
WHEN go_grid3.
READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
CHECK ( ls_vbap-matnr IS NOT INITIAL ).
SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
WHEN OTHERS.
RETURN.
ENDCASE.
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 1
columns = 2
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_left.
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = go_cell_right.
* Create 2nd splitter container
CREATE OBJECT go_splitter_2
EXPORTING
parent = go_cell_left
rows = 2
columns = 1
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
* Get cell container
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_top.
CALL METHOD go_splitter_2->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = go_cell_bottom.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_top
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_bottom
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid3
EXPORTING
i_parent = go_cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid2.
SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid3.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNB1'
CHANGING
it_outtab = gt_knb1
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbak.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAK'
CHANGING
it_outtab = gt_vbak " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH: gt_vbap.
CALL METHOD go_grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'VBAP'
CHANGING
it_outtab = gt_vbap " empty !!!
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
CALL SCREEN '0100'.
* Flow logic of dynpro:
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "ORDERS"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid2->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Refresh display of detail ALV list
CALL METHOD go_grid3->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Orders"
WHEN 'ORDERS'.
PERFORM customer_show_orders.
WHEN 'ORDER_DETAILS'.
PERFORM order_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form CUSTOMER_SHOW_ORDERS
* text
* --> p1 text
* <-- p2 text
FORM customer_show_orders .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbak INTO TABLE gt_vbak
WHERE kunnr = ls_knb1-kunnr.
REFRESH: gt_vbap.
ENDFORM. " CUSTOMER_SHOW_ORDERS
*& Form ORDER_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM order_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_vbak TYPE vbak.
CALL METHOD go_grid1->get_current_cell
IMPORTING
e_row = ld_row.
READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
CHECK ( syst-subrc = 0 ).
SELECT * FROM vbap INTO TABLE gt_vbap
WHERE vbeln = ls_vbak-vbeln.
ENDFORM. " ORDER_SHOW_DETAILS
Regards
Uwe -
Hi,
I got a dynpro which contains a subscreen. The dynpro is called after a selection screen. In the dynpro, I add a couple of lines to the alv-table and refresh it - works fine.
Problem is if i leave the dynpro with the back button (leave to screen 0) and enter it again, the old alv-table is displayed, even the internal table in the background is empty?!
Does anyone know why this happens? Do I have to delete the alv instance in a certain way? A clear doesn't work here.
Thanks in advance!
Regards,
TobiHi,
Clearing reference variable is not enough here, as corresponding proxy object still resides in frontend. You need to free that object before clearing alv ref.
r_alv->free( ).
clear r_alv.
Now each time you enter that screen recreate alv. New object will replace old one .
Regards
Marcin
Maybe you are looking for
-
Withholding tax amount display in vendor master data
Hi All, When i executining the Vendor line item Display (FBL1N), i want to see the Withholding tax amount, withholding tax base amount. I changed the layout for display, i can't able to see withholding tax amount for Doc type RE. Thanks & Regards
-
Query to pull all the receipts applied....
My requirement is to pull the list of all the receipts applied with the applied amount of that receipt, the unapplied amount and the on account amount on that receipt. The Applied plus Unapplied plus On-Account amounts should equal the Receipt Amount
-
Getting SSMS error while open it
Hi, I am getting below error on SQL Server log file. Its a continuos error 2014-04-25 09:24:20.22 Server Process 0:0:0 (0x3b00) Worker 0x00000000106361A0 appears to be non-yielding on Scheduler 4. Thread creation time: 13042907079739. Approx Thr
-
How do I make the print in yahoo and comcast e-mail much larger--it is so small it is unreadable
The print in my e-mails at Yahoo and Comcast is so small that it is unreadable. I need to know how to make the print larger. There must be some way to do it. It wasn't always like this.
-
New user--first issue last night
Last night one of my video podcast was playing in my ipod like a song and not a video. It was showing a small square with video and words beside it? Don't understand why this happened. Has anyone had this experience. I had to resync a few times to ma