Is it mandatory to use Business object for data transfer and work flow?

<font size="3">
<pre>
In our enterprise projects we deal with some screens where we add or update some data and again
we retrieve that data and display to user in various ways like displaying on screen as
a report or viewing in excel etc.. Most of the times, though we identify the business objects
based on the nouns in requirements document, really while implementing there will not be any
business logic in the objects. Almost all the objects which we identfy as business objects
may have methods like add, delete, update and retrieve methods. Still in these cases, is it required to
have business objects or can we use transfer object to send the data for saving and retriving or any other
pattern/guideline is there for dealing such cases?
I really appreciate your comments on this topic.
Also I apologize ahead of time if my explanation is not clear to you.
</pre>
</font>
<p>
Thanks in advance.
<p>
Regards,
<p>
Rizwan.

In my opinion, DAO pattern would be suitable for you. Generally the DAO (Data Access Object) will have the CRUD (create, read, update, delete) methods to retrieve data from data-source (e.g. database). Based on the data it will create the DTOs (Data Transfer Objects) and pass them to the caller. It will also receive the DTOs from the caller and save it the data-source. Thus in your case you can
- remove the CRUD methods from the Business Objects (BO) and make them pure DTOs and use them with DAOs (If you are using JDBC codes inside your application and you don't have much of validation or processing logic in your BOs).
http://www.corej2eepatterns.com/Patterns2ndEd/DataAccessObject.htm
OR
- use BOs in combination in DAOs (if using the database connection from a pool and BOs are having complicated processing logic).
http://www.corej2eepatterns.com/Patterns2ndEd/BusinessObject.htm

Similar Messages

  • Using oDBDataSource.SetValue for date, price and percentage type

    Hi experts,
    I need to set value to db datasource for date, price and percentage type, below my code:
    oDBDataSource.SetValue("U_ItemPrc", offset, oDataTable.GetValue("U_ItemPrc", i))
    oDBDataSource.SetValue("U_Discount", offset, oDataTable.GetValue("U_Discount", i))
    oDBDataSource.SetValue("U_Data", offset, oDataTable.GetValue("U_Data", i))
                mt.Columns.Item("ItemPrc").DataBind.SetBound(True, "@TC_LIS1", "U_ItemPrc")
                mt.Columns.Item("Discount").DataBind.SetBound(True, "@TC_LIS1", "U_Discount")
                mt.Columns.Item("Data").DataBind.SetBound(True, "@TC_LIS1", "U_Data")
                mt.LoadFromDataSource()
    the column "U_ItemPrc" is a price with 5 decimals
    the column "U_Discount" is a percentage with 2 decimals
    the column "U_Data" is a date
    I get the three matrix column blank!
    How can I set value for these data type?
    please help me.
    Thanks
    Best regards
    Andrea

    I modified the source code following your suggestion but i still have the same problem with db table field with decimal and date.
    below the code:
    Dim oDBDataSource As SAPbouiCOM.DBDataSource = form.DataSources.DBDataSources.Item("@TC_LIS1")
                oDBDataSource.Clear()
                mt.Columns.Item("LineId").DataBind.SetBound(True, "@TC_LIS1", "LineId")
                mt.Columns.Item("ItemCode").DataBind.SetBound(True, "@TC_LIS1", "U_ItemCode")
                mt.Columns.Item("ItemName").DataBind.SetBound(True, "@TC_LIS1", "U_ItemName")
                mt.Columns.Item("TipoList").DataBind.SetBound(True, "@TC_LIS1", "U_TipoList")
                mt.Columns.Item("ItemPrc").DataBind.SetBound(True, "@TC_LIS1", "U_ItemPrc")
                mt.Columns.Item("Discount").DataBind.SetBound(True, "@TC_LIS1", "U_Discount")
                mt.Columns.Item("Data").DataBind.SetBound(True, "@TC_LIS1", "U_Data")
                mt.Columns.Item("ItemDesc").DataBind.SetBound(True, "@TC_LIS1", "U_ItemDesc")
                For i As Integer = 0 To oDataTable.Rows.Count() - 1
                    Dim offset As Integer = oDBDataSource.Size
                    Dim prezzo As Double = oDataTable.GetValue("U_ItemPrc", i)
                    Dim sconto As Double = oDataTable.GetValue("U_Discount", i)
                    Dim data As Date = oDataTable.GetValue("U_Data", i)
                    oDBDataSource.InsertRecord(i)
                    oDBDataSource.SetValue("LineId", offset, oDataTable.GetValue("LineId", i))
                    oDBDataSource.SetValue("U_ItemCode", offset, oDataTable.GetValue("U_ItemCode", i).ToString())
                    oDBDataSource.SetValue("U_ItemName", offset, oDataTable.GetValue("U_ItemName", i).ToString())
                    oDBDataSource.SetValue("U_TipoList", offset, oDataTable.GetValue("U_TipoList", i).ToString())
                    oDBDataSource.SetValue("U_ItemPrc", offset, oDataTable.GetValue("U_ItemPrc", i))
                    oDBDataSource.SetValue("U_Discount", offset, sconto)
                    oDBDataSource.SetValue("U_Data", offset, data)
                    oDBDataSource.SetValue("U_ItemDesc", offset, oDataTable.GetValue("U_ItemDesc", i).ToString())
                Next      
                mt.LoadFromDataSource()
    the prezzo variable store the correct value with decimal but executing the SetValue method I get the matrix column without decimal value.
    the data variable store the correct value but executing the SetValue method I get the matrix column blank.
    It seems the SetValue method works only for string field type.
    What can i do?

  • Azure Site Recovery to Azure - cost for data transfer and storage

    Hello,
    I send you this message on behalf of a small firm in Greece interested to implement Azure Site Recovery to Azure.
    We have one VM (Windows 2008 R2 Small Business Server) with 2 VHDs (100GB VHD for OS and 550GB VHD for Data) on a Windows 2012 server Std Edition.
    I would like to ask you a few questions about the cost of the data transfer and the storage 
    First: About the initial replication of the VHDs to Azure. It will be 650GBs. Is it free as inbound traffic? If not the Azure Pricing calculator shows about 57€. But there is also the import/export option which costs about the same:
    https://azure.microsoft.com/en-us/pricing/details/storage-import-export/
    What would be the best solution for our case? Please advice.
    Second: What kind of storage is required for the VHDs fo the VM (650GBs). My guess is Blob storage. For this storage locally redundant, the cost will be about 12-13€/month. Please verify.
    Third: Is the bandwidth for the replication of our VM to Azure free?
    That's all for now.
    Thank you in advance.
    Kind regards
    Harry Arsenidis 

    Hi Harry,
    1st question response: ASR doesn't support Storage Import/Export for seeding the initial replication storage. ASR pricing can be found
    here which details about 100GB of Azure replication & storage per VM is included with the purchase of the ASR to Azure subscription SKU through the Microsoft Enterprise Agreement. 
    Data transfer pricing
    here  indicates that inbound data transfers are free.
    As of now only option will be online replication. What is the current current network link type & bandwidth to Azure? Can you vote for the feature & update requirements here?
    2nd question response: A storage account with geo-redundancy is required. But as mentioned earlier with Microsoft Enterprise Agreement you will get 100GB of Azure replication & storage per VM included with ASR. 
    3rd question response: Covered as part earlier queries.
    Regards, Anoob

  • Business Objects(BOs) & Data Transfer Objects(DTOs)-both needed ?

    In a J2EE system...
    I know that "Business Objects" (BOs) are basically value objects (VOs) ...lots of getters and setters and some business logic. These are basically to model nouns in the system. Eg Student BO.
    I know that "Data Transfer Objects" (DTOs) are value objects (VOs)....with getters and setters... with the purpose of avoiding multiple method calls...to avoid overhead...which effects performance. eg it's better to pass a Student DTO then say...pass the student ID and student name and student age etc etc.
    Main question : Should a system have both ? If yes, why do I need a StudentBO.java and then another StudentDTO.java....when they are so similar ?...when both are basically VOs ? Can't I just use BOs to serve as DTOs ?
    Thanks.

    Hi,
    I've started using BO's and DTO's since 3 months .With my experiece i understand we nned both of them.
    The BusinessObject represents the data client. It is the object that requires access to the data source to obtain and store data.
    DTO
    This represents a Transfer Object used as a data carrier. The DataAccessObject may use a Transfer Object to return data to the client. The DataAccessObject may also receive the data from the client in a Transfer Object to update the data in the data source.
    From this i want to tell you that We are not gonna do any operation on BO's but we do operations on DTO
    Ashwin

  • ADO's Use with XML for Data Transfer

    Does anyone know if ADO is supported as a data transfer method
    between XML and Oracle8i and back (from Oracle8i and XML)? If
    not, are any other Microsoft drivers supported for this type of
    operation?
    null

    Hi there,
    I have a similar question for you: I have an ASP page (coded in vbScript) that connects to an oracle 9i database via ODBC and accesses data using ADO.
    Using this method I can read and write to the database successfully for all data types except that of XML Type.
    It is my understanding that a column of XML Type is fundamentally treated as a CLOB column underneath the covers. Then why can I write data to a CLOB column and not to an XML column using ADO methods??
    Here is the code I am using:
    'put my dom object into a variable
    Dim xmlDoc
    xmlDoc = objDom.xml
    ' Connection string
    Dim cnxn
    Set cnxn = Server.CreateObject("ADODB.Connection")
    cnxn.Open "dsn=sc3;uid=user;pwd=password;"
    ' Recordset object
    Dim rs
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open "Select * FROM xmltabletest", cnxn, 2, 2
    'write xml document to column of xml type
    rs.AddNew
    rs("xmlcol") = xmldoc
    rs.Update
    ' clean up
    rs.Close
    cnxn.Close
    Set rs = Nothing
    Set cnxn = Nothing
    Any help with this would be great. I'd also like to write the xml document to a table of xml type using the same/similar method.
    Can anyone help me please?!?
    Thanks in advance,
    Ari

  • How to use the API for DATE, MONTH  AND YEAR

    I would like to use the java api in .util.calender in the java api to get the date.
    How to implement the API for the "DATE","MONTH","YEAR" which are available provide by java?
    can someone give me in one complete code?

    From the Java Developers Almanac 1.4:
        Calendar cal = new GregorianCalendar();
        // Get the components of the date
        int era = cal.get(Calendar.ERA);               // 0=BC, 1=AD
        int year = cal.get(Calendar.YEAR);             // 2002
        int month = cal.get(Calendar.MONTH);           // 0=Jan, 1=Feb, ...
        int day = cal.get(Calendar.DAY_OF_MONTH);      // 1...
        int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 1=Sunday, 2=Monday, ...

  • Business object for FB50 or Fv50  transcation

    Hello All,
    When a transaction is processed in T-code FB50 or FV50
    a.     It can be directly posted if the transaction amount is less than 10000
    b.     The document has to be parked, and a workflow has to be created if  the amount exceeds 10000, a workflow has to be created and a mail should be sent to higher level (Manager) for approval . Manager should have the facility to edit the document and post it.
    please let me know the business object for FB50 transcation and any standard workflow template  for my scenario.
    Thanks,
    ram

    Hi JMB,
    i went to FB50 and i have given all necessary detail and when i click the park button or post (save)button workflow  not trigering, i have tested in swel and swels transcation.
    please let me know for my scenario when workflow will start i mean when the park the document or when post the dcoument.
    you have given  5 template but in  my scenario one approver is there ,please let me know which template i can use...
    please guide me..
    Thanks,
    ram

  • Business Object for Event trigering

    Hi All:
    I want to use Business Object for Event trigering so just wondering if anybody has detail steps required for it.I already looked at transaction SWO1 but I don't know all the required steps.
    I need to call a program/function to send data to external system when user changes following objects.
    1) Customer master
    2) Quote
    3) Contact
    Thanks in advance.
    Nilesh

    Hi nilesh
    you need to find the appropriate standard business object first . this can be don eby using event trace . switch on the trace by swe4 perform the required transaction and then display the trace in swel. if a standard object is there you will get it listed there with the event that got triggered when u performed the transaction.then u can eventually make a zcopy of it and use
    do let me kno if anything else is required
    regards
    ravish
    reward points is the best way of saying thanks in sdn
    Message was edited by:
            Ravish Garg

  • JPA - Best Practice For Data Transfer?

    I've been considering an alternative method for data transfer between applications, by using Serialized or Encoded to File JPA Entities. (either Binary or XML)
    I know this procedure may have several draw backs as compared to traditional exported SQL queries or data manipulation statements, however, I want to know if anyone has considered or used this process for data transfer?
    The process would be to
    - query the database and load the JPA Entities
    - Serialize or Encode them to file
    - zip up the entire folder with the JPA entities
    - transfer the data to destination machine
    - extract the data to a temp directory
    - reload the JPA entities by de-serializing and persisting them to the database
    The reason I'm considering this process, is basically because I have a desktop application (manages member records, names, dates, contributions, etc) used by different organisations in different locations (which are not related except by purpose ie clubs or churches) and would like to have a simple way of transporting all data associated with a single profile (information about a member of the organisation) from one location to another in a simple way, ie users interact only with the application without the need for any database management tool or such.
    I'm also considering this because it is not easy to generate an SQL Script file without using a dedicated Database Management Tool, which I do not want the application users to have to learn how to use.
    I would appreciate ANY suggestions and probable alternative solutions for this problem. FYI: I'm using a Java DB database.
    ICE

    jschell wrote:
    In summary you are moving data from one database to another. True
    You only discussed flow one way. Well the process is meant to be bi-directional. Basically what I envision would to have something like:
    - the user goes to File -> Export Profile...
    - then selects one or more profiles to export
    - the export process completes and the zip archive is created and transfered (copied, mailed, etc) to the destination location
    then on the destination pc
    - the user goes to File -> Import Profile
    - selects the profile package
    - the app extracts, processes and imports the data (JPA serialized for example)
    Flow both ways is significantly more complicated in general.Well if well done it shouldn't be
    And what does this have to do with users creating anything?Well as shown above the user would be generating the Zip Archive (assuming that is the final format)
    Does this make the problem clearer?
    ICE

  • Add datas to UDT using business objects

    Hi,
    How to add datas to user defined tables using Business Objects.
    Regards,
    M.Dhivya.

    Hi,
    Check for following provided bt SAP...
    Dim ret As Long
    d
    Private Sub Add_Table_Click()
        Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
        Set oUserTablesMD = oCompany.GetBusinessObject(oUserTables)
        ' When adding user tables or fields, use a prefix
        ' identifying your partner name space. This will
        ' prevent collisions from different partner add-ons
        ' SAP's name space prefix is "BE_"
        'Set the two mandatory fields
        oUserTablesMD.TableName = "T1"
        oUserTablesMD.TableDescription = "Table1"
        'Add the table (which contains 2 default, mandatory fields, 'Code' and 'Name')
        ret = oUserTablesMD.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Table: " & oUserTablesMD.TableName & " was added successfully"
        End If
    End Sub
    Private Sub Add_UDF_Click()
        Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
        Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
        oUserFieldsMD.TableName = "T1"
        oUserFieldsMD.Name = "AlbUDF"
        oUserFieldsMD.Description = "Albert UDF"
        'Add the field to the table
        lRetCode = oUserFieldsMD.Add
        If lRetCode <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table"
        End If
    End Sub
    Private Sub Add_Data_Click()
        Dim oUserTable As SAPbobsCOM.UserTable
        Set oUserTable = oCompany.UserTables.Item(1)
        oUserTable.GetByKey ("T1")
        'Set default, mandatory fields
        oUserTable.Code = "A"
        oUserTable.Name = "Albert"
        'Set user field
        oUserTable.UserFields.Fields.Item("U_AlbUDF").Value = "1"
        oUserTable.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
        End If
    End Sub
    Hope this helps,
    Vasu Natari.
    Edited by: vasu natari on Jun 12, 2009 11:21 AM
    Edited by: vasu natari on Jun 12, 2009 11:21 AM

  • Create a business object for a Maintenance object

    Hello,
    I want to create a business object for a maintenance object to change all XML attributes to XML elements.
    Should I have to change the whole XML Schema from attributes to elements one by one?
    For example, I create the business object CM_Person_BO for the maintenance object Person, and use the business object to add user in a more standard way.
    But it is a quite large job to rewrite the whole schema for the maintenance object Person, which has following elements, which are PersonIdentifiers, PersonNames, PersonPhones, PersonCharacteristics, Person and SeasAddress.
    Is there any easy way to do it?
    Thanks,
    Kerr

    Should I have to change the whole XML Schema from attributes to elements one by one?
    Is there any easy way to do it?Unfortunately not, you will have to define the schema containing each field/element, once. The primary objective is that you should create a scaled down version of the BO having only the required fields or subset of available fields, you may not need all the fields of a MO. This increases performance as the IO is performed only for specified fields in the BO.
    You can define separate Data Areas for each Person object's context, i.e. Identifiers, Names, Phones, etc. and include them (includeDA) within the Person BO (CM_Person_BO) for clarity.

  • Creation of Generic business Object for a standard transaction

    Hi,
    We have a requirement where we are depreciating the assets (standard transaction ABAA) using a custom BDC program. We need to maintain a history (called audit trail) for the particular asset that has been depreciated using this program. For this audit train we have been asked to use "Generic Business Object" in transaction code ABAA.
    Unfortunately, Generic object services are not available in this transaction code. Can you please suggest me how to create "Generic Business Object" for a particular standard transaction code. Also, we have show the details of custom workflow that follows the approval process in order to depreciate the asset. how to show this workflow details using Generic Business Object. This is a very critical issue, any help will be very help ful.
    Please let me know should you require more information on this topic.
    Thanks,
    Ashish

    this is already answered in the forum, and also explained in the sap library

  • Extract account Based COPA from R/3 using Business Object data services

    Hello,
    We have a requirement to extract Account Based COPA from SAP R/3 to Teradata using Business Objects data services.
    I have read couple of white papers which give information on Rapid Marts( which are built in packages) already available for some applications like inventory, GL, AP, AR etc. But I could not find anything for COPA.
    Would anyone give me any information on how to use BO data services for COPA?
    Also if there is no rapid mart available for COPA, does anyone know how to create custom data marts in BO Data services?
    Is there any document available on this?
    Please respond as soon as possible.
    Thanks.

    Hi,
    this forum is for the SAP Integration Kit. Would suggest you post your question into the EIM area for Data Services.
    Ingo

  • Business object for PO and SWOTICE entries

    Hi all,
    We've copied the standard business object for a PO - BUS2012 to a Z object to be used in a workflow. In one of the methods for this Z object, we've used BAPI_PO_CHANGE to block an item of the PO. As soon as the program was generated, under the object list of the transport request for these changes, some entries got created for table SWOTICE -
        BAPIADDRESS     
        BAPIEKET        
        BAPIEKKN        
        BAPIEKKOA       
        BAPIEKKOC       
        BAPIEKKOP       
        BAPIEKPOA       
        BAPIEKPOC       
        BAPIEKPOTX      
        BAPIESKLC       
        BAPIESLLC       
        BAPIESLLTX      
        BAPIESUCC       
        BAPIESUHC       
        BAPIMMPARA      
        BAPIRETURN      
        BAPIEKKO        
        BAPIEKKOL       
        BAPIEKPO        
        BAPIEKAN        
        BAPIEKBE        
        BAPIEKBES       
        BAPIEKES        
        BAPIEKKOTX      
        BAPIESKL        
        BAPIESLL        
        BAPIESUC        
        BAPIESUH        
        BAPIRLCOPO      
        BAPIRLGNPO      
    SWOTICE - index of frozen DDIC structures.
    What is the significance of this table and items? Why did they appear in the object list of the transport request when the program was generated?
    I checked these structures if they're a part of the BAPI_PO_CHANGE interface, but they're not.
    They were present in the main program for the original business object BUS2012.
    Could somebody throw some light on this?
    Regards
    Deepthi.

    These are internally related to BUS2012. When ever U copy to a Z object and generate the object, some of the objects which runs the object gets generated automatically in the transport list. These are as such needed for the program to work fine.

  • Need to use business objects with a project, please guide on basics.

    Hello
    I am a dotnet developer (asp.net with C#). I am sorry I dont know much about Business objects. Our client a financial firm wants to use Business object with a web based application. I couldn't got a clear and good understanding of Business object. The client just said Business objects allows dynamically creating reports even clients can create reports very easily even without knowing SQL.
    Kindly guide me about Business Object product and its what component I should check for using it. Please mention some links that can give me introduction.
    Thanks a lot,
    haansi

    Hi
    Business Objects is not just one tool. You should ask your client what they will use e.g. Crystal Reports or Web Intelligence.
    Here you can see half an hour Webinars that give you a good understanding of Business Objects:
    Webinars
    Regards
    Roland

Maybe you are looking for