cancel
Showing results for 
Search instead for 
Did you mean: 

object type of distribution rules

Former Member
0 Kudos
209

hi friends          

i need object type of distribution rules plz reply soon 

regards 

thiya

Accepted Solutions (1)

Accepted Solutions (1)

silambarasan_rajendran
Active Contributor
0 Kudos

Hi Thiya,

            You mean  Loading Factor Object. It is 62. Try this it will help you

Regards,

Silambu

Answers (2)

Answers (2)

Former Member
0 Kudos

i want only object type of  distribution  rules

pedro_magueija
Active Contributor
0 Kudos

Hi Thiya,

Can you please elaborate on what you are trying to achieve?

Best regards,

Pedro Magueija

Former Member
0 Kudos

hi pedro

           like purchase order it is there  distribution rules CFL some like i want

Former Member
0 Kudos

hi pedro

            can u give me idea 

pedro_magueija
Active Contributor
0 Kudos

Hi Thiya,

Use ObjectType = "62".

I think this is the one you need.

Good luck,

Best regards,

Pedro Magueija

Former Member
0 Kudos

hi pedro

thanks  for reply i will try 

Former Member
0 Kudos

hi pedro

thanks  for lot.......................

regards

thiya

Former Member
0 Kudos

hi pedro

can u answer below post..

Distribution rules setup..

bcz this post is regarding this  post..

ho did you know the  62  is belongs to distribution rules..

Can u plz share your knowledge little bit here...

pedro_magueija
Active Contributor
0 Kudos

Hi Rachumallu,

You can cast the enum BoLinkedObject to an int and put it in a variable and check the value.

In this particular case I used the lf_LoadingFactors.

You can also decompile the dll and check the values in the enum.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

Thank u very much........pedro......

pedro_magueija
Active Contributor
0 Kudos

Hi Thiya,

I think the object you are looking for is actually a service:

oCmpSrv = oCompany.GetCompanyService()
Dim oDLservice As SAPbobsCOM.DistributionRulesService = oCmpSrv.GetBusinessService(SAPbobsCOM.ServiceTypes.DistributionRulesService)
Dim oDL As SAPbobsCOM.DistributionRule

' Add distribution rule
oDL = oDLservice.GetDataInterface(SAPbobsCOM.DistributionRulesServiceDataInterfaces.drsDistributionRule)
oDL.FactorCode = "1"
oDL.FactorDescription = "Desc 1"
oDL.InWhichDimension = 1
oDL.TotalFactor = 40

oDL.DistributionRuleLines.Add()
oDL.DistributionRuleLines.Item(0).CenterCode = "1"
oDL.DistributionRuleLines.Item(0).TotalInCenter = "10"

oDL.DistributionRuleLines.Add()
oDL.DistributionRuleLines.Item(1).CenterCode = "2"
oDL.DistributionRuleLines.Item(1).TotalInCenter = "30"


Try
    oDLservice.AddDistributionRule(oDL)
Catch ex As Exception
    MsgBox(ex.Message)
End Try

You can find this sample in the SDK Help. There is also a lot of extra info about the object there.

Hope it helps,

Best regards,

Pedro Magueija

Former Member
0 Kudos

hi fri

thanks for reply  i will try ...............