Skip to Content

As introduced in http://scn.sap.com/community/crm/webclient-ui-framework/blog/2015/12/26/logic-for-f4-help–1, F4 input help shows help values in a modal dialog. Without special tools, It is not possible to set breakpoint and make JS debug from this popped up modal dialog. In this document, I will show you how to debug using a workaround.

  1. Firstly, we need to get the URL link for requesting help values: make a httpwatch trace when clicking F4 help icon.
  2. From the httpwatch trace, find the line for ‘CRM_THTMLB_UTIL/f4_help2.do’ request. Right click and select menu ‘Copy https://….’.
    0 to get the url.PNG
  3. Paste the url into another IE tab and Enter, a help values will be shown as a normal page.
    1 open the url in another tab.PNG
  4. Click F12, Developer tool will be launched. We can search ‘thtmlbF4PickRow’ and set a JS breakpoint.
    find and set bk in thtmlbF4PickRow.PNG
  5. Then select any entry, the JS bk will stop.
    JS when select one line -1.PNG
  6. If I select the 2nd entry, it will go into function dynshlp_sel_2.
    JS when select one line -2.PNG
  7. Inside function SetInput, thtmlbF4SetInput is called. Notice the callstack and the values for SelValue and keyInputfieldId.
    JS when select one line -3.PNG
  8. In function thtmlbF4SetInput, win is ‘undefined’. This is because this value help screen has no parent window.
    JS when select one line -4 win is undefine.PNG
  9. In order to get through more codes, we make a change for ‘win’ manually — input any string to make ‘win’ a defined object.
    JS when select one line -5 win is changed.PNG
  10. Here is the farthest place where we can debug. We cannot debug further because our ‘win’ is just a string object instead of a window object. But from here we can see ‘visible’ is object for ‘C35_W162_V163_marketing_classific_text’ which is the ‘rating description’ input field.
    JS when select one line -6 2 get text field element .PNG
  11. This is the place to set value.
    JS when select one line -6 3 set text field element .PNG
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply