on 2006 Jul 27 10:19 AM
Hello,
I read from a csv file and try to create a DIS
in my SAP-System by ZZ_BAPI_DOCUMENT_CREATE2.
It's a customizing BAPI with reduced parameters.
My file adapter gives following error:
com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Während Ausführung des Anwendungs-Mapping-Programms com/sap/xi/tf/_FileInputData_2_ZZ_BAPI_DOCUMENTS_CREATE2_ ist eine RuntimeException aufgetreten: com.sap.aii.utilxi.misc.api.BaseRuntimeException; RuntimeException in Message-Mapping transformation: Zielelement /ns0:ZZ_BAPI_DOCUMENT_CREATE2 kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt.. at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep
My Message-Mapping looks like
<a href="http://www.christian-riekenberg.de/upSkript/up/mapping_csv2rfc.JPG">this</a>
Can you see something wrong?
Does anybody know a good tutorial for a file-2-bapi-szenario??
thanks
Check if the generated XML from the file adapter has the same root tag name and namespace as the message type that you use for mapping. If this is different, no values will be mapped to the target system. In that case adjust your conversion in the file adapter or adjust your message type.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think the fields in RFC are mandatory but the source strucutre fields are optional. You need to check if the node exists if not then map a constant value to it.
If you feel those fields are really mandatory then make the field occourances to 1..1 or if the fields can be optional make those fields as optional in the RFC.
If you are not ok with both the ways then you need to check for exists as above.
for testing you can also download the XML message from the SXMB_MONI and then import that in the Test tab and test it.
Thanks,
Prakash
Hello,
thank you all very very very much.
@sekhar
the link how to test mapping was great. With this
I was able to compare the two xml-version (generated from
file and from manuel testing) and found the problem
@stefan
you are right. the namespace was the error. But I just found it out two minutes before I had read your posting
But thanks a lot.
New Problem:
The response of the BAPI tells me:
"Sachbearbeiter hat keinen Benutzerstammsatz"
I will check the BAPI in my SAP-system, but
if this is a well-known problem, tell me
regards
chris
Oh...excuse me. I try to translate, but I'm not
sure if this is the correct name of the english
error message
"Advisor has no user master record"
It seems that the user which I map to the babi
is not allowed to create a new document. But
it is my user, and I'm able to connect to the
SAP system.
regards
chris
This is an application error. So you have to test your RFC in the application system with SE37 to find the problem. Log on with the same user as you have provided in the communication channel of your RFC. If this is a service user, change the attributes temporarily to dialog user.
Regards
Stefan
Hi Christian,
not the file adapter but the mapping runtime gave the exception. Field /ns0:ZZ_BAPI_DOCUMENT_CREATE2 couldnt be created. It is a mandatory field, you have to fill it. If the source field is not available use functions "IF" and "EXIST" to fill the target in case of no source with a constant "" or 0. Or just avoid the connection between row and and ZZ_BAPI_DOCUMENT_CREATE2.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2374---- [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] by michal
sekhar
User | Count |
---|---|
66 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.