JTable drag multiple items
Hello,
After figuring out how drag and drop works, I came across a problem. When you click and hold on the table, and drag it down, it doesnt select more items anymore, it just drags the item at the place where you clicked the table. This is probably because dragGestureRecognized starts the drag. Is there a workaround for this problem?
Thanks
Did you consider asking this in the Swing section of this forum? You're more likely to get quick help there.
Similar Messages
-
Why doesn't iPhoto allow dragging multiple items?
The last few versions of iPhoto (maybe since installing Mavericks) do not have to ability to drag and drop multiple items. I can highlight multiple items, but if I want to drag photos into folders to organize them, I have to drag them ONE AT A TIME! Needless to say, this is excruciating! Is this change intentional? Or am I the only one with this problem?
DaveFixed! I ran across this suggestion in another discussion:
Mary Kay NeidhamerAug 19, 2014 6:10 AM
Re: I cannot drag photos from iPhoto to desktop with iMac and Mavericks OSin response to dianeoforegon
I finally was able to solve my problem. I tried what Linc Davis suggested and that didn't help. I finally found an article athttp://www.cnet.com/how-to/how-to-rebuild-a-user-account-in-os-x/ I was able to create the user account and that solved my problem.
Rebulding my user account per the instructions fully restored the ability to drag multiple items in iPhoto. Thanks to Mary for her post, and thanks to OT for the suggestion to try a different account which pointed me in the right direction. -
Listbox drag multiple items out
Want to drag multiple items out of a listbox. Is this possible?
George Zou
http://webspace.webring.com/people/og/gtoolbox
Solved!
Go to Solution.zou wrote:
Want to drag multiple items out of a listbox. Is this possible?
Whereto?
In the same VI?
Register for the 'drop' event on a control, the drag and drop data will have info, here's a sample VI. make sure you allow dragging from the Listbox.
The help is very specific on the actual data type in the info. However it's hard to understand:
LV_LISTBOX_ITEMS
Array of a cluster that contains an array of
strings in the item you are dragging (in order from left to right) and
an integer that represents the glyph index associated with the item from
which you are dragging data.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
How do i drag multiple files and move to a folder
I just purchased an IMAC and would like to transfer all of my photos from my old Dell laptop to my IMAC. I am using a USB Flash Drive and now I need to know how to drag multiple items and move the the pictures file? it will only let me move one at a time and this will take forever! I have the magic mouse. I have figured out how to choose/highlight multiple photos but i cannot figure out how to drag them over to the pictures file.
If you're not used to spring-loaded folders, it may be helpful to open a second Finder window (⌘N) and navigate that to the target folder, so you can just drop them straight in.
-
I'm working on an application where I need multiple item DnD between JTrees and JTables. I'm using Java 1.4.1
I have the basics of multiple item DnD working, by creating Transferable classes that contain a collection of items.
The problem I have is when I drag a multiple selection within a JTree (i.e. DragSource and DropTarget are the same) then my call to event.getCurrentDataFlavors() in my dragOver(DropTargetDragEvent event) method is not returning any data flavours unless I drag over to another JTree. If I now drag back over to the source JTree (so that DragSource and DropTarget are again the same) as if by magic I now get DataFlavours whilst dragging over the source container.
This is driving me nuts! :-)
Has anybody else seen this and do they have a solution?I have the same problem here.
When I try to perform drag and drop in a JTree (DragSource and DropTarget are the same), calling event.getCurrentDataFlavors() in the dragOver(DropTargetDragEvent event) method in the DropTargetListener returns me nothing!!
However, the call of event.getCurrentDataFlavors() in the
drop(DropTargetDropEvent event) does return me the correct
information.
On the doc, the DropTargetDragEvent.getCurrentDataFlavors()
should mimic DropTargetDropEvent.getCurrentDataFlavors().
So, I suppose both functions should work in the same way
properly.
Is there anything wrong with my understanding or is that a bug
of the Java dnd? -
Dragging multiple rows in JTable - MUST use CTRL, or not?
Hello all!
I'm writing an app that needs to be able to drag multiple rows from a JTable. I have seen that I can do this by selecting multiple rows with the LEFT mouse button, while holding down the CTRL key, and then dragging (again, with the left mouse button).
The problem is, since I'm holding down the CTRL key, this comes across as a DnDConstants.ACTION_COPY.
I find that if I do multiple selection, then drag with the RIGHT mouse button (no CTRL key held down), then I get a DnDConstants.ACTION_MOVE, as I want.
My question: Is there any simple way to enable dragging multiple JTable rows, using the LEFT mouse button, but WITHOUT holding down the CTRL key?
I have been tasked with "making it act like Windows", which doesn't undo a multiple-selection when one clicks on an existing selected row until one lets go of the left mouse button; whereas JTables appear to change the selection to the clicked-upon row immediately, even if it is part of the existing selection.
Any ways around this anyone knows, short of modifying the JTable or BasicTableUI itself?
- TimBy the way, I just tested this assumption of mine, and found I was wrong if you're using default JTable drag and drop.
However, I'm using my own implementation. I notice in a simple program without any drag and drop, I get the behavior I mentioned above, so I'm guessing this IS default JTable behavior, which is then modified by the built-in drag and drop support.
So the trick will be, how to do what built-in drag and drop is doing, without using built-in drag and drop. :-)
- Tim -
How do you select and move more than one bookmark at a time?
Shift+Click does not select multiple items that are next to one another in a list because the items open in firefox before this happens.Use the bookmarks library. You may use Shift +Click, and Ctrl + Click to create groupings of selected bookmarks to drag and drop.
* one method of opening the bookmarks library is keyboard shortcut <br /> Ctrl+Shift+B (Windows)
*see also [[How to use bookmarks to save and organize your favorite websites]]
*and [[Use bookmark folders to organize your bookmarks]] -
Does anyone know how to set up a drag and drop activity where
you can have 1 target that multiple items get dragged to? For
example, an activity where you would drag multiple images into a
trash can.
I've tried, and it seems like once one items goes into the
target, nothing else works because its going on top of the first
item.
TIA!!!OK, I'm having trouble again. I need multiple items to drag
to one target. I'm putting all my actionscript in the same frame,
and here's how it looks:
stop();
name_mc.onPress = function():Void {
this.startDrag(true);
name_mc.onRelease = function():Void {
this.stopDrag();
if (eval(this._droptarget) == safe_mc) {
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
address_mc.onPress = function():Void {
this.startDrag(true);
address_mc.onRelease = function():Void {
this.stopDrag();
if (eval(this._droptarget) == safe_mc) {
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
And I'm getting the following error message:
**Error** Scene=Recap, layer=actions, frame=1:Line 21:
Statement block must be terminated by '}'
address_mc.onRelease = function():Void {
**Error** Scene=Recap, layer=actions, frame=1:Line 27: Syntax
error.
Total ActionScript Errors: 2 Reported Errors: 2
Do you know what I'm doing wrong? -
Selecting multiple items quickly in icon view
The Finder's Help menu shows only one way to select multiple items that are next to each other:
Select multiple items that are next to each other
Do one of the following:
Click one item, and then press the Shift key and click other items to include them in the selection.
Click the first item, and then press the Shift key and click the last item. All items in between are included in the selection.
Click a window to make it active, and then press Command (⌘)-A. All items in the window are selected.
When you have selected multiple items and want to deselect one of them, press the Command key and click the item.
However, I often view folders in icon view and the second method above doesn't work--frustrating if you have more than a few items.
There are two ways that do:
Change the view to List and use the second method described above (Click the first item, and then press the Shift key and click the last item) or
Click outside of the first folder/icon you wish to select, then hold and drag over the row or area:
Hope this is helpful; it would be a useful addition to the Help menu!
(Oops, just found an older similar post...sorry for the duplication.)
Message was edited by: dexterinaThanks for clarification Rhys.
I am using slicers at moment to do multi-selects but was just thinking I was missing something in case of tiles but your reply suggests that this behaviour is by design.
Nitesh Rai- Please mark the post as answered if it answers your question -
HT1343 How do I select multiple items?
How do I highlight and select multiple items?
Welcome to Apple Support Communities
There are different ways to do what you want:
Hold the Command key and press the items you want to select.
Press Command and A keys to select all items in a folder.
You can do the same with the mouse or trackpad by clicking in one part of the window and dragging it until all the items you want are highlighted -
Create multiple playlists by dragging multiple folders?
As the subject says, I'd like to be able to drag multiple folders into iTunes' Playlist column to create a playlist for each folder (and given the same names as each folder). Unfortunately, iTunes only creates one folder named "Untitled Playlist" when multiple folders are added. My music library is divided into hundreds of folders, each named for the artist who's music is contained within. Having to individually drag each folder into iTunes is a royal pain.
Is there a shortcut or key combination that will allow this? Or is this just a major iTunes feature shortcoming? I can only hope that this is addressed in a future update.My music library is divided into hundreds of folders, each named for the artist who's music is contained within. Having to individually drag each folder into iTunes is a royal pain.
Creating a playlist for each artist is also a pain, especially when iTunes does this automatically.
iTunes menu View -> Show browser.
Select the Genre, Artist, Album (or multiple items) to see only those items.
The more playlists you have the more it will slow down as i tneeds to rewrite the iTunes library file and iTunes library.xml after almost anything you do in iTunes such as listen to a song, skip a song, cahnge any info, etc. -
ITunes 7 can't add artwork to multiple items in main window like iTunes 6
In iTunes 7 I can no longer add the same artwork to multiple items in the main window. For instance, I want the same cover art added to every track of a certain album. I select all the tracks, and the artwork window says "Drag Album Artwork Here", but when I do, nothing happens.
This used to work fine in iTunes 6. Is this a bug, a setting I am missing or something else? I know I can edit the artwork in the "Get Info" window but that's inconvenient when ripping a lot of CDs.
PowerMac Dual 1.42 GHz G4 Mac OS X (10.4.7)Negative, Bill.
Even with "selected item" checked, it will not add artwork to multiple items. The method I am using is the method I have always used - highlight the whole album and drag a jpg from a web browser straight in. It makes a brief HD noise as if something is being accomplished, but the songs do not acquire any artwork.
However, if you only select one song, it will drag in seamlessly as always. -
ITunes 7.1 edit multiple item info
Hi,
Never had this problem before but upon upgrading to iTunes 7.1 last night I started experiencing it immediately. Was wondering if I'm doing something wrong or if this is a bug? I'm in the process of ripping a lot of vinyl I have to mp3. I use Lamebrain to encode my aiff files to mp3. Upon dragging a few mp3s into iTunes to add them, they show up fine in my Library, but when I highlight, say, these two new files in my Library to edit them this is when the problem starts.
When the multiple item info window pops up, I enter in whatever info I want the two items to have, hit enter, but the information I've just entered only is being applied to the first of the two highlighted items. Furthermore, the second item which didn't have the information applied to it has now been rendered mysteriously uneditable, meaning that when I press -I to get info on the track, all of the normal fields that one can enter in all the metadata are inaccessible (I can't click in any of them to enter info), as if iTunes were viewing the track as an internet radio stream or something. Only if I quit iTunes and relaunch it does it let me enter in metadata for that track. This never used to happen to me in iTunes 7.02! Any suggestions?
Thanks,
Evan
1.5 GHz PowerBook G4 15" Mac OS X (10.4.8)
1.5 GHz powerbook g4 15 Mac OS X (10.3.7)
1.5 GHz powerbook g4 15 Mac OS X (10.4.8)i was having the same problem and i fixed it by locating the songs on my computer and right clicking on it and selecting properties. then you have to make sure it is not a "read-only" file. by unclicking the read-only option , i was able to edit those songs on iTunes with the GetInfo option. hope this helps!
-
Custom content presenter template - multiple items
I am having an issue with using custom content presenter template...
Here are the steps I took:
*1. I created a single item display template veventItem_CP.jsff*
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<dt:contentTemplateDef var="node">
<af:panelGroupLayout id="pgl1" layout="vertical">
<af:outputText value="#{node.propertyMap['dDocTitle'].value}" id="ot1"/>
</af:panelGroupLayout>
</dt:contentTemplateDef>
</jsp:root>
and create a portal resource:
Content Repository Name: UCM
Content Type: IDC:Profile:Event
Content Type Default View: true
View ID: veventItem_CP
*2. I created multiple item display template veventsList_CP.jsff*
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<dt:contentListTemplateDef var="nodes" >
<af:panelGroupLayout id="nodeListPanel" halign="left" layout="vertical" valign="middle" inlineStyle="text-align:left;">
<af:iterator rows="0" id="i1" var="node" value="#{nodes}" varStatus="iterator" >
<af:commandLink text="#{node.propertyMap['dDocTitle'].value}" id="cl1"/>
<dt:contentTemplate id="listitem" node="#{node}"
view="veventItem_CP"
nodesHint="#{node}"/>
</af:iterator>
</af:panelGroupLayout>
</dt:contentListTemplateDef>
</jsp:root>
and create a Portal Resource:
Category Name: events
Category ID: *
Category Default View: true
View ID: veventsList_CP
*3. I drag and drop a folder from my UCM connection onto home.jspx and enter the following parameters into the binding:*
<taskFlow id="eventsContentPresenter"
taskFlowId="/oracle/webcenter/doclib/view/jsf/taskflows/presenter/contentPresenter.xml#doclib-content-presenter"
activation="deferred"
xmlns="http://xmlns.oracle.com/adf/controller/binding">
<parameters>
<parameter id="taskFlowInstId"
value="${'cd6c7cd6-2c74-4e6c-a711-a748d9abd0d8'}"/>
<parameter id="datasourceType" value="${'dsTypeFolderContents'}"/>
<parameter id="datasource"
value="${'AcqUCM#dCollectionID:133054394311000404'}"/>
<parameter id="templateCategory" value="${'events'}"/>
<parameter id="templateView" value="${''}"/>
<parameter id="regionTemplate" value="${'false'}"/>
<parameter id="maxResults" value="${''}"/>
</parameters>
</taskFlow> Then when I deploy the code the error I get is:
<TemplateRegistry> <getListTemplateViewId()> No default template view specified for category id 'events'. Returning the default view for the default category.Hey Yannick,
I think you are mistaken...
I am using a contentListTemplate, and in the developer's guide it says to use the templateCategory for multiple-item content presenter templates. When I do what you suggested, my veventsList_CP doesn't work and the ADF default tempalte is used.
I accomplished what I needed to accomplish on the home page by re-writing my veventsList_CP to not use the nested template:
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<dt:contentListTemplateDef var="nodes" >
<af:panelGroupLayout id="nodeListPanel" halign="left" layout="vertical" valign="middle" inlineStyle="text-align:left;">
<af:iterator rows="0" id="i1" var="node" value="#{nodes}" varStatus="iterator" >
<af:panelGroupLayout id="pgl1" layout="vertical"
inlineStyle="padding-left:10px; padding-top:10px;">
<af:commandLink text="#{node.propertyMap['dDocTitle'].value}" id="cl1"
inlineStyle="font-size:small; font-weight:bold;"/>
<af:outputText value="#{upcomingEventsBean.dates}"
id="ot2"/>
</af:panelGroupLayout>
</af:iterator>
</af:panelGroupLayout>
</dt:contentListTemplateDef>
</jsp:root>
Now I need to make the commandLink direct to a content presenter display template that shows all of the event's metadata. I've done this before by using the default navigation model, but never programmatically. I will give it a try and report how it goes.
Edited by: ilovebuffets on Sep 19, 2011 11:42 AM -
MULTIPLE ITEM PROBLEM IN VL31N BDC
hI FRIENDS ,
I AM POSTING A BDC OF TRANSACTION VL31N ,ie FOR SCHEDULE AGREEMENT INBOUND DELIVERY.I CREATE A FUNCTIONAL MODULE OF THE SAME AND CALL IT FROM AN ASP PAGE,IN THAT THERE IS PO NUMBER 5500000986 WHICH HAS TWO ITEMES 62 AND 95 RESPECTIVLY OF SAME MATARIAL NUMBER R010230123041002 AND DIE NUMBER 2304P,NOW THE PROBLEM IS THIS BDC IS WORKING WHEN THERE IS ONLY ONE ITEM BUT GIVES AN ERROR "CANT CREAT INBOUND DELIVERY FOR PO NO ...' WNEN IT HAS MULTIPLE ITEM.WHAT SHOULD I DO ? I ALSO USED LOOP BUT IT ALSO DOSENT WORK AS IT WILL ADD ALL OPEN QTY OF PO 986 AND UPDATE AGAINST ITEM NO 95.
CODE IS AS FOLLOWS:.........
FUNCTION y_synie_bdcinbdly.
""Local interface:
*" IMPORTING
*" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
*" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
*" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
*" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
*" VALUE(USER) LIKE APQI-USERID OPTIONAL
*" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
*" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
*" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
*" VALUE(EXTNID) LIKE MAKT-MAKTG
*" VALUE(VENDORNO) LIKE LFA1-LIFNR
*" VALUE(PONUMBER) LIKE EKKO-EBELN
*" VALUE(ITEMNUMBER) LIKE LIPS-VGPOS
*" VALUE(MATERIAL) LIKE MAKT-MAKTG
*" VALUE(DLYQTY) LIKE LIPS-LFIMG
*" VALUE(BTCHNO) LIKE LIPS-CHARG
*" VALUE(POSLR) LIKE EKES-EBELP OPTIONAL
*" EXPORTING
*" VALUE(SUBRC) LIKE SYST-SUBRC
*" VALUE(INDELYNO) LIKE SY-MSGV2
*" VALUE(MSG1) LIKE SY-MSGV1
*" VALUE(MSG2) LIKE SY-MSGV2
*" VALUE(MSG3) LIKE SY-MSGV3
*" VALUE(MSG4) LIKE SY-MSGV4
*" TABLES
*" MESSTAB STRUCTURE BDCMSGCOLL
*" ERRTAB STRUCTURE YSYNERRMSGS
*" INDLYTAB STRUCTURE YSYN_QTYTAB
Updated by ANAND SYNISE 19.1.2007
DATA: BEGIN OF bdctab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdctab.
DATA: datenow(10) TYPE c,
fldvar(30) TYPE c,
fldno TYPE i,
flditoc(6) TYPE c,
qty(13) TYPE c.
DATA maxposnr LIKE lips-posnr.
DATA testposnr TYPE posnr.
DATA itemnoint TYPE i.
CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4) INTO datenow.
CLEAR bdctab.
REFRESH bdctab.
PERFORM open_group USING group user keep holddate ctu.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '4007'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'RV50A-VERUR_LA'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '/00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-LIFNR'.
bdctab-fval = vendorno.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LV50C-BSTNR'.
bdctab-fval = ponumber.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-VERUR_LA'.
bdctab-fval = extnid.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=MKAL_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIKP-BLDAT'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=POPO_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-POSNR(01)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '0111'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'RV50A-PO_MATNR'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = 'WEIT'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-PO_MATNR'.
bdctab-fval = material.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=POLO_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-POSNR(01)'.
APPEND bdctab.
*ADDED BY ANAND ON 22-01-2007
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = ITEMNUMBER . "ITEMNUMBER = LIPS-VGPOS
APPEND bdctab.
************ENDED***********************
ADDED BY MILIND 19.01.2007
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = poslr .
APPEND bdctab.
* ENDED * *
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LIPS_SELKZ(01)'.
bdctab-fval = ''.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '/00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-CHARG(01)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
QTY = INDLYTAB-DLYQTY.
qty = dlyqty.
bdctab-fnam = 'LIPSD-G_LFIMG(01)'.
bdctab-fval = QTY.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIPS-CHARG(01)'.
* BDCTAB-FVAL = INDLYTAB-BTCHNO.
bdctab-fval = btchno.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=SICH_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-MATNR(02)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CALL TRANSACTION 'VL31N' USING bdctab MODE 'N' MESSAGES INTO messtab.
subrc = sy-subrc.
PERFORM close_group USING ctu.
CLEAR bdctab.
REFRESH bdctab.
IF sy-subrc EQ 0.
indelyno = sy-msgv2.
ENDIF.
LOOP AT messtab.
MOVE: messtab-msgid TO errtab-msgid,
messtab-msgnr TO errtab-msgnr,
messtab-msgv1 TO errtab-msg1,
messtab-msgv2 TO errtab-msg2,
messtab-msgv3 TO errtab-msg3,
messtab-msgv4 TO errtab-msg4.
APPEND ERRtab.
ENDLOOP.
LOOP AT errtab.
SELECT SINGLE text FROM t100
INTO errtab-errmsg
WHERE msgnr EQ errtab-msgnr AND arbgb EQ errtab-msgid
AND sprsl EQ sy-langu.
MODIFY errtab.
ENDLOOP.
ENDFUNCTION.Hi,
Check this code:
REPORT Z_CUSTOMER_UPLOAD .
D A T A D E C L A R A T I O N S *
DATA:BEGIN OF IT_CUSTOMER OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_CUSTOMER.
DATA:BEGIN OF IT_success OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_success.
DATA:BEGIN OF IT_error OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_error.
DATA: L_INDEX TYPE SY-TABIX.
DATA:IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
ERROR MESSAGE TABLE
DATA:IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : C_S TYPE C VALUE 'S',
C_E TYPE C VALUE 'E'.
*DATA: IT_SUCCESS LIKE IT_CUSTOMER OCCURS 0,
IT_ERROR LIKE IT_CUSTOMER OCCURS 0.
DATA : V_RECTOT TYPE I,
V_RECERR TYPE I,
V_RECSUC TYPE I.
S E L E C T I O N - S C R E E N *
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_FILE LIKE RLGRAP-FILENAME .
SELECTION-SCREEN : END OF BLOCK B1.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
to get F4 help for p_file
PERFORM F4_FILENAME USING P_FILE.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Uploading data from flat file into it_tab
PERFORM BDC_UPLOAD USING P_FILE.
PERFORM PROCESS_DATA.
PERFORM POPULATE_BDC.
E N D O F S E L E C T I O N *
*END-OF-SELECTION.
PERFORM DISPLAY_REPORT.
*& Form F4_FILENAME
text
-->P_P_FILE text
FORM F4_FILENAME USING P_P_FILE.
DATA:L_FILE TYPE IBIPPARMS-PATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = L_FILE .
P_P_FILE = L_FILE.
ENDFORM. " F4_FILENAME
*& Form BDC_UPLOAD
text
-->P_P_FILE text
FORM BDC_UPLOAD USING P_P_FILE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_P_FILE
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 8
I_END_ROW = 1000
TABLES
INTERN = IT_DATA
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 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.
ENDFORM. " BDC_UPLOAD
*& Form PROCESS_DATA
text
--> p1 text
<-- p2 text
FORM PROCESS_DATA.
SORT IT_DATA BY ROW COL.
LOOP AT IT_DATA.
CASE IT_DATA-COL.
WHEN 1.
IT_CUSTOMER-KUNNR = IT_DATA-VALUE.
WHEN 2.
IT_CUSTOMER-VKORG = IT_DATA-VALUE.
WHEN 3.
IT_CUSTOMER-VTWEG = IT_DATA-VALUE.
WHEN 4.
IT_CUSTOMER-MATNR = IT_DATA-VALUE.
WHEN 5.
IT_CUSTOMER-KDMAT = IT_DATA-VALUE.
WHEN 6.
IT_CUSTOMER-MEGRU = IT_DATA-VALUE.
WHEN 7.
IT_CUSTOMER-LPRIO = IT_DATA-VALUE.
WHEN 8.
IT_CUSTOMER-ANTLF = IT_DATA-VALUE.
APPEND IT_CUSTOMER.
ENDCASE.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form POPULATE_BDC
text
--> p1 text
<-- p2 text
FORM POPULATE_BDC.
DATA:L_COUNTER TYPE N,
L_STRING TYPE STRING.
LOOP AT IT_CUSTOMER.
AT NEW KUNNR.
CLEAR L_COUNTER.
L_INDEX = SY-TABIX.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
perform bdc_dynpro using 'SAPMV10A' '0100'.
perform bdc_field using 'MV10A-KUNNR'
IT_CUSTOMER-KUNNR.
perform bdc_field using 'MV10A-VKORG'
IT_CUSTOMER-VKORG.
perform bdc_field using 'MV10A-VTWEG'
IT_CUSTOMER-VTWEG.
perform bdc_field using 'BDC_OKCODE'
'/00'.
ENDAT.
L_COUNTER = L_COUNTER + 1.
CLEAR L_STRING.
perform bdc_dynpro using 'SAPMV10A' '0200'.
CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-MATNR.
CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-KDMAT.
CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-MEGRU.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*-- For Page down in Call Transaction Mode
IF L_COUNTER = 14.
CLEAR L_COUNTER.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=P+'.
ENDIF.
perform bdc_dynpro using 'SAPMV10A' '0200'.
CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-SELKZ.
perform bdc_field using 'BDC_OKCODE'
'=SELE'.
perform bdc_dynpro using 'SAPMV10A' '0300'.
perform bdc_field using 'MV10A-KDMAT'
IT_CUSTOMER-KDMAT.
perform bdc_field using 'MV10A-LPRIO'
IT_CUSTOMER-LPRIO.
perform bdc_field using 'MV10A-ANTLF'
IT_CUSTOMER-ANTLF.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EBACK'.
at end of kunnr.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
CLEAR IT_BDC.
REFRESH IT_BDC.
ENDAT.
IF NOT IT_MESSAGES[] IS INITIAL.
PERFORM FORMAT_MESSAGE.
ENDIF.
ENDLOOP.
ENDFORM. " POPULATE_BDC
*& Form bdc_dynpro
text
-->P_0273 text
-->P_0274 text
FORM bdc_dynpro USING VALUE(P_0273)
VALUE(P_0274).
IT_BDC-PROGRAM = P_0273.
IT_BDC-DYNPRO = P_0274.
IT_BDC-DYNBEGIN = 'X'.
APPEND IT_BDC.
CLEAR IT_BDC.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0278 text
-->P_RECORD_KUNNR_001 text
FORM bdc_field USING VALUE(P_0278)
VALUE(P_0279).
IT_BDC-FNAM = P_0278.
IT_BDC-FVAL = P_0279.
APPEND IT_BDC.
CLEAR IT_BDC.
ENDFORM. " bdc_field
*& Form FORMAT_MESSAGE
text
--> p1 text
<-- p2 text
FORM FORMAT_MESSAGE.
DATA: L_MSG(100).
LOOP AT IT_MESSAGES.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MESSAGES-MSGID
LANG = SY-LANGU
NO = IT_MESSAGES-MSGNR
V1 = IT_MESSAGES-MSGV1
V2 = IT_MESSAGES-MSGV2
V3 = IT_MESSAGES-MSGV3
V4 = IT_MESSAGES-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
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.
write:/ l_msg.
ENDLOOP.
ENDFORM. " FORMAT_MESSAGE
reward if helpful,
keerthi
Maybe you are looking for
-
Hi there, i got a Problem with my iphone 4 and my os windows 7 porfessional 64 bit. Last week my pc crashed and after 12 hours to find the problem (it was the memory... bloody things) i have allready deleted everything and partitioned the hd new. So
-
Questions About Losing Connection
Like other people I've noticed here, my WRTG45 v5 wireless router has recently started losing connection to the net multiple times a day. At first, we thought it was because our modem was old, so we bought a new one, but it didn't fix anything. So he
-
I have several recurring reminders that I get to pop up on the first of every month for example. It is a work computer, and since the first of March fell on a Sunday, my computer was turned off. I would expect that the reminders would have then poppe
-
Using Sharepoint as a Public Document Upload Form
Hello, We have ran into an issue where an external part of our company needs an upload solution. Members have Powerpoint documents which need to be uploaded to internal users in the company. We have been extensivly been researching the capabilities
-
I have an intensity image that displays correctly, but is rotated 45 degrees. I have messed around in LabVIEW trying to get it to display correctly, but have ran out of ideas. How would I go about manipulating the matrix of data in LabVIEW to rotat