With the SAP DCOM Connector, when is the best time to use a session object vs. direct declare as far as performance...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
is concerned? This RFM/BAPI requires a "Commit work". 'Session: Public oSession As TRIPoRcvLib.PoRcvSessionComponent Set oSession = New TRIPoRcvLib.PoRcvSessionComponent oSession.PutSessionInfo "STG", "UsrName", "Password", "EN", "100" VS Simple declare: Set oRcv = oSession.CreateInstance(NAMESPACE & ".GoodsMovement") Set oRcv = New TRIPoRcvLib.GoodsMovement With oRcv .destination = "stg" .userid = "UsrName" .Password = "Password" .client = "100" End With 'Build the recordsets oRcv.BapiCreateFromData GoodsmvtHeader:=RsHeadIn, GoodsmvtCode:=RsCodeIn, goodsmvtitem:=RsItemsIn, Return:=rsReturn oRcv.CommitWork Both of these work but there is a huge performance issues with the session object on the commit work call.
I am a little confused by the supplied source code since you seem to have oSession in both cases. So my answer makes the assumption that in case A) you use a session object, in case B) you don't. Then the answer is that you need A) whenever you want to commit multiple updates executed on different business object instances, otherwise the choice is yours./
Dig Deeper on SAP Basis administration and NetWeaver administration
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.