Hi Pk,
If you possible to do the 542 movement using any one of the transactions(MB01 , MB31 , MB1A ,MB1B ,MB1C ,MB11). That can be achieved using BAPI_GOODSMVT_CREATE.
We can post 542 document using MB1B. So please use GM_CODE as '04'.
Arivazhagan S