PdcMaterialFile.CheckSourceFPart

From External Bemet Wiki
Revision as of 10:11, 28 January 2013 by TC (talk | contribs) (Created page with "== Declaration == CheckSourceFPart(strMatNr as String, booStock as boolean) as Boolean == Description == This function adjusts the sourcing strategy for materials in Fparts a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

CheckSourceFPart(strMatNr as String, booStock as boolean) as Boolean

Description

This function adjusts the sourcing strategy for materials in Fparts according to the input paramater booStock (preferably the value of LM_MAT.LM_VR).

Notes

When changing a material's stock strategy in PdC, user is presented with the option to adjust all Fparts the material is incorporated in. This function executes that functionality from vbScript.

Code example

Adjust a material's sourcing strategy.

Sub btn_SelectMatNrClick(Sender)
  edt_MatNr.Text = pdc.ChooseRecord(36, "", "")
End Sub

Sub btn_CheckSourcesClick(Sender)
dim booResult
dim booStock
  booStock  = (GetAnyField("LM_MAT", "LM_MATN", edt_MatNr.Text, "LM_VR") = "J")
  booResult = pdc.MasterData.MaterialFile.CheckSourceFPart(edt_MatNr.Text, booStock)
  msgbox "CheckSourceFPart = " & booResult
End Sub

Availability

Available since Jsnuary 2013 (4.3).