You need to configure NetWeaver before you can use LDAP. For example, NetWeaver needs to know which domain controller or LDAP server you want to use for the bind. Once that has been configured, you can then write code to use the LDAP Simple Bind.
Just out of interest, why are you writing code to check password using LDAP ? I'm interested in the use case where somebody logs on to a system and then later needs their password checked.