How use Active X object in sap 2005A SP14

How use Active X object in sap 2005A SP14 with usercontrol in vb.net
or control in vb.net please show example code
Thanks for advance

Hi,
I try to use this sample too (C# version) but it does not work properly.
I got two different COMExeptions at line 75:
fTree = SBO_Application.Forms.AddEx( CP );
Message: Form - already exists.
and at line 114:
AcXTree.ClassID = "MSComctlLib.TreeCtrl.2";
ErrorCode=-2147417851
Ausnahme von HRESULT: 0x80010105 (RPC_E_SERVERFAULT)
I don't know the reason - but i am searching...
Edited by: David Kostenzer on Feb 20, 2008 4:48 PM

Similar Messages

  • How to get List of  all activated Info objects in sap BI production system

    Hi Experts,
             For my requirement  I need list of all activated info objects in sap bi production system.
    Can any body suggest any thing.

    Hi,
    Check in the following table, all the below tables are for InfoObejct related only
    RSDIOBJ -
    Directory of all InfoObjects
    RSDIOBJT------ Texts of InfoObjects
    RSDIOBJ------- Directory of all InfoObjects
    RSDIOBJT----- Texts of InfoObjects
    RSDATRNAV------ Navigation Attributes
    RSDATRNAVT----- Navigation Attributes
    RSDBCHATR------ Master Data Attributes
    RSDCHABAS------- Basic Characteristics (for Characteristics,Time Characteristics, and Units)
    RSDCHA----
    Characteristics Catalog
    RSDDPA -
    Data Package Characteristic
    RSDIOBJCMP----
    Dependencies of InfoObjects
    RSKYF----
    Key Figures
    RSDTIM----
    Time Characteristics
    RSDUNI -
    Units
    Thanks
    Reddy

  • Using Active-Directory PW at SAP logon procedure

    Hello,
    I have the requirement no to use single sign on for some systems with sensitive data, but  would like to check during sap logon procedure the  from our central active directory password.
    is there any best practice configuration or SAP / AD Win Addon solution available to connect SAP NW abap 7.40 at Win2012 sever with our active directory. Nearly all win based applications can handle a PW check from application to AD. Is there any SAP or Partner implementation helpful to expand the SAP client internal User-PW check?
    Thanks in advanced for alternatives to the standard client SSO or any idea in the direction using active directory password within sap-logon.
    Please give me a short feedback if you need more details.
    regards,
    Bernhard Mair
    Goethe-Institut München

    The SAP NetWeaver ABAP app server only accepts SAP user id and password or it can use SNC to authenticate the user when SAP GUI is used on workstation. So, if you want the user to be prompted to enter their Active Directory credentials during a logon using SAP GUI, and you don't want SSO, then you need to purchase a third party product.
    Please note, that SAP is not JUST a Windows based application, as it can also be installed on Unix and Linux, so SAP have made it work in same way on all platforms without any 'special' windows authentication capabilities.
    Thanks
    Tim

  • How to active ABAP Proxy in SAP system.

    Hi All,
         I want to work with ABAP proxies.How to active ABAP proxy in SAP system.What the configuration is needed.Is there any configuration is need in XI system to work with ABAP proxies.Please help me..
    Thanks,
    Kishan.

    Hi Kishan,
    You have to check whether ur r/3 system's(WAS 620 or above) excahnge profile has entries for integration builder.
    Pls check the Example configuration for accessing
    interfaces in the Integration Repository (exchange profile):
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/content.htm
    If the Parameters are not there u need to add in the respective section's as provided in the link.
    exchange profile URL is:
    http://r3servername:5<instance>00/exchangeProfile
    I hope this provides you a solution.
    Regards.
    Praveen

  • How to Transport development object in SAP BI

    Hi to all,
    Please can any body tell me , How to transport development object from one server to another server.
    i am fresher in SAP Bi , so i need to know in depth , please also send me website link so i can get more depth knowledge.
    Please also send step by step process for that.
    i shall be thankfull to you for this.
    Regards
    Pavneet Rana

    <Removed by Moderator>
    You can surf through https://help.sap.com for referring the material or surf in SDN forums..where you can lots of info for getting in depth knowledge on this.
    hope this is clear for you.
    Regards
    Ramsunder
    Edited by: Pravender on Jun 8, 2010 6:41 PM

  • How to create Individual Object in SAP CRM

    Hi Experts,
    Can some one please let me know the procedure to create Individual Objects in SAP CRM. I mean I want to know the function modules or classes to create Individual Objects.
    My requirement is like this: I want to create an Individual Object first and then create an Installed base and assign the Individual Object to Installed base.
    I need ABAP code to do the above tasks.
    Thanks in advance.
    Nadh.

    Could you please share your solutions?
    Thanks

  • How to Activate massive objects in sap

    Hello, SAP Gurus.
    I try to apply support packages in ERP emhancemente 6.06 from sp level 7 to sp 10, but i have a problem because my system has a lot inactive obejects in sap and I need to activate them quickly, to continue apply sp untill 10 level.
    Now I´m using report RADMASG0, but is too slow the activation, someone knows another way and quick to activate massive objects?
    Thank you for your answers.

    hi,
    You can do via SE38 and run this programs RADMASG0_C3 & RADMASG0
    Please also check these Notes.
    1882203 - SPAM : CHECK_INACT_OBJECTS error Inactive Objects
    513348 - AUT01: Inactive objects exist
    Regards,

  • How to find unused objects in SAP BI system?

    Hello All,
    I have got a requirement- you can say optimization programme in BW system.
    For that i have to first find the list of unused obects-DSO's, IC, etc.
    We have RSDODSO, RSDCUBE tables, but not sure how to use them- by looking at latest data loads/ time stamp.
    If you have any suggestions on this .Please revert me back.
    Regards,
    Siva

    HI Kumar,
    For cubes: Goto se11 and use table RSMDATASTATE and check the value of the field LAST_CHANGE this is the date on which last time data is loaded in cube.
    Check RSMO & find which all data loads are happening daily...weekly...montly
    Refer to the link below for more info on unused objects:
    How to find UNUSED InfoObjects list in BEx Query by comparing with Infoprovider.
    How To Find Unused InfoObjects Part - 1.
    Regards,
    Ashvin

  • How to Unlock the Object in SAP Solution Manager

    Hi all,
    Iam trying to Upload the TS into Solution manager, but the Project Documentation TAB is locked by another User.So i am unable to get ADD button enable
    I dont have access to SM12 or SE03. How to Unlock this
    Regards

    This is not the right forum to ask your doubt. Post this in Solution Manager forum
    SAP Solution Manager
    Regards,
    Prateek

  • Where do I use These lock object FM's (Enqueue & D? and How do I use them?

    I created lock object for user defined table (zconsist). The system automatically created 2 FM's (Enquiue & Dequeue).
    I created a new TCode and accessing this with mulitple users to do some updates and inserts in that above table.
    I used INSERT ZCONSIST statement in 5 places in my program (4 include programs).
    Where do I use These FM's? and How do I use them?
    I mean before inserting which FM I need to use? after immediately what fm used?.
    every insert statemnt before i need to use the respective fm? so 5 places i need to call the respective FM is it right?
    thank in advance.

    Hi Sekhar,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    kindly reward if found helpful.
    cheers,
    Hema.

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • How to Use Transient View Objects to Store Session-level Global Variables

    hi
    Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
    at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    Based on this documentation I created the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
    It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
    Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
    On rollback the Transient View Object instance keeps its row and attribute values.
    Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
    questions:
    - (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
    - (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
    Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
    at http://blogs.oracle.com/smuenchadf/examples/#90
    It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
    This can be illustrate with a small change in the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
    It now shows the result of both these expressions on the page ...
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
    See also the screencast at http://screencast.com/t/k8vgNqdKgD
    Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
    public class MyCustomADFBCDataControl
      extends JUApplication
      @Override
      public void setTransactionModified()
        ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
        Transaction vTransaction = vApplicationModule.getTransaction();
        if (vTransaction.isDirty())
          super.setTransactionModified();
    }Resulting in what seems to be more consistent/expected transaction (dirty) information,
    see also the screencast at http://screencast.com/t/756yCs1L1
    Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
    Currently, question (q2) remains.
    regards
    Jan

  • In XI mapping, how to get number from a number_range object in SAP R/3

    HI All,
    I have a scenario where I need to read a Number_range object  in SAP R/3 or ABAP XI and retreive the current number.
    I need to use this number during the message mapping.
    (I read about JCO and RFC, but am a little confused about how-to and what is the correct approach)
    Just to let you know, I do not want to pass this number in the original IDOC coming from IDOC, so I need this lookup.
    Scenario:
    In MM, make a call to SAP.
    Get the latest number from SNRO( number-range object)
    Use this number in mapping.
    Any help pointers, greatly appreciated.
    Many thanks
    Shirin

    Shrin,
    Please find the parameters you need to specify while creating UDF
    Imports:javax.xml.transform.stream.StreamResult;com.sap.aii.mapping.lookup.;javax.xml.transform.dom.DOMSource;javax.xml.parsers.DocumentBuilder;java.io.;javax.xml.parsers.;org.w3c.dom.;org.xml.sax.;javax.xml.transform.;
    The Template for RFC Lookup
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace() ;
    //Filling the string with our RFC-XML (With Values)
    String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:<Function Module name>xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"></ns0:ZFI_GET_RUNID> ";
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    //1. Determine a channel (Business System, Communication channel)
    Channel channel = LookupService.getChannel("<Business System Name>","Communication channel name");
    //2. Get a RFC accesor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    //3. Create a xml input stream representing the FM request message.
    InputStream inputstream = new ByteArrayInputStream(m.getBytes());
    //4. Create xml Payload
    XmlPayload payload  =  LookupService.getXmlPayload(inputstream);
    //5. Execute Lookup
    Payload result = accessor.call(payload);
    InputStream in = result.getContent();
    //This are the extra step which i dont know what it mean
    //out = new ByteArrayOutputStream(1024);
    //byte[] buffer = new byte[1024];
    //for (int read = in.read(buffer); read > 0; read = in.read(buffer))
    //out.write(buffer,0,read);
    //content = out.toString();
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(in);
    NodeList list = document.getElementsByTagName( "REsult" );
    Node node = list.item(0);
    if (node  != null)
         node = node.getFirstChild();
         if (node  != null)
              content = node.getNodeValue();
    } catch (Exception e) {
    importanttrace.addWarning("Error while closing accesor" + e.getMessage());
    catch (LookupException e)
    importanttrace.addWarning("Error While lookup" + e.getMessage());
    //This exception is not to be catch at this step as there is no try step before this
    //catch (IOException e)
    //importanttrace.addWarning("Error" + e.getMessage());
    finally
    if(out!=null)
      try{
           out.close();
    } catch (IOException e) {
    importanttrace.addWarning("Error while closing system" + e.getMessage());
    //7. close the accessor in order to free resources
    if (accessor!=null) {
    try{
          accessor.close();
    } catch (Exception e) {
    importanttrace.addWarning("Error while closing accesor" + e.getMessage());
    return content;
    Have mentioned in genric  where u need to specify the communication channel name, business service etc.,
    Moreover there is a field result, which is the output returned from the FM

  • How to retrieve the data from SAP-BAPI by using VB Code

    Hi ,
    I am new to BAPI.
    V have created an application in Visual Basic with the following fields
    EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
    We have written the code for SAVING the data into SAP. Already we have
    constructed a table with the respective fields in SAP.
    For that we ourself created our own BAPI Structure / Function Group /
    Function Module/ Business Object - RELEASED related elements.
    1)Established the connection successfully.
    2)Stored the data into SAP Successfully and v r in need of
    3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
    Following is the code :
    'BAPI Structure  : ZBAPIEMP
    'Function Group  : ZBAPIEMP
    'Function Module : ZBAPI_EMP_CREATEFROMDATA
    'Business Object : ZBAPIEMP
    'Function Module : ZBAPI_EMP_GETLIST
    Dim bapictrl As Object
    Dim oconnection As Object
    Dim boEmp As Object
    Dim oZEmp_Header As Object
    Dim oImpStruct As Object
    Dim oExpStruct As Object
    Dim oreturn As Object
    Dim x As String
    Private Sub Form_Load()
    Set bapictrl = CreateObject("SAP.BAPI.1")
    Set oconnection = bapictrl.Connection
    oconnection.logon
    Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
    Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
    Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
    End Sub
    Private Sub cmdSave_Click()
        oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
        oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
        oZEmp_Header.Value("ADDR1") = txtAddr1.Text
        oZEmp_Header.Value("ADDR2") = txtAddr2.Text
        oZEmp_Header.Value("CITY") = txtCity.Text
        oZEmp_Header.Value("PHONE") = txtPhone.Text
        boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
        x = oreturn.Value("Message")
        If x = "" Then
            MsgBox "Transaction Completed!..."
        Else
            MsgBox x
        End If
    End Sub
    Private Sub cmdView_Click()
    End Sub
    COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.

    I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
    -Tim
    Option Compare Database
    Dim SAPLOGIN As Boolean
    Dim FunctionCtrl As Object
    Dim SapConnection As Object
    Sub SAPLOGOUT()
    On Error GoTo LogoutFehler
        SapConnection.logoff
        SAPLOGIN = False
    Exit Sub
    LogoutFehler:
        If Err.Number = 91 Then
            Exit Sub
        Else
            MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
        End If
    End Sub
    Function SAPLOG() As Boolean
    'Verbindungsobjekt setzen (Property von FunctionCtrl)
       Set FunctionCtrl = CreateObject("SAP.Functions")
       Set SapConnection = FunctionCtrl.Connection
    'Logon mit Initialwerten
       SapConnection.Client = "010"
       SapConnection.Language = "EN"
       SapConnection.System = "PR1"
       SapConnection.SystemNumber = "00"
       'SapConnection.Password = ""
       SapConnection.GroupName = "PR1"
       SapConnection.HostName = "168.9.25.120"
       SapConnection.MessageServer = "168.9.25.120"
         If SapConnection.Logon(0, False) <> True Then  'Logon mit Dialog
             Set SapConnection = Nothing
             DoCmd.Hourglass False
             MsgBox "No connection to SAP R/3 !"
             SAPLOGIN = False
             SAPLOG = False
             Exit Function
          End If
        SAPLOG = True
    End Function
    Function MatDescr(MatNr As String)
    Dim func1 As Object
    Dim row As Object, X As Integer, ErsteNr As String
    Dim DatensatzZähler As Long
    Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
        If Not SAPLOGIN Then
            If Not SAPLOG() Then
                MsgBox "No connection  to SAP !", 16
                SAPLOGOUT
                Exit Function
            End If
        End If
    ' Instanziieren des Function-Objektes
    Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
    ' Export-Paramter definieren
    func1.exports("MATNR") = MatNr
    func1.exports("SPRAS") = "EN"
    DoEvents
    If Not func1.call Then
        If func1.exception <> "" Then
            MsgBox "Communication Error with RFC " & func1.exception
        End If
        DoCmd.Hourglass False
        SAPLOGOUT
        Exit Function
    Else
      MatDescr = func1.imports("MAKTX")
    End If
    If MatDescr = "" Then
        MatDescr = "PART NO. NOT FOUND"
    End If
    End Function

  • How to handle the Exception in GP using executable callabel object.

    Hi all,
            I handled an exception in GP using Background callable Object. That is working fine.
    (Ex: Exception_No_User_Found). The Problem is I am not able to handle the exceptions for normal callable object. I have done the same thing as i did in background callable object except implementing IGPBackgroundCallableObject Class.  I have created an WebDynpro DC Project where in getDescription method i declared an Exception and in execute method of component controller I caught the exception if no user found.
    Then i created an callable object for this simple DC project. but that is not working i could not catch the exception. when i execute the process it is asking the User ID if i give the wrong userId it is not refreshing back to the user id input form.
    But if i test that simple callable object separately it is throwing an Exception when I give the wrong input..
    but the same thing is working fine using background callable object.
    I couldn't handle the exception for the simple callable object or executable callable object.
    Please If anyone bring me the solution that would be appreciated.
    Thanks in advance.
    Regards,
    Malar.

    Hi Shikhil
    Thanks for your reply
    Please have a look below for exceptions which i am getting in GP and let me know how to handle these exceptions.
    1) "Activity could not be read"
    2) "Action has been stopped"
    3) error while processing the item can not be displayed
    if you give any idea/clue how to handle these exceptions then it would be great help to me
    Thanks
    Sunil

