BP Cockpit. Standard sap icon (e.g. ICON_OKAY) within a cell of XML table?

Hello all,
I have programmed a custom bp cockpit.
I am able to build up the xml to show the data, but only with texts.
Does anybody know how could I be able to insert an image (an standard SAP icon like "ICON_OKAY") in any of the table cells?
Thank you very much in advance.
Gonzalo Milla Millá

Hello all again,
finally, I found the way...
The problem was that the standard XSLT conversion program 'CRM_CCKPT_CFS_SERVICE_DEFAULT' ignores the tag 'img' so... there's no way to insert images (at least within a table cell).
I try to explain the solution:
FIRST: Create own XSLT conversion program
a. Go to transaction XSLT_TOOL
b. Copy the standard conversion program 'CRM_CCKPT_CFS_SERVICE_DEFAULT' to a customer one... let's call it 'Z_CCKPT_CFS_SERVICE'.
c. Modify this Z_CCKPT_CFS_SERVICE adding following lines:
<xsl:when test="child::img=true()">
  <td class="table7" width="{@width}" nowrap="x">
    <img src="{child::img/@src}"/>
  </td>
</xsl:when>
insert this lines just before, and at the same level that
<xsl:when test="@colspan=true()">
Here we are telling to the conversion program how to translate XML code for images to HTML code (only when they are found between "td" tags)
SECOND: Find icon path and insert it within XML code
a. Go to your Z class for your infoblock (let's say Z_CL_INFOBLOCK) that inherits from CL_CRM_CCKPT_IOS and modify the GET_REPORT method
b. Get the icon path:
DATA:
  lc_icono TYPE string.
  lc_icono = cl_bsp_mimes=>sap_icon( 'ICON_OKAY' ).
This way, we get the physical path to the icon.
c. insert icon in xml code:
DATA:
  lv_string TYPE string.
CONCATENATE '<img src="' lc_icono '"/>'
  INTO lv_string.
CALL METHOD crmcl_cckpt_templatesplitter=>fill_template
  EXPORTING
    iv_tagname  = 'S1'
    iv_string   = lv_string
  CHANGING
    cv_template = ls_template.
Here, we are filling contents of tab 'S1' in the XML template LS_TEMPLATE with the line
<img src="physical/path/of/your/icon.gif"/>
, that will be "translated" with your Z XSLT conversion program Z_CCKPT_CFS_SERVICE
THIRD: link Z conversion program ('Z_CCKPT_CFS_SERVICE') to your XML.
a. Also within the GET_REPORT method, after the creation of the XML code, insert following line as the first one in the XML table (export parameter of the method):
DATA:
  lw_meta TYPE string.
  lw_meta = '<meta:metadata xmlns:meta="urn:sap-com:document:sap:crm_cckpt:metadata" STYLESHEET="Z_CCKPT_CFS_SERVICE"/>'.
  INSERT lw_meta INTO lt_xml_temp INDEX 1.
  _et_xml_out[] = lt_xml_temp[].
  CLEAR et_xml_out.
  LOOP AT _et_xml_out INTO _ls_xml_out.
    CONCATENATE et_xml_out lv_newline _ls_xml_out INTO
                et_xml_out.
  ENDLOOP.
FOURTH: Finally, it works!!!
You have your icon included as the content of a table cell...
Hope this helps
Best Regards
Gonzalo Milla Millá

Similar Messages

  • How to display standard SAP icons in WebDynpro?

    Hi everybody,
    in my web dynpro app I'm using several web icons for display. Works very well so far with this notation: `~Icon/Failure` e.g.
    Now I need an icon which I can't find in the web icons library: the standard sap icon ICON_PRESENCE.
    I have tried this method: http://www.sapgeek.net/2009/10/web-dynpro-use-icons/  but it doesn't work; it seems that the system searches for the gif name as a web icon and can't find it.
    Is there any other way to diaplay standard sap icons in web dynpro, or does someone know if there is a web icon showing a burning light bulb??
    Thank you in advance for any advice!

    Hi,
       Suppose you need to display a standard SAP icon then take a image UI element and in the property SOURCE
       of image element click on the small F4 icon, a window opens with different tabstrips, select SAP ICONS tab
       and choose the relevent icon.
       If you dont find the icon, then you can upload the icon onto the application server and use it in your component.
      For this rightclick on your component and create a mime object and import the image from PC to SAP and you can
      now use this and will find it in the component usage tab in that F4 window of SOURCE property.

  • IMPORTING STANDARD SAP ICONS

    Hi
    I have an WD4A app and I would like to import sap's standard icons such as s_b_okay.gif to be displayed in my app
    based on some condition. My question is how do I call these icons and attach them to image UI elements I have
    created?
    Thanks for yr help
    Yuval Peery

    HI Perry ,
    You can bind the image sourse property of your UI with the attribute type string and programatically you can change the value for the image source based on your condition
    Sample code :
    DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->Element_context.
        DATA lv_image TYPE wd_this->Element_context-image.
    *   get element via lead selection
        lo_el_context = wd_context->get_element( ).
    if condition = 1.  " here you can change icon based on your condition
       lv_image = '~Icon/Add'.  " or you can get the value from table - ICON  & copy the text , Eg : @00@  lv_image = ' @00@'.
    else.
       lv_image = '~Icon/AddRow'.
    endif.
    *   set single attribute
        lo_el_context->set_attribute(
          name =  `IMAGE`
          value = lv_image ).
    Regards
    Chinnaiya P
    Edited by: chinnaiya pandiyan on Jul 6, 2010 4:14 PM

  • Toolbar: replace SAP icon with custom icon

    Hello,
    in the account overview (component BP_HEAD, view BPHEADOverview), the implementation class (CL_BP_HEAD_BPHEADOVERVIEW_IMPL) contains method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS where the buttons for the account overview are collected.
    Here you can check which buttons are used by SAP standard, e.g. for the PDF fact sheet, an icon is added:
    ls_button-icon_src = '/sap/bc/bsp/sap/crm_ppm/w_pdf__s.gif' .
    Now, I wanted to replace the given icon by another, customer-specific icon. I've tried to change the given URL to anything else, however, it didn't work. I even found out that the given URL is not necessary, it even works with this:
    ls_button-icon_src = 'w_pdf__s.gif' .
    ls_button-icon_src = 'i_do_not_exist/w_pdf__s.gif' .
    Thus, I assume that there's some kind of mapping of the icon name (e.g. "w_pdf__s.gif") is mapped to any table entry or whatever hard-coded.
    Does anyone having experience with replacing the icon with a custom-specific one and can provide the necessary steps?
    Regards
    Wolfgang

    Hi Wolfgang,
               You can use below sample code to get corresponding url for any standard sap icon:
    lv_icon = 'ICON_LED_GREEN'.
    *   Convert icon code into URL and prepare bee
        lv_icon = cl_bsp_mimes=>sap_icon( id = lv_icon ).
        lr_image->src = lv_icon.
    Also, all the icons are available in the database table 'ICON'.
    I hope that helps.
    Thanks,
    Rohit

  • Standard sap BACK, CANCEL icons affected by custom status - why?

    Hello SDN Community,
    I was trying to clean up some items in the Function List display of my custom status and I had deleted a couple of items that I had created incorrectly.
    After that, I ran my transaction and clicked the standard sap EXIT icon.  It returned me to the initial SAP screen.   However, I noticed that the BACK and CANCEL icons were greyed out.  It was working fine 5 minutes before this.
    Would anyone know what I might have done to cause this to happen?  Things to look for, places to check?
    Thank you,
    Dean Atteberry.

    Rich,
    Both buttons (BACK, CANCEL) have function codes of the same name.
    The EXIT button has function code of "EXIT".
    All three are active as long as my transaction is running and they function fine from any screen (about 6 screens).
    However, when I hit any one of the three (BACK, EXIT, CANCEL), it returns me to the SAP Easy Access screen.  On that screen BACK and CANCEL are greyed out.  EXIT is active.
    When I hit back from my first screen, my program does "LEAVE PROGRAM".   So I turned on debugger and put SY-PFKEY in the variable display and hit BACK.  It went directly to Easy Access, so I didn't see anything.  However, when I typed in SE38 in command line, it was still in debugging mode and "SESSION" showed up in debug variable display for SY-PFKEY.
    Program for easy access is SAPLSMTR_NAVIGATION and when I looked in SE41 for status SESSION, found it.  I can see function code settings, but not sure what it means.
    Looks like I managed to mess something up internally when I deleted those incorrect function codes because my program works fine.  Its when I return to SAP that this happens.
    Also tried logging off and logging on in hopes that it was transient, but still happening.  8-(
    Thank you for your help.
    Dean Atteberry.

  • Adding field in standard SAP transaction output results.

    Hi,
    I have to add a new field in standard SAP transaction output results.
    Can any one tell me what are the ways (brief explanation) that I can do this?
    If using exists - then what kind of exists I have to use? And how to find out the possibility with user exists?
    Thanks for your time.
    Thanks.
    Chris.

    Hi,
        There are so many ways to find out the user exits.
    Hi,
    To see SAP Exits -> Use Tcode SMOD
    To See create a project for Customer Exits -> Use Tcode CMOD
    There are projects to which Exits are assigned. Selects the relevant projects.
    What is User Exit:
    http://www.sap-img.com/abap/what-is-user-exits.htm
    How to find then:
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    All Exits List:
    http://www.easymarketplace.de/userexit.php
    Do a search on SAP Exits, Customer Exits, enhancements, etc
    Step 1 :- Execute transaction
    step 2 :- Click on Status Menu
    step 3 :- Double click on the program (screen) __?????___
    Step 4 :- Search source code for the 'Customer-Function' string using the find button. Remember to select 'In main program'.
    Step 5 :- A list of search results should be displayed indicating where all function exits can be found.
    You can now double click on each of them to go to its position in the source code. This also
    allows for the insertion of breakpoints so that you can test if the exits are called in the
    appropriate place.
    Step 6 :-Once you have found the Function Exit within the source code (Find Function Exit) you need to
    access the actual function module it executes. This is done using the following steps:
    Step 6.1 :-
    Step 1
    Locate desired 'Call Customer-function' statement within source code.
    Step 2
    If code is not within main program (module pool) e.g. SAP* then you will need to find this
    out by selecting 'Main Program' from the 'GOTO' menu. The Main program for transaction
    Step 3
    The actual function module name can now be calculated based on the information retrieved,
    it is defined by the following format:
    EXIT_<Program name>_<Exit number>
    eg :- 'EXIT_SAPLMR1M_004'.
    Step 7.1:-
    Once you have found the Exit function module
    Step 1
    Execute transaction CMOD
    Step 2
    Select 'SAP Enhancements' from the 'Utilities' menu.
    Step 3
    Select 'All selections' from the 'Edit' menu.
    Step 4
    Now populate the Component name field with the exit function module and press
    the execute button.
    Step 5
    A list of all Exits(Enhancements) containing that function module should now be displayed.
    Step 5
    You can now double click on the desired exit to display a detailed description of its uses and a list of all
    components contained in it.
    Implementing Function Exit
    This is required in-order to activate Function exit:
    Step 1
    The first step is to enter source code into function module in the usual way i.e. via SE37.
    There will already be an include declaration within the code with the following
    format: Include zx*.
    Double click on this to create it, source code can then be entered within here.
    Although it is good practice to create another include with this to store your
    code, this allows separation of difference enhancements allowing them to be easlity
    removed without de-activating the enhancement.
    Step 2
    Execute transaction CMOD and create new Enhancement. Enter name and press the create
    Button.
    Step 3
    The following screen should be displayed, enter short text then click on the 'Enhancement
    Step 4
    Now enter the Exit name (enhancement) which contains the desired Function Exit.
    Step 5
    Return to initial screen of CMOD and press the activate icon. The exit is now ready for use.
    Please Mark The Helfull Answers & close the thread.
    regards
    dj
    reward for all useful answers.

  • Dynamic Selections in Standard SAP program

    There is an Icon which enables dynamic selection in the Standard SAP Transaction 'FBL3N'. How can I add or fields from this dynamic selection?
    Any help would be appeciated.
    Thanks,
    ALAM.

    Hi ,
    it all need upon requrement..
    if any extra paramaters need to add to input or output ---check for Badi or User-exits and add functionality.
    if no enhacements found try to create a copy of standard program and create z Program and add own code..
    Always better to create custom program for rather manually doing code changes to standard program..
    Prabhudas

  • Functionality in long text  -- include -- characters-- SAP Icons

    Can any one please tell me the functionality in long text  -->include >characters>SAP Icons. Is it possible to include any icon in longtext.
    regards
    Ravikumar

    Hi,
    The standard icons should be available. If not, see note [1067936|https://service.sap.com/sap/support/notes/1067936] that explains how they can be made available.
    -Paul

  • Populating our log message along with standard sap log in ck11n.

    Hi all,
    I have developed a user exit which is used in costing of material using ck11n.
    Here i have to show our custom log message along with the standard log shown by standard sap system after costing run is complete.
    I got one FM-- CM_F_MESSAGE  which is used by SAP. But i want the message along with SAP messages and not separately.
    Can u help me out for this. its very urgent.
    Thanks in advance.

    Hi
    I'm not sure because I don't know that trx, but I seem the function group of that function manages a log, so you can try.
    This is an extract of abap code of SAPLCKDI where that fm is used:
    CALL FUNCTION 'CM_F_MESSAGE'
       EXPORTING
         ARBGB = Y_CMF-CK
         MSGNR = '327'
         MSGTY = Y_CMF-W
         MSGV1 = SICHT
         MSGV2 = KLVAR.
    So I suppose you should call it by this way:
    CALL FUNCTION 'CM_F_MESSAGE'
       EXPORTING
         ARBGB = <your message class>
         MSGNR = <message number>
         MSGTY = <message type>
         MSGV1 = <text 1>
         MSGV2 = <text 2>
         MSGV3 = <text 3>
    I think MSGV* is optional parameter.
    Max

  • Is there any standard SAP table which stores the license number assigned to a delivery item

    Hi Experts,
    This is in relation to license number assigned to a delivery item under ‘Export License Log’. Our scenario is for delivery of type NLCC created for an inter-company stock transport order. (i.e.not a sales order case where the license may get copied from sales order to delivery through copy control)
    As we understand, for legal control – relevant scenarios, export license for each item shall be determined afresh every time the delivery is accessed. (Depending on legal regulation, grouping, destination country, export control class, delivery partners vis-à-vis license master customer assignments etc.)
    To print the license text on one of the delivery output types, we want to access the license number for each item. (determined under export license log)
    Our question is:  is there any standard SAP table which stores the license number assigned to a delivery item?
    We have checked some of the license tables (T606*, VAEX, EMXX etc.) but couldn’t get any specific table storing delivery-item-specific license data.
    Helpful answers Text Removed
    Regards,
    Jagan
    Message was edited by: G Lakshmipathi
    Dont add such text in your post

    Hi Lakshmipathi,
    The export control log can be accessed by going to delivery Extras-> Export license log
    We need a table that stores the determined license for each item in a delivery document ( as shown in the below screenshot)
    Regards,
    Jagan

  • Is there any Standard SAP Report?for displaying Billing block/Status-Order

    Hi,
    Am a ABAP Developer. I heard that there is SAP Query/ABAP Query/Standard SAP report for the below functionality/requirement. SO, pls. let me know if there is any SAP Query/ABAP Query/Standard SAP report?
    "This report is suppose to display Credit and Debit memo documents which are blocked and yet has a status of APRV; the other display is for Return Documents which are blocked and yet has a status RCVD."
    thanq

    Hi,
    Use t-code
    V23 - Blocked sales document for billing
    VA14L - Sales document blocked for delivery
    VFX3 - For blocked billing documents.
    Kapil
    Edited by: Kapildev Farakte on Jan 8, 2010 4:15 AM

  • Standard SAP program to generate email invoices ?

    Hello,
    Is there is any standard SAP SD program which can analyse the accounts recevables, and generate many invoices for many customers with a single run ? The program would then recognize the customer e-mail adress and send an e-mail with the invoice in attachment.
    I think that the SAP FSCM application can do that, but what about SD ?

    Hi,
    I am not sure whether this will really meets your requirement.
    But trying to suggest you with following way:
    could you just check the NACE->V3->MAIL option.
    Though this we can send the Invoice details through mail to respective Payee or Customer.
    And through VF31 we can send mail for multiple Invoices.
    Thank You,
    RB.

  • Creating a new Search Help on a standard SAP table field?

    Good day, everyone!
    As part of a report I am writing, the customer would like to have Search Help added to the AUFEX field in table AUFK.  They would like this functionality so that when they are changing an order via t-code ko02, they can get a list of valid values to put in field AUFEX.  I would like to tie it to a zTable I've created; in my zTable, I have just 2 fields:  a key value (that will go into AUFEX) and a text description of the key value.  This zTable is used in my report.
    While I've created a Search Help on this table already for table maintenance, I've never added a custom Search Help to an existing standard SAP table field before.  I've done some Googling and other searching to see what I need to know, but I've only been able to find information on Collective Search Helps.  AUFEX doesn't yet have a Search Help field, so I don't think Collective Search Helps is my answer.
    Is this possible?  Can I add a custom Search Help to a standard SAP table field that doesn't have any Search Help linked to it yet?  Is there an existing thread or guide somewhere that can tell me how to do this?
    Thank you!

    Hi
    Yes u can: u can assign the search help to (A) data element livel or (B) field table livel.
    After creating your search help:
    A) Run SE11, insert your data element (AUFEX), press edit and insert the search help in "Search Help" area on DEFINATION tab;
    B) Run SE11, insert your table (AUFK), press edit, place the cursor on your field (AUFEX) and go to GoTo->Search help->for field
    But u should consider it'll mean to change a standard object for both cases: so u need to get the access key from your OSS.
    Max

  • Calling a Standard SAP transaction VA03 from another web dynpro application

    Hi All,
    I have a requirement wherein I need to call the standard SAP transaction VA03 whenever a sales order is selected in some other we dynpro application so that the sales order gets displayed.
    No regarding usage of OBN for the above functionality I have certain queries:
    1. In order to call VA03 do I need to create a transactional iview for it or is there any direct method.Also how to pass this sales order number as parameter to the T.Code.
    2. Can we use standard business object BUS2032 for OBN or a new Business object is created.What exactly is the purpose of these standard business objects in portal and when should they be used.
    Thanks in advance
    Aman Gupta

    Hi Aman - Do you have a portal team in your project or you have to create the IVIEWS yourself?
    I do have a portal team and I dont know how they create the IVIEWs but for example, I will go to my portal team and I will ask them to create an IVIEW for TCODE VA03, they will created and they will tell me the input parameters they entered for the IVIEW so I can call OBN and display in webdynpro.
    SAP in SRM has webdynpro e.g. for BUS2121 and they have an IVIEW already implemented in the portal context pointing to the webdynpro of BUS2121 so we can used the IVIEW by calling OBN and passing the parameters; in my case the object_type will be 'shc' and the operation will be 'display' and the paremeters itab will be the GUID of my shopping cart, that way the OBN can understand which Shopping cart open and in which operation mode.
    I also did something like your requirement, I need it to display a specific case in Records Management but SAP has a standard IVIEW for records management 'RMREGEDIT' that didn't work for my requirement so I went to SE38 created a program that displayed the case based on GUID and I created a TCODE of my custom program. Portal team created a custom IVIEW of my custom TCODE and they told me the input parameters to call the TCODE in OBN and I pass in the itab parameter the GUID of the case using the FM that I post before.
    The action to call the OBN is in the event handler ON_CLICK of my ALV and the action is getting trigger when the user actually clicks a HYPERLINK in the ALV.
    Hope this helps you!
    Please feel free to ask me more details if you need.
    Jason PV

  • Exception handling for a standard SAP Function Module - the OO way

    Hello,
    I was wondering what is the correct way to call a standard SAP function module inside a method of global class.
    I want to display the error via the:
    get_text( ) and get_longtext( ) methods.
    I don't want to use the sy-subrc check. Is this possible?
    My example doesn't seem to work...
    See example bellow:
    DATA: ex_object_cx_root TYPE REF TO cx_root,
          ex_text TYPE string,
          ex_text_long TYPE string.
    TRY.
          CALL FUNCTION 'L_TO_CONFIRM'
            EXPORTING
              i_lgnum                        = i_lgnum      " Warehouse number
              i_tanum                        = i_tanum      " Transfer order number
              i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
              i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
            TABLES
              t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
            EXCEPTIONS
              to_confirmed                   = 1    " Transfer order already confirmed
              to_doesnt_exist                = 2
              item_confirmed                 = 3
              item_subsystem                 = 4
              to_item_split_not_allowed      = 51
              input_wrong                    = 52
              OTHERS                         = 53.
        CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
          " Error:
          RAISE EXCEPTION TYPE zcx_transfer_order
            EXPORTING textid = zcx_transfer_order=>zcx_transfer_order
                 err_class = 'ZCL_WM_TRANSFER_ORDER'
                 err_method = 'CONFIRM_TO_2STEP_PICKING'
                 err_message_text = ex_text
                 err_message_text_long = ex_text_long.
      ENDTRY.
    Thank you very much in advance

    Hello Marko,
    If i understand correctly you've enclosed the call to the FM 'L_TO_CONFIRM' inside the TRY ... CATCH ... ENDTRY block.
    CATCH cx_root INTO ex_object_cx_root.
          ex_text = ex_object_cx_root->get_text( ).
          ex_text_long = ex_object_cx_root->get_longtext( ).
    You can't do this because the FM 'L_TO_CONFIRM' doesn't propagate OO exceptions!
    Your approach is almost correct, what you've to do is goes like this:
    CALL FUNCTION 'L_TO_CONFIRM'
      EXPORTING
        i_lgnum                        = i_lgnum      " Warehouse number
        i_tanum                        = i_tanum      " Transfer order number
        i_quknz                        = '1'          " '1' - confirm withdrawal only (picking )
        i_commit_work                  = 'X'          " Indicator whether COMMIT WORK in function module
      TABLES
        t_ltap_conf                    = it_ltap_conf " Table of items to be confirmed
      EXCEPTIONS
        to_confirmed                   = 1    " Transfer order already confirmed
        to_doesnt_exist                = 2
        item_confirmed                 = 3
        item_subsystem                 = 4
        to_item_split_not_allowed      = 51
        input_wrong                    = 52
        OTHERS                         = 53.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
              INTO ex_text. "Get the ex_text by this technique & not by CX_ROOT->GET_TEXT()
    ENDIF.
    I'll have to check how to fetch the long text of the message
    BR,
    Suhas

Maybe you are looking for