Showing posts with label glaccount. Show all posts
Showing posts with label glaccount. Show all posts

Wednesday, August 26, 2015

SQL Server & Maximo .. How to split GL account in SQL Server

Below query can be used in sql server to split a GL account which has 3 components in to individual components divided by '-' (ex : 100010123-abcd-1234 will be divided into gl1- 100010123, gl2- abcd , gl3 - 1234) .

select gldebitacc,

substring(gldebitacc,0,CHARINDEX('-',gldebitacc)) as gl1,

substring(gldebitacc,CHARINDEX('-',gldebitacc)+1,len(gldebitacc)-(CHARINDEX('-',gldebitacc)+charindex('-', reverse(gldebitacc)))), as gl2,

REVERSE(substring(reverse(gldebitacc),0, charindex('-', reverse(gldebitacc)) )) as gl3

 from

poline


----------------------------------------------------------------------------
All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.

Maximo Automation Script .. Split GL account

Below is the script which can be used for splitting the GL account to components

from psdi.mbo import MboConstants
from psdi.mbo import GLFormat
from java import util

 glComp1=mbo.getValue("gldebitacc").split('-')[0]
glComp2=mbo.getValue("gldebitacc").split('-')[1]
glComp3=mbo.getValue("gldebitacc").split('-')[2]

----------------------------------------------------------------------------

All the messagesbelow are just forwarded messages if some one feels hurt about it please add your comments we will remove the post.Host/author is not responsible for these posts.