cancel
Showing results for 
Search instead for 
Did you mean: 

Hi all B1DE guide

Former Member
0 Kudos

can any body guide me to develop add-on using B1DE.

I download this from sap site but coding in that different than what given in sap b1 sample coding.

if any one wnat to share any coding with me that very useful for me.

thanks in adva.

Awaiting reply soon

raj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajkumar gupta

i think the bellow codes are help u to showing screen printer form.the adding data to the UDO are automaticaly done.

public static void Main() {

// SAPbouiCOM.Application SBO_Application;

int retCode = 0;

string connStr = "";

SAPbouiCOM.SboGuiApi SboGuiApi = null;

SboGuiApi = new SAPbouiCOM.SboGuiApi();

B1WizardBase.B1Connections.ConnectionType cnxType = B1WizardBase.B1Connections.ConnectionType.MultipleAddOns;

// CHANGE ADDON IDENTIFIER BEFORE RELEASING TO CUSTOMER (Solution Identifier)

string addOnIdentifierStr = null;

if ((System.Environment.GetCommandLineArgs().Length == 1)) {

connStr = B1Connections.connStr;

SboGuiApi.Connect(connStr);

SboGuiApi.GetApplication(-1);

System.Windows.Forms.MessageBox.Show("Connected");

}

else {

connStr = System.Environment.GetCommandLineArgs().GetValue(1).ToString();

}

try {

// INIT CONNECTIONS

retCode = B1Connections.Init(connStr, addOnIdentifierStr, cnxType);

// CONNECTION FAILED

if ((retCode != 0)) {

System.Windows.Forms.MessageBox.Show("ERROR - Connection failed: "+ B1Connections.diCompany.GetLastErrorDescription());

return;

}

// CREATE DB

if (((cnxType == B1WizardBase.B1Connections.ConnectionType.SSO)

|| (cnxType == B1WizardBase.B1Connections.ConnectionType.MultipleAddOns))) {

DocIndent_Db addOnDb = new DocIndent_Db();

addOnDb.Add(B1Connections.diCompany);

LoadFromXml();

}

// CREATE ADD-ON

DocIndent addOn = new DocIndent();

System.Windows.Forms.Application.Run();

//System.Windows.Forms.MessageBox.Show("hi");

}

catch (System.Runtime.InteropServices.COMException com_err) {

// HANDLE ANY COMException HERE

System.Windows.Forms.MessageBox.Show("ERROR - Connection failed: " + com_err.Message);

}

}

private static void LoadFromXml()

{

System.Xml.XmlDocument xmlDoc = null;

string sPath = null;

xmlDoc = new System.Xml.XmlDocument();

// sPath = "D:
SAP Project(Subhas)
VB Net 2005
DocIndent
DocIndent
SimpleIndentForm.xml";

sPath = System.AppDomain.CurrentDomain.BaseDirectory.ToString();

xmlDoc.Load(sPath + "SimpleIndentForm.xml");

string sXML = xmlDoc.InnerXml.ToString();

B1Connections.theAppl.LoadBatchActions(ref sXML);

B1Connections.theAppl.Forms.Item("SimpleIndent_");

}

Answers (0)