there is one button called RULE double click on that button u can get the pup window in that there one options called ABAP-CODEselect thata button .once u select that button it will opens the ABAP editor intila screen .you can write the code accodring to your requirment.