Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from hovering_yogi on Nov 3 at 4:55 AM Is it a custom message that is being popped in SAP - you might need to adjust the SAP custom coding to make sure it doesn't issue the screen when called from batch / bapi calls. Not a developer though but would be my first thought
| | | ---------------Original Message--------------- From: mbigun Sent: Sunday, November 02, 2014 1:41 PM Subject: BAPI_SALESORDER_CHANGE Is Calling Dialog Window In Background Mode I'm using .NET Connector 3.0 to communicate with SAP. I need to change existing Sales Order. When I'm trying to add new item to Sales Order system is not allow me to do it and failing due to DYNPRO_SEND_IN_BACKGROUND error. I found a lot of questions regarding this issue and the main reason of it is: FM BAPI_SALESORDER_CHANGE is trying to call dialog/window in background mode, but this is not allowed without SAPGUI. I also tried FM SD_SALESDOCUMENT_CHANGE and got same result. Are there ways to disable dialog window calling? How to avoid this issue? Are there any other RFC enabled functions which I can use to make changes in Sales Order? Sample of my code: public DataTable BAPI_SALESORDER_CHANGE(RfcDestination destination) { RfcRepository repo = destination.Repository; IRfcFunction salesDoc = repo.CreateFunction("BAPI_SALESORDER_CHANGE&q uot;); IRfcFunction salesDocCommit = repo.CreateFunction("BAPI_TRANSACTION_COMMIT& quot;); salesDoc.SetValue("SALESDOCUMENT", "3939393837"); IRfcStructure salesHeader = salesDoc.GetStructure("ORDER_HEADER_IN") ; IRfcStructure salesHeaderINX = salesDoc.GetStructure("ORDER_HEADER_INX" ); salesHeaderINX.SetValue("UPDATEFLAG", "U"); IRfcTable salesItems = salesDoc.GetTable("ORDER_ITEM_IN"); salesItems.Append(); salesItems.SetValue("ITM_NUMBER", 130); salesItems.SetValue("MATERIAL", "000000000081828282"); salesItems.SetValue("TARGET_QTY", Convert.ToDecimal("1")); IRfcTable salesItemsINX = salesDoc.GetTable("ORDER_ITEM_INX"); salesItemsINX.Append(); salesItemsINX.SetValue("UPDATEFLAG", "I"); salesItemsINX.SetValue("ITM_NUMBER", 130); salesItemsINX.SetValue("MATERIAL", "X"); salesItemsINX.SetValue("TARGET_QTY", "X"); RfcSessionManager.BeginContext(destination); salesDoc.Invoke(destination); //HERE I'M GETTING ERROR salesDocCommit.Invoke(destination); RfcSessionManager.EndContext(destination); IRfcTable returnTable = salesDoc.GetTable("RETURN"); return ConvertToDataTable(returnTable); }
| | Reply to this email to post your response. __.____._ | _.____.__ |