Hi Kiran,
Since you are come from PI, you must know the inbound proxy class also the outbound proxy class.
When you defining a inbound interface, input the inbound proxy class and method, the RAW structure is automatically show up, which is come form the parameter of method. And vice versa for outbound interface.
For a IDOC interface, you could run /AIF/IDOC_GEN_IF_AND_STR report, to convert IDoc basic type to raw structure.
The other contents, already in cookbook.
Regards,
Archer