We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

Re: [sap-dev] BAPI_SALESORDER_CHANGE Is Calling Dialog Window In Background Mode

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

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.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2014 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
hovering_yogi  

Consultant
13 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have a technical question? Need to find IT solutions? Ask your peers in the Toolbox for IT community.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language