rohan_rege
24th September 2002, 03:56
hi,

i am facing a problem where the session tfacp1140s000
displays a message tfacps0030 " price difference too large ; no authorization for approval"

but when i try to simulate thru my afs code .......

the mess_str = stpapi.get.mess.code ..........doesnt return anything

the string mess_str is empty all the time.....when it shudnt be .


my statement is

mess_str= stpapi.get.mess.code("tfacp1140s000" ,error.mess)

but neither of the string variables -mess_str or error.mess are filled

any suggestions ??????

I have checked the session manually...for the same data i am entering into it thru afs.......it gives the Warning message as above....but when the code runs.....no last message is retrieved

In the code of tfacp1140s000 ..the message is displayed using
message command.......


Rgds
Jai Gurudeva*
Rohan Rege

mark_h
24th September 2002, 16:56
At what point did you put the mess.code prompt - Was it right after an update or continue? Something that would cause the error. I know at times I have had problems trapping some warnings and in those cases I put some error checking code in my function server.

Mark

rohan_rege
24th September 2002, 18:23
hi mark...

yes indeed i have used the message api call only after a stpapi.continue ..

how do i get aroound the prob........? any alternative
like the one u said u used when u came across this problem.

also based on this message i have to either open another session from the curr one or end the curr session.


stpapi.end.session("tfacp1131s000")
stpapi.handle.subproc "tfacp1130s000", "tfacp1140s000","add" )
f1130s000.Approve( error.mess )
string mess_code(20)
long count

mess_code = stpapi.get.mess.code("tfacp1140s000", error.mess )

if not isspace(error.mess) or mess_code="tfacps0030" then
stpapi.put.field( "tfacp1140s000", "tfacp200.bloc","PRC")
ret = stpapi.update("tfacp1140s000",0 , error.mess)
ret = stpapi.save( "tfacp1140s000", error.mess )
endif
stpapi.end.session("tfacp1140s000")



any suggestions ...........????????

Rgds
Jai Gurudeva*
Rohan

mark_h
24th September 2002, 20:36
I am not sure how hard it is for you to check price difference and approval limit. For most of my function servers it has been simple - make sure part exists, verify inventory unit of measure, things like that. So I am not sure how hard it would be for you to calculate the price difference and make sure they can do the approval. That is all I can think of at this time.

Mark