Returning Business Objects to View?

All,
I was just in a meeting where two different approaches to returning data to the view were discussed.
In a nutshell, here are the two options presented:
1) The service layer should return the Business Entities entirely (which happen to be Hibernate objects).
2) The service layer should return an object thats specific to the process at hand and contains only the data needed for that process.
We will have multiple clients invoking the service both remote, and local.
My preference is to go with option 2.
What are your thoughts?
Thanks in advance,
KL

If you had not mentioned the words "Hibernate object", I would have been agnostic. However, IMO, these should be considered persistence tier objects. While there is a 'lazy-load view' pattern, there is also much discussion as to whether this is a good idea. For example, if I call a getter on a Hibernate object within the view, it may invoke a complex series of database operations to fetch a graph of dependent child objects.
IMO, it is the responsibility of the controller to ensure that the view has all model data required to render properly.
There is one further point to consider, only tangentially related to your original topic. Hibernate objects, generally, will correspond more strongly to the persistence scheme than the actual ideal OO model you might have designed separately. True, for the vast majority of model->persistence mappings, this will be 1 to 1. However, for the 20% of the system where this is not the case, you really do want to use a full-fledged model object.
So, couple with what, to me, is dangerous--having a view implicitly lazy-load data--with the fact that a HIbernate 'object model' is really more of a 'table-model', I would advise against option #1.
- Saish

