cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter Module Vs Function Module

Former Member
0 Kudos

We are creating a Adapter Module to process an Incoming File. The File contains the Material Master data. But there are many records are invalid due to various reasons. We need to strip the badrecords.

There are around 650 fields in each record and the condition are very complex to be validated in the XI message mapping. Thats were we decided to go with an Adapter Module.

But my question here is, can i write a Function Module in XI and send the File to the Function Module to validate them and there by strip the bad records, rather than writing an adapter module?

Any Suggestions

Accepted Solutions (0)

Answers (2)

Answers (2)

nisarkhan_n
Active Contributor
0 Kudos

By function module you mean.....

you are trying to pass the data to a Function module in the mapping and in this function module youa re trying to validate the data so the response of the FM will contain only the valid records.

it might eat up lot of time, as you might have topass each field to the FM or the who record as a single field.

supose if you have any one filed as invalid for ex ( ph no if total length is 10 then valid) in the mapping create the target node only when the conditino is true....

if you think the consition are more complex then you can think of the AM.

Former Member
0 Kudos

Nisar and Raj, thanks a lot .

But I can't go with the Message mapping as I said earlier,because of the very complex record structure and the Validation rules. I want to get rid of the Adapter Module too.

What I mean with a Function Module is, in XI using the Transaction SE37 create a procedure and when the file comes send it to this function module. And this Function module will strip the unwanted records and will send back xi the valid records.

ravi_raman2
Active Contributor
0 Kudos

Jenni,

Ok based on your answers..you seem to be an abap person..yes you can do the se37 thingy..it will get a lot more complicated than you are expecting..reasons are

1) you plan to write an adaptor module( written in java) that will be deployed to xi...which internally will call a abap function/bapi to do the cleansing...

Why would you want to do that when you can do the same directly in the java code...that way you are reducing an extra trip for the data internally....

Hope that helps

Regards

Ravi Raman

VijayKonam
Active Contributor
0 Kudos

Hi Jenni,

I assume that, you are an ABAPer and you do not want to go for an adapter module creation. My suggession would be -

Use the file adapter. use FCC and create the XML structure you need. Do not have any validations at this time. Just create the XML. Now you have two options -

a. Create an ABAP mapping and pass this XML to the ABAP mapping. Implement all of you business validation rules here, and create the target structures only when everything looks good. Here you would have full control over the target message.

b. If you are more interested in writing a FM. creating a function module (rather server synchronous proxy) then implement the logic here. The output structure of this proxy would be with all the good records. You would need to have BPM in this case.

I beleive I made some sense.

VJ

justin_santhanam
Active Contributor
0 Kudos

Jenni,

I don't know what u mean by Function Module over here. But in our place we are doing the below process. There is one separate webservice, we will receive more customer data. Each customer can have some bad records or we need to re-structure the data[ex: phone num]. So we will send each customer data to the webservice and it will give back the response with valid data.

I hope it helps little bit!!

raj.