cancel
Showing results for 
Search instead for 
Did you mean: 

BYD webservice:QueryPurchaseOrderQueryIn develop in asp.net,System.ServiceModel.FaultException

0 Kudos

Error message in visual studio

Error message in BYD BusinessCommunication Monitoring

Accepted Solutions (1)

Accepted Solutions (1)

VenkateshG
Explorer

Hi Han,

Looks like you are using a selection/query parameter with both lower and upper boundaries which is not allowed for that particular parameter

Can you please publish the sample request you are trying to send?

Regards

Venkatesh

www.linkedin.com/in/venkatesh-govindan-80815218

Answers (3)

Answers (3)

0 Kudos

Dear Venkatesh

I tried two way, and result below:

1. without having IntervalBoundaryTypeCode but including both Lower and Upper Boundary Tag, the error in BYD BusinessCommunication Monitoring is:Element 'IntervalBoundaryTypeCode' missing

 POSBEQ_SBPOLCSC.InclusionExclusionCode = "I";
 //POSBEQ_SBPOLCSC.IntervalBoundaryTypeCode = "3";
 POSBEQ_SBPOLCSC.LowerBoundaryPurchaseOrderLifeCycleStatusCode = (POQuery.PurchaseOrderLifeCycleStatusCode)1;
 POSBEQ_SBPOLCSC.UpperBoundaryPurchaseOrderLifeCycleStatusCode = (POQuery.PurchaseOrderLifeCycleStatusCode)6;
    

By the way, the same request use SoapUI is ok.

         <PurchaseOrderSimpleSelectionByElements>
            <SelectionByPurchaseOrderLifeCycleStatusCode>
               <InclusionExclusionCode>I</InclusionExclusionCode>
               <IntervalBoundaryTypeCode>3</IntervalBoundaryTypeCode>
               <LowerBoundaryPurchaseOrderLifeCycleStatusCode>1</LowerBoundaryPurchaseOrderLifeCycleStatusCode>
               <UpperBoundaryPurchaseOrderLifeCycleStatusCode>2</UpperBoundaryPurchaseOrderLifeCycleStatusCode>
            </SelectionByPurchaseOrderLifeCycleStatusCode>
         </PurchaseOrderSimpleSelectionByElements>

2.same syntax structure for SelectionByID, i get the correct data.

VenkateshG
Explorer
0 Kudos

Hi Han,

I dont see anything wrong in your code. As you see from SAP Documentation below. However as per the error you get "combination of Intervalboundarytypecode and....." , i suggest you to try your code without having IntervalBoundaryTypeCode but including both Lower and Upper Boundary Tag. If it works let me know. Thanks.

0 Kudos

Dear Venkatesh, Very glad to see your answer. My code here:

//------------------------------------------ Code Bgn ---------------------------------------

//PurchaseOrderSimpleByElementsQuery_sync - PurchaseOrderSimpleSelectionByElements - SelectionByPurchaseOrderLifeCycleStatusCode // - ProcessingConditions //PurchaseOrderSimpleByElementsQueryMessage_sync - PurchaseOrderSimpleByElementsQuery - PurchaseOrderSimpleByElementsQuerySelectionByPurchaseOrderLifeCycleStatusCode // - QueryProcessingConditions POQuery.PurchaseOrderSimpleByElementsQueryMessage_sync POSBEQM_sync = new POQuery.PurchaseOrderSimpleByElementsQueryMessage_sync(); POQuery.PurchaseOrderSimpleByElementsQuery POSBEQ = new POQuery.PurchaseOrderSimpleByElementsQuery(); POQuery.PurchaseOrderSimpleByElementsQuerySelectionByPurchaseOrderLifeCycleStatusCode POSBEQ_SBPOLCSC = new POQuery.PurchaseOrderSimpleByElementsQuerySelectionByPurchaseOrderLifeCycleStatusCode(); POSBEQ_SBPOLCSC.InclusionExclusionCode = "I"; POSBEQ_SBPOLCSC.IntervalBoundaryTypeCode = "3"; POSBEQ_SBPOLCSC.LowerBoundaryPurchaseOrderLifeCycleStatusCode = (POQuery.PurchaseOrderLifeCycleStatusCode)1; POSBEQ_SBPOLCSC.UpperBoundaryPurchaseOrderLifeCycleStatusCode = (POQuery.PurchaseOrderLifeCycleStatusCode)6; POQuery.PurchaseOrderSimpleByElementsQuerySelectionByPurchaseOrderLifeCycleStatusCode[] aPOSBEQ = new POQuery.PurchaseOrderSimpleByElementsQuerySelectionByPurchaseOrderLifeCycleStatusCode[1]; aPOSBEQ[0] = POSBEQ_SBPOLCSC; POSBEQ.SelectionByPurchaseOrderLifeCycleStatusCode = aPOSBEQ; POSBEQM_sync.PurchaseOrderSimpleSelectionByElements = POSBEQ; POQuery.QueryProcessingConditions QPC = new POQuery.QueryProcessingConditions(); QPC.QueryHitsUnlimitedIndicator = false; QPC.QueryHitsMaximumNumberValue = 100; POQuery.ObjectID objID = new POQuery.ObjectID(); objID.Value = "00163E10B4641EE685E94F3B1599E24C"; QPC.LastReturnedObjectID = objID; POSBEQM_sync.ProcessingConditions = QPC; //POQuery.FindSimpleByElementsRequest frq = new POQuery.FindSimpleByElementsRequest(POSBEQM_sync); #endregion POQuery.QueryPurchaseOrderQueryInClient iiPOC = new POQuery.QueryPurchaseOrderQueryInClient("binding_SOAP12"); iiPOC.ClientCredentials.UserName.UserName = "_INS_PO01"; iiPOC.ClientCredentials.UserName.Password = "Welcome1"; POQuery.PurchaseOrderSimpleByElementsResponseMessage_sync rpmSync = iiPOC.FindSimpleByElements(POSBEQM_sync);

//------------------------------------------ Code End ---------------------------------------