Skip to Content

SAP B1 System Form Modifying

Hi experts,

I want to modify Employee Master Data. To do it i have get the form to SAP Businees One Studio, added a tab folder,items and created a .srf file.

Now I want to show that my modified system form in the SAP B1.

 public static void createSystemFormStudio(string fileName)
        {
            System.Xml.XmlDocument oXMLDoc;


            oXMLDoc = new System.Xml.XmlDocument();
            oXMLDoc.Load("../../" + fileName + ".srf");


            SAPbouiCOM.Framework.Application.SBO_Application.LoadBatchActions(oXMLDoc.InnerXml);
        }
 

I used this code but it gives me an error that

"Additional information: Form - Reserved / Illegal form Unique ID. Form Unique Id : 'F_21'" .

How can i solve this issue.

Thanks for your helps.

Regards.

Ahmet

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 02, 2017 at 12:02 PM

    Hi Ahmet,

    You can do this:

    Edit system form in B1 studio.

    Then export your change as an Update Part.

    After this you can use this new xml part in your add-on with a code like this: (just a sample)

    private void SBO_Application_ItemEvent( string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent ) 
    {
    	BubbleEvent = true;
                
            if ( pVal.FormType == 60100 & pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD && pVal.Before_Action == true ) 
            { 
            	oOrderForm = SBO_Application.Forms.GetFormByTypeAndCount( pVal.FormType, pVal.FormTypeCount );
     
                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD && pVal.Before_Action == true)
                    {
                        UpdateFormByXML("yourPartXml.xml", pVal.FormUID);
                    }  
    	} 
    } 
     
    private void UpdateFormByXML(string sFileName, string sFormUID)
    {
    	try
    	{
                    string sXPath = "Application//forms//action//form//@uid";
                    string sPath = System.Environment.CurrentDirectory + "\\";
     
                    XmlDocument xDoc = new XmlDocument();
     
                    xDoc.Load(sPath + sFileName);
     
                    XmlNode xNode = xDoc.SelectSingleNode(sXPath);
                    xNode.InnerText = sFormUID;
     
                    string sXML = xDoc.InnerXml.ToString();
     
                    SBO_Application.LoadBatchActions(ref sXML);
    	}
    	catch (Exception ex)
    	{
    		SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, true);
    	}
    }
    

    P.S: This code above was provided by Owen Slater in this topic: https://archive.sap.com/discussions/thread/827583

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 02, 2017 at 02:25 PM

    Hi Diego,

    I did your suggestion, i created a button, tab folder and items for the tab that named "Bordro".

    when i run my addOn

    Button is shown but tab folder not.

    How can i shown my tab folder in system form.

    Thanks for your helps.

    Regards.

    Ahmet

    Add comment
    10|10000 characters needed characters exceeded