Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need help IDoc Creation .

Former Member
0 Likes
800

hi ,

I am new to Cross Applications. I am on the process of creating an Idoc and I am stuck where I need to assign a function module to the Idoc in txn we57.

I need no know whether we need to create this function module in SE37 or not ?

Even the same function module name has to be given while creating a process code in we 42.I request for guiding me on the same .

Waiting for your helpful suggestions,

Sasmita

hi ,

I am new to Cross Applications. I am on the process of creating an Idoc and I am stuck where I need to assign a function module to the Idoc in txn we57.

I need no know whether we need to create this function module in SE37 or not ?

Even the same function module name has to be given while creating a process code in we 42.I request for guiding me on the same .

Waiting for your helpful suggestions,

Sasmita

5 REPLIES 5
Read only

Former Member
0 Likes
770

Hi Sasmita,

If you are extending the IDOC Type or creating a new IDOC Type then a new function module needs to be created and assigned in we57 and for the process code as well, as you have pointed out.

In the process code(we42) create a new Z process code and attach the function module

In the we57 function module attach the function module with the idoc type.

Regards

Arun

Read only

0 Likes
770

Thanks for the response Arun.

The new function module which has to be created , Can I get litle more info about the FM , I mean what will be the import and export parameters and other details as this is related to Idocs I am not sure what exactly has to be done for creating this FM .

Regards,

Sasmita

Read only

0 Likes
770

Hi ..

The Parameters for All inbound FMs will be Same.

So To create an inbound FM :

Copy the Existing Standard FM like IDOC_INPUT_MATMAS01 to a New FM.

Remove the Source code and Write ur source code.

But the Parameters must be same.

It will generally have the Parameters for

IDOC Control records table

IDOC Data records table

IDOC Status records table

Pseudocode.

LOOP AT <CONTROL_RECORDS>

Loop at <respective data records>

Fill the data from data records into BDCDATA table

Call transaction 'tcode' to update database

Fill the control records.

<b>Reward if Helpful</b>

Read only

0 Likes
770

Hi Sasmita,

Check any of the function module starting with

IDOC_INPUT_*

and check the import and export parameters of these function modules and match with your Function module

Regards

Arun

Reward points for helpful answers

Read only

Former Member
0 Likes
770

Hi Sasmita,

Create function module with the following

1 ) Parameters in function Module

Import :

INPUT_METHOD LIKE BDWFAP_PAR-INPUTMETHD

MASS_PROCESSING LIKE BDWFAP_PAR-MASS_PROC

Export :

WORKFLOW_RESULT LIKE BDWFAP_PAR-RESULT

APPLICATION_VARIABLE LIKE BDWFAP_PAR-APPL_VAR

IN_UPDATE_TASK LIKE BDWFAP_PAR-UPDATETASK

CALL_TRANSACTION_DONE LIKE BDWFAP_PAR-CALLTRANS

Tables:

IDOC_CONTRL LIKE EDIDC

IDOC_DATA LIKE EDIDD

IDOC_STATUS LIKE BDIDOCSTAT

RETURN_VARIABLES LIKE BDWFRETVAR

SERIALIZATION_INFO LIKE BDI_SER

Exception:

WRONG_FUNCTION_CALLED Wrong function module for message

<b>NOTE : these import,export and table parameters can be get from any standard IDOC F.M</b>

2) The function module gets created when you enter the above specified import, export, tables and exception. Then in the source code tab of function module write the required code for processing the IDOC.

3)Once the function module is created add Idoc type and related data using the transaction WE 57.

4)Go to transaction WE 57 add function module name and type as ‘F’ . Also add the basic type and Message type in the transaction and then save and close

5)Go to transaction BD 51 add the function module and the input type as 0 or 1 or 2. this identifies the type of processing of the IDOC

<b>For PROCESS CODE</b>

6)Now we have to create a Process code for the above using Transaction WE 42.

Go to transaction WE 42 click on Change display button.

7) Once you are in the change mode enter Process code, Description for the Process code and in the identification enter the function Module name also click radio buttons processing with ALE and processing by function module and save the trasaction.

8)Once you the save the WE 42 transaction, you get a green/yellow button next to the function module click on that it takes you to a new window.

9)Drop down the arrow next to the function module you should be able to find the function module which you have created, now save you have your process code created. Now test the IDOC

<b>Summary for customizing idoc and F.M.</b>

Points:

WE 31: Create Segments(Fields)

WE 30: Create IDOC Type( attach segments to the IDOC type.

WE 81: Create Message Type.

WE 82: Assign Message type to IDOC type

Create Function Module

WE 57: Add function Module Details

BD 51: Add function Module & Corresponding input

WE 42: Create Process code

REWARD ME WITH POINTS IF IT USEFUL

Regards,

Vijay