ABAP OO - Class cl_bcs

Hi,
I'm quite new to abap oo but...anyway:
I get a exception when I try to call
call method lo_bcs->set_sender
1. Any pointers to why this code doesn't work.
2. Why can't I do a CREATE OBJECT on lo_bcs.
method SETADDRESS_TO_FROM .
data: lo_sender type ref to if_sender_bcs.
data: lo_bcs  type ref to cl_bcs.
*CREATE OBJECT lo_bcs. DONT WORK!!!?
try.
      lo_sender = cl_cam_address_bcs=>create_internet_address( i_address_string = '[email protected]' ).
catch cx_address_bcs.
      exit.
endtry.
  TRY.
  call method lo_bcs->set_sender
    exporting
      i_sender        = lo_sender.
   CATCH CX_SEND_REQ_BCS .
  ENDTRY.
endmethod.
//Martin

Hello Martin,
If the Instantiation for the class is defined to be <i>Private</i>, then you
cannot create the object of the class outside of the class.
=============================================================================
You have asked: <i>Is this a common approach in the abap oo world ? </i>.
There's nothing common or uncommon about it. It depends on what functionality
needs to be achieved.
=============================================================================
<i>Looks strange....why do they do this?</i>
In Java, you can actually make the constructor as private. In ABAP, however,
that is not possible. So this is another way of achieving equivalent
functonality.
=============================================================================
Now you'd like to know <i>Why do they do this...?</i>
That is a reasonably big discussion and cannot possible be explained satisfactorily
in a Forum Post. but I can tell you something: This way of disallowing external
instantiation for a class is the key to implementing OO Design Patterns.
As I had said, you can easily find other weblogs and Forum posts which can introduce
you to what these are.
Regards,
Anand Mandalika.

