PRoblem when posting more than one document
Hi all,
I'm using BAPI BAPI_GOODSMOVEMENT_CREATE to post the documents for PO_GR.when i post one document through text file it is done succesfuully. when i'm posting more than one document it is giving error "posting not possible".
My code is as follows:
loop at i_data.
concatenate '0' i_data-stor_loc into i_data-stor_loc.
concatenate '00' i_data-plant into i_data-plant.
i_item-po_number = i_data-po_no.
i_item-po_item = i_data-po_item.
i_item-move_type = i_data-mvt_type.
i_head-doc_date = doc_date.
i_head-pstng_date = post_date.
i_head-ref_doc_no = i_data-del_note.
i_item-entry_qnt = i_data-entry_qty.
i_item-stge_loc = i_data-stor_loc.
i_item-plant = i_data-plant.
i_item-stck_type = i_data-stk_type.
i_item-batch = i_data-batch.
I_ITEM-move_val_type = i_data-move_batch.
APPEND: i_item,i_head.
CLEAR:i_item.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = i_head
goodsmvt_code = i_code
TESTRUN = ' '
IMPORTING
GOODSMVT_HEADRET =
MATERIALDOCUMENT = matdoc
MATDOCUMENTYEAR =
tables
goodsmvt_item = i_item
GOODSMVT_SERIALNUMBER =
return = return
IF return IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
LOOP AT return.
WRITE: return-message.
ENDLOOP.
WRITE: matdoc.
PLease specify where i'm going wrong.
Regards,
SImha.
Hi,
I had used the same FM to post multiple documents, but never faced this error.
*- Header
MOVE: sy-datum TO bapigm_head-pstng_date,
sy-datum TO bapigm_head-doc_date,
sy-uname TO bapigm_head-pr_uname,
v_mblnr TO bapigm_head-ref_doc_no,
con_bfwms_bestand TO bapigm_head-ext_wms.
*- Item
*- Populate item data
LOOP AT i_items_trans.
CLEAR ibapigm_item.
*- Convert the matnr backto 18 char form (External)
CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'
EXPORTING
input = i_items_trans-matnr
IMPORTING
output = i_items_trans-matnr
EXCEPTIONS
number_not_found = 1
length_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.
ibapigm_item-material = i_items_trans-matnr.
ibapigm_item-plant = i_items_trans-werks.
ibapigm_item-stge_loc = i_items_trans-lgort.
ibapigm_item-move_type = '101'. "Goods Receipt
ibapigm_item-mvt_ind = 'B'. "Goods Movement for PO
ibapigm_item-po_number = i_items_trans-ebeln.
ibapigm_item-po_item = i_items_trans-ebelp.
ibapigm_item-entry_qnt = i_items_trans-ktmng.
ibapigm_item-entry_uom = i_items_trans-meins.
APPEND ibapigm_item.
ENDLOOP.
*-Call FM
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = bapigm_head
goodsmvt_code = bapigm_code
IMPORTING
goodsmvt_headret = bapigm_headret
TABLES
goodsmvt_item = ibapigm_item
return = ibapigm_ret.
*- Commit on Success
IF NOT bapigm_headret-mat_doc IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Raj
Similar Messages
-
Rendering problem when viewing more than one document
Hi
I have a weird problem. When I open two or more documents the rendering of the pages gets extremely bad for all documents except the first one, which remains just fine. What to do?
BR
ChristianHi
I have a weird problem. When I open two or more documents the rendering of the pages gets extremely bad for all documents except the first one, which remains just fine. What to do?
BR
Christian -
KSV5 - Actual distribution post more than one document
Hi!
I've posted a cost center cycle actual distribution by using KSV5 transaction, cost center group and cost element group. The sys post two or more CO document insted of one and not in a progressive way. Why?
Is it a bug of the system?
Thanks
GiovannaHi Giovanna,
As I said, it's normal and should not pose any problem for you. Anyway, if you reverse, for example, the entire cycle results, the system will know to treat all the documents in question via the connection stroed in T811D table. The factors for creation of multiple documents could be various: number of items, controlling subkey value, auxiallary account assignment, etc.
For the 'jumping' of document numbers I wouldn't worry too much as well (though, this issue could be treated via SNR0 transaction), since it's internal CO documents and not FI. In some countries there are regulations which demand consequent document numbers, but this concerns only 'official' FI documents posted in general ledger.
Regards,
Eli -
NIO - Selector problem - when using more than one in same application
Hi,
I'm developing a multiplayer-server, which shall be able to handle at least 2000 concurrent clients. To avoid the use of 4000 threads for 2000 clients (a thread for each stream), I would like to use NIO.
Problem:
The server has of course a ServerSocketChannel registered with a Selector, and when clients connects, the SocketChannel's is received. IF these channels is registered (OP_READ) with the same Selector-instance as the ServerSocketChannel, there is no problem and the Selector recognizes when a registered SocketChannel is ready for OP_READ - BUT when the received SocketChannels is registered with another Selector-instance than the one the ServerSocketChannel is registered with, the Selector NEVER recognizes, when a SocketChannel is ready for OP_READ - why not and how do I solve the problem? Only one thread can service the same Selector-instance, and when both receiving many connections and read/write, this could easily be a bottleneck
Following is the used code; 2 classes: ClientListener (has a ServerSocketChannel registered with a Selector) and ClientHandler (has another Selector where the SocketChannels is registered and a thread-pool that services all the SocketChannels, when they are ready for read/write):
public class ClientListener {
private static final int BACKLOG = 32;
private int port;
private Thread internalThread;
private volatile boolean noStopRequested;
private ServerSocketChannel ssc;
private static Selector selector;
private ClientHandler clientHandler;
public ClientListener(ClientHandler clientHandler, String bindAddress, int port) throws InternalErrorException {
this.clientClass = clientClass;
this.clientHandler = clientHandler;
this.noStopRequested = true;
this.port = port;
try {
InetAddress inetAddress;
if (bindAddress.equals(""))
inetAddress = InetAddress.getLocalHost();
else
inetAddress = InetAddress.getByName(bindAddress);
ssc = ServerSocketChannel.open();
ssc.socket().bind(new InetSocketAddress(inetAddress, port), BACKLOG);
ssc.configureBlocking(false);
Runnable r = new Runnable() {
public void run() {
try {
start();
} catch (Exception e) {
Log.echoError("ClientListener: Unexpected error: "+e.getMessage());
internalThread = new Thread(r, "ClientHandler");
internalThread.start();
} catch (Exception e) {
throw new InternalErrorException(e.getMessage());
public static Selector selector() {
return selector;
private void start() {
Log.echoSystem("ClientListener: Listening started at port "+port);
try {
selector = Selector.open();
SelectionKey acceptKey = ssc.register(selector, SelectionKey.OP_ACCEPT);
int keysAdded;
while (noStopRequested) {
SelectionKey key = null;
keysAdded = selector.select(10000);
if (keysAdded == 0)
continue;
Set readyKeys = selector.selectedKeys();
Iterator i = readyKeys.iterator();
while (i.hasNext()) {
try {
key = (SelectionKey)i.next();
i.remove();
if (key.isAcceptable()) {
ServerSocketChannel nextReady = (ServerSocketChannel)key.channel();
SocketChannel sc = nextReady.accept();
try {
clientHandler.registerClient(sc);
} catch (Exception e) { e.printStackTrace(); }
} catch (CancelledKeyException cke) {
System.out.println("ClientListener: CancelledKeyException");
} catch (Exception e) {
e.printStackTrace();
try {
ssc.close();
} catch (IOException ioe) {/* Ignore */}
Log.echoSystem("ClientListener: stopped");
public void stop() {
public class ClientHandler {
private static final int INITIAL_WORKER_COUNT = 5;
private int port;
private Thread internalThread;
private volatile boolean noStopRequested;
private static Selector selector;
private Manager manager;
private WorkerPool pool;
private ClientListener clientListener;
public ClientHandler(Manager manager, String bindAddress, int port) throws InternalErrorException {
this.manager = manager;
this.noStopRequested = true;
this.port = port;
clientListener = new ClientListener(this, bindAddress, port);
// initiating load-balanced worker-pool
pool = new WorkerPool(INITIAL_WORKER_COUNT, (int)(manager.getMaxClients() * ClientWorker.CLIENT_FACTOR), 0.75f);
for (int i=0; i < pool.getMinCount(); i++) {
pool.addWorker(new ClientWorker(pool, manager));
Runnable r = new Runnable() {
public void run() {
try {
start();
} catch (Exception e) {
Log.echoError("ClientHandler: Unexpected error: "+e.getMessage());
internalThread = new Thread(r, "ClientHandler");
internalThread.start();
public static Selector selector() {
return selector;
private void start() {
Log.echoSystem("ClientHandler: Started");
try {
selector = Selector.open();
int keysAdded;
while (noStopRequested) {
SelectionKey key = null;
try {
keysAdded = selector.select();
Log.echoDebug("ClientHandler: out of select()");
if (keysAdded == 0)
continue;
Set readyKeys = selector.selectedKeys();
Iterator i = readyKeys.iterator();
while (i.hasNext()) {
try {
key = (SelectionKey)i.next();
i.remove();
if (key.isReadable()) {
key.interestOps(key.interestOps() & (~SelectionKey.OP_READ));
ClientWorker worker = (ClientWorker)pool.getWorker();
worker.process(key);
} else if (key.isWritable()) {
key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
ClientWorker worker = (ClientWorker)pool.getWorker();
worker.process(key);
} else {
} catch (CancelledKeyException cke) {
Client client = (Client)key.attachment();
if (client != null) {
client.disconnect();
key.selector().wakeup();
} catch (CancelledKeyException cke) {
if (key != null) {
Client client = (Client)key.attachment();
if (client != null) {
client.disconnect();
key.selector().wakeup();
} catch (Exception e) {
e.printStackTrace();
Log.echoSystem("ClientHandler: stopped");
public void registerClient(SocketChannel sc) throws Exception {
sc.configureBlocking(false);
Client client = new Client(...);
SelectionKey key = sc.register(selector, SelectionKey.OP_READ, client);
key.selector().wakeup();
public void stop() {
}Ok, found the solution here: http://forum.java.sun.com/thread.jsp?forum=31&thread=282069
"The select() method holds a lock on the selector that
the register() method wants to acquire. The register()
method cannot continue until the lock is relased and
the select() method will not release it until some key
is triggered. If this is the first key you're adding
then select has nothing that will wake it up, ever.
The result is, obviously, a deadlock.
The solution is to have a queue of pending connections.
You put your new connection in that queue. Then you
wake up the selector and let that thread go through
the queue, registering connections." -
More than one document in a Batch Input Session?
Hi to all,
I need to post more than one document with a Batch Input of MB1A transaction.
The user asked me to create only one session no mater how meny documents I've to post.
The problem is that when I run the record (SM35), when the first document is saved, the batch input finishes and the rest of de documents in the record can't be processed.
Does anyone knows if this is possible? or I've to create a new session for each document to de treated?
Thanks to all.
Nico.-You should be able to post all documents in one session.
When you go in SM35 session, can you see multiple transactions in that session?
All transaction postings should happen within function 'BDC_OPEN_GROUP' and 'BDC_CLOSE_GROUP' in your program.
Cheers,
Vikram -
Hi. How do I attach more than one document to an email originating from my iPad, especially if the documents come from different apps? When starting an email there's no option for attachments, unless you send the document from inside an app like iBook and then you can only send one at a time.
How to add, send and open iPad email attachments
http://www.iskysoft.com/apple-ipad/ipad-email-attachments.html
Cheers, Tom -
For the past 60 days I've experienced Main Menu freeze when running more than one application at a time. iPhoto, Preview, Text Edit, Epson Scan, Firefox and Thunderbird are the apps I use almost daily. No matter what I do, when more than one is running they will freeze the Main Menu (top of the screen). I've tried booting is Safe Mode and I don't seem to have a problem. I've tried several suggestions from repairing permission (DiskUtility) to eliminating specifis login items. Nothing works. I've posted this issue on the Apple forum several times and no one else has experienced this problem. I hesitate to take my iMac to the Apple Store or a private Apple repair service until I've exhausted all of my options. Do I have any more options?
Question: Everytime an app crashes I have the option to report it to Apple - which I usually do. But I've NEVER reported a Main Menu freeze because it never asks me to
There's really no need to submit to Apple, it's just a round file cabinet on the other end, especially with 10.6 or earlier.
This sure sounds like a resource problem...
See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
http://support.apple.com/kb/PH7029
Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
Open Console in Utilities & see if there are any clues or repeating messages when this happens.
In the Memory tab, are there a lot of Pageouts? -
Error using pretrigger when capturing more than one channel
I am having problems acquiring data with pretrigger samples when capturing more than one channel, using NI-PXI-6071E hardware and Labview's Analog Input VIs (Legacy NI-DAQ).
My goal is to trigger on one signal, while capturing another. Unfortunately, I cannot use the PFI0 for external triggering, as our cables/hardware have already been built, so I must use an analog input channel as the trigger. I understand that to do so I must capture both channels, and the channel that I wish to trigger off of must be the first channel in the list.
If I trigger and capture on the same channel (tried 1-4) then it
works great, regardless of the number of pre-trigger samples set. If I
capture more than one channel (passing the trigger channel first), with no pretrigger samples set, then triggering and capturing both work fine. However, if I do the same with the pretrigger sample > 0 I get the following error:
Error -10621 occurred at AI Control. Possible reason(s):
NI-DAQ LV: The specified trigger signal cannot be assigned to the trigger resource.
I don't se any such limitation explained in the user manual, and searching the forum, I have found a few other people that had the
same
problem
but they did not have solutions. Any ideas?
Solved!
Go to Solution.I'm sorry for double-posting this. I was trying to post it in the DAQ board and it kept ending up on the LabView board.
If moderators have the ability to delete this thread you are welcome to do so. -
Illustrator CS6 freezing with more than one document
I have always had multiple files open at a time when using illustrator but all day today the program has been freezing everytime i open more than one document. I am able to use the program now if i only have one file open but it freezes as soon as i open the second file. I have restarted my computer twice and i have closed every other program on my computer and none of that helped. I have a macbook pro and i save all of my illustrator files on an external hard drive. As any one else experienced this?
Thanks for the helpHave you added any Illustrator plug ins or software recently, or enabled new fonts? Try working with some other doumcnets if you have not, to help narrow down if this is a global problem affecting all documents.
Create a new user account and log in as that
Run applications /utilities/disk utility and fix permissions
Is there a common image used in these doucments, may be corrupt and sometimes opening and resaving a .psd for example -
Rendering Error when using more than one DataSheetView on a Enterprise Wiki-Page
Hi Experts,
how to reproduce:
Add two Custom Lists with some Fields (Add Lookup-Columns to both Lists).
Add a DataSheetView to each List and mark it as Default-View
Create a Enterprise Wiki-Page
Add a WebPart (Custom-List-1)
You will see the Content from List 1 as DataSheet-View (because it is the Default-View)
Add another WebPart below the previous added WebPart (Custom-List-2)
You will see the Content from List 2 as DataSheet-View (because it is the Default-View)
Notice that the First DataSheet has faulty Rendering. The Lookup-Columns having more than one 'Arror-Down' Image and it is even on the left. If you click into different Column, different row you get the same.
I can reproduce this behaviour anytime.
Environment: SharePoint 2013 Enterprise, IE10
If you use Development-Tools to identify first datarow of first DataSheet you can see that it has to do something with the related <Input>-Tags:
<div class="combobox-placeholder" id="jsgrid_combobox" style="left: 27px; top: 32px; width: 117px; height: 29px; border-top-color: currentColor; border-right-color: currentColor; border-bottom-color: currentColor; border-left-color:
currentColor; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; visibility: inherit; ; direction: ltr; min-width:
117px; background-color: transparent;">
<input class="cb-textbox " style="width: 156px; height: 25px;" dir="ltr" type="text"/><input tabindex="-1" title="Dropdown" class="combobox-img" style="height: 29px;"
dir="ltr" type="button" value="▼"/><input class="cb-textbox " style="width: 84px; height: 25px;" dir="ltr" type="text"/><input tabindex="-1" title="Dropdown"
class="combobox-img" style="height: 29px;" dir="ltr" type="button" value="▼"/>
Please have a look into it. Current Workaround for me is to have a Default-ListView in first WebPart. But then Customer has to click the Edit-Button to Change the Item in the releated EditForm. This is a Show-Stopper here!
With Best Regards,
RonnyHi Ronny,
According to your description, the lookup column would render incorrectly when adding more than one datasheet view in the Enterprise Wiki page.
I tested the same scenario per your post, and I got the same results as you got.
We will help to submit the issue to proper pipeline for you.
Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay.
Appreciate your time and patience.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
How can I send more than one document on an email
how can I send more than one document on one email
Thank you but I understand that form of attaching a document. However when I select a document then click 'Share' I have the option of sending the document by email as a word or pages document or pdf, what I want to know is can I use this procedure to send more than one document per email and if I can how?
-
Hi, My printing has suddenly changed in adobe to a large scale, as in, what should be one page of print comes out as 24 pages? I havent changed anything, its happening on more than one document also, I have to stop my printer before all the pages spew out. I have tried printing 'one single page' and it does exactly the same? Help?
Is the Poster Print feature turned ON?
-
Adding More than one document to a cell in a dataform
Hi All,
I am using EPM 11.1.1.1.0 .
I have a planing application and I need to add three documents to a cell in a data form.
Is there a way i can do this...
I can add one document and can open it as well but did not find a way of adding more than one document. Is it supported on Hyperion Planning ?
Also if we have a document attached to a cell text ...Is there a way to print it out from Hyperion Planning or Workspace?
Regards.
Alicia
Edited by: Alicia on Aug 6, 2009 6:39 AMHi,
I believe it will be just one document, I say that because when you go to the cell and choose open document then it is aimed at opening just one document.
As for printing from cell text, you would have to open the document first before being able to print.
Cheers
John
http://john-goodwin.blogspot.com/ -
Problem with starting more than one SwingWorker
Hello
I wonder if anyone could tell me if there are known problems with starting more than one SwingWorker thread at once?
In response to an action the user performs, I need to obtain several lists of things from the server. This includes a couple of server-calls, and I want to do the server calls in a thread outside the awt-event thread. So I start a couple of SwingWorker-threads. This works fine sometimes, but not always. Sometimes code in some of the SwingWorkers finished method does not update the ui. I can see that the correct calls are made, but the ui is still not updated correctly. The problem seems to be related to the sequence of when the different thread are finished. For instance, if the sequence is like this:
SwingWorker1.construct
SwingWorker2.construct
SwingWorker1.finished
SwingWorker2.finished
Things go fine, but if the sequence is:
SwingWorker1.construct
SwingWorker1.finished
SwingWorker2.construct
SwingWorker2.finished
the ui-updates in SwingWorker1.finished is not done correctly.
Can anyone help me with this?This is the point:
In one SwingWorker thread you have 1 construct method, and 1 finish method - which are both invoked once.
Therefore you only have one opportunity to update the gui in that thread. This forces you to use many threads if you want regular updates, which I try to avoid.
Therefore, the solution!
Have a loop in the construct method that executes the algorithm accordingly, updating the gui accordingly at regular times, maintaining just the 1 thread - becomes easier and nicer for the programmer and the JVM.
The finish method in this case is to update the gui when all iterations are finished.
There is nothing wrong with this. Just because you have a finish method that is called in the event-dispatching thread doesn't mean that all your update code must be in there.
What you MUST ensure is that ALL your update code is executed in the event-dispatching thread, that is the most important thing. After all, SwingWorker is just a helper class, not the gospel template of how to update a gui. -
Startup issue when having more than one database on machine
Startup issue when having more than one database on machine:
I’ve installed two databases.
When I shutdown one of the database and try to start it up using
Startup pfile=’…location..’;
I get ora-12514: TNS: listener does not currently know of service rquirest in connect descriptor
when I try it again after 3 seconds, I get a new error, ora-01041: internal error. Hostdef extension doesn’t exist
Shutdown and Startup gave no problems when I had one database. Why am I getting problems when I have two databases?
I’m using: show parameter pfile|spfile; to make sure I have the right parameter locations, so the error shouldn’t be from location.
I’ve never installed two databases on one machine, so maybe I’m making a first-timer’s error.
Anyone know how to get this working, i.e. starting and stopping DB without issues?
Using oracle 11gR2 on Windows 7 64bit, all is working normal.
Thanks,
Ayman
Edited by: aymanzone on Jun 15, 2011 9:27 AMaymanzone wrote:
my oracle_sid is set to the name of one of my databases
echo %oracle_sid%
shows me the name of my first database.
Still not working though.
When I start the services of both databases using Services, I can connect and run queries from both of the database.
Edited by: aymanzone on Jun 15, 2011 11:47 AMFirstly ... the Oracle Service for the instance should be started for the DB you are trying to connect or start.
Next ... from the command prompt:
set oracle_sid=<Instance_Name>
sqlplus sys as sysdba
startup pfile='location of the respective db pfile'
Now, if you want to start or connect to another DB which is on the same server (again assuming the Service is STARTED) ...
From the same command prompt session or other ....
set oracle_sid=<Other_Instance_Name>
sqlplus sys as sysdba
startup pfile='location of the respective db pfile'
Edited by: Srikanth on Jun 16, 2011 12:27 AM
Maybe you are looking for
-
So I currently have a MacbookPro 6,1 - I believe a late 2009 model, 17" 2.66Ghz i7 Dual-Core Processor, 8gb Ram (updated), NVIDIA GeForce GT 330M. I started doing video and even noticed this when I normally do my audio work - that my video doesn't lo
-
Http post and Alfresco web script
Hi all, I'm wondering how to send the content of an XFA form into an Alfresco ECM instance. So far, I've been using "email submit buttons" by mail, but I think submitting the xml content directly into an Alfresco space could be feasible without too m
-
How to change person type 'Applicant.Employee' to 'Employee'?
we created one record with person type "Applicant" and later hired him by selecting "Create Employment" option. Now the person type is "Employee.Applicant" Can you please tell me how to change this person type to "Employee"? Since most of our reports
-
ODI Packages execution based on condition
Hi, We have clear the data using calc scripts and then load data into Hyperion using ODI packages. Currently i have one Package (Package1) to be executed on WD2 & WD3. I have created an interface which will execute the script. Here calc scripts are d
-
My contacts are deleted after the upgrade, any ideas on how to get them back
I upgrade my iphone with the new software, 5.0, and all of my contacts are gone. Everything else is still here. Any ideas?