on 10-25-2019 11:17 AM
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
Hi,
I resolved the issue by creating 2 separate UDF's. Not sure if its an effecient solution.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please suggest on how to do the same to pick multiple values from URL .
e.g.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.