Tuesday, April 10, 2007

Create an IDoc message type via a custom BAPI

Swo1

Create object type and object

clip_image002

Super type is not mandatory

clip_image004

This creates object type

clip_image006

Now create key fields

clip_image008

clip_image010

clip_image012

Now create API method

clip_image014

Create API method is nothing but assigning function module(remote enabled). This function module should exists first, so first create function module (remote enabled) with a return parameter type BAPIRET2.

clip_image016

clip_image018

After creating the function module you should release it

clip_image020

Now in object add API method

clip_image022

clip_image024

Click on next step

clip_image026

Click on next step

clip_image028

Click yes will create method in object

clip_image030

Now put cursor on API method and go to menu Object type implement/release and Object type component implement/release, you should get tick beside API method(as released)

 clip_image032

Now change release status of object type and object to implemented and then to released

clip_image034

Go to Transaction: BDBG and enter object type and method

clip_image036

Now say create, here you are creating message type, etc.

clip_image038

clip_image040

This will list the IDoc created and the relevant function modules for it

clip_image042