cancel
Showing results for 
Search instead for 
Did you mean: 

Formatted Search - Auto Refresh

Former Member
0 Kudos

Hi, all,

I have a formatted search which formula is LineTotal = Qty * Price.

When user modify Qty or Price, I would like the LineTotal Auto-Refresh.

However, I can only set Auto Refresh when either "Qty" or "Price" is changed.

Any suggections?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

If pVal.Formtype="sss" and pVal.BeforeAction = True And pVal.InnerEvent = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE Then

Select Case pVal.ItemUID

Case "3" 'Matrix ItemUID

Select Case pVal.ColUID

Case "11", "14" 'Qty Col and Price Col

oMatrix = SBO_Application.Forms.Item(pval.formuid).Items.Item("3").Specific

oEdit = oMatrix.Columns.Item("11").Cells.Item(pval.row).Specific

Dim Qty as Double=oedit.value

oEdit = oMatrix.Columns.Item("14").Cells.Item(pval.row).Specific

Dim xyz

xyz = Split(oEdit.Value, " ", -1)

dim Price as double=cdbl(xyz(1))

oEdit = oMatrix.Columns.Item("21").Cells.Item(pval.row).Specific

oEdit.value=Qty*Price

End Select

End Select

End If

regards,

varma

Edited by: Varma on Oct 6, 2008 11:41 AM

Former Member
0 Kudos

thank you very much.

this sample code is very helpful.

Answers (2)

Answers (2)

Former Member
0 Kudos

When qty or price is changed, then is changed document total as well, so you can link the FS to doc. total field and recalculate all lines in document.

Former Member
0 Kudos

hi,

you have only one field to select as refresh.No, other way if u r using FMS.

but, u can do through coding.

regards,

varma

Former Member
0 Kudos

thanks for your reply.

I would like to do it through coding.

would you please give me a simple sample code?

thanks