Skip to Content
avatar image
Former Member



i'm new to this SAP B1 SDK.....

was doing a sample project... and had to write the below code.

SAPbouiCOM.EditText oEditCustomerCode = (SAPbouiCOM.EditText).Items.Item(enControlName.CustomerCode).Specific;

But i cant get enControlName. Is that because i forgot to add any specific lbrary function or something. Pls help me with it.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Nov 22, 2017 at 01:45 PM

    Hi Royin Rufeesh,

    "enControlName" is nothing just a value type or you can say an struct. Here is how you can define it:

    private struct enControlName
        public const string Code = "3";
        public const string Name = "5";
        public const string ProjectCode = "7";

    Basically, the idea to use it is that you can have the unique ids of the items on the form in a struct and later you can reference it anywhere instead of repeating unique id everywhere.

    So now, you can use either one of the way:

    1. SAPbouiCOM.EditText oEditCode = (SAPbouiCOM.EditText).Items.Item(enControlName.Code).Specific;
    2. SAPbouiCOM.EditText oEditCode = (SAPbouiCOM.EditText).Items.Item("3").Specific;

    Hope it helps!

    Kind regards,


    SAP SME Support

    Add comment
    10|10000 characters needed characters exceeded