Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

0

Error "Specified method is not supported" SAP BW connector

I'm getting an error message when using power query connecting to S4/HANA using SAP BW connector. The error details are at the end. Hope someone can guide me.

 

The query works ok if I change 

List.Dates(#date(2023,2,8),3,#duration(1, 0, 0, 0))

To:

List.Dates(#date(2023,2,8),2,#duration(1, 0, 0, 0))

 

The query also works ok if I put a hardcoded dates, e.g.

{Cube.ApplyParameter, "[!V000026]", {{"[20230116]","[20230117]","[20230118]","[20230119]","[20230120]"}}}

instead of 

{Cube.ApplyParameter, "[!V000026]", {{DateList}}}

(it doesn't work if I put these hardcoded dates in the "DateList" table)

 

Error message details

Feedback Type:
Frown (Error)

Error Message:
Specified method is not supported.

Stack Trace:
Microsoft.Mashup.Host.Document.SerializedException
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_TableSource()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_TableSource()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

Stack Trace Message:
Specified method is not supported.

Invocation Stack Trace:
at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e)
at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture)
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass14_0.<HandleException>b__0()
at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
at Microsoft.PowerBI.Client.Program.<>c__DisplayClass6_0.<RunApplication>b__0()
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
at Microsoft.PowerBI.Client.Program.RunApplication(String[] args)
at Microsoft.PowerBI.Client.Program.Main(String[] args)


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.123.742.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Host.Document.SerializedException - Microsoft.Mashup.Host.Document.Evaluation.ErrorEvaluationResult","MethodDef":"OnException","ErrorOffset":"","ErrorCode":""}

Snapshot Trace Logs:
C:\Users\xxx\Microsoft\Power BI Desktop Store App\FrownSnapShot626e64aa-0471-45f6-a722-1e7c4aa88040.zip

Model Default Mode:
Import

Model Version:
PowerBI_V3

Performance Trace Logs:
C:\Users\xxx\Microsoft\Power BI Desktop Store App\PerformanceTraces.zip

Enabled Preview Features:
PBI_sparklines
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_setLabelOnExportPdf
PBI_dynamicFormatString
PBI_oneDriveSave
PBI_oneDriveShare
PBI_newCard
PBI_buttonSlicerAuthoring

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_angularRls
PBI_onObject
PBI_backstageUI
PBI_gitIntegration
PBI_modelExplorer
PBI_daxQueryView
PBI_aiNarrativesVisual
PBI_qnaImproveLsdlCopilot

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

PowerBINonFatalError_ErrorDescription:
Microsoft.Mashup.Host.Document.Evaluation.ErrorEvaluationResult

PowerBIUserFeedbackServices_IsReported:
True

Formulas:


section Section1;

shared #"EWM Warehouse Task BI (2)" = let
Source = SapBusinessWarehouse.Cubes("xxx", "xxx", "xxx", "xxx", [Implementation="2.0", LanguageCode="EN"]),
DateList = List.Transform(
List.Dates(#date(2023,2,8),3,#duration(1, 0, 0, 0)),
each "["&Date.ToText(_,"yyyyMMdd")&"]"
),
#"2CZI_EWM_WHSETASKITEMCUBE" = Source{[Name="2CZI_EWM_WHSETASKITEMCUBE"]}[Data],
#"2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI" = #"2CZI_EWM_WHSETASKITEMCUBE"{[Id="2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI"]}[Data],
#"Added Items" = Cube.Transform(#"2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI",
{
{Cube.ApplyParameter, "[!V000002]", {{"CHG1"}}},
{Cube.AddAndExpandDimensionColumn, "[2CTD6ZEP7AIPDRWRB0F3XMD4A0E]", {"[2CTD6ZEP7AIPDRWRB0F3XMD4A0E].[LEVEL01]"}, {"Confirmation Date.Confirmation Date Level 01"}},
{Cube.AddMeasureColumn, "Target Quan. in Alternative UoM", "[Measures].[TargetQuantityInAltvUnit]"},
{Cube.ApplyParameter, "[!V000026]", {{DateList}}}
})
in
#"Added Items";

Status: Delivered

Hi @BartVW ,

 

I apologize for forgetting to change the status. As the error says, you need to serialize the data.

 

Best regards,
Community Support Team_ Scott Chang

 

Comments
v-tianyich-msft
Community Support
Status changed to: Investigating

Hi @BartVW ,

 

Based on the error message, it appears that the parameter value could not be fetched.I think you may need to create the index column for your DateList table.

 

Best regards,
Community Support Team_ Scott Chang

BartVW
Frequent Visitor

Thank you Scott.

 

Could you explain how I do this? If I add an index column, would it also not get passed to the Cube.ApplyParameter variable somehow? 

v-tianyich-msft
Community Support
Status changed to: Investigating

Hi @BartVW ,

 

You can go through Power Query and use Index column, I think it will work.

 

Best regards,
Community Support Team_ Scott Chang

BartVW
Frequent Visitor

As I cannot add an index colum to a list, I changed the list into a table, then added an index column, and then refer to the column with the dates in Cube.ApplyParameter. As shown in below code. 

But this still gives the same error message.

 

Is this what you meant?

 

let
    DateList = List.Transform(
        List.Dates(#date(2023,2,8),3,#duration(1, 0, 0, 0)), 
        each "["&Date.ToText(_,"yyyyMMdd")&"]"
    ),
    #"Converted to Table" = Table.FromList(DateList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Index", 1, 1, Int64.Type),
    Source = SapBusinessWarehouse.Cubes("xxx", "xxx", "xxx", "xxx", [Implementation="2.0", LanguageCode="EN"]),
        #"2CZI_EWM_WHSETASKITEMCUBE" = Source{[Name="2CZI_EWM_WHSETASKITEMCUBE"]}[Data],
    #"2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI" = #"2CZI_EWM_WHSETASKITEMCUBE"{[Id="2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI"]}[Data],
    #"Added Items" = Cube.Transform(#"2CZI_EWM_WHSETASKITEMCUBE/2CZEWMWTBI",
        {
            {Cube.ApplyParameter, "[!V000002]", {{"CHG1"}}},
            {Cube.AddAndExpandDimensionColumn, "[2CTD6ZEP7AIPDRWRB0F3XMD4A0E]", {"[2CTD6ZEP7AIPDRWRB0F3XMD4A0E].[LEVEL01]"}, {"Confirmation Date.Confirmation Date Level 01"}},
            {Cube.AddMeasureColumn, "Target Quan. in Alternative UoM", "[Measures].[TargetQuantityInAltvUnit]"},
            // {Cube.ApplyParameter, "[!V000026]", {{"[20230116]","[20230117]","[20230118]","[20230119]","[20230120]"}}}
            {Cube.ApplyParameter, "[!V000026]", {{#"Added Index"[Column1]}}}
        })
in
    #"Added Items"

 

 

 

v-tianyich-msft
Community Support
Status changed to: Investigating

Hi @BartVW ,

 

According to the error message it is a serialization exception, you don't need to change your M language, all you need to do is to sort your dates, if you don't have a way to add an index, please try to convert the data storage mode to import

 

"Error":"Microsoft.Mashup.Host.Document.SerializedException - Microsoft.Mashup.Host.Document.Evaluation.ErrorEvaluationResult"

 

Best regards,
Community Support Team_ Scott Chang

BartVW
Frequent Visitor

Hi @v-tianyich-msft 

 

My model is in import mode already. I cannot add an index because my DateList is a list object.

 

I now also tried sorting my list, by wrapping the DateList code with a List.Sort as follows: 

DateList = List.Sort(List.Transform(
List.Dates(#date(2023,2,8),4,#duration(1, 0, 0, 0)),
each "["&Date.ToText(_,"yyyyMMdd")&"]"
),Order.Ascending)

 

But this still gives the same error message.

BartVW
Frequent Visitor

Hi @v-tianyich-msft 

 

The status of this issue still says 'investigating'. Can I assume someone is still looking into it?

 

v-tianyich-msft
Community Support
Status changed to: Delivered

Hi @BartVW ,

 

I apologize for forgetting to change the status. As the error says, you need to serialize the data.

 

Best regards,
Community Support Team_ Scott Chang

 

BartVW
Frequent Visitor

hi @v-tianyich-msft 

 

With all the attempts described so far in this post, it is not clear to me what you mean with 'serialize' the data. 

Is there still something I can try, or should I give up?

v-tianyich-msft
Community Support

Hi @BartVW ,

 

I feel sorry can not help you more. if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.

It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best regards.
Community Support Team_Scott Chang