Skip to Content
avatar image
Former Member

DI enum and String definition

Hi all,

I have a question on "How to" and best practice...

There are several enum like SAPbobsCOM.BoResolutionUnits.rsu_Days and the Table Result is "D", or "H" - hours..

that means the Object it self SAPbobsCOM.ServiceContracts oCT

need to have a Value like oCT.ResolutionUnit = SAPbobsCOM.BoResolutionUnits.rsu_Days;

But where is the conversion to Days? is there a dictionary available or a table ?

And if I like to use this in a user form... I have to convert this from Combobox valid values to excepted enum...

So the question is, where are the valid values stored? And are there any standard functions available for conversion? Or just C# normal ways...

putting the Valid Values into a list or dictionary and retrieve this with a getenummerator?

Thanks for any input.

Best regards

Oliver


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Oct 27, 2015 at 01:16 PM

    Hi Oliver,

    you will find the enum values in SDK Help or in Visual Studio "Go To Definition ( F12 )", BUT this is not giving you the real mapping ( 0 = 'D' , 1 = 'H' ).

    You can have a look in "Database Documentation" ( through SDK Help or REFDB.chm ) and get the valid values ( constraints ) for the specific field - imho they are in the order of the enumeration.

    This is not ideal....

    regards,

    Maik

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Maik Delly

      Hi Mark,

      yes I know this ... i can't believe it.... see some tables... like SXRET (SBO_Common) and there is a part describing a table... but I do not find the Table in DB.... this is something that I'm looking for...

      but anyway I couldn't believe that it is hardcoded... there are language files... etc... but i don't know where the Metatables are located... and how to get them...

      Best Regards.

      Oliver