cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error???

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

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

former_member206604
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

<i>Sachbearbeiter hat keinen Benutzerstammsatz</i>

I m not able to understand.........plz can you write it in english...?

sekhar

Former Member
0 Kudos

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

stefan_grube
Active Contributor
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi ,

It is giving mapping error...

remove the mapping between row andZZ_BAPI_DOCUMENT_CREATE2 and try.If it mandatory map it with constant..

do sample test mapping...

Take a look at this weblog:

XI: How to test your mapping (in real life scenarios)

sekhar

Former Member
0 Kudos

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