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

Outbound Idoc Testing!

Former Member
0 Likes
3,021

Hi!

i want to test outbound idoc & debugg outbound process code.

Can any one pls tell me how?

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
1,495

Hi!

You can use the WE41 and WE42 transaction to identify, which function module is running during the IDoc process. Then put a breakpoint into the fm.

Use WE19 to re-create a test case from an existing IDoc.

Regards

Tamá

Read only

messier31
Active Contributor
0 Likes
1,495

hi,

Put a break point in the outbound processing function module. This funciton module is assigned to the process code.

After doing this process the application in normal way. For example in case of billing... when you issue ouput type, the control will stop at the set break-point.

All logic of populating the idoc segments are done in this function module.

Hope this helps you.

Enjoy SAP.

Pankaj Singh.

Read only

Former Member
0 Likes
1,495

WE19 would help but worth checking the following out:

1. There is a valid outbound partner profile for the

combination of receiving partner (plus partner type/function0 and message

type (plus message function and code) and test flag?

2. The profile points to the correct port which has the correct

RFC destination attached

3. The RFC destination is OK, it has the correct address for

the receiving system and (if it is trfc destination) the userid is valid

(use SM59 then menu options for testing authorizations)

How are you generating the idoc? - that would have a bearing on potential

errors (e.g. control data values) and what are the errors you get?

u can debug or test u r idoc using we19 tool also....

Start the test tool with SAP Menu ® Tools ® IDoc Interface/ALE ® Test ® Test Tool (WE19). You can use a template for your test IDoc.

You can choose IDoc types as a template, either directly or according to a specific message type. You can use the F4 Help for IDocs used as a template, which searches for IDocs by selection criteria, in the same way, for example, to IDoc Display. When an IDoc file is used as a template, the IDocs are read from this file and are available to you for selection. A default value for the IDoc file gives you the system using your test port which you can enter in IDoc Administration . This test port must therefore be of the “file“ type. The default file is the inbound file entered there.

· You generate the IDoc using .

The IDoc is displayed as a tree structure. If you do not use a template to create the IDoc type, at least one more segment must be added.

· To create segments in the form of tree nodes (colored fields) place the cursor on an existing node (for example a control record at the top) and choose .

You can cut, paste or copy individual segments or entire segment groups by positioning the cursor on the relevant segment and selecting the required action from the Edit menu.

· Click on the white fields to change data in the segments.

In the case of the control record, only the fields which are relevant for standard inbound processing are displayed. Do not forget the required entries in the partner profiles if you want to send the IDoc for standard inbound processing! You can also change all of the control record data by choosing All fields in the edit screen.

In the All fields editor screen you must enter the non-language specific partner function (for example AG for vendor). This is the only screen in the IDoc Interface in which the partner function is not translated into your language (in English AG becomes vendor VD) - in the partner profiles or in the IDoc display the field is always translated. Thus, you see the partner functions here in the way they are saved in the database. This is a unique value in the SAP System and therefore protected against mistakes.

· The additional procedure depends on whether you want to test inbound or outbound processing.

Outbound Test Tool: Procedure

1. When you have completed your IDoc, choose Standard outbound. If you have chosen a valid port, the port and port type are displayed for you to check.

2. Decide if you want to start outbound processing immediately: The IDocs will then be transferred to the port (status 03), regardless of what is in the partner profiles. If you do not configure the test indicator, the status of the IDocs remains 30 in the database, again independent of the settings in the partner profiles. You can also send several copies of your IDoc (repetition factor).

If you want to pass the IDocs, which you stored in status 30 with the test tool in the database, on to the port, use Test: Outbound Processing from IDoc The advantage is that the settings then take effect in the partner profiles. In particular, a receiving system is also triggered when the file port is used, if that is defined in the partner profiles.

3. Choose to start the outbound processing.

Inbound Test Tool: Procedure

When you have completed your IDoc, select one of the following processing options:

Standard inbound processing:

The IDoc is treated like an IDoc which was sent by an external system. The IDoc is first saved in the database, then the corresponding control records are compared with the inbound partner profiles and finally the business process determined using the process code is triggered (see Inbound processing).

Inbound function module (inbound processing using ALE):

the IDoc is first saved in the database and can then be forwarded directly to the specified function module. The function module can be run in debugging mode. If the function module calls a transaction, it can be processed in the background, foreground or in the foreground from the point at which an error is found. To do so, however, the ABAP command CALL TRANSACTION must use the import parameter INPUT_METHOD, in conjunction with MODE. Otherwise, the transaction is always processed in the background.

Function modules called directly must have the ALE Interface (Release 3.0 onwards).

Inbound File:

Generate or extend a sequential inbound file: The IDoc is first saved in the database with status 68 ("error, no further processing") and then in a file. Specify the name explicitly. The system proposes a name determined from the test port of the IDoc administration. If you select Start IDoc inbound processing immediately, the file is processed immediately and then deleted if processing was successful. This mode corresponds exactly to standard IDoc inbound processing. If further processing is not started immediately, the file is kept and can be used for additional test purposes.

You can write the test IDoc more than once in the file and thus also send them for inbound processing more than once (repetition factor).

Choose to start inbound processing from the corresponding screen.

regards,

srinivas

Read only

0 Likes
1,495

Hi,

Put the break point in outbound selection program. Suppose if you are using the BD10 for posting the material data you should put break point in RBDSEMAT.

If you are using the FM for posting the idoc put the break point in the FM.

If you are using the Message control for posting the idoc put the break point in RSNAST00 report program.

Regards,

Uday

Read only

Former Member
0 Likes
1,495

Hi,

As you know before testing inbound interface you have to do the basic settings like Process code for corresponding F.M, and Basic type.

-For Examle your basic type process code is ‘DELS’ and make sure whether your F.M ‘IDOC_INPUT_DESADV1’ is assigned under this process code or not.

-Next step is create the partner profile configuration using T-code we20, In that if the partner type is L.S, under that select your partner number and click on the partner no the create the outbound parameter by clicking on the ‘+’ button symbol under the INBOUND PARAMTRS. Then it takes next screen you have to give some inputs like what is message type, Process code name etc…….

-Once if you done above settings, go to T-code ‘WE19’.

-Enter the Basic type is 'DESADV01’and press execute..

-For first time you need to be double click on ‘EDIDC’ button then it displays one pop-up screen, in that screen you have to give the sender and receiver information like Port, partner no, type, Message type etc……. and finally click on ok button.

-Next you would be fill all the test data on the corresponding segment by double clicking on the segment names. Once if you fill all the data in that segments press the button ‘STANDARD OUTBOUND’ button if partner profile configuration is available you will get one pop-up screen it shows ur sender and receiver information along with message type with green light. Press ok button the it creates IDOC no which the data has been processed.

-If you want to see the Idoc processing in BACKGROUND, put a BREAK POINT at function module level and use the above process.

-In this way suppose if you created one idoc and no is like 00000123.Next time you want to create some more idocs with different test scenarios you can use existing idoc no with modifying the data, this is how you can do is take the existing idoc no ‘00000123’ go to WE19 and give this idoc no in ‘EXISTING IDOC’ column and press execute button then it takes into other screen, in that you can change this idoc by giving the other data in corresponding segments and do the above process ie press ‘STANDRD PROCESS’.

This is the way how you can test idocs by using WE19 T-Code.

Hope you can understand with above discussion.

<b>Rewards with points if it really useful</b>.

Regards,

Vijay

Read only

varma_narayana
Active Contributor
0 Likes
1,495

hi Rahul..

The Test tool for IDOCs is WE19.

To debug the Process Code :

Open the Function module of the Process Code in SE37.

Set the break point in the Source code of this FM. Eg: IDOC_OUTPUT_ORDERS

<b>Reward if Helpful</b>