I think you should replace UD1 by strRecord right?
also use float
something like this...
def Amount_Changesign(strField, strRecord):
# parse recor
srcUd1 = strRecord[57:60]
srcAmt = float(strRecord[116:129].strip())
if srcUd1 == "ABC":
vAmt = srcAmt*-1 #this does not return anything
vAmt = srcAmt #this returns value
Got your idea, but apparently the one that makes the FDMEE confuse was the fact that amount extracted from SAP looks like this 210,000.00- (so the minus sign is located at the back).
So what I did was I use the position of the "-" sign at the back, and only read the amount. S
If it reads the "-" sign: # the minus sign is in strRecord[128:129]
it will take the value of the amount and multiply it with -1, but when it does not have minus sign at the back, it will literally just take the amount. #amount is strRecord[116:128] got to be changed into float and replace the "," with ""
take only the amount
This is resolved Francisco, thanks for the lookout !
Cool, please mark the thread as answered then.