PARAMIXB[1] / nOperCode of the operation being executed in the sales order routine.
Default:
AdvPL GuideM410STTS( <nOper> ) --> NilRuns additional handling after sales order changes in routine MATA410.
M410STTS is an entry point of the sales order routine MATA410(). It runs after changes to the order file have been made, allowing complementary handling for inclusion, change, deletion, copy and purchase return operations.
M410STTS( <nOper> ) --> NilPARAMIXB[1] / nOperCode of the operation being executed in the sales order routine.
Default:No expected return. The reference indicates Nil.
#Include "TOTVS.ch"
User Function M410STTS()
Local nOper := PARAMIXB[1]
Do Case
Case nOper == 3 // Inclusion
ConOut("Order included")
Case nOper == 4 // Change
ConOut("Order changed")
Case nOper == 5 // Deletion
ConOut("Order deleted")
Case nOper == 6 // Copy
ConOut("Order copied")
Case nOper == 7 // Purchase return
ConOut("Purchase return")
EndCase
Return NilThe example shows how to identify the operation received in PARAMIXB[1] and separate handling according to the sales order change type.
#Include "TOTVS.ch"
User Function M410STTS()
Local nOper := PARAMIXB[1]
If nOper == 6 // Copy
// Additional handling after copying the order.
ConOut("Post-copy sales order handling")
EndIf
Return NilWhen the operation is copy, identified by value 6, the routine runs only the desired complementary handling.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.