Skip to Content
0
Former Member
May 18, 2010 at 09:29 PM

ABAP-PI port problem

56 Views

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?