Similar Messages

  • Define attachment name for PDF document using ABAP class CL_BCS

    Hi,
    I am using the ABAP class CL_BCS to send an email with a PDF attachment. The issue I have is that although I am specifying the attchment name when receiving the email the attachment is called 'MESSAGE'PDF'.
    I can view the attachment in SOST and the correct attachment name appears.
    I need to use this class as I am sending multiple attachments, whereas the FM only allows 1 attachment .
    Has anyone had this issue before with a PDF attachment.
    Thanks
    Martin

    Hi Hasan,
    I have similar requirement. I see your post is pretty old and hope you would have found the solution at that time.
    Could you please share it with me?
    Thanks
    Puneet

  • Class CL_BCS Query for body part of mail

    HI,
    I want to send the mail with out attachement using Class CL_BCS. Can any body help me on how to send the message body in the mail using CL_BCS class....
    Thanx & Regards,
    Sameer

    Hi Sameer
    I've been struggling with this class CL_BCS too for a while and I want to give my experience with that class. Following a code example which will submit a report to memory and send the report as an attachment by mail thru the SMTP interface.
    *& Report  ZOBR_SEND_TRIP_SIM_BY_MAIL                                  *
    *& This program does following:
    *& 1. Submit a travel expense report to memory
    *& 2. Read the travel expense report from memory
    *& 3. Convert the travel expense report to HTML format
    *& 4. Copy the travel expense report from format RAW(1000) to RAW(255)
    *& 5. Send an email with body text and attachtments
    REPORT  zobr_send_trip_sim_by_mail                                  .
    DATA:
    gi_abaplist     TYPE TABLE OF abaplist,
    gi_html         TYPE          w3htmltab,
    gs_html         LIKE LINE OF  gi_html,
    gw_string       TYPE          string,
    gw_length       TYPE          i,
    gw_length_c     TYPE          so_obj_len,
    gi_solix        TYPE          solix_tab,
    gs_solix        LIKE LINE OF  gi_solix,
    gi_soli         TYPE          soli_tab,
    gs_soli         LIKE LINE OF  gi_soli,
    go_send_request TYPE REF TO   cl_bcs,
    go_document     TYPE REF TO   cl_document_bcs,
    go_sender       TYPE REF TO   cl_sapuser_bcs,
    go_recipient    TYPE REF TO   if_recipient_bcs,
    go_exception    TYPE REF TO   cx_bcs.
    * Submit report to memory
    SUBMIT rprtef00 "USER sy-uname
      EXPORTING LIST TO MEMORY AND RETURN
      WITH pnppernr EQ '00001000'
      WITH pnptimra EQ 'X'
      WITH pnpxabkr EQ 'D2'
      WITH pnppabrp EQ '11'
      WITH pnppabrj EQ '2006'
      WITH s_reisen EQ '0002600221'
      WITH hinz_dru EQ space
      WITH hinz_weg EQ space
      WITH hinz_dyn EQ 'X'
      WITH allesdru EQ 'X'
      WITH reisepro EQ 'X'
      WITH reisetxt EQ 'X'
      WITH sw_antrg INCL 'X'
      WITH addinfo EQ 'X'
      WITH extperio EQ '000'
      WITH simulate EQ space
      WITH einkopf EQ space.
    * Read report from memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = gi_abaplist
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    * Convert report to HTML format
    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
    * EXPORTING
    *   REPORT_NAME         =
    *   TEMPLATE_NAME       = 'WEBREPORTING_REPORT'
      TABLES
        html                = gi_html
        listobject          = gi_abaplist.
    LOOP AT gi_html INTO gs_html.
      CONCATENATE gw_string
                  gs_html
             INTO gw_string.
    ENDLOOP.
    gw_length = STRLEN( gw_string ).
    gw_length_c = gw_length.
    * copy table from format raw(1000) to raw(255)
    CALL FUNCTION 'TABLE_COMPRESS'
      TABLES
        in  = gi_abaplist
        out = gi_solix.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    TRY.
    *   Create persistent send request
        go_send_request = cl_bcs=>create_persistent( ).
    *   Create document (body text in text format)
        gs_soli = 'Trip is now settled, see attachment.'.
        APPEND gs_soli TO gi_soli.
        gs_soli = 'Reimbursement is paid out by your next salary.'.
        APPEND gs_soli TO gi_soli.
        go_document = cl_document_bcs=>create_document( i_type    = 'RAW'
                                                        i_text    = gi_soli
                                                        i_subject = 'Trip reimbursement' ).
    *   Add attachment (ABAP list format)
        CALL METHOD go_document->add_attachment
          EXPORTING
            i_attachment_type    = 'ALI'
            i_attachment_subject = 'Expense report(ALI)'
            i_att_content_hex    = gi_solix.
    *   Add attachment (HTML format)
        CALL METHOD go_document->add_attachment
          EXPORTING
            i_attachment_type    = 'HTM'
            i_attachment_subject = 'Expense report(HTM)'
            i_att_content_text   = gi_html.
    *   Add note (Text format)
        CALL METHOD go_send_request->set_note( gi_soli ).
    *   Add document to send request
        CALL METHOD go_send_request->set_document( go_document ).
    *   Get sender object
        go_sender = cl_sapuser_bcs=>create( sy-uname ).
    *   Add sender
        CALL METHOD go_send_request->set_sender
          EXPORTING
            i_sender = go_sender.
        go_recipient = cl_cam_address_bcs=>create_internet_address( '[email protected]' ).
    *   Add recipient with its respective attributes to send request
        CALL METHOD go_send_request->add_recipient
          EXPORTING
            i_recipient  = go_recipient
            i_express    = ' '
            i_copy       = ' '
            i_blind_copy = ' '
            i_no_forward = ' '.
    *   set send immediately flag
        go_send_request->set_send_immediately( 'X' ).
    *   Send document
        CALL METHOD go_send_request->send( ).
        COMMIT WORK.
    * Exception handling
      CATCH cx_bcs INTO go_exception.
        EXIT.
    ENDTRY.
    Notice that the only way to put a body text in the email is to call the method cl_document_bcs=>create_document with input of a type 'RAW'.
    Be aware of the settings of the SMTP node in SAPConnect (transaction SCOT) because the seetings could cource an unwanted conversion of the email.
    1. Doubbelclick on the TMTP node and a popup screen will show.
    2. Click on the 'Set' button next to 'Internet' under 'Supported address type' and a       popup screen will show.
    3. Set output format for SAP documents as 'SAPscript/Smart forms' = 'PDF', 'ABAP list' = 'PDF', 'RAW text' = 'TXT'.
    This setting will convert 'SAPscript/Smartforms', 'ABAP list' to PDF format. If 'RAW text' = 'PDF' the body text wil be converted to 'PDF' format and change to an attachment and the body text will disappear.
    Hope this is usefull for you and others.
    Best regards
    Ove Bryntesson
    Applicon A/S

  • Attach Custom Fax Cover  Page using Object class Cl_BCS

    Hello,
    Scenario: To attach a custom fax cover page to the faxing functionality. The standard fax cover page is not needed.
    Method Used: Fax is initiated in the ABAP code via the function module SO_NEW_DOCUMENT_ATT_SEND_API1
    had to change the code to use object class CL_BCS , because of the subject line length limitation.
    I want to get rid of the SAP standard cover page that gets generated and attach a custom cover page
    By applying SAP OSS Note 553113 - I am able to deactivate the standard fax cover page.
    But I haven't found a way of attaching a custom fax cover page(not sure what the original SApscript layout is)
    else would have modified the same.
    Any help in the matter would be appreciated.
    Thanks for your help.
    Almas.

    Hi Hasan,
    I have similar requirement. I see your post is pretty old and hope you would have found the solution at that time.
    Could you please share it with me?
    Thanks
    Puneet

  • Email Dynamic Form as Attachment using class cl_bcs?

    Hi Experts
    I really hope that you can help me.
    I have a dynamic form embedded in my view and I need to email this form as an attachment to a list of participants.
    I already use the class cl_bcs for sending email, but how do I retrieve the form parameters (on button click within WD ABAP) and then convert them to the correct format so that they can be included in the cl_bcs class for sending?
    Thanks in advance
    I'll award points to helpful answers.
    Anton Kruse

    HI,
    To send mail with PDF attachement,
    U have to specify the emporting and exporting parameters for the Interactive Form in the SFP transaction.
    Then add the below coding,
    *Send mail in PDF format
    Funtion module to get the generated FM name
          TRY.
              CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
                EXPORTING
                  i_name     = lc_formname
                IMPORTING
                  e_funcname = lv_fmname.
            CATCH cx_fp_api_repository.                     "#EC NO_HANDLER
            CATCH cx_fp_api_usage.                          "#EC NO_HANDLER
            CATCH cx_fp_api_internal.                       "#EC NO_HANDLER
          ENDTRY.
          ls_param-nodialog = 'X'." suppress printer dialog popup
          ls_param-getpdf   = 'X'." launch print preview
          CALL FUNCTION 'FP_JOB_OPEN'
            CHANGING
              ie_outputparams = ls_param
            EXCEPTIONS
              cancel          = 1
              usage_error     = 2
              system_error    = 3
              internal_error  = 4
              OTHERS          = 5.
          IF sy-subrc <> 0.
    Do Nothing
          ENDIF.
          ls_fp_doc-langu    = lc_sprsl.
          ls_fp_doc-country  = lc_country.
          ls_fp_doc-fillable = 'X'.
    Mail Format /1BCDWB/SM00000091
          CALL FUNCTION lv_fmname
            EXPORTING
              /1bcdwb/docparams  = ls_fp_doc
              empno              = ls_emp_det-empno
              empname            = ls_emp_det-empname
              state              = ls_emp_det-state
              location           = ls_emp_det-location
              organisation       = ls_emp_det-organisation
              position           = ls_emp_det-position
              mailid             = ls_emp_det-mailid
              actual_date        = ls_emp_det-actual_date
              likely_date        = ls_emp_det-likely_date
              resig_date         = ls_emp_det-resig_date
              generic_det        = lt_generic
              bond_det           = lt_bond
            IMPORTING
              /1bcdwb/formoutput = ls_formout
            EXCEPTIONS
              usage_error        = 1
              system_error       = 2
              internal_error     = 3
              OTHERS             = 4.
          IF sy-subrc <> 0.
    *do nothing.
          ENDIF.
          CALL FUNCTION 'FP_JOB_CLOSE'
            EXCEPTIONS
              usage_error    = 1
              system_error   = 2
              internal_error = 3
              OTHERS         = 4.
          IF sy-subrc <> 0.
    Do Nothing
          ENDIF.
    *Function call to get the xstring value.
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer     = ls_formout-pdf
            TABLES
              binary_tab = lt_att_content_hex."PDF file from function module
          lv_bodytext_row-line = lc_subject.
          APPEND lv_bodytext_row TO lt_bodytext.
          APPEND ' ' TO lt_bodytext.
          lv_bodytext_row-line = text-001.
          APPEND lv_bodytext_row TO lt_bodytext.
          APPEND ' ' TO lt_bodytext.
          DESCRIBE TABLE lt_bodytext LINES lv_num_rows.
          lv_num_rows = lv_num_rows * 255.
          MOVE lv_num_rows TO lv_textlength.
          TRY.
              lv_attdoctype = lc_pdf.
              lv_atttitle = text-000.
              lc_document = cl_document_bcs=>create_document(
              i_type = lc_raw
              i_text = lt_bodytext
              i_length = lv_textlength
              i_subject = lv_subject ).
              lc_document->add_attachment( EXPORTING
              i_attachment_type     = lv_attdoctype
              i_attachment_subject  = lv_atttitle
              i_attachment_language = sy-langu
              i_att_content_hex     = lt_att_content_hex ). This will attach ur PDF to mail
    Create persistent send request
              lv_send_request = cl_bcs=>create_persistent( ).
    Add document to send request
              lv_send_request->set_document( lc_document ).
              lv_sender = cl_sapuser_bcs=>create( sy-uname ).
    Add sender
              CALL METHOD lv_send_request->set_sender
                EXPORTING
                  i_sender = lv_sender.
              CLEAR : ls_smtp_addr.
         READ TABLE lt_mailid INTO ls_mailid WITH KEY pernr = ls_0001-pernr.
              IF sy-subrc = 0.
                ls_smtp_addr = ls_mailid-usrid_long.
              ENDIF.
    Create recipient.
             lv_recipient    = cl_cam_address_bcs=>create_internet_address(
                                                          ls_smtp_addr ).
    Add recipient with its respective attributes to send request
              lv_send_request->add_recipient( EXPORTING
                            i_recipient = lv_recipient
    Set send immediately
              lv_send_request->set_send_immediately( 'X' ).
    Send document
              lv_send_request->send( ).
            CATCH cx_root INTO lv_oref.                     "#EC NO_HANDLER
          ENDTRY.
    Hope this ll help u!!
    Thanks,
    Divya.S

  • Acces dynamic configuration variable (e.g. filename) in ABAP mapping class

    Hi experts
    I am searching for a possibility to acces a dynamic configuration variable (DCV) in an ABAP mapping class. Since I could not find a solution in SDN and other sources, I hope somebody in this forum can help me.
    What I already found is the following code which can be used to set a DCV, but what I would be interested in is how to read a DCV.
    Any help is appreciated.
    Markus
    METHOD if_mapping~execute.
    DATA l_record type mpp_dynamic.
    * copy payload
    result = source.
    * add an adapter specific attribute
    l_record-namespace = 'http://sap.com/xi/XI/System/File'.
    l_record-name = 'FileName'.
    l_record-value = 'test.xml'.
    dynamic_configuration->add_record( l_record ).
    ENDMETHOD.

    Hi Markus,
    you can find everything in my blogs
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    Regards,
    michal

  • How can I call a ABAP proxy class from BADI? PLease help

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi,
       You can call a method of a class from BADI. Here are the steps.
       1) In the BADI implementation create a object for the proxy class.
       2) Call the Execute_Synchronous method.
        You can define a BADI by using SE18 and you can implement it by using SE19.
    Sample code...
    ================================================
      METHOD ZIF_EX_VBADI~CONVERTUPPER.
      DATA: OBJ TYPE REF TO ZTESTCLASS.
      DATA: IT_DATA  TYPE ZIN_MT,
                IT_RES   TYPE ZOUT_MT,
                SEXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT.
      TRY.
          CREATE OBJECT OBJ
             EXPORTING
                 LOGICAL_PORT_NAME = 'TESTPORT'.
      CATCH CX_AI_SYSTEM_FAULT INTO SEXCEPTION.
      ENDTRY.
    ENDMETHOD.
    ================================================
    Thanks,
    Vivek LR

  • How to use CL_PROXY_BASIS instead of CL_PROXY_CLIENT your ABAP Proxy class?

    Hello experts,
    I have a scenario where a new basis release was done in my development and testing SAP boxes (Basis Release 710 I believe) which means from then on when generating an ABAP Proxy class the inheriting class will be used is CL_PROXY_CLIENT as opposed to the previous CL_PROXY_BASIS.
    This causes a problem though because the target date for the project, which uses this ABAP proxy, is supposed to be in the production system before the date when the basis release will be done in the production system.  Obviously this will cause delays in my project since if I were to move my objects to production before the basis release a dump/syntax error will occur in production because the class CL_PROXY_CLIENT is not expected be production yet.
    The next plan is to try to use CL_PROXY_BASIS instead of CL_PROXY_CLIENT, by editing my ABAP Proxy Class be force. My question is, what steps do I need to take so that I can change these classes so CL_PROXY_BASIS will be referenced/used instead of CL_PROXY_CLIENT ?
    I hope to hear from all of you soon.
    Regards

    >
    Rich Heilman wrote:
    > Bad idea.  Your dev and prod boxes should be at the same basis level at all times. 
    >
    Which release and SP level are you still on?

  • XML to internal table conversion within ABAP mapping class

    I am doing a ABAP mapping for file to Idoc. My requirement is to convert XML file into ABAP internal table (within ABAP mapping class). Is there any standard FM, method, transformation etc, which can be used here.
    Thanks, Dehra

    Dehra,
    Have you seen this weblogs which talks about this:
    /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    Hope this helps you....
    ---Satish

  • ABAP proxy class - data structure

    I generated a ABAP Proxy Class and the data structure I want to use is put automatically under item structure which has 0...unbounded type.
    1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    2. If my source structure has only 3 level, and the target structure has more than 3 (including item), how to map it?
    e.g.
    Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    I need to map level 3 from my source to level 4 in target, but it didn't seem to work.
    Thanks.

    --->1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    You can delete the proxy at Application Server.....make necessary changes at XI Message Interface and again generate the proxy...
    -->Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    For this you need to make use of context change features of XI Mapping.
    Regards,

  • Custom proces type based on ABAP OO class

    Hy,
    I have a process type and in one method of its asoociated ABAP OO class I have to check if their process chains are running or not.
      I know how to make the tests, but the problem is that I have to integrate them in one method. I'm lookink for a solution to adapt the process type from :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/509f3ae6-e36e-2910-48a8-ab43dc167dd9   
    Any suggestions about what should I keep or not and in which method should I put my tests?
    Thank you.

    Hello,
    Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
    Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
    Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
    Cheers,
    Mike

  • ABAP OO Class and Change Documents

    I have created a class based on the IF_WORKFLOW interface.  I created a couple of events.  I created a workflow task assigned to a custom method of the class.  I setup the Material Change Document to trigger the class event when there is a change.  The workflow task does trigger when I change a material, but I don't know how to pass the key of the Change Document (matnr) to the workflow task/method using the ABAP OO Class interface.  Any help?
    Thanks,
    Kenneth

    Thanks for the reply Florin.  Yes, I have seen Joclyn Dart's Whitepaper and blogs.  They are very helpful, but I haven't seen much information within them about Change Documents.  I tried your suggestions, but the material key is still not being filled when I trigger the change document and workflow task using tcode MM02.
    Here is what I have done:
    Created an Attribute 'Material' type mara-matnr and checked 'Key Attribute'.
    Created an Attribute M_POR type SIBFLPOR.
    Here are the methods:
    Constructor with parameter 'Material' *
    METHOD constructor.
      me->m_por-catid = 'CL'.
      me->m_por-typeid = 'ZMM_WF_MATTEC'.
      me->m_por-instid = me->material.
    ENDMETHOD.
    Find_by_lpor with parameters LPOR and RESULT (default params) *
    METHOD bi_persistent~find_by_lpor.
      DATA: p_material TYPE matnr.
      MOVE lpor-instid TO p_material.
      TRY.
          CREATE OBJECT result
            TYPE
              zmm_wf_mattec
            EXPORTING
              material      = p_material.
        CATCH cx_bo_error .
          EXIT.
      ENDTRY.
    LPOR with parameter RESULT (default param) *
    method BI_PERSISTENT~LPOR.
    result = me->m_por.
    endmethod.
    ENDMETHOD.
    Custom method MAT_CHANGED with parameter 'Material' * (not coded yet)
    This is the task being triggered by the Change Documents *
    METHOD mat_changed.
    ENDMETHOD.
    Edited by: Kenneth Moore on Nov 4, 2008 11:00 AM

  • How to enter Enhancement Mode of ABAP OO Classes: Add Methods, Pre-Methods.

    Hello,
    do you know how to enter the enhancement mode of the class builder?
    I want to enhance a standard global ABAP OO class by implicit enhancements for inserting methods, attributes or pre- and post-methods - as described in  <a href="http://help.sap.com/saphelp_nw70/helpdata/en/58/4fb541d3d52d31e10000000a155106/content.htm">Online help</a>.
    I start the SE24 on my NW 7.0, but there is no menu <i>Edit-> Enhancement Operations-> Enhance Class/Interface </i> as written in <a href="http://help.sap.com/saphelp_nw70/helpdata/en/86/b83142680d5c33e10000000a155106/content.htm">Online Help</a>.
    When I press the <i>Display</i> button, there is no enhancement button (the spiral), and the sub entries of menu <i>Edit-> Enhancement Operations</i>, like <i>Insert Pre-Method</i> are inactive (gray).
    In SE80 I don't find them too. The only implicit enhancements I found are on the beginning and end of methods implementation code.
    Do you have experience enhancing classes?
    Best regards
    Michael Umlauff

    Hallo Michael,
    You first have to go in se80 or se24
    Then menu Class-> Enhance
    Then you will be able to use Edit-> Enhancement Operations-> Insert Pre-Post Methodes
    Regards,
    Walter

  • Integration of BOR functionality into a ABAP-OO Class

    Hi together,
    we are planning a WebDynpro application in which we are using about ten ABAP-OO classes. The functionality of that classes are using BOR-Objects. Since we are using the M-V-C pattern, we like to create Entities, e.g. "Business Partner" within our model. There is already a BOR "BP" existing. We like to use this BOS-Object for implementing the ABAP-OO Entity Class. By doing it that way, we are sure that the new object will satisfy any SAP compliance.
    Is there a standard way to integrate the functionality of BOR-Objects into an ABAP-OO Class?
    Best regards
        Thomas Wetzler

    Hi,
    have a look how SAP is handling this, for example in class CL_ATTACHMENT_LIST.
    There is an include CNTN01_SWC with the definitions of the data-types and macros you need to handle the BOR-objects and containers.
    Include this in the local class-implementations of your global class. Then you can handle the BOR-objects inside the methods as usual.
    Regards
    Dirk

  • How to indicate a message by a planning function type in an ABAP-OO-Class

    Hello,
    I integrated a message with following statement " MESSAGE i003(upf1) WITH v1 v2." in an ABAP-OO-Class, which is used by a Planning Function Type. The function type works but it´s not indecated after executing the Planning Sequence, neither from web template nor in the planning modeller.
    Does anybody know this problem/behavior?
    Thank for response
    Andreas

    Hi Joerg,
    how about this:
    data: l_dummy type char100.
    MESSAGE i003(upf1) WITH v1 v2  into l_dummy.
    i_r_msg->add_msg( ).
    You do not need to take special care about the variables. Just raise the message as you want it to be raised. The only thing you need to do is to raise the message into a string (..into l_dummy). The interface IF_RSPLFA_MSG and the implemetation of add_msg is going to read the standard message variables (SY-MSGNO, SY-MSGID, SY-MSGTY, MSGV1 ...). You just need to throw the message
    and call  i_r_msg->add_msg( ) e.g. in the execute method of your customer planning function.
    Please give it a try and take a look at it in the debugger.
    Hope this helps.
    Matthias Nutt
    SAP Consulting Switzerland

Maybe you are looking for

  • My LV program can't find the iak file when the program is loaded from a different PC.

    Hello all, My LV vi with Fieldpoint I/O and it's IAK file are stored on the company network.  If I load and run the LV vi from the PC it was developed on, everything is fine.  If I load and run on a different PC (that has an identical install of LV),

  • Configure log4j to write to different log files conditionally

    Hi folks, Is there is way log4j could be configured to write to multiple log files conditionally? Let me try to explain what i am trying to do. I have two classes DatabaseChecker and FTPChecker extends Checker class. Within Checker class, there is a

  • This Device Is Already Associated With an Apple ID

    I was having trouble logging into FaceTime and connecting to wifi. So I wiped my iPad mini and reset to factory settings. I was able to get my iPad mini working after wiping it and rebuilding it manually as a new device. Now, I have a new problem - m

  • IPod Touch (2nd gen) - Does not work with Component AV Cable

    I have a 2nd generation iPod Touch. Today I bought the component AV cable at the Apple store (along with a universal dock). Connected it correctly to the TV and: 1. No picture (screen is blue, as though nothing connected); no sound (whether video or

  • Price at gr

    can we mention the price at the time of gr tcode migo movment type 101 if the price at gr is different from po price