Q

Session object vs. direct declare

With the SAP DCOM Connector, when is the best time to use a session object vs. direct declare as far as performance 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./


This was first published in November 2001

Dig deeper on SAP Basis administration and NetWeaver administration

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close