Pages

Friday, December 16, 2016

Webui Classes and interface

CLASSES


CL_CRM_BOL_CORE
            This class creates an instance of business object layer (Component Set). This class follows singleton design pattern. The BOL Core is the central service provider for API classes and it communicates with underlying business object implementation.
·         START_UP: It takes the name of component set that to be started and starts the BOL. It takes one more parameter IV_DISPLAY_MODE_SELECT which is optional and set to ABAP_FALSE by default. This means BOL follows optimistic lock which makes all objects changeable in user interface even without a lock. The lock is automatically requested on first attempt of change.
·         GET_ENTITY_FACTORY: Get factory handler for business object.

CL_CRM_BOL_QUERY_SERVICE
            Used to select bol entity.
·         GET_INSTANCE: Get the instance.
·         SET_PROPERTY: Set a search criterion.
·         GET_QUERY_RESULT: This method is used to execute the query and returns the result of type if_bol_entity_col.

CL_CRM_BOL_DQUERY_SERVICE
            This class is used for advanced query search using greater than, lesser than, multiple search patterns, saved searches (save and retrieve).
·         SET_QUERY_PARAMETERS: Setting the query parameter for maximum hits.
·         ADD_SELECTION_PARM: Adding selection criteria. It takes 4 parameters.
·         GET_QUERY_RESULT: This method is used to execute the query and returns the result of type if_bol_entity_col.
·         SAVE_QUERY_AS_TEMPLATE: Save query as template using query id.
·         LOAD_QUERY_AS_TEMPLATE: Load the query from template using query id.

CL_CRM_BOL_ENTITY
            This class is used to access the entities which implements business objects.
·         GET_RELATED_ENTITIES: Gets a list of 1:N related entities for particular attributes.
·         CREATE_RELATED_ENTITIES: For creating child objects.

CL_CRM_BOL_COL
            This class is used to hold all the instances implementing the standard property access interface IF_BOL_BO_PROPERTY_ACCESS.

CL_CRM_BOL_ENTITY_COL
            This holds regular BOL entities only.

CL_CRM_BOL_ENTITY_FACTORY
·         CREATE: For creating root entity.

CL_BSP_DLC_VIEW_DESCRIPTOR
            This class is used to describe the property of attributes such as changing to dropdown list, checkbox, link, radio, oca, etc.





INTERFACES
IF_BOL_TRANSACTION_CONTEXT
            This interface Controls transactional behavior such as modify, create, delete entities. It has three types of transaction, one is global transaction context which holds all modified root entities, next is fine granular transaction context exists for each root object instance and last is custom transaction context.
·         SAVE: Save the changes.
·         COMMIT: Commit the changes.
IF_BOL_BO_COL
            Provides collection to hold business objects (BO).
IF_BOL_ENTITY_COL_ITERATOR
·         GET_FIRST: Gets the first entity from collection wrapper.
·         GET_NEXT: Gets the next entity from collection wrapper.
IF_BOL_BO_PROPERTY_ACCESS
            This interface is used to access the properties of BOL entities and query services. The classes CL_CRM_BOL_ENTITY and CL_CRM_BOL_QUERY_SERVICE inherits this interface.
·         GET_PROPERTY_AS_STRING

·         SET_PROPERTY

Friday, November 11, 2016

SAP CRM Business Partner and Set type data tables

SAP CRM Business Partner and Set type data tables



