Error in the macro 'rp-provide-from-last'

Hi, experts!
Can anyone please help me address an error regarding the macro rp-provide-from last? During activation, this error is returned: "Unable to interpret SPACE. Possible causes: Incorrect spelling or comma error".  The line in question is this: rp-provide-from-last p0000 SPACE pn-begda pn-endda This is the only error standing between me and activation. Please help
Thanks in advance.
Regards,
brent

HI Brent,
Use this sample example :
REPORT  ZTEST_94TEST.
TABLES :pernr.
INFOTYPES :0000.
GET PERNR.
rp-provide-from-last p0000 SPACE pn-begda pn-endda.
No syntax errors and activated. hope it will be helpful.

Similar Messages

  • Query on reading infotype 0001 using the macro rp-provide from last p0001

    Dear Friends,
            I have a question rgarding relating the infotype 0001 when we are using in the program the logical database PNP.
    iam using rp-provide-from-last p0001 space sydatum sydatum
            if pnp-sw-found eq 1.
            append p0001 into i_p0001.
            endif.
    iam getting a problem in production , in the selection screen iam passing for emloyee subgroup with multiple values option.
    i have passed E,H,S  -> where E means Executive , H means hourly and S means salaried employee...
    one particular scneario is iam having an employee whose
    employee subgroup is C (contactor) and on the selection screen if am passing this personnel no and on the selection screen iam only having in the multiple selection option only E,H,S but not C so this record should  should fail but it is getting success and appending to internal table i_p0001
    which is wrong
    , i mean to say the macro is getting success
    rp-provide-from-last p0001 space sydatum sydatum
    this employee .
    my question is will the macro will not check on the selection screen the employee gropu which we have passed and should i exclusively check
    if p0001-persk in pnppersk ?? or please let me knwo how to check this wrong employee not getting appended to my internal table.
    please let me know
    regards
    madhuri

    Hi Madhuri
      The macro rp-provide-from-last p0001 will not fetch data from the database, it simply extracts the last record from the available internal table P0001[]  for the time frame provided(as 3rd and 4th parameters). You can check the definition of the macro from the database table TRMAC, it simply uses the LOOP....ENDLOOP and IF conditions to arrive at the last record and populates the fields pnp-sw-found, pnp-sw-tabix.
        And coming to your problem, please check all the IT0001 records of the EE concerned, it can happen that the EE is attached to different employee subgroups in different time frames and hence the LDB is fetching all the available records of the EE (even if the employee subgroup is not among the one's selected in  the selection screen). If this is the case, I reckon, u've to perform manual check before appending to the internal table.
    Note:  The macro  rp-provide-from-last p0001 space sydatum sydatum will only fetch the valid IT0001record as on date - sy-datum

  • An unknown error occurred (0x80092013) what the **** is going on  from last six month i am unable to access i tune store?pls give me solution which should help me to shortout this problem as soon as possible

    An unknown error occurred (0x80092013) what the **** is going on  from last six month i am unable to access i tune store?pls give me solution which should help me to shortout this problem as soon as possible. i have not expected this from apple

    I have been trying for months to put iTunes on my laptop and kept getting installation errors in Windows 7. I gave up and just installed iTunes on my PC running XP.
    Now I have to install Quicktime on the laptop and once again I get an installation error 0x800736FD.
    All windows updates are fine, none failed.
    I have removed all apple software from my laptop using CCleaner, common files and folders. Tried reinstalling and still the same error.
    Could you offer any advice on how to get both quicktime and then iTunes working??
    Thank you in advance

  • Problem with 'RP-PROVIDE-FROM-LAST' and IT0377(GB)

    Greetings,
    I have encountered a problem in that we have an interface from SAP to UNIPAY and this interface selects all the paydata from employees and then converts it so that it can be payed via UNIPAY. Now this in itself may sound fairly simple but the problem is the interface is selecting data from IT0377 that has been delimited and still paying the employee which is incorrect. I have debugged the interface and the problem is with 'RP-PROVIDE-FROM-LAST IT0377' which is still selecting and bringing through the data of the delimited record.
    Has anybody had this problem and if so what was done to correct it ?
    Thanks
    Mark

    this macro will put the last infotype record in the header line of concerned internal table, for the given period (pn-begda and pn-endda on selection screen).
    rp-provide-from-last p0377 space pn-begda pn-endda.
    here in the header of internal table p0377, the last record valid for period pn-begda n pn-endda, will be put after execution of the macro statement.
    i think u r looking the table 1st record in debug mode but u shud not look at 1st record instead of tht see the header line of table and use that header data.
    see my dummy code below -
    *& Report  ZPPL_PREVEMPLOYERS                                          *
    REPORT  ZPPL_PREVEMPLOYERS   message-id rp
                                 line-size 250
                                 line-count 65.
    *Program logic :- This Report is used to Download all the Previous
    * Employer (IT0023) records of the employees
    *eject
    *& Tables and Infotypes                                                *
    tables: pernr.
    infotypes: 0000,
               0001,
               0002,
               0023.
    *eject
    *& Constants                                                           *
    constants: c_1(1)       type c               value '1'   ,
               c_3(1)       type c               value '3'   ,
               c_i(1)       type c               value 'I'   ,
               c_x(1)       type c               value 'X'   ,
               c_eq(2)      type c               value 'EQ'  ,
               c_pl03       like p0001-werks     value 'PL03'.
    *eject
    *& Selection-Screen                                                    *
    parameters: p_file  like rlgrap-filename default 'C:TempABC.xls',
                p_test  as checkbox default c_x               .
    *eject
    *& Internal tables                                                     *
    * Internal Table for Output
    data: begin of t_output occurs 0    ,
           pernr like pernr-pernr       ,
           nachn like p0002-nachn       ,
           vorna like p0002-vorna       ,
           orgeh_stext like p1000-stext ,
           plans_stext like p1000-stext ,
           begda like p0023-begda       ,
           endda like p0023-endda       ,
           land1 like p0023-land1       ,
           arbgb like p0023-arbgb       ,
           ort01 like p0023-ort01   .
    data: end of t_output           .
    *eject
    *& Variables                                                           *
    data: o_stext like p1000-stext,
          p_stext like p1000-stext.
    *eject
    *& Initialization                                                      *
    Initialization.
    * Initialize Selection-Screen values
      perform init_selction_screen.
    *eject
    *& AT Selection-screen                                                 *
    at selection-screen .
    * Check if Test run selected, download file name should be entered
      if p_test is initial.  "
        if p_file is initial.
          message e016 with 'Please enter file name'
                            'specifying complete path'.
        endif.
      endif.
    *eject
    *& Start-of Selection                                                  *
    Start-of-selection.
    get pernr.
      clear t_output.
    * Read Infotype 0
      rp-provide-from-last p0000 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * Check if employee is active
      check p0000-stat2 in pnpstat2.      "pernr Active
    * Read Infotype 1
      rp-provide-from-last p0001 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * check if employee belongs to PL03
      check p0001-werks in pnpwerks.  "belongs to PL03
    * Check if emp belongs to Active Group
      check p0001-persg in pnppersg.
    * Read Infotype 2
      rp-provide-from-last p0002 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * Read Org Unit Text.
    CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
         EXPORTING
              OTYPE                   = 'O'
              objid                   = p0001-orgeh
              begda                   = p0001-begda
              endda                   = p0001-endda
              reference_date          = p0001-begda
         IMPORTING
              object_text             = o_stext
          EXCEPTIONS
              nothing_found           = 1
              wrong_objecttype        = 2
              missing_costcenter_data = 3
              missing_object_id       = 4
              OTHERS                  = 5.
    *Read Position Text.
    CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
         EXPORTING
              OTYPE                   = 'S'
              objid                   = p0001-plans
              begda                   = p0001-begda
              endda                   = p0001-endda
              reference_date          = p0001-begda
         IMPORTING
              object_text             = p_stext
         EXCEPTIONS
              nothing_found           = 1
              wrong_objecttype        = 2
              missing_costcenter_data = 3
              missing_object_id       = 4
              OTHERS                  = 5.
    * Gather all the required information related to the emp
      move: pernr-pernr to t_output-pernr,
            o_stext to t_output-orgeh_stext,
            p_stext to t_output-plans_stext,
            p0002-nachn to t_output-nachn,
            p0002-vorna to t_output-vorna.
    * Gather previous Employee details
      loop at p0023.
        move-corresponding p0023 to t_output.
        append t_output.
      endloop.
    *eject
    *& End-of Selection                                                    *
    end-of-selection.
      perform print_report.
    * Downlaod the file
      if not t_output[] is initial.
        if p_test eq space.
          perform download_file.
        endif.
      else.
        write: 'No records selected' color col_negative.
      endif.
    *eject
    *& Top-of-page                                                         *
    Top-of-page.
    * Print Header
      perform print_header.
    *eject
    *&      Form  download_file
    * Description :
    FORM download_file .
      DATA: full_file_name    TYPE string,
            z_akt_filesize    TYPE i     .
      full_file_name = p_file.
    *  download table into file on presentation server
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = full_file_name
          filetype                = 'DAT'
          NO_AUTH_CHECK           = c_x
          codepage                = '1160'
        IMPORTING
          FILELENGTH              = z_akt_filesize
        CHANGING
          data_tab                = t_output[]
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          not_supported_by_gui    = 22
          error_no_gui            = 23
          OTHERS                  = 24.
      IF  sy-subrc               NE        0.
        MESSAGE e016 WITH 'Download-Error; RC:' sy-subrc.
      ENDIF.
    ENDFORM.                    " download_file
    *eject
    *&      Form  print_report
    *Description:
    FORM print_report .
      data: i       type i,
            w_count type i.
      sort t_output.
    * Print the report
      loop at t_output.
        i = sy-tabix mod 2.
        if i eq 0.
          format color col_normal intensified on.
        else.
          format color col_normal intensified off.
        endif.
        write:/1     t_output-pernr          ,
               10     t_output-vorna(25)     ,
               35    t_output-nachn(25)      ,
               61   t_output-orgeh_stext     ,
               102  t_output-plans_stext     ,
               143  t_output-begda           ,
               154   t_output-endda          ,
               168   t_output-land1          ,
               178   t_output-arbgb(40)      ,
               219   t_output-ort01          ,
               249   space              .
      endloop.
      uline.
      Describe table t_output lines w_count.
      Skip 2.
      Write:/ 'Total No of Records Downloaded: ' color col_total,
              w_count.
    ENDFORM.                    " print_report
    *eject
    *&      Form  print_header
    *Description:
    FORM print_header .
      skip 1.
      Uline.
      format Intensified on color col_heading.
      write:/1   'Pers. #'        ,
             10   'Last Name'     ,
             35   'First Name'    ,
             61   'Org Unit'      ,
             102  'Position'      ,
             143  'Beg Date'      ,
            154   'End Date'      ,
            168   'Cntry Key'     ,
            178   'Prev Employer' ,
            219  'City'           ,
            249   space          .
      format intensified off color off.
      uline.
    ENDFORM.                    " print_header
    *eject
    *&      Form  init_selction_screen
    *Description:
    FORM init_selction_screen .
      refresh: pnpwerks,
               pnppersg,
               pnpstat2.
      clear:   pnpwerks,
               pnppersg,
               pnpstat2.
      pnpwerks-sign   = c_i.
      pnpwerks-option = c_EQ.
      pnpwerks-low    = c_pl03.
      append pnpwerks.
      pnppersg-sign   = c_i.
      pnppersg-option = c_EQ.
      pnppersg-low    = c_1.
      append pnppersg.
      pnpstat2-sign   = c_i.
      pnpstat2-option = c_EQ.
      pnpstat2-low    = c_3.
      append pnpstat2.
    ENDFORM.                    " init_selction_screen

  • What is difference between rp-provide-from-last VS rp_provide_all

    Hello All:
        I have the following code:
    rp-provide-from-last p0000 space pn-begda pn-endda. -- I know this statement gets latest record from Infotype 0 for the given period.
    rp_provide_all       p0210 'FED' pn-begda pn-endda.
    Could someone please tell me what exactly the code above does? Rewards assured.
    Thanks.
    Mithun

    RP_PROVIDE_ALL does not look like a standard macro. I have checked entries in TRMAC table and it does not return anything for this macro name.
    I believe there must be custom macro created in your program which is used here. Please check the program and see if the declaration is available for RP_PROVIDE_ALL.
    ashish

  • Difference between RP_PROVIDE_FROM_LAST and RP-PROVIDE-FROM-LAST

    Can anyone tell me the difference between RP_PROVIDE_FROM_LAST and RP-PROVIDE-FROM-LAST?  Both the macros are same difference is with underscore(_) and hiphen(-).  Both are working fine for the functionality without any difference.  Then why there are two macros for a single functionality?

    Just providing the links are considered as link farming ( which are against the rules of the forums ), the links would be removed for the following reasons:
    1) If a link is provided( not many ) , then you must point out the explanation in it
    2) If the links were easily searchable by the OP
    3) If the links just direct you to sap documentation
    4) If the reply consists only bunch of link references.
    I think the 3rd & 4th point made your post to be deleted.
    There are no links which states the differences between these two Macro's. Mod's are doing their right job, please join them and make this forum clean
    Kesav

  • Difference  Between Provide and RP-PROVIDE-FROM-LAST  in ABAP-HR

    what is the Difference Between Provide and RP-PROVIDE-FROM-LAST  IN hR. IF I want to retrieve data in BETTWEEN BEGDA AND ENDDA. what these 2 ill return.
       Both ill return the LAtest record. plz  let me know what ill happen.
      With Regards,
       Venkata Suresh K

    PROVIDE is like a loop statement and it reads records between BEGDA and ENDDA. There is a lot to it, you can read doc...
    RP-PROVIDE-.. _> This is like read table.
    It is similar to : Sort itab descending. read itab index 1.
    If you want data between BEGDA and ENDDA and you have 2 internal tables, you can use PROVIDE. Otherwise, you can use a normal LOOP statement. Provide is helpful if you want to get data from more than 1 table.
    For eg: Infotype 0000 has 2 records from 1.1.2000 to 1.1.2006, and 2.1.2006 to 31.12.9999, and Infotype 0185 has 1 record from 1.1.2005 to 31.12.9999.
    If you use a provide BETWEEN BEGDA and endda in this case, it will run through the loop 3 times with these dates :
    1.1.2000 to 31.12.2004.
    1.1.2005 to 1.1.2006
    2.1.2006 to 31.12.9999
    If a record is not there in one of the internal tables during the date, there is a PNNNN_VALID flag which is filled up (4.6c) and in mySAP onwards, you have explicit valid flags.
    Hope it helps. Please reward points if helpful.
    Regards.
    Samant

  • 'RP-PROVIDE-FROM-LAST IT0377'

    Greetings,
    I have encountered a problem in that we have an interface from SAP to UNIPAY and this interface selects all the paydata from employees and then converts it so that it can be payed via UNIPAY. Now this in itself may sound fairly simple but the problem is the interface is selecting data from IT0377 that has been delimited and still paying the employee which is incorrect. I have debugged the interface and the problem is with 'RP-PROVIDE-FROM-LAST IT0377' which is still selecting and bringing through the data of the delimited record.
    Has anybody had this problem and if so what was done to correct it ?
    Thanks
    Mark

    Hi,
                 Did you check The format, apparently , is DD.MM.YYYY.?
    <b>Reward points</b>
    Regarsd

  • Rp-provide-from-last p0002 space pn-begda pn-endda.

    Hello Gurus,
    I need to know what is the sintax to get a particular person from PNP using
    rp-provide-from-last p0002 space pn-begda pn-endda.
    Thanks

    Hello Enrique,
    Check this code, if the sy-subrc as equal 2, employee is inactive:
    *&      Form  check_pernr_exists
    *       Check if employee exists
    *      -->P_PERNR    Personnel Number
    *      <--P_SUBRC    Return code
    FORM check_pernr_exists USING p_pernr TYPE any
                            CHANGING p_subrc TYPE sysubrc.
      CLEAR p_subrc.
      CALL FUNCTION 'RP_CHECK_PERNR'
        EXPORTING
          beg                     = sy-datum
          pnr                     = p_pernr
    *   IMPORTING
    *     NAME                    =
    *     PERSA                   =
    *     BUKRS                   =
    *     KOSTL                   =
    *     MOLGA                   =
    *     PERSONNEL_SUBAREA       =
        EXCEPTIONS
          data_fault              = 1
          person_not_active       = 2
          person_unknown          = 3
          exit_fault              = 4
          pernr_missing           = 5
          date_missing            = 6
          OTHERS                  = 7
      IF sy-subrc <> 0.
        p_subrc = sy-subrc.
      ENDIF.
    ENDFORM.                    "check_pernr_exists

  • How do I set Safari to prompt before closing multiple tabs OR reopen all of the closed tabs when when I relaunch the application?  The "Reopen all windows from last session" is unselectable.

    How do I set Safari to prompt before closing multiple tabs OR reopen all of the closed tabs when when I relaunch the application?  The "Reopen all windows from last session" is unselectable.

    It would seem if your choose "Show my windows and tabs from last time" '''''and''''',
    *when you last closed Firefox, you had no web site open (just a blank tab), that it would open just that blank tab
    *when you last closed Firefox, you had one or more tabs/web site open, that would allow you to "Restore Previous Session"
    #Have you tried that?
    #If so, what is happening in each circumstance when you reopen Firefox?
    '''Restore Previous Session'''<br />
    Open tabs are automatically saved when closing Firefox beginning in Firefox 4. To open your last session, after Firefox starts, click History > Restore Previous Session. For this to work
    #You must be remembering history (Options > Privacy > Remember my browsing history).
    #*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
    #You must not be using Private Browsing or permanent Private Browsing
    #*See [https://support.mozilla.com/en-US/kb/Private%20Browsing Private Browsing]
    #You must not use Clear Recent History or Clear history when Firefox closes
    #*See [https://support.mozilla.com/en-US/kb/Clear%20Recent%20History Clear Recent History]
    #*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]

  • "error obtaining the list of methods" from Sun deploytool, "security" pane

    I'm trying to apply security features to a web application in a .ear file. Following the J2EE tutorial I try to play with the Security tabbed pane in deploytool. Well, all the time I do get
    Error obtaining the list of methods on MyService
    java.lang.RuntimeException: my.package.MyService
    The thing is, I could sucessfully deploy and use my web service ...
    Maybe someone @sun.com could have a look at this stacktrace I got from deploytool (-verbose switch)
    Jan 27, 2005 1:36:27 PM com.sun.enterprise.deployment.EjbDescriptor getMethodDescriptors
    SEVERE: "DPL8008: method/class loading failure : method/class name - (EjbDescrip
    tor.getMethods())"
    ---------------- Exception -----------------------------------------------------
    [EjbComponentSecurityInspector.refresh:595]
    Getting method descriptors
    java.lang.RuntimeException: de.rochade.srap.ws.RoSrapScriptExecService
    java.lang.RuntimeException: de.rochade.srap.ws.RoSrapScriptExecService
    at com.sun.enterprise.deployment.EjbDescriptor.getMethodDescriptors(EjbD
    escriptor.java:1318)
    at com.sun.enterprise.tools.deployment.ui.ejb.EjbComponentSecurityInspec
    tor.refresh(EjbComponentSecurityInspector.java:593)
    at com.sun.enterprise.tools.deployment.ui.utils.InspectorPane.privateRef
    resh(InspectorPane.java:880)
    at com.sun.enterprise.tools.deployment.ui.utils.InspectorPane._refresh(I
    nspectorPane.java:1012)
    at com.sun.enterprise.tools.deployment.ui.utils.InspectorPane.access$100
    (InspectorPane.java:38)
    at com.sun.enterprise.tools.deployment.ui.utils.InspectorPane$DeferredRe
    fresh.run(InspectorPane.java:864)
    at com.sun.enterprise.tools.deployment.ui.utils.UIInvocationEvent.dispat
    ch(UIInvocationEvent.java:53)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at com.sun.enterprise.tools.deployment.ui.utils.UIEventQueue.dispatchEve
    nt(UIEventQueue.java:168)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Any known bug in deploytool or so?
    Asked this first at
    http://forum.java.sun.com/thread.jspa?threadID=590706&tstart=0
    there are some more problems mentioned ...
    Thanx!
    Merten

    Hi Merten,
    I'm not sure if the Security tab will add the basic
    auth that you mentioned in your email. You might
    have a look at the Login Config on the Endpoint tab
    and see if that gives you what you want.
    http://docs.sun.com/source/819-0079/dgdesc.html#wp1366
    64
    JHi J,
    I tried this Login Config stuff, but it worked for me only in the servlet (JAX-RPC) world, not for my EJB web service. In the J2EE tutorial I found the steps described for servlet based web services (this security-contraints stuff), I could protect my HTTP POST method successfully. But for an EJB web service, what are the required steps to add HTTP Basic auth? It seems to be way different, is it supported in deploytool the same way as for servlets?
    I'll send another copy of my .ear to you ([email protected]). Sorry, I know this is not an dt (deploytool) related issue, but perhaps you can help me anyway. :-) I think I did the right stuff in my deployment descriptors, but it's not working. And I saw a NPE in my server's log file (will send you the stack trace too).
    cu
    Merten

  • How do I fix errors in the document I converted from PDF to Word?

    It converted easily but it has all kinds of strange lettters and numbers making it difficul to read.

    Hi Bogdana,
    Thank you for reaching out!
    Depending on the state of the original document the PDF was created from, this may be of assistance:
    OCR
    Let me know if it worked for you.
    Kindest regards, Stacy

  • How can I change the default search provider from yahoo to google via script?

    I have 350 users who are upset about the default search provider being changed. I need to change it back via script. How do I do this? I have attempted lockPref("browser.search.isUS", false); in my mozilla.cfg file with no success.

    ''philipp [[#answer-665520|said]]''
    <blockquote>
    hi, does this work?
    defaultPref("browser.search.defaultenginename.US", "data:text/plain,browser.search.defaultenginename.US=Google");
    </blockquote>
    Unfortunately, no it does not.

  • Error during the work with KPI from MSAS 2012.

    Good afternoon. You couldn't help me.
    At me it is established on the Sharepoint 2013 SP1 Enterprise Trial server. On other MS SQL 2012 SP2 and MSAS Multidimensional server.
    I configure Sharepoint 2013 BI features and PerformancePoint Services.
    Also it was connected to the cube. All dimensions and measures are visible and I can work with them and create reports and dashboards.
    But I can create in Scorecards only new KPI on the basis of my measures. In attempt of import already existing in Analysis services KPI's there is a mistake : (from system log)
    There was an unforeseen error: 13365.
    System.IO.FileNotFoundException:
    It is impossible to load the file or assembly "Microsoft.AnalysisServices, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    or one of components, dependent on them. It isn't possible to find the specified file.       
    File name: "Microsoft.AnalysisServices, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
       in Microsoft.PerformancePoint.Scorecards.Server.ImportExportHelper.GetImportableAsKpis(DataSource asDataSource)
       in Microsoft.PerformancePoint.Scorecards.Server.PmServer.GetImportableAsKpis(DataSource dataSource)

    Hi,
    Please try following the note 206168. which tells you to change the r3trans.
    If you have changed the r3trans earlier, then try using the same r3trans as provided in the kernel CD.
    Hope this helps
    Regards,
    Imran

  • Error in the standard htmlb.jar from EP6 SP9 (HTMLx)

    I've successfully migrated my custom developed applications from EP5 SP5 to EP6 SP9. I've used the well known 3rd party
    HTMLxframework for the DatePicker and Locale corrections only (I am a brazilian developer). 
    In the org.sapportals.htmlb.rendering there is a class named RenderUtil.
    This class has two places with this specific code:
    ResourceBundle r = ResourceBundle.getBundle("java.text.resources.LocaleElements", locale);
    Which is very wrong as the "java.text.resources.LocaleElements" is available only until j2sdk 1.3. In the EP5 that runs under 1.3 there's no problem but EP6 uses j2sdk 1.4 and this packages has been relocated from the standard package to a "ext" (extension) package and been renamed as "sun.text.resources.LocaleElements".
    So, as HTMLx uses this RenderUtil class, I had to decompile the original from the htmlb.jar using JAD and corrected the above line with the following new line or code:
    ResourceBundle r = ResourceBundle.getBundle("sun.text.resources.LocaleElements", locale);
    More than that, I had to change several places of the HTMLx's HxInputFieldRenderer to reflect the class name changes made to the CSSs of the EP6. In the new version SAP does not open a pop-up window for the DatePicker. Instead they chose to rewrite it as a dynamic layer. So the HTMLx code has to change to reflect that.
    Here follows the workaround version of HxInputFieldRenderer.java (notice that some strings are not internationalized, I just copied and pasted the parts I needed, so it's not a definitive version, but will help you get a clue of what to do):
    * HxInputFieldRenderer.java
    * Copyright (C) 2003  Alan Hobbs
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU Lesser General Public
    * License as published by the Free Software Foundation; either
    * version 2.1 of the License, or (at your option) any later version.
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    * Lesser General Public License for more details.
    * You should have received a copy of the GNU Lesser General Public
    * License along with this library; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    package org.open.sapportals.htmlx.rendering;
    import javax.servlet.jsp.PageContext;
    import org.open.sapportals.htmlx.HxField;
    import org.open.sapportals.htmlx.HxInputField;
    import org.open.sapportals.htmlx.HxLocaleUtil;
    import com.sapportals.htmlb.Component;
    import com.sapportals.htmlb.Form;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.enum.DataType;
    import com.sapportals.htmlb.enum.InputFieldDesign;
    import com.sapportals.htmlb.enum.ResourceType;
    import com.sapportals.htmlb.rendering.DefaultInputFieldRenderer;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.type.AbstractDataType;
    import com.sapportals.htmlb.type.DataDate;
    import com.sapportals.htmlb.type.DataString;
    import com.sapportals.htmlb.type.Date;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.logger.ILogger;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
    import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
    import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
    * @author Alan.Hobbs
    * To change the template for this generated type comment go to
    * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    * Render the HxInputField.
    * Version   Date         Author     Description
    * 0.1.0     1-Aug-2003   AHobbs     Origional
    * 0.1.0     4-Aug-2003   AHobbs     Added resource bundle
    * 0.1.1     6-Aug-2003   AHobbs     Write hidden fields to store the locale
    * 0.1.1     8-Aug-2003   AHobbs     Don't show the date picker button if the field is disabled
    * 0.1.2    10-Aug-2003   AHobbs     Only generate the month and day name javascript once per form
    * 1.1.0     1-Apr-2004   AHobbs     Added render methods to allow a HTMLB InputField
    *                                   to be used instead of a HxInputField
    * 1.1.0     6-Apr-2004   AHobbs     Changed the names for the hidden fields to "_HTMLX_xxxxx"
    * 1.1.0    20-Apr-2004   AHobbs     Allow debug code to be written to the console with System.out.println()
    * 1.3.0      4-May-2004  AHobbs     Added PopUp rendering
    public class HxInputFieldRenderer extends DefaultInputFieldRenderer {
        protected ILogger m_logger = PortalRuntime.getLogger("htmlx");
        private static boolean writingDebugToConsole;
        public HxInputFieldRenderer() {
            super();
        public void render(Component component, IPageContext pc)
            m_logger.info("Entry: HxInputFieldRenderer.render()");
            if (!(component instanceof HxInputField)) {
                m_logger.warning(
                    "HxInputFieldRenderer.render() component is not instanceof HxInputField " +
                    "(component.getClass().getName()='" + component.getClass().getName() + "')");
                return;       
            HxInputField inf = (HxInputField)component;
            DataType type = inf.getType();
            if (writingDebugToConsole) {
                System.out.println("Start    rendering HxInputField (id='" + inf.getId() + "') ...");
            m_logger.info("  id='" + inf.getId() + "'");
            m_logger.info(inf.toString());
    /*  Only include for PDK version 5.0.5.0 and above - may not be required ???
    //        m_logger.info("  VersionInfo.getVersion()='" + VersionInfo.getVersion() + "'");
    //      if (VersionInfo.?????) {
    //            if (pc.isUsingSession() && !inf.isVisible() && inf.getParkInSession()) {
    //                String uniqueName = pc.getParamIdForComponent(inf);
    //                Object value = inf.getValue();
    //                String valueString = null;
    //                if (value != null) {
    //                    if (value instanceof AbstractDataType) {
    //                        AbstractDataType dataValue = (AbstractDataType)value;
    //                        if (dataValue != null)
    //                            if (dataValue.isValid())
    //                                valueString = dataValue.toString(pc);
    //                            else
    //                            if (dataValue instanceof DataString)
    //                                valueString = dataValue.toString(pc);
    //                            else
    //                                valueString = dataValue.getValueAsString();
    //                    else {
    //                        valueString = value.toString();
    //                else {
    //                    valueString = "";
    //                pc.getParamList().put(uniqueName, valueString);
    //                return;
            boolean showDateHelp = false;
            if (DataType.DATE.equals(type)
            && inf.isShowHelp()
            && !inf.isDisabled()) {
                showDateHelp = true;
            boolean showPatternHint = false;
            if (inf.isShowPatternHint()
            && (DataType.DATE.equals(type)
            ||  DataType.TIME.equals(type))
            ||  ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0))) {
                showPatternHint = true;
            boolean showStatusMsg = false;
            if (inf.isShowStatusMsg() && (inf.getStatusMsg() != null) && (inf.getStatusMsg().length() > 0)) {
                showStatusMsg = true;
            if (showDateHelp || showPatternHint || showStatusMsg) {
                pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
                pc.write(""><tr><td>");
              String uniqueName = pc.getParamIdForComponent(inf);
            if (inf.isVisible()) {
                 pc.write("<span id="");
                   pc.write(uniqueName);
                 pc.write("-r" class="urEdfHelpWhl">");
                if (inf.isPassword())
                    pc.write("<input type="password" class="sapEdf");
                else
                    pc.write("<input type="text" class="sapEdf");
                if (inf.isInvalid())
                    pc.write("i");
                if (inf.isRequired())
                    pc.write("Req");
                else
                    pc.write("Txt");
                if (inf.isDisabled())
                    pc.write("Dsbl");
                else
                    pc.write("Enbl");
                if (inf.getDesign() == InputFieldDesign.SMALL)
                    pc.write("Sml");
                pc.write("" autocomplete="off");
                int mySize = inf.getSize();
                if (mySize > 0) {
                    pc.write("" size="");
                    pc.write(mySize);
                int maxlength = inf.getMaxlength();
                if (maxlength > 0) {
                    pc.write("" maxlength ="");
                    pc.write(maxlength);
                java.lang.String value = inf.getWidth();
                if (value != null && !"".equals(value)) {
                    pc.write("" style="width:");
                    pc.write(value);
                    pc.write(";");
                java.lang.String tooltip = inf.getTooltip();
                if (tooltip != null) {
                    pc.write("" title="");
                    pc.writeEncoded(tooltip);
                   pc.write(" onchange="return htmlbDoEvent(this,'TV','onchange','0','");
                   pc.write(uniqueName);
                   pc.write("',1,1,'',0);" "); 
                   pc.write(" onblur="return htmlbDoEvent(this,'TV','onblur','0','");
                   pc.write(uniqueName);
                   pc.write("',1,1,'',0);" ");
                if(inf.isDisabled())
                    pc.write("" readonly="");
            else {
                pc.write("<input type="hidden");
            pc.write("" name="");
            pc.write(uniqueName);
            if (inf.isLabeled()) {
                pc.write("" id="");
                pc.write(uniqueName);
            Object value = inf.getValue();
            pc.write("" value="");
            if (value != null) {
                String valueString = null;
                if (value instanceof AbstractDataType) {
                    m_logger.info("-- Abstract Data Type");
                    AbstractDataType dataValue = (AbstractDataType)value;
                    if (dataValue != null) {
                        m_logger.info("-- dataValue != null");
                        if (dataValue.isValid()) {
                            m_logger.info("-- dataValue.isValid()");
                            if (dataValue instanceof DataDate) {
                                m_logger.info("-- dataValue instanceof DataDate");
                                Date date = ((DataDate)dataValue).getValue();
                                valueString = HxLocaleUtil.formatDate(date, pc.getLocale());
                            else {                       
                                m_logger.info("-- NOT dataValue instanceof DataDate");
                                valueString = dataValue.toString(pc);
                        else if (dataValue instanceof DataString) {
                            m_logger.info("-- dataValue instanceof DataString");
                            valueString = dataValue.toString(pc);
                        else {
                            m_logger.info("-- dataValue.getValueAsString()");
                            valueString = dataValue.getValueAsString();
                else {
                    // Not Abstract Data Type
                    m_logger.info("-- Not Abstract Data Type");
                    valueString = value.toString();
                pc.writeEncoded(valueString);
            pc.write(""/>");
            if (showDateHelp) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                   pc.write("</td><td align='left'><button id='");
                   pc.write(uniqueName);
                   pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
                   pc.write(uniqueName);
                   pc.write("','");
                   pc.write(dateFormat);
                   pc.write("','1')"></button>");
                   pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
                        "SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
                        "SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
                        "SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
                        "SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
                        "SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
                        "SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
                        "SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
                        "SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
                        "SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
                        "SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
                        "SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
                        "SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
                        "SAPUR_MONDAY_ABBREV:"2ª"});</script>");
            if (showPatternHint) {
                String pattern        = "";       
                String patternTooltip = "";
                if (DataType.DATE.equals(type)) {
                    pattern        = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
                else if (DataType.TIME.equals(type)) {
                    pattern        = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
                    pattern = " " + pattern;
                else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
                    pattern = " " + inf.getPatternHint();
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
                pc.write("</td><td align='left'>");
                pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
                pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
                pc.write("</nobr></span>");
            if (showStatusMsg) {
                if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
                    pc.write("</td><td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
                else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
                    pc.write("</td></tr><tr>");
                    if (showDateHelp && showPatternHint) {
                        pc.write("<td align='left' colspan='3'>");
                    else if (showDateHelp ^ showPatternHint) {      // '^' is Exclusive OR (XOR)
                        pc.write("<td align='left' colspan='2'>");
                    else {
                        pc.write("<td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
                pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
                pc.write("</font>");
            if (showDateHelp || showPatternHint || showStatusMsg) {
                pc.write("</td></tr></table>");
            // Generate code to store the current Locale in the HTML form,
            // and make the month and day names available in javascript arrays.
            // The form's Language attribute is used as a flag so that this is only
            // done once for each form.
            Form form = pc.getCurrentForm();
            if ((form.getLanguage() == null)
            || (!form.getLanguage().equals(pc.getLocale().toString()))) {
                // Save the locale in the html form as hidden fields so that the
                // same locale can be used to parse returned data.
                pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
                pc.write("<input type="hidden" name="_HTMLX_COUNTRY_"  value="" + pc.getLocale().getCountry()  + "">");
                pc.write("<input type="hidden" name="_HTMLX_VARIANT_"  value="" + pc.getLocale().getVariant()  + "">");
                // Write javascript arrays of month and day names in the locale language
                StringBuffer sb = new StringBuffer(250);
                String javaScriptPath = pc.getJavascriptPath();
                sb.append("var javaScriptPath='");
                sb.append(javaScriptPath);
                sb.append("';");
                java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
                if (dayNames.length != 7) {
                    throw new IllegalStateException("Only locales with 7 days are supported!");
                sb.append("var htmlbDayNames = new Array('");
                for (int i = 0; i < 6; i++) {
                    sb.append(dayNames<i>);
                    sb.append("','");
                sb.append(dayNames[6]);
                sb.append("');n");
                sb.append("var htmlbMonthNames = new Array('");
                java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
                for (int i = 0; i < 11; i++) {
                    sb.append(monthNames<i>);
                    sb.append("','");
                sb.append(monthNames[11]);
                sb.append("');n");
                java.lang.String jscript = sb.toString();
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
                // Set the language in the form so we don't do this again       
                form.setLanguage(pc.getLocale().toString());
            if (writingDebugToConsole) {
                System.out.println("Finished rendering HxInputField (id='" + inf.getId() + "')");
            m_logger.info("Exit:  HxInputFieldRenderer.render()");
        //  Methods to allow the Standard HTMLB InputField to Mimic HxInputField
        //  The key idea here is to use the standard InputField ONLY as a String
        //  field (never Date) so that we have total control over the display format
        //  and then HTMLX looks after ofrmating the string, abd displaying the
        //  help icons, status messages etc.  
         * Render the HTML placed before a HTMLB InputField, an InputField,
         * and the code placed after the InputFIeld, so that it behaves like a
         * HTMLX HxInputField
         * @param field
         * @param pc
        public static InputField mimicRender(HxField hxField, IPageContext pc) {
            HxInputField hxInputField = new HxInputField(hxField, pc.getLocale());
            return mimicRender(hxInputField, pc);
         * Render the HTML placed before a HTMLB InputField, an InputField,
         * and the code placed after the InputFIeld, so that it behaves like a
         * HTMLX HxInputField
         * @param field
         * @param pc
        public static InputField mimicRender(HxInputField hxInputField, IPageContext pc) {
            // Render stuff before InputField
            renderBeforeInputTag(hxInputField, pc);
            // Render InputField
            InputField inputField = new InputField(hxInputField.getId());  
            setUpInputField(hxInputField, inputField, pc);
            // This is a kludge to make a field read only.  It is achieved by
            // adding the flag to the 'width' attribute.  HTMLB then unknowingly
            // adds the flag when it renders the 'width' attribute.
            if (hxInputField.isReadOnly()) {
                inputField.setWidth( inputField.getWidth() + ";" readonly="");
            inputField.render(pc);
            String uniqueName = pc.getParamIdForComponent(inputField);
            String popUpKeyUniqueName = "";
            // If the field has a Pop Up add a hidden field for the Key populated by the Pop Up
            if (hxInputField.isShowPopUp()) {
                InputField keyInputField = new InputField(hxInputField.getId() + "PopUpKey");  
                keyInputField.setVisible(false);
                keyInputField.setValue(hxInputField.getPopUpKeyValue());
                keyInputField.render(pc);
                popUpKeyUniqueName = pc.getParamIdForComponent(keyInputField);
            // Render stuff after InputField
            renderAfterInputTag(hxInputField, pc, uniqueName, popUpKeyUniqueName);
            return inputField;      
         * Render the HTML to be placed before a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param field
         * @param pc
        public static void renderBeforeInputTag(HxField field, IPageContext pc) {
            renderBeforeInputTag(new HxInputField(field), pc);
         * Render the HTML to be placed before a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param pc
        public static void renderBeforeInputTag(HxInputField inf, IPageContext pc)
            if (writingDebugToConsole) {
                System.out.println("Start    rendering mimic HxInputField (id='" + inf.getId() + "') ...");
            if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
                pc.write("<table cellspacing="0" cellpadding="0" border="0" id="");
                pc.write(""><tr><td>");
         * Set a HMTLB InputField with the values stored in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not support some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static InputField setUpInputField(HxField hxField, IPageContext pc, PageContext pageContext) {
            Component component = (Component)pageContext.getAttribute(hxField.getId());
            if (!(component instanceof InputField)) {
                String msg =
                    "HxInputFieldRenderer.setUpInputTag() component is not instanceof InputField " +
                    "(hxField.getId()='" + hxField.getId() + "' " +
                    " component.getClass().getName()='" + component.getClass().getName() + "')";
                PortalRuntime.getLogger("htmlx").severe(msg);
                throw new IllegalArgumentException(msg);
            InputField inf = (InputField)pageContext.getAttribute(hxField.getId());
            setUpInputField(hxField, inf, pc);
            return inf;
         * Set a HMTLB InputField with the values in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not allow you to set some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static void setUpInputField(HxField hxField, InputField inf, IPageContext pc) {
            inf.setDisabled(hxField.isDisabled());
            inf.setInvalid(hxField.isInvalid());
            inf.setMaxlength(hxField.getMaxLength());
            inf.setRequired(hxField.isRequired());
            inf.setShowHelp(false);
            inf.setTooltip(hxField.getTooltip());
            inf.setType(DataType.STRING);
            inf.setValue(hxField.getValueAsString(pc.getLocale()));
            inf.setVisible(hxField.isVisible());
            inf.setSize(hxField.getMaxLength());
         * Set a HMTLB InputField with the values stored in the HxField.
         * This makes for less code in the JSP, and some versions of the PDK/EP
         * do not support some paramters in the TAG (e.g. Tooltip)
         * @param hxField
         * @param myContext
         * @param pageContext
        public static void setUpInputField(HxInputField hxInputField, InputField inf, IPageContext pc) {
            inf.setDisabled(hxInputField.isDisabled());
            inf.setInvalid(hxInputField.isInvalid());
            inf.setMaxlength(hxInputField.getMaxlength());
            inf.setRequired(hxInputField.isRequired());
            inf.setShowHelp(false);
            inf.setTooltip(hxInputField.getTooltip());
            inf.setType(DataType.STRING);
            inf.setValue(hxInputField.getPreformattedValueAsString());
            inf.setVisible(hxInputField.isVisible());
            inf.setSize(hxInputField.getSize());
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param field
         * @param myContext
         * @param pageContext
        public static void renderAfterInputTag(HxField field, IPageContext pc, PageContext pageContext) {
            renderAfterInputTag(new HxInputField(field), pc, pageContext);
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param myContext
         * @param pageContext
        public static void renderAfterInputTag(HxInputField inf, IPageContext pc, PageContext pageContext) {
            Component component = (Component)pageContext.getAttribute(inf.getId());
            String uniqueName = pc.getParamIdForComponent(component);
            String popUpKeyUniqueName = "";
            if (inf.isShowPopUp()) {
                component = (Component)pageContext.getAttribute(inf.getId() + "PopUpKey");
                popUpKeyUniqueName = pc.getParamIdForComponent(component);
            renderAfterInputTag(inf, pc, uniqueName, popUpKeyUniqueName);
         * Render the HTML to be placed after a HTMLB InputField so that it
         * behaves like a HTMLX HxInputField
         * @param inf
         * @param pc
         * @param uniqueName
         * @param popUpKeyUniqueName
        public static void renderAfterInputTag(
            HxInputField inf,
            IPageContext pc,
            String       uniqueName,
            String       popUpKeyUniqueName)
            if (showDateHelp(inf)) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                pc.write("</td><td align='left'><button id='");
                   pc.write(uniqueName);
                   pc.write("-btn' type="button" tabindex="-1" ti="-1" class="urEdfHlpDate" onclick="htmlb_showDateHelp(event,'");
                pc.write(uniqueName);
                pc.write("','");
                pc.write(dateFormat);
                pc.write("','1')"></button>");
                   pc.write("<script>htmlb_addTexts('pt_BR',{SAPUR_OCTOBER:"Outubro",SAPUR_MSG_LOADING:"Processo de carga em andamento"," +
                        "SAPUR_SUNDAY_ABBREV:"Do",SAPUR_F4FIELD_TUTOR:"Pressionar F4 para exibir as entradas possíveis"," +
                        "SAPUR_INVALID:"Não válido",SAPUR_FEBRUARY:"Fevereiro",SAPUR_F4FIELD:"F4- campo de entrada"," +
                        "SAPUR_FRIDAY_ABBREV:"6ª",SAPUR_WEDNESDAY_ABBREV:"4ª",SAPUR_MAY:"Maio",SAPUR_MSG_WARNING:"Advertência"," +
                        "SAPUR_DECEMBER:"Dezembro",SAPUR_SEPARATOR:"-",SAPUR_MSG_SUCCESS:"Com êxito",SAPUR_SATURDAY_ABBREV:"Sa"," +
                        "SAPUR_THURSDAY_ABBREV:"5ª",SAPUR_MSG:"{0} {1} {2}",SAPUR_BUTTON_WHL:"{0} - {1} - {2} - {3}",SAPUR_JULY:"Julho"," +
                        "SAPUR_APRIL:"Abril",SAPUR_FIELD_TIME:"Hora",SAPUR_MSG_ERROR:"Erro",SAPUR_REQUIRED:"Necessário"," +
                        "SAPUR_BUTTON_WHL3:"{0} - {1} - {2}",SAPUR_SEPTEMBER:"Setembro",SAPUR_NOVEMBER:"Novembro",SAPUR_AUGUST:"Agosto"," +
                        "SAPUR_JANUARY:"Janeiro",SAPUR_BUTTON:"Botão",SAPUR_FIELD_PW:"Senha",SAPUR_FIELD:"Texto editável"," +
                        "SAPUR_DISABLED:"Não disponível",SAPUR_FIELD_DATE:"Data",SAPUR_MARCH:"Março",SAPUR_FIELD_NUMBER:"N°"," +
                        "SAPUR_MSG_STOP:"Stop",SAPUR_BUTTON_WHL4:"{0} - {1} - {2} - {3}"," +
                        "SAPUR_BUTTON_ENABLED:"Para ativar, utilizar a barra de espaço",SAPUR_TUESDAY_ABBREV:"3ª",SAPUR_READOLNY:""," +
                        "SAPUR_MSG_JUMPKEY:"Pressionar a barra de espaço para navegar para o campo correspondente",SAPUR_JUNE:"Junho"," +
                        "SAPUR_MONDAY_ABBREV:"2ª"});</script>");
            if (showPopUp(inf)) {
                String dateFormat  = HxLocaleUtil.getSapDatePatternNumber(pc.getLocale());       
                pc.write("</td><td align='left'><div class="urEdfHlpSml" onClick="");
                pc.write("htmlxPopUp('");
                pc.write(getPopUpUrl(pc, inf.getPopUpPage()));
                pc.write("', '");
                pc.write(uniqueName);
                pc.write("', '");
                pc.write(popUpKeyUniqueName);
                pc.write("', ");
                pc.write(inf.getPopUpWidth());
                pc.write(", ");
                pc.write(inf.getPopUpHeight());
                pc.write(", '");
                pc.write(inf.getPopUpAttributes());
                pc.write("')">");
                pc.write(" </div>");
            if (showPatternHint(inf)) {
                String pattern        = "";       
                String patternTooltip = "";
                if (DataType.DATE.equals(inf.getType())) {
                    pattern        = HxLocaleUtil.getDatePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.DatePatternTooltip", pattern);
                else if (DataType.TIME.equals(inf.getType())) {
                    pattern        = HxLocaleUtil.getTimePatternInLocaleLanguage(pc.getLocale());       
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.TimePatternTooltip", pattern);
                    pattern = " " + pattern;
                else if ((inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0)) {
                    pattern = " " + inf.getPatternHint();
                    patternTooltip = HxLocaleUtil.formatHxMsg(pc.getLocale(), "HxInputField.PatternTooltip", pattern);
                pc.write("</td><td align='left'>");
                pc.write("<span class='sapTxtLeg' title='" + patternTooltip + "'><nobr>");
                pc.write("<font color='666666' face='Microsoft Sans Serif' style='vertical-align:super' size='1'><b>" + pattern + "</b></font>");
                pc.write("</nobr></span>");
            if (showStatusMsg(inf)) {
                if (inf.getStatusMsgPosition().equalsIgnoreCase("RIGHT")) {
                    pc.write("</td><td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' size='1'>");
                else if (inf.getStatusMsgPosition().equalsIgnoreCase("BELOW")) {
                    pc.write("</td></tr><tr>");
                    if (showDateHelp(inf) && showPatternHint(inf)) {
                        pc.write("<td align='left' colspan='3'>");
                    else if (showDateHelp(inf) ^ showPatternHint(inf)) {      // '^' is Exclusive OR (XOR)
                        pc.write("<td align='left' colspan='2'>");
                    else {
                        pc.write("<td align='left'>");
                    pc.write("<font color='990000' face='Microsoft Sans Serif' style='verticle-align:super' size='1'>");
                pc.write("<nobr>" + inf.getStatusMsg() + "</nobr>");
                pc.write("</font>");
            if (showDateHelp(inf) || showPopUp(inf) || showPatternHint(inf) || showStatusMsg(inf)) {
                pc.write("</span></td></tr></table>");
            // Generate code to store the current Locale in the HTML form,
            // and make the month and day names available in javascript arrays.
            // The form's Language attribute is used as a flag so that this is only
            // done once for each form.
            Form form = pc.getCurrentForm();
            if ((form.getLanguage() == null)
            || (!form.getLanguage().equals(pc.getLocale().toString()))) {
                // Save the locale in the html form as hidden fields so that the
                // same locale can be used to parse returned data.
                pc.write("<input type="hidden" name="_HTMLX_LANGUAGE_" value="" + pc.getLocale().getLanguage() + "">");
                pc.write("<input type="hidden" name="_HTMLX_COUNTRY_"  value="" + pc.getLocale().getCountry()  + "">");
                pc.write("<input type="hidden" name="_HTMLX_VARIANT_"  value="" + pc.getLocale().getVariant()  + "">");
                // Write javascript arrays of month and day names in the locale language
                StringBuffer sb = new StringBuffer(250);
                String javaScriptPath = pc.getJavascriptPath();
                sb.append("var javaScriptPath='");
                sb.append(javaScriptPath);
                sb.append("';");
                java.lang.String dayNames[] = RenderUtil.getDayAbbreviations(pc.getLocale());
                if (dayNames.length != 7) {
                    throw new IllegalStateException("Only locales with 7 days are supported!");
                sb.append("var htmlbDayNames = new Array('");
                for (int i = 0; i < 6; i++) {
                    sb.append(dayNames<i>);
                    sb.append("','");
                sb.append(dayNames[6]);
                sb.append("');n");
                sb.append("var htmlbMonthNames = new Array('");
                java.lang.String monthNames[] = RenderUtil.getMonthNames(pc.getLocale());
                for (int i = 0; i < 11; i++) {
                    sb.append(monthNames<i>);
                    sb.append("','");
                sb.append(monthNames[11]);
                sb.append("');n");
                String jscript = sb.toString();
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLB_INPUTFIELD_DATEHELP", jscript);
                pc.getDocument().getIncludes().addBodyEndResource(ResourceType.DIRECTJSCRIPT, "HTMLX", getHtmlxJavascript());  
                // Set the language in the form so we don't do this again       
                form.setLanguage(pc.getLocale().toString());
            if (writingDebugToConsole) {
                System.out.println("Finished rendering mimic HxInputField (id='" + inf.getId() + "')");
        private static boolean showDateHelp(HxInputField inf) {
            if (DataType.DATE.equals(inf.getType())
            && inf.isShowHelp()
            && !inf.isDisabled()) {
                return true;
            return false;
        private static boolean showPopUp(HxInputField inf) {
            if (!showDateHelp(inf)
            && !inf.isDisabled()
            && inf.isShowPopUp()) {
                return true;
            return false;
        private static boolean showPatternHint(HxInputField inf) {
            boolean isDateOrTime = DataType.DATE.equals(inf.getType()) || DataType.TIME.equals(inf.getType());
            boolean patternHintSet = (inf.getPatternHint() != null) && (inf.getPatternHint().length() > 0);
            if (inf.isShowPatternHint()
            && (isDateOrTime || patternHintSet)) {
                return true;
            return false;
        private static boolean showStatusMsg(HxInputField inf) {
            if (inf.isShowStatusMsg()
            && (inf.getStatusMsg() != null)
            && (inf.getStatusMsg().length() > 0)) {
                return true;
            return false;
        private static String getPopUpUrl(IPageContext pc, String pageName) {
            IPortalComponentRequest request = (IPortalComponentRequest)pc.getRequest();
            IPortalComponentResponse response = (IPortalComponentResponse)pc.getResponse();
            IPortalUrlGenerator portalGen = null;
            IUrlGeneratorService urlGen = (IUrlGeneratorService)request.getService(IUrlGeneratorService.KEY);
            ISpecializedUrlGenerator specUrlGen2 = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
            if (specUrlGen2 instanceof IPortalUrlGenerator) {
                portalGen = (IPortalUrlGenerator) specUrlGen2;
            // Create the url to the iView
            String url = "";
            if (portalGen != null) {
                // Create the parameters passed to SAP transaction for mesima
                url = portalGen.generatePortalComponentUrl(request, pageName); // "htmlxJarMimicExample.default");
            return url;
        protected static String getHtmlxJavascript() {   
            return "n" +
            "    if(window.document.domain == window.location.hostname) {                         n" +
            "        document.domain = document.domain.substring(document.domain.indexOf('.')+1); n" +
            "    }                                                                                n" +
            "    var popUpTextId;                                                                 n" +
            "    var popUpKeyId;                                                                  n" +
            "    var myPopUp;                                                                     n" +
            "    function setTextField(text) {                                                    n" +
            "        field = document.getElementById(popUpTextId);                                n" +
            "        if (field) {                                                                 n" +
            "            field.value = text;                                                      n" +
            "        }                                                                            n" +
            "        else {                                                                       n" +
            "            alert('Text target field for pop up not found (' + popUpTextId + ')');   n" +
            "        }                                                                            n" +
            "    }                                                                                n" +
            "    function setKeyField(key) {                                                      n" +
            "        field = document.getElementById(popUpKeyId);                                 n" +
            "        if (field) {                                                                 n" +
            "            field.value = key;                                                       n" +
            "        }                                                                            n" +
            "    }                                                                                n" +
            "    function setFields(text, key, close) {                                           n" +
            "        setTextField(text);                                                          n" +
            "        setKeyField(key);                                                            n" +
            "        if (close) {                                                                 n" +
            "            myPopUp.close();                                                         n" +
            "        }                                                                            n" +
            "        return false;                                                                n" +
            "    }                                                                                n" +
            "    function htmlxPopUp(url, textId, keyId, width, height, attributes) {                  n" +
            "        popUpTextId = textId;                                                        n" +
            "        popUpKeyId = keyId;                                                          n" +
            "        if (myPopUp) {                                                               n" +
            "            myPopUp.close();                                                         n" +
            "        }                                                                            n" +
            "        if (event!=null){                                                            n" +
            "            xPos = event.screenX-event.offsetX;                                      n" + 
            "            yPos = event.screenY-event.offsetY;                                      n" +
            "        }                                                                            n" +
            "        if ((xPos+width) > screen.availWidth) {                                      n" +
            "            xPos=screen.availWidth - width - 10;                                     n" +
            "        }                                                                            n" +
            "        if ((yPos+height) > screen.availHeight) {                                    n" +
            "            yPos=screen.availHeight - height - 10;                                   n" +
            "        }                                                                            n" +
            "        sizeAndPos = 'width=' + width + ', height=' + height + ', top=' + yPos + ', left=' + xPos;      n" +
            "        myPopUp = window.open(url, 'PopUp', sizeAndPos + ', ' + attributes); n" +
            "        if (!myPopUp) {                                                              n" +
            "            alert('You may have unrequested popup blocking on.');                    n" +
            "        }                                                                            n" +
            "    }n";   
        //  Methods to assist dubugging JSP pages   
         * @return True if debug messages are being written to the console
        public static boolean isWritingDebugToConsole() {
            return writingDebugToConsole;
         * When an error occurs in a JSP page the line number given in the stack
         * trace is rarely the line that caused the error.  This can make traking
         * down errors in a JSP page can be very difficult.  By writing debug messages
         * to the console every time a field is rendered, it can be much easier to
         * identify the area of code causing a problem.<p>  
         * <b>Do NOT set this in the production release of your application.</b>
         * @param b
        public static void setWritingDebugToConsole(boolean b) {
            writingDebugToConsole = b;
         * Initialise to NOT write debug to the console
        static {
            writingDebugToConsole = false;

    Try these
    [http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/65ad4ee0531aa8e10000000a114a6b/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    [http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01381.0120/doc/html/koh1278435126915.html]
    Reagards,
    Mouli

Maybe you are looking for