Application Log These are 3 important transaction code used for Application Log: SLG0 – Create a new Log Object and Sub-object SLG1 – Display Application Log SLG2 – Delete the Application Log Step-1: Create Object using SLG0 : Step-1.2: Select Object and click on Sub-Objects: Step-2: Implement logic for Object & Sub Object with dummy code: REPORT ZDEMO_TESTING. ***===>Standard Internal Table & Structure DATA:lt_msg TYPE bal_tt_msg, ls_msg TYPE bal_s_msg. ***===>Data Declaraction DATA: lv_handle TYPE balloghndl. ***===>Append Message to Internal Table MOVE 'S' TO ls_msg-msgty. MOVE 'ZCRM' TO ls_msg-msgid. MOVE '000' TO ls_msg-msgno. MOVE 'SLG Log' TO ls_msg-msgv1. APPEND ls_msg TO lt_msg. ***===>Call Generic Function Module to create application log CALL FUNCTION 'ZCRM_APPLICATION_LOG' EXPORTING i_object...
Below are the list of user parameters: ***Display the message details in CRM Web UI BSPWD_USER_LEVEL - 9 ***It will ignore all enhancement and run the SAP UI as standard WCF_IGNORE_ENHANCEMT - A ***Filter the Business Role CRM_UI_PROFILE - Z*
Read the current user Business Role in SAP CRM: ***Get Business Role Data( lr_ui_profile) = cl_crm_ui_profile=>get_instance( ). IF lr_object IS BOUND. Data(lr_br_profile ) = lr_ui_profile->get_profile( ). ENDIF. IF rv_result EQ lc_busuness_role. "Added your logic ENDIF. Read the current customer confirm data Sin AP CRM: Data(lr_current_data) = cl_crm_ui_data_context_srv=>get_instance( me ). IF lr_current_data is bound. ***Get Business Partner Details lr_current_data ->get_entity( name = 'CURRENTCUSTOMER' ). ***Get Contract Account Details lr_current_data ->get_entity( name = 'CURRENTBUAG' ). ***Get Premise Details lr_current_data ->get_entity( name = 'CURRENTPREMISE' ). ENDIF.
Comments
Post a Comment