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

Debugging inbound IDOC from PI.

former_member201275
Active Contributor
0 Likes
2,118

How can I debug Function Module RH_INFTY_OF_IDOCSEG_TYP_GET.

I have an IDOC coming from Send System, through PI, to Target system. Message type HRMD_A. In this IDOC one of the infotypes is enhanced to include an additional field eg. P0019-ZZFIELD.

When this leave the Sending system this field has a value eg. ‘04’. In PI this field is successfully mapped to P0019-ZZFIELD, and I can see in the XML output that this has the correct value.

When this IDOC arrives in the Target system this field has no value i.e. when I view it in WE02 this field is empty. I am certain this is occurring because of T777D where I have maintained IDOC segment as E1P0019, and 2nd IDOC segment as ZL_E1P0019. The second IDOC segment of course has my new field therein.

I have coded an enhancement at the start of Function Module RH_INFTY_OF_IDOCSEG_TYP_GET to ensure that the correct IDOC segment is being used but this doesn’t seem to work.

I know how to debug from WE19 i.e. after the IDOC has arrived and it is visible in WE02, then it can be reprocessed and debugged. The problem is that this doesn’t help me as I need to see how the data is getting into the IDOC segments i.e. between PI and WE19.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,431

I suspect PI has cached the structure of the IDoc. You need to delete the IDoc from the cache and re-process an inbound message again to create another IDoc.

How can I debug Function Module RH_INFTY_OF_IDOCSEG_TYP_GET.

I have an IDOC coming from Send System, through PI, to Target system. Message type HRMD_A. In this IDOC one of the infotypes is enhanced to include an additional field eg. P0019-ZZFIELD.

When this leave the Sending system this field has a value eg. ‘04’. In PI this field is successfully mapped to P0019-ZZFIELD, and I can see in the XML output that this has the correct value.

When this IDOC arrives in the Target system this field has no value i.e. when I view it in WE02 this field is empty. I am certain this is occurring because of T777D where I have maintained IDOC segment as E1P0019, and 2nd IDOC segment as ZL_E1P0019. The second IDOC segment of course has my new field therein.

I have coded an enhancement at the start of Function Module RH_INFTY_OF_IDOCSEG_TYP_GET to ensure that the correct IDOC segment is being used but this doesn’t seem to work.

I know how to debug from WE19 i.e. after the IDOC has arrived and it is visible in WE02, then it can be reprocessed and debugged. The problem is that this doesn’t help me as I need to see how the data is getting into the IDOC segments i.e. between PI and WE19.

5 REPLIES 5
Read only

Former Member
0 Likes
1,431

Hi Glen,

In WE20, you can find the process code from the related partner profile, then go to WE42 to find out the function module. In this FM, you can set a external breakpoint using the RFC user name.

Then once IDOC transfered from PI, breakpoint will be reached.

Regards,

Archer

Read only

Former Member
0 Likes
1,432

I suspect PI has cached the structure of the IDoc. You need to delete the IDoc from the cache and re-process an inbound message again to create another IDoc.

Read only

0 Likes
1,431

Hi Martin,

Thank you for your speedy answer. I am a PI newbie, please could you tell me the steps to delete the IDOC from the cache, and then also how do I reprocess the inbound message. Please bear in mind I have no access to the Sending system, only my system which Receives the IDOC. Thank you once again.

Read only

0 Likes
1,431

IDX2 is the transaction to clear the IDoc cache.

With regards to testing, how has the data been getting into the PI system in the first place?

Read only

0 Likes
1,431

From an IDOC from the sending system.