indian_sumesh
28th July 2009, 07:55
Dear Baan friends,
I have done AFS for Order Acknowledgement session but if the order line type to print is = Exclude already printed line then no eport is printed
but in orginal session it shows message "No data within selection"
sk how i cancapture this situation to show same message through my AFS session
Thanks & regards
Sumesh
mark_h
28th July 2009, 14:59
For reports I do something like this:
print_tisfc0418m000(zoom.orno, zoom.orno,errmsg)
if errmsg(1;14) ="No data within" then
message("No shortages for %s.",zoom.orno)
else
And this is the last step in the function it calls:
stpapi.continue.process("tisfc0418m000",msg)
stpapi.get.mess.code("tisfc0418m000",msg)
stpapi.end.session("tisfc0418m000")
arthur_info
28th December 2009, 16:45
Hello Mark,
One question: If the user needs to press "yes" or "no", how can I handle it automatically?
Thanks,
Arthur
NPRao
28th December 2009, 20:05
Refer to the AFS manual:
Set answers to questions in session
SYNTAX
void stpapi.enum.answer(string session, string question, bset answer)
ARGUMENTS
session Name of the session this command is executed on. question Baan ERP question code. This question code must be valid within the session, that is, the session must ask this question when the user interface is used. answer The enum or set answer to be supplied as answer to the question. This must be expressed as the enum value as opposed to the numeric equivalent for example, tcyesno.yes
i.s.o. 1.
3-40 | Baan 4GL engine primitives
DESCRIPTION
This sets the answers to questions that occur while the session is executing.
RETURN VALUES
None.
EXAMPLE
stpapi.put.field("dtfsa1101s000", "dtfsa101.seno", str$(i.seno))
stpapi.put.field("dtfsa1101s000", "dtfsa101.name", new.name)
stpapi.enum.answer("dtfsa1101s000", "dtfsa1101a", tcyesno.yes)
ret = stpapi.insert("dtfsa1101s000", true, error.msg)
Explanation:
The session prompts the user whether to continue if a record is already present with the same name. The default answer in the session is No, but you must continue.
USAGE NOTES
Functions in dll created by creatdll:
Function extern long <fs-name>.define.enum.answer(string question, bset answer)
This function must only be used for questions for which the default answer in the session must be overruled.
If the same question is used more than once in the same session, you can define only one answer.