Portlet Factory, Version 6.1.2
SAPBWAccess
It is not generally necessary to use this object, but it allows Java-level access to the SAP BW. Calling getSAPBWAccess() on the SAPBWDataHelper will use the connection pooling, unlike this example which uses the object directly, not from a pool:
public static void main(String[] args) SAPBWAccess sa = null; try IXml props = XmlUtil.parseXml("<Properties>" + "<PropertyList>" + "<DataSourceInfo>default </DataSourceInfo>" + "<Format>Multidimensional </Format>" + "<AxisFormat>TupleFormat </AxisFormat>" + "<Content>Data </Content>" + "</PropertyList></Properties>"); IXml cmd = XmlUtil.parseXml("<Command>" + "<Statement> SELECT [Measures].MEMBERS ON AXIS(0) , NON EMPTY [0PLANT].MEMBERS * [0MAT_PLANT__DUSG].MEMBERS ON AXIS(1) FROM [DUMINVVAL/DUMINVVAL_DU_MDX_Q001_IMELT] </Statement>" + "</Command>"); sa = new SAPBWAccess("http://localhost:8082/sapbw"); sa.setCommand(cmd); sa.setProperties(props); // sa.setStubResult(XmlUtil.parseXml("<Result/>")); sa.setLogging("true"); sa.setTimeout("25"); IXml x = sa.executeMdx(); System.out.println(x); catch (Exception e) System.err.println("Error:" + e.toString()); e.printStackTrace(); finally if (sa != null) sa.release(); sa = null; }Parent topic: SAP BW Data Access builder
Library | Support |