cancel
Showing results for 
Search instead for 
Did you mean: 

Module Processing

Former Member
0 Kudos

File1 to XI to FILE2

File1 contains the fields

EmployeeNO and Employee Name

If EmployeeName is empty, I want to classify this as a bad record and dont want to send to the adapter.

For the above scenario how to write the Module Processing.

Please provide the Step by step Process. If you have screen shots, I kindly request you to send it to

mohinimrm@yahoo.com

Thanks a bunch

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rohini,

go through this pdfhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/how to develop a module for reading file name in a sender file adapter xi 3.0.pdf

you can get some idea...

Thanks,

Sekhar

Answers (4)

Answers (4)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Rohini,

<i>If EmployeeName is empty, I want to classify this as a bad record and dont want to send to the adapter.</i>

This can be achieved in the message mapping using the IF EXISTS function itself. What is the need for a Adapter Module?

Meanwhile the How to guide for adapter modules is available in SDN Library itself,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01...

Regards,

Bhavesh

Former Member
0 Kudos

Thanks All.

Bhavesh the idea is to develop a Module processing for learning purpose. Ya, Iknow, I can check that one field in my Message mapping, but in my original scenario I have many more fields .

Thnaks for your support.

Former Member
0 Kudos

Hi Rohini,

These are the basic steps involved in writing a module:

1. Make sure you have the following jar files with you.

aii_af_cci.jar

aii_af_mp.jar

aii_af_ms_api.jar

aii_af_ms_spi.jar

aii_af_trace.jar

aii_af_svc.jar

aii_af_cpa.jar

2. Open NetWeaver Developer Studio. Create a new EJB Module

New>J2EE>EJB Module.

Specify a meaningful name for the module and click Finish.

3. Right click on the folder ejbModule and create new package.

Enter a meaningful name for package and click Finish.

4. Right click on the Project, select New-->Folder. Enter lib as the folder name.

Copy all the jar files specified above from your local system and paste them into newly create lib folder.Right click on the project. Select Properties-->Java build path. Go to Libraries tab and add the jar files from lib folder to the classpath.

5. Switch to J2EE Perspective-->J2EE Explorer tab.

Right click on the newly created package and select New-->EJB.

6. Specify a meaningful name for the EJB. Select Bean Type as Stateless Session Bean.

Make sure to uncheck the checkbox “Generate default interfaces”.

Click on Next.

7. On the next screen change the values of following attributes as specified below.

Remote Interface: com.sap.aii.af.mp.module.ModuleRemote

Home Interface: com.sap.aii.af.mp.module.ModuleHome

Local Interface: com.sap.aii.af.mp.module.ModuleLocal

LocalHome Interface: com.sap.aii.af.mp.module.ModuleLocalHome

Click on Finish.

8. After clicking on Finish, a Creation error will be reported. Ignore this error as the file would still be created as specified.

Open the newly created file in Java Editor and add “Module” to the implements list of the bean class. Press Ctrl + Shift + O to remove import errors if any.

You will see a new error as

“Class must implement the inherited abstract method Module.process(ModuleContext, ModuleData)”.

Right click in the java editor and select Source-->Override / Implement methods. Select process method from Module interface and click Ok.

You should have an error free build of the project after this.

process is the only method where we need to write the business logic.

With this you are ready to right the situation specific business logic in the process method.

9. Once you create a deployable archive i.e. .ear for this using NDS, you can deploy this archive using NDS or using SDM.

Also go through these links:

http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm

/people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi

and also there is a how to guide on Service Market Place which delas with creating modules for your Adapter. Think it might be helpful to you and answer your query,

https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=011000358700000002...

Just open the link below, and select the topic How to create adapter modules for j2ee engine

I hope all this information provided will help you create your module successfully.

Regards,

Abhy

Former Member
0 Kudos

Hi,

i have sent a pdf to ur id regarding module processing

chk that out

cheers

jithesh

Former Member
0 Kudos