When creating a sql result screen
Hi,
The screen created based on the query, as shown in the example, the screen is displayed normally, but I can't change its name to develop the Beas script.
The default name is sqlanzeige1
tools=isql=title=Fila de Registro Apontamento MES<tab>dwname=teste<tab>name=FilaRegistroMES<tab>sql=select getdate()
-
Hi,
see
http://help.beascloud.com/script/index.html?ue_form.htm
this help you to create own forms
regards
Martin
-
Hi, Martin
Thank you very much.
regards
João Antonio
-
Hi, Martin
As the code below is displaying a form a result of the query, however I need to enable for editing and New Date column.
How can I do this?

regards
João Antonio
-
you can open the customizing script in this form too
the name is in this case Reprogramacao.src (the dwname)
here you can do all in example form_load
// Change title
dw_1.item.datefield.title=My Date
// Disable editing
dw_1.item.itemcode.tabsequence=0
// Change display and edit format
dw_1.modify=datefield.format="yyyy/mm/dd" datefield.edit.format="yyyy/mm/dd" -
Hi, Martin
Thank you very much.
Below is the sharing of the code./* Reprogramar data de entregra OP - SAles Order By João Antonio 19/11/2021 */
global function dw_master_item_button_Reprogramacao_click
declare=lform.ue_form
lform.title=Reprogramação Data de Entrega
lform.dwname=Reprogramacao
lform.sql=select &
b.belnr_id as 'Documento', &
b.belpos_id as 'Posição', &
b.itemcode as 'ItemCode', &
b.itemname as 'ItemName', &
b.lieferdatum as 'Data de Entrega', &
cast(null as datetime) as 'novadata' &
from beas_fthaupt a &
inner join beas_ftpos b on b.belnr_id = a.belnr_id &
where &
a.abgkz = 'n' &
and b.abgkz = 'n' &
and b.belpos_id = 10 &
and a.typ ='sales order'
lform.dw_1.item.novadata.title=Nova Data
lform.dw_1.item.novadata.enabled=1
lform.dw_1.item.dynamiccol=1
lform.style=browse
lform.showdialog
//tools=isql=title=Fila de Registro Apontamento MES<tab>dwname=teste<tab>name=FilaRegistroMES<tab>sql=select getdate()
global end// Criado 22/11/2021 By João Antonio
global function form_loaded
// Menu-Entry
create=button=name=Aplicar,menutext=Aplicar Nova Data,text=Aplicar Nova Data,position=0
end global// Criado 22/11/2021 By João Antonio
global function form_load
dw_1.item.novadata.title=Nova Data Entrega
dw_1.modify=novadata.format="dd/mm/yyyy" novadata.edit.format="dd/mm/yyyy"
dw_1.modify=data_de_entrega.format="dd/mm/yyyy" novadata.edit.format="dd/mm/yyyy"
dw_1.item.novadata.tabsequence=1
end global// Criado 22/11/2021 By João Antonio
global function dw_1_item_novadata_itemchanged
sql=update beas_ftpos set lieferdatum ='<dw_1.item.novadata.value,yyyy/mm/dd>' where belnr_id = <dw_1.item.documento.value> and belpos_id = <dw_1.item.posição.value>
sql=update beas_fthaupt set LFGDAT ='<dw_1.item.novadata.value,yyyy/mm/dd>' where belnr_id = <dw_1.item.documento.value>
end global
// Criado 22/11/2021 By João Antonio
global function dw_master_item_button_Aplicar_click
AplicarNovaData()
global end
// Criado 22/11/2021 By João Antonio
global function AplicarNovaData
question=Aplicar e Recalcular as Novas Datas de Entregas?=yesfunction()=nofunction()
function yesfunction
for ll_loop=1 to <dw_1.rowcount>
object=ue_fert_struktur_browse=kapa_recalcorder=<dw_1.item.documento:[ll_loop].value>=<dw_1.item.posição:[ll_loop].value>
next
messagebox=ok$$Alterada <dw_1.item.documento:[ll_loop].value> ordem de trabalho. Operação concluída com sucesso!!!
return success
end function
global endRegards
João Antonio
-
Hi João Antonio
Thank you for sharing
regards
Martin
Please sign in to leave a comment.
Comments
6 comments