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: 

Creating Inbound IDoc

Former Member
0 Kudos

Hi All,

I want to know how to create an Inbound IDoc within the same sap system? I want to create it using my own program, no external system.

Message type is wminve and basic type is wmivid01. This is for inventory count purpose.

Will 'idoc_inbound_write_to_db' help? But this is 'Not Released'.

What is the other way? Your help will be highly appreciated.

Thanks,

Sagar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can use the FM "IDOC_INBOUND_SINGLE" for the same.

For eg:

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

PI_IDOC_CONTROL_REC_40 = IDOC_HEADER

IMPORTING

PE_IDOC_NUMBER = DOCNUM

TABLES

PT_IDOC_DATA_RECORDS_40 = IDOC_DATA

EXCEPTIONS

IDOC_NOT_SAVED = 1

OTHERS = 2.

You first need to populate the IDOC_DATA & IDOC_HEADER

Thanks,

ajay

9 REPLIES 9

Former Member
0 Kudos

Thre is some function module,

IDOC_INPUT*POST(I do not have SAP access) u try in se37. u may find it.

Happy coding

//Kiran

Former Member
0 Kudos

hi,

there is function module IDOC_INPUT_<MSG TYPE>

you can use it.

thanks,

sachin.

0 Kudos

It doesnt look like for this message type. Is there any other way to post and process inbound IDoc?

Former Member
0 Kudos

If your objective is to create dummy Idocs and test in dev system, then go for Tcode WE19.

Regards

Meenakshi

Former Member
0 Kudos

Hi,

You can use the FM "IDOC_INBOUND_SINGLE" for the same.

For eg:

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

PI_IDOC_CONTROL_REC_40 = IDOC_HEADER

IMPORTING

PE_IDOC_NUMBER = DOCNUM

TABLES

PT_IDOC_DATA_RECORDS_40 = IDOC_DATA

EXCEPTIONS

IDOC_NOT_SAVED = 1

OTHERS = 2.

You first need to populate the IDOC_DATA & IDOC_HEADER

Thanks,

ajay

0 Kudos

Hi Ajay,

That looks good option. I will test it tomorrow and award points.

Thank you very much,

Sagar

0 Kudos

Hi ajay,

I am getting 'Function module not allowed: BAPI_IDOC_INPUT1' error (status 51). I created partner profile with BAPI as process code.

What is going wrong? Any Idea?

Edited by: Sagar Lipare on Oct 8, 2008 5:18 AM

0 Kudos

Hi Ajay,

This works. Its creating and processing IDoc but it doesnt return any errors messages in the processing. Whats the way to get errors also?

Thanks for your help,

Sagar

0 Kudos

Hi,

Well this is the issue with this FM......I was able to use only two Exception's given in the FM.....

Ajay