You are on page 1of 4

3/21/2014

SAP CRM Technical Tutorials by Naval Bhatt.: Concepts of BOL programming : Get_current

SAP CRM Technical Tutorials by Naval Bhatt.


SAP CRM tutorials for all : Please feel free to contact me on naval.k.bhatt@gmail.com. This blog is for helping those who are facing issues in CRM technical and functional . Not for career counselling , Please refrain from sending those questions . Please do some research before asking any question . Please don't copy and paste the requirements which you get from your client . YOUR URGENCY IS NOT MY PROBLEM :-) I will take my sweet time in replying . Home My Intro SAP Job Websites Document pdfs ... Middleware concepts ...

Basics of OOABAP... Interview Questions ....

Practical BOL programming ..

SAP CRM related links ...

Tuesday, January 31, 2012

Search

Concepts of BOL programming : Get_current Get_current and get_iterator how does it works?
The data you enter on the Web UI gets saved in the database tables via BOL Entities or Objects. These BOL Entities are kind of class instances with underlying structures(mapped to the database tables). These BOL entities are held by Collection Wrappers. They are kind of containers or wrapper classes in the context nodes. For example, in a form view the data gets stored in 1 BOL entity and in turn held by a Collecton Wrapper whereas in a table view the data is 1:N, there can be N BOL entities (all with same structure) corresponding to each row of the table view and held by a Collection Wrapper. The BOL entities will be of type CL_CRM_BOL_ENTITY. So when you want to access data from a view, you write this way... If you are in a method of IMPL Class.... ( if you are at the context node methods
Already a member? Sign in

Followers:Join to get regular update


Join this site
w ith Google Friend Connect

Members (82) More

C o n t e x tN o d en a m e>C o l l e c t i o nW r a p p e r>g e t _ c u r r e n t ( ) . )

My other blogs SAP BPM & Workflow tutorials


V i e wC o n t r o l l e r>C o n t e x t>C o n t e x tN o d en a m e> C o l l e c t i o nW r a p p e r>g e t _ c u r r e n t () .

My travel experiences Me & my pursuit of happiness Wandering hermit Photography

get_current gives the BOL entity underlying the view. You can alternatively use get_first( ) as in a Form view there is 1 BOL entity only. If you are in table view then,get_current gives the current entity. If you want the next row then get_next ( ) or you can loop at the collection_wrapper and get the corresponding row using index. If you want to delete certain rows in the table view then you can delete by looping at the collection but there is a danger of missing the index(as happens when ypu delete entries while looping on an internal table). So you use the table view iterator to do this as it searches on the index or BOL entity totally.

Join me on my photography journey


Naval Bhatt Photography .. on Facebook

Blog Archive
http://sapcrmtutorial.blogspot.in/2012/01/concepts-of-bol-programming-getcurrent.html 1/4

3/21/2014

SAP CRM Technical Tutorials by Naval Bhatt.: Concepts of BOL programming : Get_current

Explore the methods of classes CL_CRM_BOL_ENTITY and IF_BOL_BO_COL. Do a where used and observe what they are doing. The best thing about CRM Web Client UI is that the code written across components is almost uniform. You open any of the methods the code will be similar. So if you master one component, everything is almost same. Posted by Naval Bhatt at 2:56 AM Labels: SAP CRM tutorials

2014 (2) 2013 (57) 2012 (155) December (2) November (8) October (1) September (15) August (14) July (26) June (18)

6 comments:
MANISH SINGH March 26, 2012 at 2:25 PM The idea about collection wrapper is effective to give clear understanding about it...!!!! M.S. Reply

May (11) April (9) March (28) February (13)

Unknown April 11, 2012 at 3:16 PM Can you please give the sample code to read model attribute values inside of GET_ methods ? I can able to see the value in the debug but can't read them through pro grammatically. Really in the need of help... Reply Replies Naval Bhatt July 26, 2012 at 10:18 AM

January (10) Basic BSP tags ... SAP CRM master table ... Concepts of BOL programming : Get_current How to make a view configurable ? ASAP Methodology Some important Shot notes in CRM Model View Controller Design Pattern Overview How CRM can be enhanced ..... Business layer ..... SAP Architecture ....

You can use the code in the below comment Reply

golden May 31, 2012 at 2:12 AM Very Clear picture you have given for collection wrapper. but in default get method first iterator is checked. can u pl explain this code. DATA: current TYPE REF TO if_bol_bo_property_access. if iterator is bound. current = iterator->get_current( ). else. current = collection_wrapper->get_current( ). endif. Reply

Naval Bhatt

July 26, 2012 at 9:12 AM

DATA: current TYPE REF TO if_bol_bo_property_access. if iterator is bound. current = iterator->get_current( ). else. current = collection_wrapper->get_current( ). endif. in the above code the iterator comes automatically from the importing parameters of the method . we get the current entity (entity in focus in your collection wrapper).
http://sapcrmtutorial.blogspot.in/2012/01/concepts-of-bol-programming-getcurrent.html 2/4

3/21/2014

SAP CRM Technical Tutorials by Naval Bhatt.: Concepts of BOL programming : Get_current

then using get_property we can get the value of the attribute of the entity . Reply

PEEYUSH PALLAV July 26, 2012 at 10:06 AM Thanks a lot for your reply. Reply
pow ered by

Enter your comment...

Popular Posts
Comment as: Google Account

Publish

Preview

CRM Tables and Transaction Codes TABLE NAME DESCRIPTION BUSINESS PARTNERS BUT000 BP: General data Contains Business Partner Number, Partner Category, Partne... Getter - Setter methods in Web UI Using Get and Setter methods you can retrieve data to field and set specific data to field. Using Get_I method you can make your field ... Important methods in CRM web UI Important methods in CRM web UI or component programming . View Impl class methods: DO_CONFIG_DETERMINATIO N : The method is for run tim... SAP CRM interview questions Q 1. What is the typical landscape for a CRM project? What is the maximum number of landscapes that you have worked on in a project. ... SAP CRM Most useful BADIs (Updating) . ORDER_SAVE BADI is used at the time of saving order. 1st called CHECK_BEFORE_SAVE Useful for check if the values are filled as expect... An introduction about IPC SAP CRM uses IPC to determine pricing information when creating a business transaction, such as a quotation, sales order, service proce...

Newer Post

Home
Subscribe to: Post Comments (Atom)

Older Post

http://sapcrmtutorial.blogspot.in/2012/01/concepts-of-bol-programming-getcurrent.html

3/4

3/21/2014

SAP CRM Technical Tutorials by Naval Bhatt.: Concepts of BOL programming : Get_current

One order framework One Order Object Model The CRM One Order documents are created in transaction CRMD_ORDER. The Header table that is updated by the crea... Concepts of BOL programming : Get_current Get_current and get_iterator how does it works? The data you enter on the Web UI gets saved in the database tables via BOL Entities ... How to use messages in CRM web UI In general there are 4 different Sources for error messages: Important Info Message BSP Framework messages UI Framework mes... Create a Tree view display in CRM web UI This blog gives the steps to create a Tree view display in CRM web UI. Below is a screen shot of the sample implementation. ...

Total Pageviews

2 5 6 3 0 3
Follow by Email
Email address... Submit

Naval bhatt 2012. Awesome Inc. template. Powered by Blogger.

http://sapcrmtutorial.blogspot.in/2012/01/concepts-of-bol-programming-getcurrent.html

4/4

You might also like