cancel
Showing results for 
Search instead for 
Did you mean: 

enControlName

Former Member
0 Kudos

Hi,

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.

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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,

ANKIT CHAUHAN

SAP SME Support

Former Member
0 Kudos

Thank you Mr.Ankit

Can you please explain what is this 3. is it the UID of EditText ?

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Royin,

Yes, you got it right.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Answers (0)