Similar Messages

  • Get information about business object from view implementation class

    Hi,
    i´d like to develop some button behavior in a view. How can i get the information of the related business object like the order or the position. I like to disable buttons if specific status are set.
    Bye Richard

    hi,
    Is needed field available in context nodes or not?
    for example:
    If you want to read STATUS_DESCR attribute from the context node SELECTEDDOC , then code like this
    lr_selected ?=  me->typed_context->SELECTEDDOC->collection_wrapper->get_current( ).
    if lr_selected is bound.
      lv_status = lr_selected->get_property_as_string( 'STATUS_DESCR' ).
    endif.
    activtae the debugging in IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS method and check the values for context nodes and attributes.
    I mean debugging for:
    me->typed_context
    me->typed_context->SELECTEDDOC
    comp_controller
    regards
    ismail

  • SAP/Business Objects Presort Views - Sneak unique information aboard?

    I would like to know if there is a way to assign/include a unique sequence range + tray tags/container/pallet information during presort on each record?
    - Stephen
    Edited by: Kendra Vangundy on Nov 4, 2009 11:44 AM - please do not include phone numbers on the forums - thanks!

    Stephen,
    Here are the basic steps for setting up the IM Barcode in Presort. 
    VIEWS:
    Open the Presort job
    Double-click Execution Options
    Click Generate Intelligent Mail Barcode Data
    Click OK
    Expand Version Setup
    Double-click Version Description
    Click IM Barcode
    Fill out the Mailer ID, Serial Start Number, Serial Maximum Number, and Service Type
    Click OK
    Repeat Steps 5-9 for each version description if necessary
    Double-click IM Barcode Information
    Fill out IMB Pallet Numbering (if palletizing) and IMB Tray/Sack Numbering - Serial Start and Mailer ID
    Click OK
    Expand Output File Setup
    Double-click the Create File for Output for the address output file
    Add one or all of following fields for the address output file:
    IMB_ADR (length 31) - Contains the 31-digit number for the IM barcode.
    IMB_ADR_EC (length 65) - Posts the encoded barcode in all upper case to the address output file.
    IMB_ADR_AC (length 65) - Posts the encoded barcode in mixed case to the address output file. The 2nd, 4th, 6th and so on characters are lower case. This field should only be used if your printer supports alternate casing.
    Click OK
    Edit the Container and Pallet Output File blocks by adding the following fields
    IMB_TRYSCK (length 24) - Contains the 24-digit number for the Tray/Sack IM barcode and is only available for the container output file.
    IMB_PLT (length 21) - Contains the Pallet IM barcode only for pallet output file.
    IMB_RTAUTO (length 24) - Posts the route or auto information to the container output file. For carrier route direct trays, this field outputs the carrier route code for the pieces in the tray. For all other trays, if the pieces within the tray are barcoded, the field output would be "AUTO".
    Click OK
    Double-click Address Output File posting block
    Click Post Data
    Add the fields from step 16 by clicking Auto Assign or manually adding them under the Output Database Fields section
    Click OK
    Add the fields from step 18 to the Container and Pallet posting blocks
    Click OK
    JOBFILE:
    Open the .pst file in an editor
    Go to the Execution block
    Set the IMB Intelligent Mail Barcode to Y
    Go to the Version Description block
    Enter the IMB Mailer ID, IMB Serial Num Start, IMB Serial Num Max, and the IMB Service Type code
    Repeat step 4 and 5 for each version description block if necessary.
    Go to the Intelligent Mail block
    Enter the IMB Pallet Mailer ID, IMB Pallet Serial Num Start, IMB Tray/Sack Mailer ID, and IMB Tray/Sack Serial Num Start
    Go to the Create File for Output block for the Address Output file
    Add one or all of the following fields:
    IMB_ADR (length 31) - Contains the 31-digit number for the IM barcode.
    IMB_ADR_EC (length 65) - Posts the encoded barcode in all upper case to the address output file.
    IMB_ADR_AC (length 65) - Posts the encoded barcode in mixed case to the address output file. The 2nd, 4th, 6th and so on characters are lower case. This field should only be used if your printer supports alternate casing.
    Example:  Field (name, length, type[,misc])u2026u2026 = IMB_ADR,31,c
    Go to the Address Output File block
    Add the posting information
    Example:  Copy  (source,destination)u2026u2026u2026u2026 = AP.IMB_ADR, IMB_ADR
    Repeat steps 9-12 for the Container and Pallet Output File by adding the following field(s):
    IMB_TRYSCK (length 24) - Contains the 24-digit number for the Tray/Sack IM barcode and is only available for the container output file.
    IMB_PLT (length 21) - Contains the Pallet IM barcode only for pallet output file.
    IMB_RTAUTO (length 24) - Posts the route or auto information to the container output file. For carrier route direct trays, this field outputs the carrier
    Thanks,
    Kendra

  • Mapping in interconnect between different Business Objects

    I want to know how to do transformation and mapping between different business objects in interconnects.
    Always,We have a very complex SQL,when We do intergration
    with Oracle interconnect ,We use DB Adapter or Jdbc Adapter,but the complex SQL have to be excuted in the resource DB or the destination DB which may be a big pressure to them ,I think can We use different Business Objects, and do the Mappings in interconnect,so the big pressure will be on the interconnect server just like the ETL tools, But I just find that Interconnect can do tranformation and mapping in one Business Object ,how can I do? Is anyone meet this problem like me ?thanks for discussion.

    For me, Business Objects are logical groupings of business processes. For example, we have a Business Object called "Maintain_Employees". Under this we have 1 Procedure (Create_Employee) and 2 Events (Update_Employee and Delete_Employee).
    We have 1 Oracle system interfacing with 23 other legacy systems. Some of these legacy systems will be using this "Maintain_Employees" Business Object (Common View), and our main transformations will be between the Common View and the legacy Application Views.
    We are using a number of techniques to assist in "validating" data in the InterConnect. The main ones are using 'Cross Reference Tables (XREF)' and 'DatabaseOperation' transformations. By using 'Content Based Routing' we are able to send the right message to the right legacy system, and therefore do the right transformation/validation on the message payload. However, this is only a small part of a complex puzzle.
    I also have the "problem" of having "very complex SQL" on our Oracle system too. This is not unusual when using the InterConnect.
    To my mind, the InterConnect does 2 main operations. Firstly, it performs some message transformation (mapping), and secondly, it acts as a transportation engine (routing) using the adapters.
    The remainder of the effort required to create or consume the message resides with the Applications themselves. Whether it is parsing an XML CLOB payload, inserting data into staging tables, writing to log files, pre-processing data, calling API's or something else, your Application side programming and processing overhead can get large.
    The trade off it to ask the question, do I want to be able to track and manage messages from start to finish in high detail? Or can I trust that all message payload data will be consumed with no additional processing on the Application side?
    My experience has shown that the bottleneck is always at the Application side, and almost never in the InterConnect.
    The short answer to your first question is "You are right. Mappings can take place only between Application Views and Common Views only - not between Business Objects.".
    To answer your second question "Probably everyone reading this forum has this problem. The intelligence that is able to really interpret message data, validate it and process it is only found in the Application, not the InterConnect. You could, however, use the Workflow engine within OAI in order to provide additional pre-validation, human interaction and logic, but this too could be complex."
    At my current client, we are architecting an Application OAI Message handling schema. This will contain staging tables, pre-processing tables, "OAI" wrapper PL/SQL scripts, "APPS" wrapper PL/SQL scripts and Message Logging and Exception tables. Ours will be a complex set of PL/SQL processes too.
    I hope this helps, just in letting you know that you are not alone with this problem.
    I wonder if anyone else would like to share how they have architected their InterConnect and Application side mapping and transformation solutions.

  • Business Objects is not returning all rows from Query

    We set the rowcount to 1000000 and the business objects query only returns 16,960 rows.  We then uncheck the limit for the rowcount and the first run of the query returns 65,535.  The subsequent run of the query returns all the rows which is greater than 65,535.  We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set.  What would be causing the rowcount to be reset and how can it be fixed?

    We set the rowcount to 1000000 and the business objects query only returns 16,960 rows.  We then uncheck the limit for the rowcount and the first run of the query returns 65,535.  The subsequent run of the query returns all the rows which is greater than 65,535.  We are on release 6.1A of business objects and selecting from Microsoft SQLServer 2005 in 2000 compatablility mode. We noticed that the rowcount being sent to SQLServer is replacing the set number with the 65,535 the first time the query is sent and subsiquent queries have the correct rowcount set.  What would be causing the rowcount to be reset and how can it be fixed?

  • Business Objects XI R2 Viewer Change viewer mode.

    How to i make the crystal report viewer control use a control other than the DHTML control when viewing reports? It always comes up as the DHTML viewer, how do i make it use the java, or activeX control? changing the default viewer preferencein the users enterprise logon does not work like it did in CR 10.
    This is when viewing a report from the crystal enterprise Viewer.

    Since this issue occurs "when viewing a report from the crystal enterprise Viewer." and as per the header at the top of this forum:
    "This forum is dedicated to development and deployment of .Net applications that connect and interact with BusinessObjects Enterprise, BusinessObjects Edge, or Crystal Reports Server. This includes the development of applications using the BusinessObjects Enterprise, Report Application Server, Report Engine, and Web Services SDKs".
    I will transfer the query to the Business Objects Enterprise Administration forum:
    BI Platform
    Ludek

  • Examples for RAS/BOE/Viewer SDK for Business Objects XI 3.1 (12.0)

    Hi, I am a newbie in Business Objects.
    I am trying to find some examples on how to view reports on separate Application server (JBoss) and retrieve reports from Business Objects server. Us I understood from forums/guides I need to use Viewer SDK or (BOE/RAS SDK).
    However I cannot find any examples for above mentioned SDKs to start from something.
    OIne of the places I came across is here: http://devlibrary.businessobjects.com/businessobjectsxi/en/en/Viewers_SDK/default.htm indeed it is only for v11, as well as others places I came across.
    Can anyone guide me with this?
    Thank you!

    Hello.
    Java samples can be found at the following location:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsSDKSampleApplications
    Specifically, Business Objects Enterprise (including the Viewers SDK) samples can be found at the following location:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaBusinessObjectsEnterpriseSDKSamples
    RAS SDK samples can be found at the following location:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaRASSDK+Samples
    Hope this helps.
    Regards.
    - Robert

  • Two Business Objects to fill a Data Grid/table using Anchors?

    Hi,
    I have a SAP standard tile were a table (grid) is filled by an Business Object. I want to add an additional column and retrieve the value from another Business Object.
    My questions
    1) Can I use Anchors to automatically set the relationship between two Business Objects A & B, so that I can just Drag & Drop an additional field from Business Object B to the DataGrid of Business Object A in the design screen without writing additional code?
    2) Some BO's do come with a predefined relationship to other BO's, but in the case of I have to write a supply function do I have to use a specific "Data Source Type" such as "Business Object", "BusinessQuery" or "Business CollectioN"?
    3) I already tried to write a supply function, but I realized that the system does return for some BO's or BS's a object instance, if I call "gFactory.newBusinessQuery". Is there any logic/restriction behind?
    I know I can use RowLoaded2 and a unbound column, but I want to know if this approach is also possible?
    Thank you for any help,
    Regards,
    Andreas

    Hi Andreas,
    The answer to your question is YES. You can very well do it without any changes at the code level.
    The scenerio can be implemented using a concept called JointField Mapping in MAS.
    Scenerio 1 :
    If you want to display the extra field from another BO in a list tile on the click of a search button from the search tile , then
    Please do the following :
    1. Select the Busines Query that you have associated to the search tile and go to properties from the View Designer.
    2. In the properties, Click on the Joint Field Mapping and select the BO where the extra field id present and select the primary key, Segment Field associated, (extra field)BO Property that you want to display in the list tile.
    2. Add a new control (new Field) in the List tile - ie, From the Toolbox (Tileset COntrols).
    3.Go to properties of the newly added control. Associate the anchor as the same achor as the list tile was pointing to earlier. for eg : Y_BOCAPGEN.
    4. Then Go to BCOLFieldName property and give the property name as the newly added BO property name(New field).
    After everything is modelled, You will be able to see the extra field in your application!!!!
    NOTE : Ofcourse, After the Successful generation.
    Scenerio 2 :
    If you want to display an Extra Field in a Detail tile,
    1. Go to Relationship of the BO from the Detail tile and go to properties.
    2. In the properties, You can find the Joint Field Mapping porperty.
    3. This property is again modelled as explained in scenerio 1.
    Hope, It would have definetly helped and answered your query.
    Have a good day!!
    Best Regards,
    Vignesh Ravikumar.

  • Crystal reports / business objects - RAS timeout issue

    Hi,
    I am experiencing a problem in my Java application in viewing a report generated by Crystal Report. Let me start off by saying I'm not entirely sure that the problem is with Weblogic, but at the moment it seems likely to be.
    The Java app uses the RAS in Business Objects to get/display a report. There is a timeout setting on the RAS server and once this has elapsed, the next request from the Java web app causes a timeout error. Code in the Java app handles the timeout and makes a new connection to the RAS and displays the report (the error and re-connection is all seamless to the end user).
    This was all working fine until recently when the server was upgraded from Windows 2000 to Windows 2003. Now when the Java app makes a request after the timeout has elapsed there is no error returned and instead the process continues and a blank page is shown on the web page.
    On the Business Objects side of things, one of the log files states a "received invalid request" message which seems to indicate the Java app is sending it something unrecognisable. So my question is, are there any known issues with Weblogic server under Windows 2003 that could be causing this problem? I'm running version 8.1 SP3.
    Since the problem has arose I've tested the Java app on a Windows 2000 and Windows XP environment (both 8.1 SP3) and the timeout occurrance and handling works as expected. I've raised a support request with Business Objects but from previous experience I know they will take a while to respond. So any help about this from you guys will be much appreciated.

    Hi,
    I am experiencing a problem in my Java application in viewing a report generated by Crystal Report. Let me start off by saying I'm not entirely sure that the problem is with Weblogic, but at the moment it seems likely to be.
    The Java app uses the RAS in Business Objects to get/display a report. There is a timeout setting on the RAS server and once this has elapsed, the next request from the Java web app causes a timeout error. Code in the Java app handles the timeout and makes a new connection to the RAS and displays the report (the error and re-connection is all seamless to the end user).
    This was all working fine until recently when the server was upgraded from Windows 2000 to Windows 2003. Now when the Java app makes a request after the timeout has elapsed there is no error returned and instead the process continues and a blank page is shown on the web page.
    On the Business Objects side of things, one of the log files states a "received invalid request" message which seems to indicate the Java app is sending it something unrecognisable. So my question is, are there any known issues with Weblogic server under Windows 2003 that could be causing this problem? I'm running version 8.1 SP3.
    Since the problem has arose I've tested the Java app on a Windows 2000 and Windows XP environment (both 8.1 SP3) and the timeout occurrance and handling works as expected. I've raised a support request with Business Objects but from previous experience I know they will take a while to respond. So any help about this from you guys will be much appreciated.

  • Monitoring changes in Oracle Database with Business Objects

    Hi: I need to know if there is a Business Objects tool that allows me to be constantly checking one Oracle database to see if there are changes. The customer is not permitted to access the database, only has enabled a stored procedure that returns a string value if there are changes or not. That string (XML) is performed by DataServices later with BO to generate something. I would like to know if there is any product of BO (Data Integrator, etc ...) that allows me to take an active process of consultation on the Stored Procedure and that the consultation is launched every 10-15 seconds.
    Thanks in advance
    Santi

    Yes I am using Generic ODBC connection and it goes fine till the authentication even it is showing me schema tables, but when I try to fetch any table columns or try to view table values it goes stuck or give me error.
    Can you please guide me in detail how I can turn off advance features and what values should I put in Array Size, etc.
    Regards,
    Danish Baig.

  • DTO, Business Objects and architectural layers design

    Hi everybody,
    What would prevent one from using Business objects (properties + getters/setters and bevaviour related to a business entity) thru all tiers of a J2EE Web application ?
    Example : DAO layer populates BO properties, Business layer uses BO behaviour , web layer stores BO in some scope (request,session,...) for view presentation of the BO properties.
    Compared to a DTO/VO (only properties, no behaviour) solution :
    - If the application is distributed the BO solution adds serialization overhead (possibl performance bottlenecks) if BO's are large objects.
    - If there is requirements for clustering , storing large BO's in session adds session replication overhead.
    - BO solution breaks layer isolation , but practically speaking what could be the consequences of it ?
    - Some BO properties need formatting for text deiting by the views and cannot be displayed as is.
    - BO solution is a more OO approach than using only data objects
    What other arguments can you think of ?

    "Session" data applies to the session. Thus when I
    order a book and it is added to my shopping cart the
    session data might be used to store that information.
    But that data in of itself is not a "business
    s object". It is, by definition, session data.Ok conceptually speaking it is session data, but from
    a technical point of view you need an Object instance
    of some sort to hold that data.No actually you don't.
    There are a number of ways to maintain session data. With tradeoffs between each.
    What I was talking about (which does not mean I think
    It is a good idea...) is using the BO properties for
    holding that data and storing the BO instance(s) in
    the session.
    And I still don't see that this is a "Business Object". No more so than a security key is a "Business Object".
    The best term is session data and you might have different groupings (data not behavior) within that.
    Exactly what behavior do you envision?Any computational behaviour that uses the BO
    properties and is needed to implement a use case.
    This behaviour is used to calculate data that is not
    persisted by the DAO as is but rather computed from
    m other persisted data.
    Give me an exact example.
    For example it would be quite reasonable to have a DTO that represents a "rectangle" and that DTO would have a height and width and the DTO would have a method that return the area (multiplying the two data points.)
    Conversely my previous example of the zipcode, the DTO should NOT have a method to validate that the zipcode exists although it could validate that it has the correct form (5/9 digits in the US.)
    The problem is coupling. If the BO needs the
    database layer (see the zipcode example above) then
    the GUI layer is going to need the database layer is
    well. Even though the GUI will never use the
    database layer.I understand that this coupling applies to
    distributed architectures where you package your
    applications in different jars/wars/ears. In this
    case If BO's ared used thru all layers, The GUI
    (web) layer needs the data access layer jars even if
    it will never use it.
    This clearly adds coupling.
    But in the case of a collocated application (a single
    war) it does not change anything.
    No. The point is not how the application is architected.
    The point is that the GUI layer is then dependent on the database layer internals.
    Consider another example, the DTO is produces a formatted xml string using a XML library. Now you need to create the database layer for the system. The database layer does not need the XML at all. And yet just to compile the database layer you are going to have to provide the XML library. This represents coupling that serves no purpose. And although in very small projects it might be convienent in larger projects coupling like that will cause problems and confusion.
    And? Are you suggesting that the BO should do the
    formatting?No I mean that DTO/VO's could have either text
    formatting/editing methods or property types (e.g
    String formatted property for a date) that facilitate
    the work of the presentation layer. And most of the time that is going to be incorrect.
    "Formatting" for a web page is likely to be different than for a printed report. And for a backend system it might need XML which is still a different format. Adding all of that to the DTO is not the way to do it. (In the same way that the database and gui code should not be intermixed.)
    I would not put
    any similar formatting behaviour in the BO. That's
    why I consider this issue while comparing BO and
    DTO's
    - BO solution is a more OO approach than using only
    data objects
    No it isn't.
    An object that prints itself is not more OO than one
    that is printed.
    I thought one of the purpose of OO programming was to
    group behaviour and dataCertainly, but it doesn't mandate that one form of grouping is better than another. After if that was the sole concern then why not have just one object for the entire application - that is one way to "group" it.

  • CRM Business Object BUS1006005 Not Showing In LSMW Object List

    I am trying to use Bus. Object BUS1006005 in an LSMW using BAPI.  I noticed that I need to generate an ALE interface for the object before LSMW can use it.. Can someone please help me with this?  When I drop-down on Business Object in LSMW Attributes, this object does not show on the list, however I noticed that Bus. Objects with ALE Message Types do show up.
    Kind Regards,
    Jason

    IDOC Type:It is the Structure and format of the data that is to be exchanged
    see the EDBAS table
    MESSAGE TYPE: Determines and Processes the various outputs associated with an application document . Mostly used in SD and MM modules
    See the EDMSG table
    see the link for LSMW-IDOC
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    LSMW-BAPI
    Step-by-Step Guide for using BAPI in LSMW
    Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.
    Introduction:
    This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.
    Pre-requisites:
    It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.
    Step-by-Step Procedure:
    Details of the BAPI used in this scenario:
    Business Object: BUS2012
    Method: CreateFromData
    Details of Message Type and Basic IDoc Type:
    Message Type: PORDCR
    Basic IDoc Type: PORDCR02
    Let’s have a look at the BAPI first, before proceeding to the LSMW:
    1. Go to Transaction BAPI
    2. Click on Search Button
    3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”
    4. Press ENTER
    5. Following screen appears:
    6. On the left side of the screen, Expand the “PurchaseOrder”.
    7. Select “PurchaseOrder” and double-click on the same for details.
    Building LSMW using BAPI:
    1. Go to Transaction LSMW.
    2. Enter the Project, Subproject and Object information and click on CREATE.
    3. Enter the descriptions for Project, Subproject and Object.
    4. Now select Settings à IDoc Inbound Processing
    5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:
    6. Click on “Activate IDoc Inbound Processing”.
    7. Click on “Yes” when prompted for “Activate IDoc Inbound?”
    8. Hit on “Back” to return to the main screen.
    9. Click on Continue (F8). Following Screen appears:
    10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.
    11. Select the radio button “Business Object Method” and enter the following details:
    Business Object: BUS2012
    Method: CreateFromData
    Hit ENTER
    12. Save and click on BACK button. Following information message is displayed.
    13. Now select step 2 “Maintain Source Structures” and click “Execute”.
    14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
    Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:
    Select “Lower Level” and click on Continue. Enter the Item data structure name.
    Click Save and hit BACK button to go to the main screen.
    15. Select step 3 “Maintain Source Fields” and hit execute.
    16. Enter the fields as shown below:
    17. Click SAVE and return to main screen.
    18. Select step 4 “Maintain Structure Relations” and click Execute.
    Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
    Select HEADERDATA and hit ENTER
    Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
    Click Save and return to main screen.
    19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:
    20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
    Save and return to main screen.
    21. Select the step “Assign Files” and click on Execute.
    Assign the file provided to the source structure. Here the same file is provided for both the structures.
    Save and return to the main screen.
    22. Select the step “Read Data” and click on Execute.
    Click on Execute.
    Return to the main screen.
    23. Select the step “Display read data” and click on execute.
    Click on the structure name to get the field level values.
    24. Return to main screen and now select “Convert Data”.
    25. Return to the main screen and select “Display Converted data”.
    26. Return to main screen and select “Start IDoc generation”.
    27. Now select the step “Start IDoc Processing” on the main screen.
    28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed
    It is given in screen shot.
    http://www.****************
    LSMW-IDOC
    see this and do accordingly
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    Go through the steps
    Hi please go through the following steps for IDOC method
    Step 1. Run the transaction ( /nlsmw ) you will reach to the screen
    Here you have to specify
    Project : 060_BUS_TRANS
    Subproject : SERVICE_TICKET
    Object : SRV_TICKET_ZSVT
    click on the execute button .you will reach the screen :
    The screen shows the 15 steps to Run the lsmw
    Step 2) select the first step ( Maintain object attributes) and click the execute button.After clicking on the execute button you will reach at. the screen
    Here you have to specify ( MEssage type and basic type)
    click on the BACK button
    Step 3) select the 2nd step ( Maintain source structures) and click the execute button
    Here you have to specify the source structures.
    Step 4) Select the 3rd step ( Maintain source fields) and click on the execute button :
    Here you have to specify the fields present in the source structure
    Step 5) select the 4th step ( Maintain structure relationship ) and click on the execute button :
    Here you have to specify relationship between source and target structures
    Step 6) select the 5th step ( Maintain field mapping ) and click on the exécute button :
    Here you have to map the fields between source and target structure. Also you have to apply conversion rules here if any
    STEP 7) select the 6th step and click on the exécute button
    Here you can define any fixed value or user define routines
    Step 8) select the 7th step ( Specify files) and click on the exécute button :
    At This screen we have to specify the files for This we should be in change mode .So please click on the button shown in the above screen. After clicking on This button you will be in change mode and will be able to specify the files :
    Step 9) select the 8th step ( Assign files) and click on the exécute button
    For assigning files yoy should be in change mode do the same thing click on the button as shown in the above screen :
    Then assign the files to different structures.
    Step 10 ) select the 9th step ( Read Data) and click on the exécute button :
    After clicking on the exécute button you will reach to the screen
    Again click on the exécute button . After clicking on the exécute button you will reach to the next screen
    Here you will see data is read.
    Step 11) select the 10th step ( Display read data) and click on the exécute button :
    Here you can see your test data present in test files assign to source sturcture
    Step 12 ) select the 11th step ( Convert data) and click on the exécute button :
    After clicking on the exécute button you will reach to the screen
    Click on the exécute button as shown on the : After click on the exécute button you will reach to the next screen
    Data is converted
    Step 12th ( Display converted data is same as Display read data )
    Step 13 ) select the 13th step ( Start idoc generation) and click on the exécute
    button :
    At this step Idoc is generated using converted data
    Step 14) select the 14th step ( Start idoc processing ) and click on the exécute button :
    After clicking on the exécute button you will reach to the screen :
    And then click on the exécute button : After clicking on the exécute button you will reach to the final processive screen
    If data is processed correctly you will see ( 53 Status message with green sign)
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    Step-by-Step Guide for using BAPI in LSMW
    Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.
    Introduction:
    This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.
    Pre-requisites:
    It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.
    Step-by-Step Procedure:
    Details of the BAPI used in this scenario:
    Business Object: BUS2012
    Method: CreateFromData
    Details of Message Type and Basic IDoc Type:
    Message Type: PORDCR
    Basic IDoc Type: PORDCR02
    Let’s have a look at the BAPI first, before proceeding to the LSMW:
    1. Go to Transaction BAPI
    2. Click on Search Button
    3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”
    4. Press ENTER
    5. Following screen appears:
    6. On the left side of the screen, Expand the “PurchaseOrder”.
    7. Select “PurchaseOrder” and double-click on the same for details.
    Building LSMW using BAPI:
    1. Go to Transaction LSMW.
    2. Enter the Project, Subproject and Object information and click on CREATE.
    3. Enter the descriptions for Project, Subproject and Object as prompted.
    4. Now select Settings à IDoc Inbound Processing
    5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:
    6. Click on “Activate IDoc Inbound Processing”.
    7. Click on “Yes” when prompted for “Activate IDoc Inbound?”
    8. Hit on “Back” to return to the main screen.
    9. Click on Continue (F8). Following Screen appears:
    10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.
    11. Select the radio button “Business Object Method” and enter the following details:
    Business Object: BUS2012
    Method: CreateFromData
    Hit ENTER
    12. Save and click on BACK button. Following information message is displayed.
    13. Now select step 2 “Maintain Source Structures” and click “Execute”.
    14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
    Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:
    Select “Lower Level” and click on Continue. Enter the Item data structure name.
    Click Save and hit BACK button to go to the main screen.
    15. Select step 3 “Maintain Source Fields” and hit execute.
    16. Enter the fields as shown below:
    17. Click SAVE and return to main screen.
    18. Select step 4 “Maintain Structure Relations” and click Execute.
    Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
    Select HEADERDATA and hit ENTER
    Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
    Click Save and return to main screen.
    19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:
    20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
    Save and return to main screen.
    21. Select the step “Assign Files” and click on Execute.
    Assign the file provided to the source structure. Here the same file is provided for both the structures.
    Save and return to the main screen.
    22. Select the step “Read Data” and click on Execute.
    Click on Execute.
    Return to the main screen.
    23. Select the step “Display read data” and click on execute.
    Click on the structure name to get the field level values.
    24. Return to main screen and now select “Convert Data”.
    25. Return to the main screen and select “Display Converted data”.
    26. Return to main screen and select “Start IDoc generation”.
    27. Now select the step “Start IDoc Processing” on the main screen.
    28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed:
    Please Go through these Links ,
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    bapi-idoc:
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Thanks
    Naveen khan

  • BUSINESS OBJECTS- Crystal Reports-based out of Function module

    We are right now creating BUSINESS OBJECTS- Crystal Reports. Our client requirement is to create this report based out of u201CFunction moduleu201D.
    With the current parameters settings at the Crystal Reports designer we are able to create the report based on View and Linking various table. The reports get executed and fetch data. But when we create a report based out of FM, the report returns nothing. The screen stays in u201CNot responding stageu201D and terminates after without any message/pop-up.
    Can anyone please help us resolving this? Are there any parameters/settings to be done which we are missing?
    Thanks,
    Pallavi

    Hi Pallavi,
    Not much info to go on. What version of Cr are you using?
    What database and version are you using?
    How are you connecting to the database, ODBC, OLE DB or native driver?
    Have you turned tracing on the server to what SQL is being passed from CR?
    Have you copied the SQL from Show SQL in the Designer and paste that into a DB SQL test tool to verify you should be getting data back and that you are not returning so much data it's going to take a week to get?
    Not responding simply means CR is waiting for data, try being patient and see if you ever get data or add a Record Selection formula so you only get a few rows of data.
    Try reporting off of a single table itself to verify it works and you have permission to run the SQL.
    Thank you
    Don

  • Business Object Repository ( B O R )

    Can some one please send me some data or links from where I can get data on Business object repository .

    Hi,
         SAP's Business Object Repository gives you an improved way to integrate business processes with external partners -- an increasingly necessary ability in the burgeoning e-marketplace economy.
    The age of e has had a profound effect on the IT industry. Not only has it changed our way of life, but it has also forced systems such as SAP to embrace a new era of openness. Marketplace demands for flexible automation of inter-business workflow and intelligent data exchange have forced formerly very proprietary ERP systems to begin helping customers integrate with other companies and with e-marketplaces data formats. For the first time, companies must expose their business processes to the outside world.
    In order to achieve this openness, SAP provides a technical infrastructure for the R/3 product, the Business Object Repository (BOR), which provides a simple yet powerful mechanism for external systems to trigger core business processes (such as placing an order) without concern for the underlying data structure. This level of abstraction is beneficial because it decouples R/3 from the external system. Either system is therefore free to change its internal business processes without affecting the other. SAP provides this technical infrastructure using a component-based view of its system. Each component or object provides a view of the data and the business processes that interact with that data. External systems can access this data via BAPI methods, which in turn access the underlying data structures of the system. It is the responsibility of the object and the BAPI to ensure the integrity of the data. This encapsulation of the data not only lends itself to external interfaces, but by using objects from within SAP, you can greatly reduce implementation, testing, and maintenance effort via the promotion of code reuse.
    Business Objects
    A business object is a problem-domain entity that you model in the SAP system, such as SalesOrder, BillingDocument, and Employee. The BOR stores all the objects in the R/3 system. The repository is a group of all the objects in the R/3 system. If the focus of objects is to model atomic business processes then it can be said that the BOR provides an enterprisewide view of business processes. By designing your ABAP code to fit your business processes you increase the ability of that code to flex when those processes are altered or integrated with external systems. This had made the object-oriented approach, which the BOR provides, essential to developing inter-business or e-business functionality.
    Attributes
    A business object is primarily represented by its attributes. You perform actions, such as create, update, or delete on the attributes by calling the methods of the object.
    Attribute NetValue of Object BUS2032 (SalesOrder).
    The majority of attributes are data-dictionary fields (for example, the NetValue attribute is defined by VBAK-NETWR). When you access an attribute of an object, you execute a SQL statement that retrieves the corresponding field in the database.
    Definition of attribute NetValue.
    You can also define attributes that do not exist in the data dictionary. These attributes are called virtual attributes. For example, a business partner has an attribute called BirthDate that is stored in the data dictionary. You can add a virtual attribute to the BusinessPartner object called Age. The age of a business partner is not stored in the database, but you can calculate it using the current date and the birth date of the business partner. If you implement the ABAP code that calculates Age, every time you access the Age attribute, the code executes and returns the business partners age.
    Definition of virtual attribute Age.
    This is an excellent example of one of the tools that a component-based approach provides. The external system does not need to concern itself with how to gather the data that it requires. The calling program needs only to access the attribute for the data to be returned. This is how business objects decouple the calling program (whether it be in R/3 or external to R/3) from the internals of R/3.
    The BOR lets you define multi-line attributes. These attributes define one-to-many relationships between an object and other fields. These objects can be defined in the data dictionary or can also be virtual attributes.
    An attribute that uniquely defines an object in the system is called a key attribute. In the case of a SalesOrder, the key attribute is VBAK-VBELN (the TableName and FieldName). It is not uncommon for an object to have several key fields. An example of this is object is the SalesArea (BUS000603) object type which has SalesOrganization (TVTA-VKORG), DistributionChannel (TVTA-VTWEG) and Division (TVTA-SPARTE) as key fields.
    Methods
    As mentioned earlier, the methods of an object represent the actions you take with objects attributes. An action in this example would include retrieving the status of one or more sales orders based on specific criteria. Methods are analogous to function modules in that they have importing and exporting parameters as well as exceptions, which you view by selecting a method and clicking on the toolbar button. This allows external systems (or internal developments) to pass and accept parameters from these methods just as if they were using function modules -- allowing external systems to call methods.
    In Figure 4, the methods shown with the green LED are BAPIs that are called specifically from external systems. They can, however, be called from within the system itself. The method shown with the stop sign is obsolete, but retained for backward compatibility, and should not be used in new developments.
    Methods of SalesOrder.
    Delegation and Subtyping
    One of the most complex concepts in object-oriented development is that of inheritance. This concept lets you extend core functionality by creating a child of the parent object that inherits all of its attributes and methods. For example, a Manager object is a subtype (child) of the Employee object. The Manager object has all the attributes of an Employee object (such as EmployeeID or Name) but also has some extra attributes (such as CompanyCar or ParkingSpace). SAP has not implemented inheritance in the BOR. However, it has provided subtyping and delegation, which offer an alternative way to extend R/3 functionality.
    Subtyping
    A subtype of an object is another object whose creation is based upon a parent object (see the preceding manager/employee example). The subtype maintains references to all the attributes and methods of its parent object. This means that any methods and attributes defined on the parent can be executed and accessed on the child object. I have often heard less-experienced developers refer to subtyping as copying the parent object. Although the effects can be similar, in order to achieve an understanding of some of the more advanced concepts, such as interface inheritance, it is important to realize that this is not accurate.
    If a subtype object were merely a copy of its parent, then all the code contained within the parent would be physically copied to the child. This is not the case. The subtype simply maintains references to its parents methods and attributes. The real difference is that the subtype lets you redefine these methods and attributes. You can easily add your own business rules to the parent methods by redefining the subtypes method. In the following example, I will show why this distinction is so important.
    Subtyping Case Study
    As an ABAP developer at Acme Tyres Pty. Ltd., you have been given the task of implementing some security measures for the companys online store. The requirement is simple: The password must be at least six characters long.
    Modifying SAP code leads to costly and complicated upgrades due to the modified code being overwritten by the newly delivered SAP code. Therefore, The challenge is finding a way of implementing the business logic without modifying SAP code.
    After some investigation, you realize that the method CHANGEPASSWORD (in BAPI) on the object KNA1 (Customer) is called when customers change their passwords. All you need to do is create a subtype of KNA1 and then redefine the CHANGEPASSWORD method adding the ABAP code to ensure that the password is a minimum of six characters long. It is of course not wise to change SAP code even assuming you have the passwords, which can be provided only be SAP. After the method is redefined, you just need to implement the business rules in ABAP.
    FIGURE 5 Redefinition of ChangePassword method.
    It is imperative that once you redefine the method it still behaves in a similar manner. You are allowed to add extra business logic, but the method must still change the password rather than do something unexpected, like delete a customer. This is particularly important when SAP is being accessed from external systems. The external system will expect a method to provide certain functionality. The developer should take care to ensure that this expectation is met.
    Delegation
    Now that you have implemented a new CHANGEPASSWORD method, you need to tell the SAP system to use the redefined version of CHANGEPASSWORD and not the version that was delivered on the KNA1 object. This is similar to object-oriented inheritance but the two concepts do have fundamental differences.
    Delegation for objects.
    By making an entry in the delegation table, you tell R/3 that before executing a method on KNA1, it should first check if that method has been redefined on the subtype. If it has, then the system executes the redefined method . If it hasn't, then the system executes the original method. Figure 7 illustrates this process.
    Execution flow for methods with delegation.
    This delegation is powerful because it lets you implement your own business logic without modifying any SAP code. As long as the objects are properly delegated, your method will be executed.
    Responsibility
    So far I have shown you two major components of an object, its attributes and methods. The difficulty in SAP is that it has traditionally been a data-driven, procedural-development approach. The BOR is not well understood by developers and managers and thus it is shunned by those that stand to gain the most from it. If managers and developers alike would take a formalized approach to development using business objects, significant savings in the development, testing, and maintenance phases would be achieved. This is due to the high level of re-use that business objects encourage.
    Having said this, when a powerful tool is put into the hands of an inexperienced person, chaos can (and usually does) ensue. If object-oriented design principals are not adhered to, then the resulting code has poor reusability and maintainability. Although an in-depth discussion of design issues is beyond the scope of this article, I will introduce in the following section one of the more fundamental design aspects of BOR programming: Responsibility.
    When you are given the task of creating a method or attribute on an object, one of the most important questions you should ask is, Does this attribute or method belong on this object? This question is fundamental to an object-oriented design and the answer can make a world of difference. Answering this question incorrectly has detrimental effects on the development effort resulting in methods and attributes strewn across myriad objects, with no coherent structure. If the methods and attributes were strewn across several objects, it would be more difficult to provide a uniform interface to external systems. If an external system wants to execute a particular business process in R/3, it may need to access several business objects, thus increasing coupling and reducing the layer of abstraction between R/3 and the external system.
    Lets take, for example, the requirement to be able to update a sales order. This is a common requirement and one that SAP usually implements for you. For the sake of the example, lets assume that SAP has not implemented this method. You will need to implement your own UPDATE method on one of the business objects. The question here is: Which object? This question is what I term as defining responsibility. Which object is responsible for having the UPDATE method on it? As shown in Figure 4, the answer in this cases is BUS2032 (SalesOrder). If you put it on any other object then you run the risk of no one else knowing of its existence. Next time there is a requirement to update a sales order, the developer will develop an additional method. You would then have two separate pieces of code that implement the same functionality. This duplication doubles development, testing, and maintenance requirements. On large projects, this can become a real problem and a maintenance and testing nightmare.
    SAP recognizes the challenges facing developers in the e-business era. It is aware that if it wants to take R/3 to the next phase, it needs to continue evolving the ABAP language and ensure that powerful development tools are available to SAP developers.
    Rising to the challenge, SAP has begun developing extensions to the ABAP language called ABAP objects (see "Introducing ABAP Objects," in the IntelligentERP feature archive for an excellent introductory article to ABAP objects by Jürgen Heymann and Horst Keller). These extensions will provide ABAP developers with a full range of object-oriented tools. Eventually, these new extensions will make BOR obsolete. However, the use of object-oriented development is sure to be an integral part of future SAP developments, regardless of where the world of e takes us.
    Reward points
    Regards

  • Performance issue with Business Objects Java JRC API in CRXI R2 version

    A report is developed using java JRC API in CR XI release 2. When I generate the report in the designer, it took less than 5 seconds to display the results in crystal report viewer inside the designer. But in the QA environment, when I generate the same report from the application, it takes almost 1 to 1.5 minutes to display the same results in PDF. I also noticed that if the dataset contains bigger volume of data, then the reports are taking even longer almost 15 to 20 minutes.
    While generating the report from the application, I noticed that most of time is taken during the execution of the com.crystaldecisions.report.web.viewer.ReportExportControl Object method as shown in following line of code
    exportControl.processHttpRequest(request, response, context, null)
    We thought the delay in exporting the report to PDF might be the layout of the report and data conversion to PDF for such a bigger volume of data.
    Then we investigated the issue and experimented quickly to generate the same report with same result set data from the application using XML, XSL and converted the output XSL-FO to PDF using Apache FOP (Formatting Objects Processor) implementation. The time taken to export the report to PDF is less than 6 seconds. By doing this experiment, it is proved that the issue is not with conversion of data to PDF but it is the performance problem with Business Objects Java JRC API in CR XI R2.
    In this regard, I searched for the above issue in the SAP community Network Forums -> Crystal Reports and Xcelsius -> Java Development -> Crystal Reports. But I did not find any answers or solutions for this kind of issue in the forums.
    Any suggestion, hint in this matter is very much appreciated.

    Ted, The setReportAppServer problem is resolved. Now I could able to generate the report with hardcoded values in the SQLs in just 6 seconds where as the same report was generated in CRXI R2 in 1 minute 15 seconds as mentioned in the earlier message.
    But, our exisiting application passes the parameter values to the SQLs embedded in the report. For some reason the parameters are not being passed to the report and the report displays only the labels without data.
    As per the crj 12 samples codes, the code is written as shown below.
    1. Created ReportClient Document
    2. SetReportAppServer
    3. Open the report
    4. Getting DatabaseController and switching the database connection at runtime
    5. Then setting the parameters as detailed below
    ParameteFields parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();
    parameterFieldController.setCurrentValue("", "paramname",paramvalue);
    parameterFieldController.setCurrentValue("", "paramname",paramavalue);
    byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 
    6. Streaming the report to the browser
    Why the parematers are not being passed to the report?  Do I need to follow the order of setting these parameters?  Did I miss any line of code for setting Params using  crj 12?
    Any help in this regard would be greatly appreciated.

Maybe you are looking for

  • GPO (as a whole) problem or Folder Redirection Problem?

    Hello everyone, After a couple hours of looking at different TN articles on folder redirection I just can't get it to work properly. I had some major system errors and had to perform a clean install of the OS. My folder redirections from the old inst

  • Standby database Error in applying archives

    Hi All Environment: Oracle 8i Platform- HP-UX I have production database on HPUX box and standby database on anothe HPUX box. I am applying archive to standby everyday manually. In last week, I have added ney datafile webapp03 in Production database

  • Prepopluate adapters getting triggered twice

    Hi, I have configured an access policy for my DB resource and it works fine. However, I see that the pre-populate adapters run twice. One of the pre populate adapter fetches a unique number from the DB each time it runs and since this adapter gets tr

  • Publisher could not be verified message

    I am very confused, I had itunes installe don my computer, and wante dto move it to an external hard drive I bought. I couldnt figure out how to move it so I uninstalled it and when I went to reinstall itunes on the external It now tells me the publi

  • HP Teaming Query

    Hi I currently have a quad port NIC with two of those ports in a team for Hyper-V traffic.  I wanted to add two free onboard NIC's to that team, just open HP NCU, select the current team, select the free NICs, then just click Team?  Those new NIC's d