Setting Document Type with a Macro
RespondidaI am attempting to use a Macro Type Universal Function to set the Document Type of a Purchase Order to Item, but although I can set the value in the Combobox, the document table does not update and remains as if a Service type document. Is there a trick I am missing to get this to work correctly?
Stuart
-
Comentario oficial
Hello Stuart,
I have a macro that changes the document type when the Business Partner is selected and it works fine. Here is it:

-
Hi ,
you can use set focus / send keys with enter after setting the value, just be aware that send keys isn't recommended by boyum.
might be a cleaner way to do this (?)
-
In theory that should work, but in practice, after using either Focus or Click to select the ComboBox, no following input works. Using Set, or SendKeys has no impact on the screen and the ComboBox remains open awaiting user input.
-
ok try use dynamic code as follows :
SAPbouiCOM.ComboBox myCombo = (SAPbouiCOM.ComboBox)form.Items.Item("3").Specific;
myCombo.Select("S", SAPbouiCOM.BoSearchKey.psk_ByValue); -
Aside from needing the change "S" to "I" for setting it to Item Type, it works perfectly. Thank you.
-
Sure , maybe theres a better way to do this with B1UP , I'm not sure.
Glad it worked.
-
Thanks for the official comment Yaremi, but that is exactly what I was trying to do originally and it did not work for me.
-
Hello Stuart,
Maybe the event is not triggering the universal function, I tested and worked for me, if the problem persists please contact your local support so we can investigate further. =)
Iniciar sesión para dejar un comentario.
Comentarios
8 comentarios