Following are the tables that will come in handy, when you have to find out where is the relationship stored between BP Guid and Set Types Guid (Example, Shipping, Billing, Sales Tab's).
Here are the tables

CRMD_ORGMAN – Organization unit set
BUT000 - Business Partner
CRMM_BUT_LNK0011 - Business Partner - Sales Rule
CRMM_BUT_SET0010 - Business Partner: Sales Data
CRMM_BUT_LNK0021 - Business Partner - Shipping Rule
CRMM_BUT_SET0020 - Business Partner: Shipping Data
CRMM_BUT_LNK0031 - Business Partner - Billing Rule
CRMM_BUT_SET0030 - Business Partner: Billing Data
CRMM_BUT_LNK0141 - Business Partner Organization Rule
CRMM_BUT_SET0140 - Business Partner Organization Rule Period

Friday, November 4, 2016

Difference Between Append Structure and Include Structure



Difference Between Append Structure and Include Structure

1. Append Structure is a mechanism of adding extra fields to the Standard Table. Where as, Include Structure is a mechanism of adding extra fields to the Custom Table.


2. Append Structure adds fields at the last of the Standard Table. Where as, Include Structure adds fields at any position.


3. Append Structure can only be used once.(i.e. If we add an append structure to a Standard Table, the same Structure can't be appended to the another Standard table). Where as, Include Structure can for Multiple Tables. (i.e. If we include structure to the custom table using include structure, the same structure can be included in any other Custom Tables).


Append Structure & Include Structure can also be used to add new fields or extra fields to the structures. (i.e. Using Append Structure, we can add a structure to a standard structure, which will add the fields at the end of the structure. Include Structure can be included in any custom structure at any position).

Note :
1. It is not possible to add or to append or to include a table to a structure.
2. We can't append a structure to a sap table which has the fields with data type VARC, LCHR RAW & LRAW.(i.e. all the fields with the above specified data types should be always be as the last fields in the data base table. if we add an append structure to such table their comes the conflict b/w append structure and the long data types in sap table.

Tuesday, August 9, 2016

How to Delete an already released transport request or task

     
          How to Delete an already released transport request or task .


        Is it possible to delete a task/transport request once it is set to release ? 
        Of course, we can But we  have to change status of the request to do so.



       1. Goto  transaction SA38 ( or SE38 )and run program: RDDIT076 . 

         
     



   

 2.  Set your request number and run the program, A list with Transport request and tasks will appear 







 3 . Double click on the TR or task you want to unlock. A popup will appear for change and display (Expert mode).
      

   PS : in case the expert mode is not enable go down to see the Alternative approach. 

  
 4.   On the popup window click on display/change button or press F9. 




5. Change the Status from R to D (Or N to D in case only task is released ).




6.  Click on ok button. A confirmation popup will appear click on yes. 

7. The TR is set to modifiable state,Now you can delete Transport request.    



-------------------------------------------------------------------------------------------------------------------------

PS : Sometime user didn't have the proper authorisation for the expert mode(i.e only display access is given  ) as the auth. object   S_CTS_ADMI  is missing, You can  ask you Basic consultant for the this access or to unlock the TR.

Alternate solution :( surpass the authority check in debugging mode.)  

Goto tcode SE37 , Open function module TR_AUTHORITY_CHECK_ADMIN. place a session  debugger at line 23. 





 Execute  report RDDIT076 as mentioned in the step 1 and 2 above, 

Debugger will hit as soon as you click on the TR  , in the debug mode forcefully go inside the If condition ( place the cursor on line 24 and press F12). execute the return condition. 

The debugger will get hit couples of time so repeat the same steps. After the execution is completed you can see the popup with Expert mode is enable. 





Follow the step 4 and rest afterwards  :-) 



      

   

Monday, July 11, 2016

CRM Webui Keyboard Shortcuts



List of shortcut keys:



1) F2 – Technical data





2) F6 – HTML Print preview





3) CTRL + SHIFT + F7 – Performance Information




to close  the window  we need  to press ‘CTRL + SHIFT + F7’ keys again.
Also ‘Create Memory Snapshot’ has the same functionality as a memory snapshot in S_MEMORY_INSPECTOR. ‘Start Backend Runtime Analysis’ creates a runtime trace that can be read via transaction SAT.

4) CTRL + ALT + F2 – System Information 






5 ) SHIFT+ALT+F2 for "view hierarchy





6) conditional break point using ALT+F2




 7) SHIFT+ALT+CTRL+F2 all short cut keys








Friday, June 24, 2016

How to find view name and component from transport request



SAP CRM webui provides this excellent feature to change layout of  view based on our requirement.

When a new screen layout is created a Guid is generated by system (context id), the Screen layout customisation is stored as an XML file,Based on the context system at run time knows which screen layout need to be loaded.

As a developer we are are aware of the change done on screen by us ,while sometime it is difficult to know the views/component name as their might be a lot of views changed or maybe other developers are also working on the same component.      

In Transport request we can only see the guids and and some others node, like in the below picture:




this is not what we are looking for right ?

The solution of our question is BSPC_DL_XMLSTRX2.


"BSPC_DL_XMLSTRX2 is a standard SAP Table which is used to store Storagetable for XML layout descriptions information."

1. Goto Se16/SE11 give the table name as BSPC_DL_XMLSTRX2.



2. In the Context id field paste the guid(or list of guid ) copied from the transport request.



3. Execute. you will get View and component name with  role key and other fields .




If it was useful, you are welcome to leave a comment :-) .