This functions sets an object’s property.
SapGui.bdh
SapGuiObjectSetProperty( in nObject   : number,
                         in sProperty : string,
                         in uValue    : union ) : boolean; 
               	 | Parameter | Description | 
|---|---|
| nObject | The objects handle. | 
| sProperty | The name of the property to be set. | 
| uValue | The value to be set. Only simple types are accepted. To set an object property use the function SapGuiObjectSetPropertyObject. | 
transaction TMain
  var
    sConnID   : string;
    i         : number;
    nIterator : number;
    nType     : number;
    nObject   : number;
    bRet      : boolean;
    sStr1, sStr2 : string;
  begin
    // Connecting to SAP
    sConnID := SapGuiOpenConnection(" /SAP_CODEPAGE=1100 /FULLMENU 10.5.2.198 0 /3");
    SapGuiSetActiveConnection(sConnID);
    SapGuiSetActiveSession("ses[0]");
  
    // SAP
    SapGuiSetActiveWindow("wnd[0]", "SAP", SAPGUI_MATCH_Exact); 
    SapGuiWindowAction(SAPGUI_WND_MAXIMIZE);
  
    // Logon to SAP System
    SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
    ThinkTime(2.8);
    SapGuiLogon("ddic", "minisap", "000", ""); 
    // Copyright
    ThinkTime(2.1);
    SapGuiSetActiveWindow("wnd[1]", "Copyright", SAPGUI_MATCH_Exact);
    SapGuiPressButton("tbar[0]/btn[0]");
  
    // SAP Easy Access
    ThinkTime(9.9);
    SapGuiSetActiveWindow("wnd[0]", "SAP Easy Access", SAPGUI_MATCH_Exact);
    SapGuiGetHandleFromControlId("wnd[0]", nObject);
    SapGuiObjectSetProperty(nObject, "ButtonbarVisible", 0);
  end TMain;