How to create a BP function with c++, which I can access from any Blueprint?

Blueprint is tied to same rules and structures as C++ and same as you need to target from which object you want to call a function, same in blueprint you need to point “Target”.

Use “static” as i showed in example

UFUNCTION(BlueprintCallable, Category = "Something")
static void DoSomething(UClass* Something);

“Static” statement is obligation to compiler that function will not use object instance of a class, so in exchange it will let you call that function without need of targeting object and in C++ class becomes more like namespace for that function and in blueprint “target” input dissapers as it is no needed anymore.

And same as i posted there, check UGameplayStatics class in engine source code:

https://github.com/EpicGames/UnrealEngine/blob/4.2/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h
https://github.com/EpicGames/UnrealEngine/blob/4.2/Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp

It’s full of static functions targeted for blueprint use which doesn’t require “target” input