What is the dramatic purpose of Scene IV?

sorry Act 4 scene 4

This scene reminds Hamlet of his purpose.

"Act IV, scene iv restores the focus of the play to the theme of human action. Hamlet’s encounter with the Norwegian captain serves to remind the reader of Fortinbras’s presence in the world of the play and gives Hamlet another example of the will to action that he lacks. "

Check this site.
http://www.sparknotes.com/shakespeare/hamlet/section11.rhtml

Act 4, Scene 4 in Shakespeare's play Hamlet serves to remind the reader of the theme of human action and restore the focus of the play. In this scene, Hamlet encounters a Norwegian captain who is leading Fortinbras's troops towards Poland. The presence of Fortinbras and his army serves as a contrast to Hamlet's inaction and lack of resolve. It reminds Hamlet of his purpose and gives him another example of the will to take action that he lacks.

You can find more information about Act 4, Scene 4 of Hamlet and its dramatic purpose on the SparkNotes website. The provided link will direct you to a page specifically dedicated to the analysis of this scene.