Idoc distribution with status of error records.
my business requirement is i want to creat the Outbound Interface to distribute the data from sapserver to ESB server using the one userdefined function module, in this custom function module i written the logic to validate the input data if validation is file those error records are updated to one return table parameter and using the FM Master_Idoc_distribute for create and distribute the sucessfull records. till its working fine (with status 30-ready to dispach, 01- idoc creatd is in we05 and i have done the all configaration of message type creation, idoc type creation, port, partnerfrofil) ,
but my requirement is , for example if in 10 records even one record is also error records then no need to distribute the idoc data to sending system, just i want to send the idoc number with status error with error message.
plese suggest me the appropriate procedure.
Thanks & Regards,
in ur code ur filling the idoc data rcord, control record ryt ..before u append data to idoc data , u r also validating and u might be doing in loop for appening the idoc data.
if there is any error in idoc then it won't distribute the data, it will be in error status only..u can only see the data in WE02. Then u can also change the data in WE02 and redistirbute it via BD87.
if u have any conerns let me know