Kamal,
The SAP IDOC structure can be downloaded from SAP R3 as a DTD(Tx. WE60, enter the IDOC type and use Documentation->Create DTD). The same can be uploaded into BC as a record(New : Record->Enter a name->Source->DTD).
Create a Record reference of this record and then map the output(boundNote) of the TransformFlatToHierarchy.
All the fields in the IDOC would appear in the structure, irrespective of the content. However, the “null pointer execption” would not get solved, as the values from the IDOC still remains NULL. One has to validate the fields contents for null values before passing the data to your transformer !
HTH
Bhavani Shankar.
#webMethods#Adapters-and-E-Standards#Integration-Server-and-ESB