Skip to Content

SAP PO, how to pass multiple values in URL

Hello everyone,

I am using PO 7.5 and developing a REST to RFC scenario. I am exposing BAPI_GOODSMVT_GETDETAIL, which takes 2 inputs. This means, URL will be of the form http://<server>:<port>/RESTAdapter/...?MaterialDocument=<value>&MaterialDocYear=<value>.

In sender channel, I have made this:

My Message Type is

So in UDF, I need to pass two inputs? Can someone guide me for that. I havent found any solution over the internet yet.

Without UDF and simple mapping, I get this error

"Cannot create target element /ns1:BAPI_GOODSMVT_GETDETAIL/MATDOCUMENTYEAR. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD: Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_REQ_BAPIGOODSMOVEMENTDETAIL"

Looking forward towards response.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Oct 29, 2019 at 12:29 PM

    Hi,

    I resolved the issue by creating 2 separate UDF's. Not sure if its an effecient solution.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2019 at 10:59 AM

    Hi!

    You might refer to this blog (or even others from the series) for better understanding:

    https://blogs.sap.com/2014/12/18/pi-rest-adapter-exposing-a-function-module-as-restful-service/

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2019 at 12:33 PM

    Hi!

    The most straight-forward way, I see (and which is described in mentioned blog), is to create UDF with two input parameters (one - for DC attribute name and the other - for attribute namespace). After that you'll be able to use the same UDF for mapping different DC attributes to target fields.

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 06, 2019 at 10:34 AM

    On another note, if I need to pass 3 parameters like

    http://<server>:<port>/RESTAdapter/...?MaterialDocument=<value>&MaterialDocYear=<value>&Var=<Value>, how will I get 3 variables in UDF? And in channel configuration.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.