Keyboard-Controlled Drag n Drop ?
Before I dig too deep into HOW to do this, can anyone tell me
whether it's possible to adapt the Flash MX 2004 Drag and Drop
learning interaction so that it can be controlled from the keyboard
(when the SWF is embedded in a Web page)? I have found some
information about accessibiltiy issues in general, but nothing
specifically related to using the existing learning
interactions.
Drag 'n' Drop software has never been the greatest solution as it has a bad habit of creating CDs that can only be read on machines that have the same software installed. Roxio and Nero are the big two CD and DVD burning applications. I've used both and either would work fine.
Similar Messages
-
Re-create Tree control drag and drop move
Hello,
Ive got a tree control where dragEnabled=true and I have
custom handlers for dragEnter, dragOver, and dragDrop so that I can
drag/drop from datagrid's to the tree and it works fine.
The issue is now the built in tree functionality for moving
nodes around within the tree is gone. When I set dropEnabled=true
it breaks the ability to drop from the datagrid to the tree.
How can i keep the ability to move tree nodes within the tree
and also be able to drag and drop from a datagrid onto the tree?
Thanks for any help!While doing more testing I found the solution.. seriously...
dont know how I should have known this one...
on Tree dragOver handler:
if( from.id == 'data_grid' ) event.preventDefault(); -
Global Volume Slider (from library) to control drag and drop xml playlist
hi there,
have spent some time doing tutorial and looking online but can't seem to get a volume slider functioning.
the scenario is :
3 circles which can be dragged over a target (one for each circle)
When the circle is placed on its target it loads its respective xml playlist into 4 buttons (play, pause, forward, back)
I want to be able to create some kind of function to control the volume, either using a slider or a rotary dial, whichever is easiest!
any help greatly appreciated!Be sure you include the SoundTransform class...
import flash.media.SoundTransform;
Create a SoundTransform object
...named 'st' (I like short names). Create this AFTER the creation of your soundChannel object...
var st:SoundTransform = channel.soundTransform;
st.volume = 1;//This sets the volume to 100%
channel.soundTransform = st;//This associates your SoundChannel object with your SoundChannel object
Then, for simple testing of this
...create some new button...
halfVol_btn.addEventListener(MouseEvent.CLICK, doHalfVolume);
function doHalfVolume(e:MouseEvent):void{
st.volume = .5;//This sets the volume to 50%
So, now you have a half-baked volume control. Nothing exciting, but this gets you acquainted with the volume part of what you want. You have created, and have access to, the st.volume property to set the volume to whatever you want, from 0 to 1.
Next, I'd suggest that you practice the creation of your own slider. Search online for tutorials on it, like I mention above (as a Flash programmer, this is something I, and you, end up doing - searching - dozens of times a week at times). In the end, the position of your knob/button/control in the slider is a %: What % is the location of the knob on the total width/height of the slider. This % is what you send to the st.volume property.
http://www.lmgtfy.com/?q=create+volume+slider+as3
As an alternative to create your own slider, you can also use the Flash "Slider" component:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/Slider.html
...but this, too, requires some getting-up-to-speed with using it.
Good luck. If you want some actual code examples - you'll find plenty online :-) -
How do I drag and drop multiple files on a control?
LabVIEW supports dragging and dropping a single file on a path control, and have the path control populated appropriately. I want a user to be able to highlight multiple files (say, from the OS Find File window, or anywhere really) and drop them into a path array control in LabVIEW. I was hoping putting a path control in an array would do the trick, but it didn't. The mouse cursor changes to the "+" icon as it did for a single file, but when I release the button the system just beeps. Is this even doable?
Thanks, Bob MartinI guess I was hoping that the path control would realize it was in an array, and starting with the actual control where the drop occurred (if more than one item of the array is visible) start populating subsequent slots with the other file paths.
I'm not sure how much work would be involved, but maybe I could make a control in VB that would accept the drop event and output the path array I'm looking for. I've never made a control in VB for LabVIEW before, so I'm leary of how much time that would take. I'll add this to my list of "things to do that never seem to get enough priority to do." -
How do i drag indicator control type on WPF instead of using Drag and Drop points
In my WPF application, i have a window which is docked with the screen. i want to automate to expand the window using an Indicator control type, by sliding it. As of now i use StartDrag and StopDrag using specific points, which is not correct when it runs
in many other screens.
Could you please let me know, is there way to slide the control (to set window display size to viewable) without using drag and drop action using points.Hi Pavithra,
>> As of now i use StartDrag and StopDrag using specific points, which is not correct when it runs in many other screens.
To really understanding this issue, could you share us what you mean by ”which is not correct”? It would be much helpful if you could share us a screen shoot about your UI and your issue.
>> Could you please let me know, is there way to slide the control (to set window display size to viewable) without using drag and drop action using points
Do you mean that the control of the WPF is invisible and you want to set the window display size to make it visible? If so, I think you could use the Mouse.MoveScrollWheel Method to change the windows view until the control is visible. The link below might
be useful to you:
# CodedUI cann't find the controls outside the screen view, Mouse.MoveScrollWheel doesn't work too
https://social.msdn.microsoft.com/Forums/vstudio/en-US/e1dba9ee-dc51-4160-9a1a-a2220c903db0/codedui-cannt-find-the-controls-outside-the-screen-view-mousemovescrollwheel-doesnt-work-too?forum=vstest
If I misunderstood you, please feel free to let me know.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?
You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
Attachments:
Drag&Drop.llb 65 KBHi Jones,
As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
Good luck!
Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions -
When I got Elements 12 (May 2014), I was able to drag and drop things such as cut/pasted items, watermarks, etc. As of 2 weeks ago, I can no longer use my mouse to drag and drop. If I try, it just snaps back wherever it was before I tried to drag it. With that said, the item will move if I use my keyboard. It takes an eternity. WHAT IS GOING ON?! I just really want to use my mouse again...
Install the 10.10.1 update. That should do it.
-
Drag and drop ALV to table control
Hi all,
Does anyone know if it is possible to program the drag-and-drop functionality from an ALV list to a table control? I would like to have this feature to let the user enter data on 1 screen. On the left part the user sees an ALV list and on the right the user sees the online transaction. I would like the user to enter data simply by drag and drop instead of having to enter the data.
Does someone has a sample program for this?
Regards,
KrisHi Kris
I can download the programs and send them to you, but you should give me your e-mail.
Anyway you can use Drag and Drop if you build your table control by ALV, i.e. ALV GRID.
But I'm using 4.7 and I don't know how class CL_GUI_ALV_GRID is in your release, I believe the release 4.6B is one of first release whit this class.
Max -
Treeview control will not drag and drop when project is built.
I have a treeview control that I can perform drag and drop while in edit mode but once I build the executable I can't drag and drop any longer. Are there some settings that I have to change?
I am not using an Active X Control but instead the TreeView control within LabView 8.
A response would be greatly appreciated.This is a known bug, see further down in this discussion:
http://forums.lavausergroup.org/index.php?showtopic=2271
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~ -
How to drag and drop the af:inputNumberSpinbox in the control panel
Hi,
I am using jdev 11.1.1.4.0
I need the component as <af:inputNumberSpinbox> . Create a data model and how to drag and drop as inputNumberSpinbox in the data control.
normally drog and drop the particular attribute as inputText box only. I want <af:inputNumberSpinbox>.
anythig want to change in the view object control hints itself. help me.
Regards,
ragupathi S.
Edited by: Ragu on Jun 22, 2011 4:45 PMHi,
Can't you drop it as an inputText and then change it in the source to inputNumberSpinbox?
Regards,
Stijn. -
When I try to drag and drop to combine events in iPhoto, the drag accelerates out of control when it reaches the top or bottom of the screen. How can I slow it down?
from iphoto Help
Album overview
A photo album in iPhoto is just like one you would create with printed photos: It’s a collection of photos you select from your library and arrange in the order you want.
You can create photo albums to:
Focus on a particular subject, such as your favorite nature photos
Group pictures that you want to send to a friend, post on a webpage, or burn to a CD or DVD
Gather a decade of anniversary photos
iPhoto has two kinds of photo albums:
Standard photo albums: You create these albums (B, shown below) by selecting particular photos. You can add new photos by dragging them to the album (or using the Add To button), and you can remove photos at any time. All adding and removing is done manually; iPhoto doesn’t update standard albums automatically as you import new photos.
Smart Albums: iPhoto creates these albums for you, based on criteria your specify. iPhoto then updates Smart Albums (A, shown above) for you as your library changes. For example, you could create a Smart Album containing:
Photos of specific people, such as your family members. As you import new photos, iPhoto uses Faces to detect your family members, and automatically adds new photos of them to the Smart Album (after you’ve confirmed the matches in Faces).
All the photos of your daughter taken on school field trips in third grade. Use Faces (to name your daughter) and keywords (to mark certain photos or events as “field trips”) to help specify the photos you want iPhoto to place in that Smart Album.
Only photos taken with a specific camera, or photos matching other Exchangeable Image File (EXIF) information.
You can make as many albums as you like, and you can include the same photo in several albums without making multiple copies of it.
After you create an album, such as “Australia Adventures,” it appears in your Source list below Albums.
In full-screen view, the album appears as a stack of photos below Albums.
To further organize your library, you can group several albums (along with slideshows and projects) into a folder. For example, you could create a folder containing several years of birthday albums or a collection of albums with photos of your camping trips.
To create a folder, see “Create a folder in the Source list and move items into it” in “Customize the Source list”.
Folders appear only in the Source list, not in full-screen view.
Note: A photo album is different from a photo book, which is a collection of photos you create to get professionally printed and bound. See this topic: Photo book overview.
Copyright © 2014 Apple Inc. All rights reserved.
LN -
Issue : drag and drop from list control to tree control
Hi,
I was trying a drag and drop from list control to tree control. I have used some sample data to populate list and tree controls .
It is working fine . except one problem ..
Prob : when i drag an item to tree control .. it gets added .. now tree contains (X+1) data in list .. say X is the inital number of nodes in a tree node.
now if i drag another item from list to last item in the tree node .. i.e at X+1 index. .. it throws null pointer exception.
I am considerably new in flex programming . looking for help from experts ..
Below is my code :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.listClasses.IListItemRenderer;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.utils.ObjectUtil;
import mx.collections.ICollectionView;
import mx.core.UIComponent;
import mx.managers.DragManager;
import mx.events.DragEvent;
import mx.controls.Alert;
import mx.controls.Label;
import mx.events.CloseEvent;
private var homePath:String="/home/e311394/dndTest/";
private var destPath:String="/home/e311394/dndDest/";
private var eid:String="e311394";
private var actn:String;
[Bindable]
private var cm:ContextMenu;
private var cmi:ContextMenuItem;
[Bindable]
private var dp:ArrayCollection;
private function init():void
cmi=new ContextMenuItem("Remove");
cmi.enabled=true;
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
cm=new ContextMenu();
cm.hideBuiltInItems();
cm.customItems=[cmi];
cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenuItem_menuSelect);
list.contextMenu=cm;
private function contextMenuItem_menuSelect(evt:ContextMenuEvent):void
list.selectedIndex=lastRollOverIndex;
private function contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
var loclSelectedRow:Object=list.selectedItem;
var lostrSelectedMenuItem:String;
lostrSelectedMenuItem=evt.target.caption;
if (loclSelectedRow != null)
var obj:Object=new Object()
obj.label=loclSelectedRow.label as String;
//Alert.show(obj.label);
if (lostrSelectedMenuItem == "Remove")
if(loclSelectedRow!=null)
var pth:String=homePath.concat(loclSelectedRow.label);
//Alert.show(pth);
//FlexDnDRemoteService.process(eid,"delete",pth,"-");
var coll:ArrayCollection=list.dataProvider as ArrayCollection;
if (coll.contains(loclSelectedRow))
coll.removeItemAt(coll.getItemIndex(loclSelectedRow));
public function onTreeDragEnter(event:DragEvent):void
event.preventDefault();
DragManager.acceptDragDrop(event.target as UIComponent);
tree.showDropFeedback(event);
protected function onTreeDragOver(event:DragEvent):void
event.preventDefault();
event.currentTarget.hideDropFeedback(event);
try
var index:int=tree.calculateDropIndex(event);
catch (e:Error)
DragManager.showFeedback(DragManager.NONE);
return;
tree.selectedIndex=index;
var draggedOverItem:Object=tree.selectedItem;
public function onTreeDragExit(event:DragEvent):void
event.preventDefault();
tree.hideDropFeedback(event);
private function showAlert():void
Alert.yesLabel="Move";
Alert.noLabel="Copy";
Alert.buttonWidth=70;
Alert.show("Copy / Move ?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL, this, alertListener, null, Alert.OK);
private function alertListener(eventObj:CloseEvent):void
var result:Boolean=false;
if (eventObj.detail == Alert.CANCEL)
//Alert.show("CANCEL");
return;
if (eventObj.detail == Alert.YES)
//Alert.show("YES");
result=true;
else if (eventObj.detail == Alert.NO)
//Alert.show("NO");
result=false;
var index:int=tree.calculateDropIndex(treedropevt);
//Alert.show("Drop Pos" + index.toString());
/* var treeList:ArrayCollection=tree.dataProvider as ArrayCollection;
Alert.show(" index"+index+"Length "+treeList.length);
if(index > treeList.length)
Alert.show("Returning");
return;
var items:Array=new Array();
if (treedropevt.dragSource.hasFormat("items"))
items=items.concat(treedropevt.dragSource.dataForFormat("items") as Array);
var parentItem:Object;
parentItem=getObjectTarget();
/* if (tree.dataDescriptor.isBranch(tree.indexToItemRenderer(index).data))
parentItem=tree.indexToItemRenderer(index).data;
else
var dropParentPackage:Object = tree.mx_internal::_dropData.parent as Object;
Alert.show("HAck"+dropParentPackage.toString());
parentItem=tree.getParentItem(tree.indexToItemRenderer(index).data);
//Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
//Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
var position:int=0;
/* if(ObjectUtil.getClassInfo(parentItem).properties.length==0)
Alert.show("Returning");
return;
if (parentItem != null)
try
while (tree.indexToItemRenderer(index).data != parentItem)
//Alert.show(tree.indexToItemRenderer(index).data.toString());
if (index > 0)
index--;
//Alert.show("Insiade");
position++;
catch (e:Error)
Alert.show("Catch" + index.toString());
return;
for each (var item:Object in items)
var obj:Object=new Object()
obj.label=item.label as String;
if (parentItem != null)
//Alert.show("ADDED");
tree.dataDescriptor.addChildAt(parentItem, obj, position++);
else
//Alert.show("PARENT NULL");
tree.dataDescriptor.addChildAt(tree.selectedItem, obj, position++);
var spth:String=homePath.concat(item.label);
//Alert.show(spth);
var dpth:String=destPath.concat(item.label);
//Alert.show(dpth);
if (result == true)
removeItems();
//FlexDnDRemoteService.process(eid,"move",spth,dpth);
else
//FlexDnDRemoteService.process(eid,"copy",spth,dpth);
tree.validateNow();
public function getObjectTarget():Object
var dropData:Object=tree.mx_internal::_dropData as Object;
if (dropData.parent != null)
return dropData.parent;
else
// if there is not parent (root of the tree), I take the root directly
var renderer:IListItemRenderer=tree.indexToItemRenderer(0);
return renderer.data;
public function removeItems():void
//remove moved elements
var items:Array=treedropevt.dragSource.dataForFormat("items") as Array;
var coll:ArrayCollection=list.dataProvider as ArrayCollection;
for each (var item:Object in items)
if (coll.contains(item))
coll.removeItemAt(coll.getItemIndex(item));
private var treedropevt:DragEvent;
public function onTreeDragDrop(event:DragEvent):void
treedropevt=event;
showAlert();
event.preventDefault();
tree.hideDropFeedback(event);
public function resultHandler(event:ResultEvent):void
Alert.show("Success", "Status");
public function faultHandler(event:FaultEvent):void
Alert.show(event.fault.faultString, "Failure");
]]>
</mx:Script>
<mx:ArrayCollection id="listDP">
<mx:Object label="File1.dnd"/>
<mx:Object label="File2.dnd"/>
<mx:Object label="File3.dnd"/>
<mx:Object label="File4.dnd"/>
<mx:Object label="File5.dnd"/>
</mx:ArrayCollection>
<mx:Number id="lastRollOverIndex"/>
<!--
<mx:ArrayCollection id="treeDP">
<mx:Object label="/home">
<mx:children>
<mx:Object label="dummy1.ks"/>
<mx:Object label="dummy2.ks"/>
<mx:Object label="e493126">
<mx:children>
<mx:ArrayCollection>
<mx:Object label="/home/e493126/sample1.ks"/>
</mx:ArrayCollection>
</mx:children>
</mx:Object>
</mx:children>
</mx:Object>
</mx:ArrayCollection>
-->
<mx:ArrayCollection id="treeDP">
<mx:Object label="/dndDest">
<mx:children>
<mx:ArrayCollection>
<mx:Object label="sample1.ks"/>
<mx:Object label="sample2.ks"/>
<mx:Object label="sample3.ks"/>
<mx:Object label="sample4.ks"/>
<mx:Object label="sample5.ks"/>
<mx:Object label="sample6.ks"/>
</mx:ArrayCollection>
</mx:children>
</mx:Object>
</mx:ArrayCollection>
<mx:List id="list"
itemRollOver="lastRollOverIndex = event.rowIndex"
width="50%"
dragEnabled="true"
dataProvider="{listDP}"
labelField="label"
allowMultipleSelection="true"
dragMoveEnabled="false">
</mx:List>
<mx:Tree id="tree"
width="50%"
dragEnabled="true"
dataProvider="{treeDP}"
dragEnter="onTreeDragEnter(event)"
dragOver="onTreeDragOver(event)"
dragExit="onTreeDragExit(event)"
dragDrop="onTreeDragDrop(event)"
labelField="label"
liveScrolling="true">
</mx:Tree>
<mx:RemoteObject id="FlexDnDRemoteService"
showBusyCursor="true"
destination="FlexDnD">
<mx:method name="process"
result="resultHandler(event)"
fault="faultHandler(event)"/>
</mx:RemoteObject>
</mx:Application>
Thanks,
RajivYa , i have searched and have used the same code.
But needed to customize few things like:
stop dnd in same tree
drop some item into a folder ..( onto it ) etc
have achieved the same .. but this issue ..
i think the tree dataprovider (contents internally is not being updated .. only the UI)
any suggestions ?
- Rajiv -
Drag and Drop between the Two Tree controls
Hi all,
I am Flex newbie. Can anyone please send me the drag and drop
example between the Two Tree controls.
Thank you
-Nagaraju"ndendukuri" <[email protected]> wrote in
message
news:gdnbtt$7tt$[email protected]..
> Hi all,
>
> I am Flex newbie. Can anyone please send me the drag and
drop example
> between the Two Tree controls.
>
http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html -
Drag and Drop between two ALV Tree Controls
Hello all,
I have designed a spilt control of two ALV Trees using CL_GUI_ALV_TREE.
I have a top node as the Sales order Number and the child node as the items belonging to that sales order number.
Now i need to drag and drop the lines from one sales order to another.
Also these drag drop can take place between the nodes of the two different trees.
Can someone provide with a detail example as i need to complete the same urgently.
Regards,
ArunOnce check the Below code For tree to tree drag an drop
* CLASS lcl_main DEFINITION
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
* Types
TYPES:
BEGIN OF t_ekpo,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
END OF t_ekpo.
TYPES:
BEGIN OF t_vbap,
vbeln TYPE vbeln,
posnr TYPE vbelp,
END OF t_vbap.
* Internal Tables
DATA:
i_ekpo TYPE STANDARD TABLE OF t_ekpo,
i_ekpo_op TYPE STANDARD TABLE OF t_ekpo,
i_vbap TYPE STANDARD TABLE OF t_vbap,
i_vbap_op TYPE STANDARD TABLE OF t_vbap,
i_fcat_ekpo TYPE lvc_t_fcat,
i_fcat_vbap TYPE lvc_t_fcat.
* Work Areas
DATA:
wa_ekpo TYPE t_ekpo,
wa_ekpo1 TYPE t_ekpo,
wa_vbap TYPE t_vbap,
wa_vbap1 TYPE t_vbap.
* Data Declarations
DATA:
g_ebeln TYPE ebeln,
g_vbeln TYPE vbeln_va.
DATA: g_variant TYPE disvariant,
g_hierarchy_header TYPE treev_hhdr,
g_handle_drag TYPE i,
g_handle_drop TYPE i.
* Class data
DATA:
splitter TYPE REF TO cl_gui_splitter_container,
container TYPE REF TO cl_gui_custom_container,
container_1 TYPE REF TO cl_gui_container,
container_2 TYPE REF TO cl_gui_container,
tree1 TYPE REF TO cl_gui_alv_tree,
tree2 TYPE REF TO cl_gui_alv_tree,
g_drag TYPE REF TO cl_dragdrop,
g_drop TYPE REF TO cl_dragdrop.
* Constants
CONSTANTS:
c_30(2) TYPE c VALUE '30'.
* Methods
METHODS:
get_data, " Data Fatch
build_display, " Display Container
display_ekpo, " Ekpo table display
display_vbap, " Vbap table display
add_node_ekpo " Add node to Ekpo
IMPORTING table TYPE t_ekpo
key TYPE lvc_nkey
text TYPE lvc_value
flag TYPE c
CHANGING i_key TYPE lvc_nkey,
add_node_vbap " Add node to vbap
IMPORTING table TYPE t_vbap
key TYPE lvc_nkey
text TYPE lvc_value
flag TYPE c
CHANGING i_key TYPE lvc_nkey,
dnd_behaviour, " Drag and drop behavour
register_events_ekpo, " Register Events Ekpo
register_events_vbap, " Register events vbap
handle_drag_multiple " Drag Multiple Values
FOR EVENT on_drag_multiple
OF cl_gui_alv_tree
IMPORTING sender node_key_table fieldname drag_drop_object,
handle_drop " Drop the values
FOR EVENT on_drop
OF cl_gui_alv_tree
IMPORTING sender node_key drag_drop_object,
add_node_drop " Add node to Drop Node
IMPORTING table TYPE t_ekpo
key TYPE lvc_nkey
text TYPE lvc_value
CHANGING i_key TYPE lvc_nkey.
ENDCLASS. " Lcl_main DEFINITION
* CLASS LCL_DRAGOBJ DEFINITION
* Drag And drop Structure
CLASS lcl_dragobj DEFINITION INHERITING FROM lcl_main FINAL.
PUBLIC SECTION.
* Types
TYPES: BEGIN OF t_node_info,
l_ekpo TYPE t_ekpo,
l_node_text TYPE lvc_value,
l_node_key TYPE lvc_nkey,
END OF t_node_info.
* Data
DATA: i_node_info TYPE TABLE OF t_node_info,
wa_node_info TYPE t_node_info.
ENDCLASS. " LCL_DRAGOBJ DEFINITION
* Object Declarations
DATA obj_main TYPE REF TO lcl_main.
* Initialization *
INITIALIZATION.
CREATE OBJECT obj_main.
* Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
SELECT-OPTIONS:
s_ebeln FOR obj_main->g_ebeln,
s_vbeln FOR obj_main->g_vbeln MATCHCODE OBJECT cs_vbeln.
SELECTION-SCREEN END OF BLOCK block1.
* Start of Selection *
START-OF-SELECTION.
* Call Screen
CALL SCREEN 100.
* CLASS lcl_main IMPLEMENTATION
* Local class Implementation
CLASS lcl_main IMPLEMENTATION.
* Get Data *
METHOD get_data.
* Data from Ekpo
SELECT ebeln
ebelp
FROM ekpo
UP TO 100 ROWS
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln.
* Data from Vbap
SELECT vbeln
posnr
FROM vbap
UP TO 100 ROWS
INTO TABLE i_vbap
WHERE vbeln IN s_vbeln.
ENDMETHOD. " Get_data
* Build Display *
METHOD build_display.
* Create Container
CREATE OBJECT container
EXPORTING
container_name = 'CUST_CONT'.
* Split the container
CREATE OBJECT splitter
EXPORTING
parent = container
rows = 1
columns = 2.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = container_1.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = container_2.
* create tree control
CREATE OBJECT tree1
EXPORTING
parent = container_1
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
item_selection = 'X'
no_html_header = 'X'
no_toolbar = 'X'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
CREATE OBJECT tree2
EXPORTING
parent = container_2
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
item_selection = 'X'
no_html_header = 'X'
no_toolbar = 'X'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
g_variant-report = sy-repid.
g_variant-handle = space.
g_variant-log_group = space.
g_variant-username = space.
g_variant-text = space.
g_variant-dependvars = space.
* Call method for get data
CALL METHOD get_data.
* Drap And Drop behaviour method
CALL METHOD dnd_behaviour.
* Display the Ekpo table
CALL METHOD obj_main->display_ekpo.
* Diaplay the vbap table
CALL METHOD obj_main->display_vbap.
CALL METHOD tree1->frontend_update.
CALL METHOD tree2->frontend_update.
ENDMETHOD. " Build_display
* Display EKPO *
METHOD display_ekpo.
* Data
DATA:
l_key1 TYPE lvc_nkey,
l_key2 TYPE lvc_nkey,
l_key3 TYPE lvc_nkey,
l_node_text TYPE lvc_value.
* ALV control service modules
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_buffer_active = 'X'
i_structure_name = 'EKPO'
i_client_never_display = 'X'
i_bypassing_buffer = space
CHANGING
ct_fieldcat = i_fcat_ekpo
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
DELETE i_fcat_ekpo FROM 4.
ENDIF. " IF sy-subrc EQ 0.
g_hierarchy_header-heading = 'Purchase Order Details'(001).
g_hierarchy_header-tooltip = 'Purchase Order'(002).
g_hierarchy_header-width = c_30.
g_hierarchy_header-width_pix = ' '.
* Diaply
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
is_variant = g_variant
CHANGING
it_outtab = obj_main->i_ekpo_op
it_fieldcatalog = i_fcat_ekpo.
LOOP AT i_ekpo INTO wa_ekpo1.
MOVE wa_ekpo1 TO wa_ekpo.
l_key1 = ''.
AT NEW ebeln.
MOVE wa_ekpo-ebeln TO l_node_text.
* Call method for Add Node to Ekpo
CALL METHOD add_node_ekpo
EXPORTING
table = wa_ekpo
key = l_key1
text = l_node_text
flag = space
CHANGING
i_key = l_key2.
ENDAT.
CLEAR l_node_text.
MOVE wa_ekpo-ebelp TO l_node_text.
* Call method for Add Node to Ekpo
CALL METHOD add_node_ekpo
EXPORTING
table = wa_ekpo
key = l_key2
text = l_node_text
flag = 'X'
CHANGING
i_key = l_key3.
ENDLOOP. " LOOP AT i_ekpo INTO wa_ekpo1.
* Call method For Register events
CALL METHOD register_events_ekpo.
ENDMETHOD. " Display_ekpo
* Display VBAP *
METHOD display_vbap.
* Data
DATA:
l_key1 TYPE lvc_nkey,
l_key2 TYPE lvc_nkey,
l_key3 TYPE lvc_nkey,
l_node_text TYPE lvc_value.
REFRESH i_fcat_vbap.
* ALV control service modules
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_buffer_active = 'X'
i_structure_name = 'VBAP'
i_client_never_display = 'X'
i_bypassing_buffer = space
CHANGING
ct_fieldcat = i_fcat_vbap
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
DELETE i_fcat_vbap FROM 4.
ENDIF. " IF sy-subrc EQ 0.
g_hierarchy_header-heading = 'Sales Order Details'(003).
g_hierarchy_header-tooltip = 'Sales Order'(004).
g_hierarchy_header-width = c_30.
g_hierarchy_header-width_pix = ' '.
* Display
CALL METHOD tree2->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
is_variant = g_variant
CHANGING
it_outtab = obj_main->i_vbap_op
it_fieldcatalog = i_fcat_vbap.
LOOP AT i_vbap INTO wa_vbap1.
MOVE wa_vbap1 TO wa_vbap.
l_key1 = ''.
AT NEW vbeln.
MOVE wa_vbap-vbeln TO l_node_text.
* Call method for Add Node to vbap
CALL METHOD add_node_vbap
EXPORTING
table = wa_vbap
key = l_key1
text = l_node_text
flag = 'X'
CHANGING
i_key = l_key2.
ENDAT.
CLEAR l_node_text.
MOVE wa_vbap-posnr TO l_node_text.
* Call method for Add Node to vbap
CALL METHOD add_node_vbap
EXPORTING
table = wa_vbap
key = l_key2
text = l_node_text
flag = space
CHANGING
i_key = l_key3.
ENDLOOP. " LOOP AT i_vbap INTO wa_vbap1.
* Call method For Register events
CALL METHOD register_events_vbap.
ENDMETHOD. " Display_vbap
* Add Node to Ekko *
METHOD add_node_ekpo.
* Data
DATA: l_layout_node TYPE lvc_s_layn.
IF flag = 'X'.
l_layout_node-dragdropid = g_handle_drag.
ENDIF. " IF flag = 'X'.
* Add node to tree1
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = table
i_node_text = text
is_node_layout = l_layout_node
IMPORTING
e_new_node_key = i_key
EXCEPTIONS
relat_node_not_found = 1
node_not_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
ENDMETHOD. " Add_node_ekpo
* Add Node to Vbap *
METHOD add_node_vbap.
* Data
DATA: l_layout_node TYPE lvc_s_layn.
IF flag = 'X'.
l_layout_node-dragdropid = g_handle_drop.
ENDIF. " IF flag = 'X'.
* Add node for tree2
CALL METHOD tree2->add_node
EXPORTING
i_relat_node_key = key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = table
i_node_text = text
is_node_layout = l_layout_node
IMPORTING
e_new_node_key = i_key
EXCEPTIONS
relat_node_not_found = 1
node_not_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
ENDMETHOD. " Add_node_vbap
* Dnd behaviour *
METHOD dnd_behaviour.
* Data
DATA: effect TYPE i,
l_flavor TYPE c VALUE 'f'.
* For drag
CREATE OBJECT g_drag.
effect = cl_dragdrop=>copy.
CALL METHOD g_drag->add
EXPORTING
flavor = l_flavor
dragsrc = 'X'
droptarget = ' '
effect = effect
effect_in_ctrl = effect.
CALL METHOD g_drag->get_handle
IMPORTING
handle = g_handle_drag.
* For Drop
CREATE OBJECT g_drop.
effect = cl_dragdrop=>copy.
CALL METHOD g_drop->add
EXPORTING
flavor = l_flavor
dragsrc = ' '
droptarget = 'X'
effect = effect
effect_in_ctrl = effect.
CALL METHOD g_drop->get_handle
IMPORTING
handle = g_handle_drop.
ENDMETHOD. " Dnd_behaviour
* register events *
METHOD register_events_ekpo.
* Data
DATA: lt_events TYPE cntl_simple_events.
* Tree events registers ALV Tree
CALL METHOD tree1->get_registered_events
IMPORTING
events = lt_events.
* Register events on frontend
CALL METHOD tree1->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
* Event Handling
SET HANDLER obj_main->handle_drag_multiple FOR tree1.
ENDMETHOD. " Register_events_ekpo
* register events *
METHOD register_events_vbap.
* Data
DATA: lt_events TYPE cntl_simple_events.
* Tree events registers ALV Tree
CALL METHOD tree2->get_registered_events
IMPORTING
events = lt_events.
* Register events on frontend
CALL METHOD tree2->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
* Event
SET HANDLER obj_main->handle_drop FOR tree2.
ENDMETHOD. " Register_events_vbap
* Handle drag multiple Values *
METHOD handle_drag_multiple.
* Data
DATA: dataobj TYPE REF TO lcl_dragobj,
l_node_key TYPE lvc_nkey,
l_ekpo TYPE t_ekpo,
l_node_text TYPE lvc_value,
l_node_layout TYPE lvc_s_layn.
* Create and fill dataobject for event ON_DROP.
CREATE OBJECT dataobj.
* Loop the Node key Table
LOOP AT node_key_table INTO l_node_key.
CALL METHOD sender->get_outtab_line
EXPORTING
i_node_key = l_node_key
IMPORTING
e_outtab_line = l_ekpo
e_node_text = l_node_text
es_node_layout = l_node_layout.
IF l_node_layout-isfolder NE 'X'.
dataobj->wa_node_info-l_node_key = l_node_key.
dataobj->wa_node_info-l_ekpo = l_ekpo.
dataobj->wa_node_info-l_node_text = l_node_text.
APPEND dataobj->wa_node_info TO dataobj->i_node_info.
ENDIF. " IF l_node_layout-isfolder NE 'X'.
ENDLOOP. " LOOP AT node_key_table INTO l_node_key
drag_drop_object->object = dataobj.
ENDMETHOD. " Handle_drag_multiple
* Handle drop multiple Values *
METHOD handle_drop.
DATA: dataobj TYPE REF TO lcl_dragobj,
l_new_key TYPE lvc_nkey,
l_node_text TYPE lvc_value.
CATCH SYSTEM-EXCEPTIONS move_cast_error = 1.
* ON_DROP
dataobj ?= drag_drop_object->object.
LOOP AT dataobj->i_node_info INTO dataobj->wa_node_info.
MOVE dataobj->wa_node_info-l_node_text TO l_node_text.
* Call method for Add Node to vbap
CALL METHOD add_node_drop
EXPORTING
table = dataobj->wa_node_info-l_ekpo
key = node_key
text = l_node_text
CHANGING
i_key = l_new_key.
ENDLOOP. " LOOP AT dataobj->i_node_info INTO dataobj->wa_node_inf
* Expand the node
CALL METHOD sender->expand_node
EXPORTING
i_node_key = node_key
CALL METHOD sender->frontend_update.
ENDCATCH.
IF sy-subrc NE 0.
CALL METHOD drag_drop_object->abort.
ENDIF. " IF sy-subrc NE 0
ENDMETHOD. " Handle_drop
* Add Node to drop *
METHOD add_node_drop.
* Add node to drop tree
CALL METHOD tree2->add_node
EXPORTING
i_relat_node_key = key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = table
i_node_text = text
* is_node_layout = l_layout_node
IMPORTING
e_new_node_key = i_key
EXCEPTIONS
relat_node_not_found = 1
node_not_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0
ENDMETHOD. " Add_node_drop
ENDCLASS. " lcl_main IMPLEMENTATION
*& Module STATUS_0100 OUTPUT
* Screen 100 Pbo
MODULE status_0100 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
CALL METHOD obj_main->build_display.
ENDMODULE. " Status_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* Screen 100 Pai
MODULE user_command_0100 INPUT.
IF sy-ucomm EQ 'BACK'.
LEAVE TO SCREEN 0.
ENDIF. " IF sy-ucomm EQ 'BACK'
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Report ZBPS_TREE_DRAG_DROP
REPORT zbps_tree_drag_drop.
* CLASS lcl_main DEFINITION
CLASS lcl_main DEFINITION.
PUBLIC SECTION.
* Types
TYPES:
BEGIN OF t_ekpo,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
END OF t_ekpo.
TYPES:
BEGIN OF t_vbap,
vbeln TYPE vbeln,
posnr TYPE vbelp,
END OF t_vbap.
* Internal Tables
DATA:
i_ekpo TYPE STANDARD TABLE OF t_ekpo,
i_ekpo_op TYPE STANDARD TABLE OF t_ekpo,
i_vbap TYPE STANDARD TABLE OF t_vbap,
i_vbap_op TYPE STANDARD TABLE OF t_vbap,
i_fcat_ekpo TYPE lvc_t_fcat,
i_fcat_vbap TYPE lvc_t_fcat.
* Work Areas
DATA:
wa_ekpo TYPE t_ekpo,
wa_ekpo1 TYPE t_ekpo,
wa_vbap TYPE t_vbap,
wa_vbap1 TYPE t_vbap.
* Data Declarations
DATA:
g_ebeln TYPE ebeln,
g_vbeln TYPE vbeln_va.
DATA: g_variant TYPE disvariant,
g_hierarchy_header TYPE treev_hhdr,
g_handle_drag TYPE i,
g_handle_drop TYPE i.
* Class data
DATA:
splitter TYPE REF TO cl_gui_splitter_container,
container TYPE REF TO cl_gui_custom_container,
container_1 TYPE REF TO cl_gui_container,
container_2 TYPE REF TO cl_gui_container,
tree1 TYPE REF TO cl_gui_alv_tree,
tree2 TYPE REF TO cl_gui_alv_tree,
g_drag TYPE REF TO cl_dragdrop,
g_drop TYPE REF TO cl_dragdrop.
* Constants
CONSTANTS:
c_30(2) TYPE c VALUE '30'.
* Methods
METHODS:
get_data, " Data Fatch
build_display, " Display Container
display_ekpo, " Ekpo table display
display_vbap, " Vbap table display
add_node_ekpo " Add node to Ekpo
IMPORTING table TYPE t_ekpo
key TYPE lvc_nkey
text TYPE lvc_value
flag TYPE c
CHANGING i_key TYPE lvc_nkey,
add_node_vbap " Add node to vbap
IMPORTING table TYPE t_vbap
key TYPE lvc_nkey
text TYPE lvc_value
flag TYPE c
CHANGING i_key TYPE lvc_nkey,
dnd_behaviour, " Drag and drop behavour
register_events_ekpo, " Register Events Ekpo
register_events_vbap, " Register events vbap
handle_drag_multiple " Drag Multiple Values
FOR EVENT on_drag_multiple
OF cl_gui_alv_tree
IMPORTING sender node_key_table fieldname drag_drop_object,
handle_drop " Drop the values
FOR EVENT on_drop
OF cl_gui_alv_tree
IMPORTING sender node_key drag_drop_object,
add_node_drop " Add node to Drop Node
IMPORTING table TYPE t_ekpo
key TYPE lvc_nkey
text TYPE lvc_value
CHANGING i_key TYPE lvc_nkey.
ENDCLASS. " Lcl_main DEFINITION
* CLASS LCL_DRAGOBJ DEFINITION
* Drag And drop Structure
CLASS lcl_dragobj DEFINITION INHERITING FROM lcl_main FINAL.
PUBLIC SECTION.
* Types
TYPES: BEGIN OF t_node_info,
l_ekpo TYPE t_ekpo,
l_node_text TYPE lvc_value,
l_node_key TYPE lvc_nkey,
END OF t_node_info.
* Data
DATA: i_node_info TYPE TABLE OF t_node_info,
wa_node_info TYPE t_node_info.
ENDCLASS. " LCL_DRAGOBJ DEFINITION
* Object Declarations
DATA obj_main TYPE REF TO lcl_main.
* Initialization *
INITIALIZATION.
CREATE OBJECT obj_main.
* Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME.
SELECT-OPTIONS:
s_ebeln FOR obj_main->g_ebeln,
s_vbeln FOR obj_main->g_vbeln MATCHCODE OBJECT cs_vbeln.
SELECTION-SCREEN END OF BLOCK block1.
* Start of Selection *
START-OF-SELECTION.
* Call Screen
CALL SCREEN 100.
* CLASS lcl_main IMPLEMENTATION
* Local class Implementation
CLASS lcl_main IMPLEMENTATION.
* Get Data *
METHOD get_data.
* Data from Ekpo
SELECT ebeln
ebelp
FROM ekpo
UP TO 100 ROWS
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln.
* Data from Vbap
SELECT vbeln
posnr
FROM vbap
UP TO 100 ROWS
INTO TABLE i_vbap
WHERE vbeln IN s_vbeln.
ENDMETHOD. " Get_data
* Build Display *
METHOD build_display.
* Create Container
CREATE OBJECT container
EXPORTING
container_name = 'CUST_CONT'.
* Split the container
CREATE OBJECT splitter
EXPORTING
parent = container
rows = 1
columns = 2.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = container_1.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = container_2.
* create tree control
CREATE OBJECT tree1
EXPORTING
parent = container_1
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
item_selection = 'X'
no_html_header = 'X'
no_toolbar = 'X'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
CREATE OBJECT tree2
EXPORTING
parent = container_2
node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
item_selection = 'X'
no_html_header = 'X'
no_toolbar = 'X'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
g_variant-report = sy-repid.
g_variant-handle = space.
g_variant-log_group = space.
g_variant-username = space.
g_variant-text = space.
g_variant-dependvars = space.
* Call method for get data
CALL METHOD get_data.
* Drap And Drop behaviour method
CALL METHOD dnd_behaviour.
* Display the Ekpo table
CALL METHOD obj_main->display_ekpo.
* Diaplay the vbap table
CALL METHOD obj_main->display_vbap.
CALL METHOD tree1->frontend_update.
CALL METHOD tree2->frontend_update.
ENDMETHOD. " Build_display
* Display EKPO *
METHOD display_ekpo.
* Data
DATA:
l_key1 TYPE lvc_nkey,
l_key2 TYPE lvc_nkey,
l_key3 TYPE lvc_nkey,
l_node_text TYPE lvc_value.
* ALV control service modules
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_buffer_active = 'X'
i_structure_name = 'EKPO'
i_client_never_display = 'X'
i_bypassing_buffer = space
CHANGING
ct_fieldcat = i_fcat_ekpo
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
DELETE i_fcat_ekpo FROM 4.
ENDIF. " IF sy-subrc EQ 0.
g_hierarchy_header-heading = 'Purchase Order Details'(001).
g_hierarchy_header-tooltip = 'Purchase Order'(002).
g_hierarchy_header-width = c_30.
g_hierarchy_header-width_pix = ' '.
* Diaply
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
is_variant = g_variant
CHANGING
it_outtab = obj_main->i_ekpo_op
it_fieldcatalog = i_fcat_ekpo.
LOOP AT i_ekpo INTO wa_ekpo1.
MOVE wa_ekpo1 TO wa_ekpo.
l_key1 = ''.
AT NEW ebeln.
MOVE wa_ekpo-ebeln TO l_node_text.
* Call method for Add Node to Ekpo
CALL METHOD add_node_ekpo
EXPORTING
table = wa_ekpo
key = l_key1
text = l_node_text
flag = space
CHANGING
i_key = l_key2.
ENDAT.
CLEAR l_node_text.
MOVE wa_ekpo-ebelp TO l_node_text.
* Call method for Add Node to Ekpo
CALL METHOD add_node_ekpo
EXPORTING
table = wa_ekpo
key = l_key2
text = l_node_text
flag = 'X'
CHANGING
i_key = l_key3.
ENDLOOP. " LOOP AT i_ekpo INTO wa_ekpo1.
* Call method For Register events
CALL METHOD register_events_ekpo.
ENDMETHOD. " Display_ekpo
* Display VBAP *
METHOD display_vbap.
* Data
DATA:
l_key1 TYPE lvc_nkey,
l_key2 TYPE lvc_nkey,
l_key3 TYPE lvc_nkey,
l_node_text TYPE lvc_value.
REFRESH i_fcat_vbap.
* ALV control service modules
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_buffer_active = 'X'
i_structure_name = 'VBAP'
i_client_never_display = 'X'
i_bypassing_buffer = space
CHANGING
ct_fieldcat = i_fcat_vbap
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
DELETE i_fcat_vbap FROM 4.
ENDIF. " IF sy-subrc EQ 0.
g_hierarchy_header-heading = 'Sales Order Details'(003).
g_hierarchy_header-tooltip = 'Sales Order'(004).
g_hierarchy_header-width = c_30.
g_hierarchy_header-width_pix = ' '.
* Display
CALL METHOD tree2->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
is_variant = g_variant
CHANGING
it_outtab = obj_main->i_vbap_op
it_fieldcatalog = i_fcat_vbap.
LOOP AT i_vbap INTO wa_vbap1.
MOVE wa_vbap1 TO wa_vbap.
l_key1 = ''.
AT NEW vbeln.
MOVE wa_vbap-vbeln TO l_node_text.
* Call method for Add Node to vbap
CALL METHOD add_node_vbap
EXPORTING
table = wa_vbap
key = l_key1
text = l_node_text
flag = 'X'
CHANGING
i_key = l_key2.
ENDAT.
CLEAR l_node_text.
MOVE wa_vbap-posnr TO l_node_text.
* Call method for Add Node to vbap
CALL METHOD add_node_vbap
EXPORTING
table = wa_vbap
key = l_key2
text = l_node_text
flag = space
CHANGING
i_key = l_key3.
ENDLOOP. " LOOP AT i_vbap INTO wa_vbap1.
* Call method For Register events
CALL METHOD register_events_vbap.
ENDMETHOD. " Display_vbap
* Add Node to Ekko *
METHOD add_node_ekpo.
* Data
DATA: l_layout_node TYPE lvc_s_layn.
IF flag = 'X'.
l_layout_node-dragdropid = g_handle_drag.
ENDIF. " IF flag = 'X'.
* Add node to tree1
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = key
i_relationship = cl_gui_column_tree=>relat_last_child
is_outtab_line = table
i_node_text = text
is_node_layout = l_layout_node
IMPORTING
e_new_node_key = i_key
EXCEPTIONS
relat_node_not_found = 1
node_not_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
CLEAR sy-subrc.
ENDIF. " IF sy-subrc NE 0.
ENDMETHOD. " Add_node_ekpo
* Add Node to Vbap *
METHOD add_node_vbap.
* Data
DATA: l_layout_node TYPE lvc_s_layn.
IF flag = 'X'.
l_layout_node-dragdropid = g_handle_drop.
ENDIF. " IF flag = 'X'.
* Add node for tree2
CALL METHOD t -
Drag and drop doesn't work and also control C and control V
drag and drop doesn't work and also control C and control V
Try this first. On your hard drive, go to Users / yourself / Library / Preferences.
In that Preferences folder there is a file called com.apple.finder.plist.
Trash that file and restart.
Maybe you are looking for
-
How to use SELECTION-SET with FREE-SELECTIONS?
Hi, how to use SELECTION-SET with FREE-SELECTIONS? Regards, Vinay.
-
HT1688 my default apps are gone. Restoring does not work
Pleas help I tried to jailbreak my iphone 4 and my default apps are gone(settings, photos, exct)
-
Issue With Exporting Video From Prelude To Premiere
So I import my raw media into Prelude and Export it to Premiere. In Prelude, I can see the entire video and everything is there. However, when I export it to Premiere only about 18 minutes of the video imports itself. The thing is that this doesn't
-
Traditional classful IP addressing?
In classful addressing, class A networks would allow up to 16,777,214 hosts be attached to the network. In reality, how was this managed? This many hosts were attached to a single LAN? Was the traffic so light that this many hosts could be attached?
-
Digital Signature Solution for UCM
Looking at options to implement Digital Signatures solution for Oracle UCM specifically we plan to use it with UCM forms in WCI portal. What are the products/solutions available and any implementation experiences please let me know. Thanks!