2008 Oct 06 1:20 AM
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
2008 Oct 06 8:43 PM
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
2008 Oct 06 4:33 AM
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
2008 Oct 06 5:06 AM
hi,
there is function module IDOC_INPUT_<MSG TYPE>
you can use it.
thanks,
sachin.
2008 Oct 06 5:29 AM
It doesnt look like for this message type. Is there any other way to post and process inbound IDoc?
2008 Oct 06 6:38 AM
If your objective is to create dummy Idocs and test in dev system, then go for Tcode WE19.
Regards
Meenakshi
2008 Oct 06 8:43 PM
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
2008 Oct 07 8:21 AM
Hi Ajay,
That looks good option. I will test it tomorrow and award points.
Thank you very much,
Sagar
2008 Oct 08 4:13 AM
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
2008 Oct 08 5:00 AM
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
2008 Oct 08 2:48 PM
Hi,
Well this is the issue with this FM......I was able to use only two Exception's given in the FM.....
Ajay
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |