Application Development 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: 

ABAP-PI port problem

Former Member
0 Kudos

Hi,

I have a scenario in which i have to generate a MBGMCR IDOC whenever a material document is posted ans send this to XI.

Now i have to put a condition to process only IDOCs that have a particular vendor number must be sent out to XI and others have to stop inside the SAP system itself.

I saw that we could use ABAP-PI port to control the IDOC before being sent out. So i added the ABAP-PI port with a FM

ZOWN_FUNCTION which is a copy of OWN_FUNCTION with the following code added in the end.

CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS' DESTINATION 'XIDCLNT100'

TABLES

idoc_control_rec_40 = I_EDIDC

idoc_data_rec_40 = I_EDIDD

But when execute this is get an error,

"IDoc adapter inbound: Sender port is initial"

But i can see that the sender port value in the EDI_DC has a value 'SAPECD'.

I've not had much luck with resolving this error. I feel the error is misleading and the sender port is not really the problem, but im not sure.

Is the approach i'm using right or should i use some other function?

Any suggestions?

2 REPLIES 2

Former Member
0 Kudos

Any suggestions for me?

0 Kudos

I resolved it myself.

Its the same procedure.

Copy own_function to my fm ZOWN_FUCTION. Call the FM IDOC_INBOUND_ASYNCHRONOUS in destination XI.

I just found that when i call the FM the import parameters are of type EDI_DC40 and EDI_DD40 whereas the type im passing to it is EDIDC and EDIDD. thats why the mismatch.