Maybe you are looking for

  • How should I debug a PVM that is crashing & rebooting too fast ?

    I have a newly created oel4u6 PVM that appears to be starting but then crashing & rebooting too fast and I don't know how to best debug it. The vm is a P2V'ed oel4u6 HP Blade that successfully boots as a HVM but I can't seem to get it to fully start

  • Windows 8 and itunes 11 burning cd issues

    i installed windows 8 and ever since itunes wont burn or recognize cds. My diagnostics say that the cd driver is not available. I've tried working with upper and lowerfilters. if i add both then my computer doesn't even recognize i have a cd drive at

  • Incorrect date format in Crystal Report XI

    I have a problem with date in reports if Day in date (yyyy/mm/dd) less than 12. Problem is: I create a report (through application). If I check the instance of the report created on Crystal Server (in Central Management Console) it's correct. If I tr

  • Lion Crashing to Black - Kernel Error Included

    Hey, Loving Lion so far - but... When I'm away from the computer I seem to get this message a lot. As I've never had it while sat at a machine I can't vouch for what causes it, but it might be something to do with me transferring to my NAS via WiFi.

  • Send Program Change bug in Logic 7.2.2

    I recently got a Mac Pro 3.0, and installed Logic 7.2.2. In general things are going okay, but I recently found a bug and I wonder if anyone else has run into it. I have a fairly extensive studio setup (6 Gigasamplers, some hardware samplers, quite a