cancel
Showing results for 
Search instead for 
Did you mean: 

PR to PO conversion error

Former Member
0 Kudos

Hi,

I have created a service interface for PRtoPO conversion with 3 operations [Query, Read and Create(or Conversion) ]. In the Query operation I get a list of open PRs. In the Read operation I get the details of a single PR (like PR no, item no, material, quantity etc).

In the Create/Conversion operation I pass only the PR number so that a PO is created with the details from the PR which I pass.

We tested by executing the service interface in the SCL system and everything is working perfectly fine. In the SharePoint end we are able to do the Query and Read operations but not the conversion. The error message we are getting is- 'Value cannot be null. Parameter name: methodInstance"

Please let me know a solution for this.

PS: I have built a custom BAPI in the backend SAP system to create a PO using a PR. The BAPI requires only the PR number as input. I re-checked all the field attributes as well in the ESR. All the fields are made optional except the PR number.

Thanks,

Pranil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pranil,

Can you please provide more information?

- Did you create the ECT manually or through the BDC Browser?

- Did you check the Create operation of the ECT? Are there any errors in the ECT?

- How do you trigger the Create operation (via External List or via your custom custom coding)?

- How did you model the Create operation in ESR? It looks like your RFC requires only the PR# to do the conversion, but BCS still needs you to keep the Input of Create the same as the Output of Read. Does your Create operation comply with this requirement?

- In the error message parameter methodInstance is mentioned. Is any of your parameters in the Create or Read operation named methodInstance?

Cheers, Alex

Former Member
0 Kudos

Hi Alex,

My answers to your questions-

- Did you create the ECT manually or through the BDC Browser?

Through BDC browser

- Did you check the Create operation of the ECT? Are there any errors in the ECT?

There are no errors in the ECT.

- How do you trigger the Create operation (via External List or via your custom coding)?

Via External list

- How did you model the Create operation in ESR? It looks like your RFC requires only the PR# to do the conversion, but BCS still needs you to keep the Input of Create the same as the Output of Read. Does your Create operation comply with this requirement?

I am using the same structure for the Input of the Create operation as the output of the Read operation.

- In the error message parameter methodInstance is mentioned. Is any of your parameters in the Create or Read operation named methodInstance?

There are no parameters named 'methodinstance' either in the Create operation or the Read operation.

Just to let you know that I was able to fix this issue by removing all the fields(quantity, delivery date, purchase org, purchase group, vendor) except the PR number from the attribute structure which I use for the Read and Create operation. But I still want to know why it creates a problem when I include these fields in the attribute structure.

Regards,

Pranil

Former Member
0 Kudos

Hi Pranil,

Thanks for all the details. Unfortunately I am not seeing any clearer. The fact that you were able to succeed with less parameters is puzzling.

Where do you actually see the error message? In the SP logs or on the SAP Gateway? Does the Create call actually reach the Gateway system or is the error happening prior to triggering the web service call?

If you see any errors in SP then please add some of the relevant logs entries into the thread.

If the error happens in Gateway then please provide more log entries from Gateway (SRTUTIL, SLG1, ...).

Cheers, Alex

Former Member
0 Kudos

Hi Alex,

I see the error logs in the SharePoint. The error is actually happening prior to the webservice call. The only error log I see in the SharePoint is -"Value cannot be null. Parameter name: methodInstance".

Since the call is not reaching the SCL system at all, there are no logs in the SCL server.

Thanks,

Pranil

Edited by: PranilAP on Jan 24, 2012 4:24 AM

Former Member
0 Kudos

Hi Pranil,

I hope the Microsoft experts in this forum can chime in here.

In the meantime you might want to take a look at some of the pre-delivered content for samples on how the create operation has been build there. The pre-delivered ECTs for Contact or AccountDocuments have a create operation. Maybe you can spot a difference between the sample and your ECT.

Cheers, Alex