With a Solaris 10 or earlier system, assuming that your tar file is named tarfile , the following two step sequence should extract only the directories from your tarfile (by extracting everything from the archive except files that are not directories):
tar tf tarfile | grep -v '/$' > exclusions.$$
tar xfX tarfile exclusions.$$
rm -f exclusions.$$
With Solaris 11, you might need:
tar tf tarfile | grep -v '/$' > exclusions.$$
tar xf tarfile -X exclusions.$$
rm -f exclusions.$$