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: 

Unable to create IDocs

ankit_doshi
Participant
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

Requirement is to do it through report and for multiple Idocs.

0 Kudos

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.

0 Kudos

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

nabheetscn
Active Contributor
0 Kudos

Please compare the control records downloaded along with control records passed to the function module.

Nabheet

0 Kudos

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.

0 Kudos

Hi,

Try to Pass both communication Idoc and master idoc control as same.