To loop over an array you can use while loop
Example :
from psdi.mbo import GLFormat
print "****************************testing*****************************"
locSet=mbo.getMboSet("LOCATION")
glvalue=locSet.getMbo(0).getMboValue("GLACCOUNT").toString()
fmt =GLFormat(glvalue,mbo.getString("ORGID"))
print fmt.getSegmentCount()
glarray=fmt.getSegments()
i=0
while(i<len(glarray)) :
print "******************"
print glarray[i]
i=i+1
Example :
from psdi.mbo import GLFormat
print "****************************testing*****************************"
locSet=mbo.getMboSet("LOCATION")
glvalue=locSet.getMbo(0).getMboValue("GLACCOUNT").toString()
fmt =GLFormat(glvalue,mbo.getString("ORGID"))
print fmt.getSegmentCount()
glarray=fmt.getSegments()
i=0
while(i<len(glarray)) :
print "******************"
print glarray[i]
i=i+1
Comments
Post a Comment