01-11-2012 10:57 AM
I have downloaded Idoc(Already existing in the system with status 53) data using FM IDOC_READ_COMPLETELY(by passing an Idoc number) and passing this downloaded data to FM MASTER_IDOC_DISTRIBUTE to create new Idoc with same data.
Idoc does gets created but with status 29(Partner profile missing). I am not able to figure out what is going wrong because Idoc already exists in the system with same data so how can the new Idoc with same data have this issue?
Also I tried to maintain the partner profile data( that i got as warning message in Long text after the creation of Idoc) but still it did not help.
01-11-2012 11:08 AM
Try to create it manually with following steps.....
Go to We19 transaction by providing the existing idoc number from which you and execute. You will have a push button standard inbound in application tool bar.click on that and press ok.
Then it will generate a new Idoc number with the same data.
and check the Idoc status...If it is having the same 29 status then its a problem with partner profile configuration.
Hope this will help.
Regards,
Karuna
Edited by: karunapsreddy on Jan 11, 2012 12:18 PM
01-11-2012 11:25 AM
01-11-2012 11:36 AM
Just manually post the idoc with the above mentioned steps.If it creates with the status 53 then we can say that problem is in report program and please try to check control records you are passing to the FM MASTER_IDOC_DISTRIBUTE .Otherwise if the Idoc has generated with the 29 status then you need to look into the partner profile configaration and the customer distribution model BD64.
01-11-2012 11:37 AM
Hi Ankit,
You can create a small BDC to simulate WE19 and put it in your program.
Then you can call it in loop for multiple idocs.
Regards,
Harsh Bansal
01-11-2012 12:44 PM
Please compare the control records downloaded along with control records passed to the function module.
Nabheet
01-11-2012 1:16 PM
Hi Nabheet,
Simply created a report where one FM gets data and using same data I try to create Idoc.
Even this fails to get the Idoc into correct status:
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
document_number = 0000000041115636
IMPORTING
idoc_control = e_edidc
TABLES
int_edids = ts_edids
int_edidd = ts_edidd
EXCEPTIONS
document_not_exist = 1
document_number_invalid = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = e_edidc
TABLES
communication_idoc_control = ts_edidc
master_idoc_data = ts_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
IF sy-subrc EQ 0.
ENDIF.
01-16-2012 9:46 AM
Hi,
Try to Pass both communication Idoc and master idoc control as same.