Hey!! I eventually figured it out. I needed to retrieve the value from the status bar of SAP. So here's what I did -
I navigated to the value which I wanted to correlate. Then I inserted a new step i.e. a function - sapgui_status_bar_get_type below it. This returned me the state of status bar.
After this I used below code for catching the desired value.
if(0==strcmp(lr_eval_string("{Status}"),"Success"))
sapgui_status_bar_get_param("2", " order_id ");
This Worked!!