Kannan,
You can try passing the function code of DETERMINE COSTS (Ctrl+F5) to the FM SAPGUI_SET_FUNCTIONCODE .
For instance,
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
FUNCTIONCODE = 'KOER' "Function code of DETERMINE COSTS
EXCEPTIONS
FUNCTION_NOT_SUPPORTED = 1
OTHERS =2.
For the BAPI, ask your ABAPer to refer its documentation.