Loading the Mill-Demo
This is the initialization action to set up working with the Mill Demo.
vuser_init()
{
sapgui_open_connection_ex(" /SAP_CODEPAGE=1100 /FULLMENU accent 00 /3",
"APO - Demo Server",
"con[0]");
sapgui_select_active_connection("con[0]");
sapgui_select_active_session("ses[0]");
sapgui_select_active_window("wnd[0]");
sapgui_window_maximize(
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui104",
END_OPTIONAL);
sapgui_logon("MILL_DEMO",
"demo-password",
"720",
"EN",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1017",
END_OPTIONAL);
/* Get the APO grid */
sapgui_tree_set_selected_node("/SAPAPO/SDP94 - Demand Planning -> Planning -> Interactive Demand Planni",
"usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell",
"F00004",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1018",
END_OPTIONAL);
sapgui_tree_double_click_node("/SAPAPO/SDP94 - Demand Planning -> Planning -> Interactive Demand Planni",
"usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell",
"F00004",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1019",
END_OPTIONAL);
sapgui_tree_set_hierarchy_header_width("352",
"shellcont/shell/shellcont[2]/shell/shellcont[1]/shell",
"352",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1022",
END_OPTIONAL);
sapgui_tree_set_hierarchy_header_width("335",
"shellcont/shell/shellcont[0]/shell/shellcont[1]/shell/shellcont[1]/shell",
"335",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1023",
END_OPTIONAL);
sapgui_tree_select_item("SALES MM EU, COLUMN_SELID",
"shellcont/shell/shellcont[0]/shell/shellcont[1]/shell/shellcont[1]/shell",
" 2",
"COLUMN_SELID",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1024",
END_OPTIONAL);
sapgui_tree_scroll_to_item("SALES MM EU, COLUMN_SELID",
"shellcont/shell/shellcont[0]/shell/shellcont[1]/shell/shellcont[1]/shell",
" 2",
"COLUMN_SELID",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1025",
END_OPTIONAL);
sapgui_tree_double_click_item("SALES MM EU, COLUMN_SELID",
"shellcont/shell/shellcont[0]/shell/shellcont[1]/shell/shellcont[1]/shell",
" 2",
"COLUMN_SELID",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1026",
END_OPTIONAL);
return 0;
}