Lets assume we want to send and receive Production order IDOC (custom table)data as mentioned below then we will go for custom IDOC.
When we create segment than automatically similar structure in data dictionary as well as segment definition is gets created.