Error CX_SY_DYN_CALL_ILLEGAL_TYPE

Hello All
I am making progress on my first page thanks to some great help I have received from this community.  I now have another question. I am getting the Illegal type error at run time.  I have determined that it is the IMPORTING portion of my BAPI that is casuing the error, I just do not know why.  First, here is the code I have in the event handler"
DATA: i_notitem type table of t_notitem,
       i_notifcaus type table of t_notifcaus,
       i_notifactv type table of t_notifactv,
       i_notiftask type table of t_notiftask,
       i_notifpartnr type table of t_notifpartnr,
       i_longtexts type table of t_longtexts,
       i_key_relationships type table of t_key_relationships,
       i_return type table of t_return.
DATA: wa_notitem type t_notitem,
       wa_notifcaus type t_notifcaus,
       wa_notifactv type t_notifactv,
       wa_notiftask type  t_notiftask,
       wa_notifpartnr type  t_notifpartnr,
       wa_longtexts type  t_longtexts,
       wa_key_relationships type t_key_relationships,
       wa_return type t_return.
CALL FUNCTION 'BAPI_SERVNOT_GET_DETAIL'
  EXPORTING
    NUMBER            = P_QMNUM
IMPORTING
  NOTIFHEADER       = BAPI2080_NOTHDRE
  NOTIFHDTEXT       = BAPI2080_NOTHDTXTE
TABLES
    NOTLONGTEXT       = i_longtexts
    NOTITEM           = i_notitem
    NOTIFCAUS         = i_notifcaus
    NOTIFACTV         = i_notifactv
    NOTIFTASK         = i_notiftask
    NOTIFPARTNR       = i_notifpartnr
    RETURN            = i_return.
Based on other comments, I defined both BAPI2080_NOTHDRE and BAPI2080_NOTHDTXTE in the type definitions tab as:
types: htab1 type standard table of BAPI2080_NOTHDRE .
types: htab2 type standard table of BAPI2080_NOTHDTXTE.
I then declared them in the Page Attributes as:
BAPI2080_NOTHDRE TYPE HTAB1
BAPI2080_NOTHDTXTE TYPE HTAB2
When I still received the error, I went into the structure of the BAPI and confirmed that I had the right data types:
function bapi_servnot_get_detail.
""Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(NUMBER) LIKE  BAPI2080_NOTHDRE-NOTIF_NO
*"  EXPORTING
*"     VALUE(NOTIFHEADER) LIKE  BAPI2080_NOTHDRE
*"       STRUCTURE  BAPI2080_NOTHDRE
*"     VALUE(NOTIFHDTEXT) LIKE  BAPI2080_NOTHDTXTE
*"       STRUCTURE  BAPI2080_NOTHDTXTE
*"  TABLES
*"      NOTLONGTEXT STRUCTURE  BAPI2080_NOTFULLTXTE OPTIONAL
*"      NOTITEM STRUCTURE  BAPI2080_NOTITEME OPTIONAL
*"      NOTIFCAUS STRUCTURE  BAPI2080_NOTCAUSE OPTIONAL
*"      NOTIFACTV STRUCTURE  BAPI2080_NOTACTVE OPTIONAL
*"      NOTIFTASK STRUCTURE  BAPI2080_NOTTASKE OPTIONAL
*"      NOTIFPARTNR STRUCTURE  BAPI2080_NOTPARTNRE OPTIONAL
*"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
One posting suggested that you needed to add DESTINATION NONE to the end of the BAPI, but when I did that I got a CX_SY_DYN_CALL_ILLEGAL_FUNC error
Not sure what to do now
John
Edited by: John Esposito on Mar 24, 2010 3:00 PM

Thank you.  hopefully this is a better copy to read.
I am making progress on my first page thanks to some great help I have received from this community. I now have another question. I am getting the Illegal type error at run time. I have determined that it is the IMPORTING portion of my BAPI that is casuing the error, I just do not know why.
First, here is the code I have in the event handler:
DATA: i_notitem type table of t_notitem,
       i_notifcaus type table of t_notifcaus,
       i_notifactv type table of t_notifactv,
       i_notiftask type table of t_notiftask,
       i_notifpartnr type table of t_notifpartnr,
       i_longtexts type table of t_longtexts,
       i_key_relationships type table of t_key_relationships,
       i_return type table of t_return.
DATA: wa_notitem type t_notitem,
       wa_notifcaus type t_notifcaus,
       wa_notifactv type t_notifactv,
       wa_notiftask type  t_notiftask,
       wa_notifpartnr type  t_notifpartnr,
       wa_longtexts type  t_longtexts,
       wa_key_relationships type t_key_relationships,
       wa_return type t_return.
clear: BAPI2080_NOTHDRE.
refresh: i_notitem,
         i_notifcaus,
         i_notifactv,
         i_notiftask,
         i_notifpartnr,
         i_longtexts.
CALL FUNCTION 'BAPI_SERVNOT_GET_DETAIL'
  EXPORTING
    NUMBER            = P_QMNUM
IMPORTING
  NOTIFHEADER       = BAPI2080_NOTHDRE
  NOTIFHDTEXT       = BAPI2080_NOTHDTXTE
TABLES
    NOTLONGTEXT       = i_longtexts
    NOTITEM           = i_notitem
    NOTIFCAUS         = i_notifcaus
    NOTIFACTV         = i_notifactv
    NOTIFTASK         = i_notiftask
    NOTIFPARTNR       = i_notifpartnr
    RETURN            = i_return
Based on other comments, I defined both BAPI2080_NOTHDRE and BAPI2080_NOTHDTXTE in the type definitions tab as
types: htab1 type standard table of BAPI2080_NOTHDRE.
types: htab2 type standard table of BAPI2080_NOTHDTXTE.
I then declared them in the Page Attributes as:
BAPI2080_NOTHDRE TYPE HTAB1
BAPI2080_NOTHDTXTE TYPE HTAB2
When I still received the error, I went into the structure of the BAPI and confirmed that I had the right data types: function bapi_servnot_get_detail.
VALUE(NOTIFHEADER) LIKE  BAPI2080_NOTHDRE
*"       STRUCTURE  BAPI2080_NOTHDRE
*"     VALUE(NOTIFHDTEXT) LIKE  BAPI2080_NOTHDTXTE
*"       STRUCTURE  BAPI2080_NOTHDTXTE
T
John

Similar Messages

  • Error  CX_SY_DYN_CALL_ILLEGAL_TYPE with READ_TEXT

    Hello,
    I've created a class to get Notification information for my BSP application.  Whenever I test the code, I'm getting  CX_SY_DYN_CALL_ILLEGAL_TYPE error for the READ_TEXT FM (trying to get the long text).  It looks like all of the Imports are correct, not sure what is wrong.  Any help would be greatly appreciated.  (This is my first BSP and class, so sorry if this is an easy question).
    Thanks in advance,
    Lisa

    Make sure the parameter..
    <b>LINES  is TLINE_T type.</b> in the Call.
    CX_SY_DYN_CALL_ILLEGAL_TYPE
    Cause: The type of actual parameter does not meet the requirements of the function interface.
    Runtime Error: CALL_FUNCTION_CONFLICT_GEN_TYP
    Cause: The actual parameter does not have the length expected by the function.
    Runtime Error: CALL_FUNCTION_CONFLICT_LENG
    Cause: The actual parameter does not have the type expected by the function.
    Runtime Error: CALL_FUNCTION_CONFLICT_TYPE
    Cause: Only functions in the update task that are designed for this purpose may be called.
    Runtime Error: CALL_FUNCTION_NO_VB
    Cause: An actual parameter does not meet the alignment requirements of the corresponding formal parameter.
    Runtime Error: CALL_FUNCTION_WRONG_ALIGNMENT

  • Runtime Exception: CX_SY_DYN_CALL_ILLEGAL_TYPE

    Hi,
       In SRM Functional during creation of internal Catalog, when I tried to Add myself as Manage Approvers (to approve Master Catalog Schema) I get this BSP error CX_SY_DYN_CALL_ILLEGAL_TYPE exception.
    Unless I add myself to Approvers list to approve Master/Procurement Schemas, Master to Procurement content mapping will not take place.
    Please Advise
    Raj Rao.

    check the below link...
    CX_SY_DYN_CALL_ILLEGAL_TYPE
    rg
    sam

  • How can I pass the gt_outtab for cl_salv_table via a form parameter?

    Hello,
    I have put everything displaying the alv into a form routine and want to pass the gt_outtab-table, which contains the data to be displayed, as a table parameter. Then I receice the error CX_SY_DYN_CALL_ILLEGAL_TYPE regardless if it is a typed parameter (the actual structure, table) or untyped parameter.
    Does anyone have an idea, what to do? Of cause refering to a global variable will do, but the readability of the programm I want to have it as a parameter.
    Thank you,
    Peter

    Hi,
    you must use your table as a global object in the program. If you try to pass the values to the subroutine as a parameter with TABLES, then you´re altering the properties of the output table; that´s why you get the exception.
    .... and don´t worry about the readability of your program.

  • Regarding Short dump while data extraction

    Hi All,
    We are trying to extract data from DB Connect. When we try to pull the data by giving selections, we are getting short dump.
    Name of Run time error.
    PERFORM_CONFLICT_TAB_TYPE
    Exception Name
    CX_SY_DYN_CALL_ILLEGAL_TYPE
    What could be the reason for this error.

    Hi Jayanth,
    Check these ...
    Perform_conflict_tab_type error
    Oracle to BW Load Runtime error CX_SY_DYN_CALL_ILLEGAL_TYPE
    Raja

  • Error in 'CX_SY_DYN_CALL_ILLEGAL_TYPE' problem in smartfrom printing

    Dear Friends,
    I developed a code for SD module for RAS GAS invoice. It it I m accessing it through VF02. on output there will be a smartform appered for invoice.
    I tested the driver code and smartform individually and had no errors.
    I attached the driver code and form through NACE for run time.
    Now when I m executing it through VF02 , when I clicked on print preview it throws a error as show.
    Plz help me to remove it. Error analysis and piece of code is attached.
    Thanx and regards,
    Error analysis                                                                               
    An exception occurred. This exception is dealt with in more detail below                                                        
    . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',                                                  
    was neither                                                                               
    caught nor passed along using a RAISING clause, in the procedure "PROCESSING"                                                   
    "(FORM)"                                                                               
    Since the caller of the procedure could not have expected this exception                                                        
    to occur, the running program was terminated.                                                                               
    The reason for the exception is:                                                                               
    The call to the function module "/1BCDWB/SF00000193" is incorrect:                                                                               
    In the function module interface, you can specify only                                                                          
    fields of a specific type and length under "ITVBRK".                                                                            
    Although the currently specified field                                                                               
    "ITVBRK" is the correct type, its length is incorrect.        
    Information on where terminated                                                                               
    The termination occurred in the ABAP program "ZV_RASGAS " in "PROCESSING".                                                
    The main program was "SAPMV60A ".                                                                               
    The termination occurred in line 633 of the source code of the (Include)                                                  
    program "ZV_RASGAS "                                                                               
    of the source code of program "ZV_RASGAS " (when calling the editor 6330).                                                
    Processing was terminated because the exception "CX_SY_DYN_CALL_ILLEGAL_TYPE"                                             
    occurred in the                                                                               
    procedure "PROCESSING" "(FORM)" but was not handled locally, not declared in                                              
    the                                                                               
    RAISING clause of the procedure.                                                                               
    The procedure is in the program "ZV_RASGAS ". Its source code starts in line 58                                           
    of the (Include) program "ZV_RASGAS ".                                                                               
    Source code extract                                                                               
    006030                       no_function_module = 2                                                                               
    006040                       OTHERS             = 3.                                                                               
    006050       IF sy-subrc <> 0.                                                                               
    006060   *   error handling                                                                               
    006070         cf_retcode = sy-subrc.                                                                               
    006080         PERFORM protocol_update.                                                                               
    006090       ENDIF.                                                                               
    006100     ENDIF.                                                                               
    006110                                                                               
    006120     IF cf_retcode = 0.                                                                               
    006130       PERFORM check_repeat.                                                                               
    006140       IF ls_composer_param-tdcopies EQ 0.                                                                               
    006150         nast_anzal = 1.                                                                               
    006160       ELSE.                                                                               
    006170         nast_anzal = ls_composer_param-tdcopies.                                                                               
    006180       ENDIF.                                                                               
    006190       ls_composer_param-tdcopies = 1.                                                                               
    006200       DO nast_anzal TIMES.                                                                               
    006210   * In case of repetition only one time archiving                                                                               
    006220         IF sy-index > 1 AND nast-tdarmod = 3.                                                                               
    006230           nast_tdarmod = nast-tdarmod.                                                                               
    006240           nast-tdarmod = 1.                                                                               
    006250           ls_composer_param-tdarmod = 1.                                                                               
    006260         ENDIF.                                                                               
    006270         IF sy-index NE 1 AND repeat IS INITIAL.                                                                               
    006280           repeat = 'X'.                                                                               
    006290         ENDIF.                                                                               
    006300   * call smartform invoice                                                                               
    006310   append itvbrp.                                                                               
    006320                                                                               
    >   CALL FUNCTION lf_fm_name2                                                                               
    006340     EXPORTING                                                                               
    006350       RDT                        =  rdt                                                                               
    006360       BILSDT                     =  min                                                                               
    006370       BILEDT                     =  max                                                                               
    006380       CUMMMSCM                   =  cummmscm                                                                         
    006390       TPCUMMMBTU                 =  tpcummmbtu                                                                       
    006400       TPCUMSCM                   =  tpcumscm                                                                         
    006410       WS_IVBEL                   =  WS_IVBEL                                                                         
    006420       WS_GVBEL                   =  WS_GVBEL                                                                         
    006430       WS_BVBEL                   =  WS_BVBEL                                                                         
    006440       WS_BILDT                   =  WS_BILDT                                                                         
    006450       TPCUMMMBTUX                =  TPCUMMMBTUX                                                                      
    006460       GINVNO                     =  inv                                                                               
    006470       BILDOC                     =  BILDOC                                                                           
    006480       ZKBETR                     =  ZKBETR                                                                           
    006490       zlng                       =  zlng                                                                             
    006500       zrc                        =  zrc                                                                               
    006510       zkb                        =  zkb                                                                               
    006520   *    VOLUM                      =  VOLUM                           
    thanx and regards,
    sitendra

    Hi Sitendra,
    This exception normally occurs when there is a type mismatch.
    Kindly check the length of all fields in the structure/table ITVBRK both in your print program and smartforms. There is a mismatch in the field length of 1 or more of the fields.
    Reward points if helpful.
    Regards,
    Senthil G.

  • Error when using BAPI

    Please find herewith my below code. This program i have created for transferring goods with mvt type '657' to '555' using BAPI 'BAPI_GOODSMVT_CREATE' for TCODE MB1A.
    *& Report  Z_BAPI_FOR_MB1A
    REPORT  Z_BAPI_FOR_MB1A.
    Tables : mkpf, mseg, WB2_V_MKPF_MSEG2.
    DATA:
    it_mb1a LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE,
    it_return LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,
    it_ex_headret LIKE BAPI2017_GM_HEAD_RET OCCURS 0 WITH HEADER LINE,
    it_im_header LIKE BAPI2017_GM_HEAD_01, " OCCURS 0, " WITH HEADER LINE,
    it_im_gmcode LIKE BAPI2017_GM_CODE, " OCCURS 0, "WITH HEADER LINE,
    mat_doc type bapi2017_gm_head_ret-mat_doc,
    mat_docyear type bapi2017_gm_head_ret-doc_year.
    *data : lv_intense(01).
    data : it_mseg like WB2_V_MKPF_MSEG2 occurs 0 with header line,
           it_cost like csks occurs 0 with header line.
    selection-screen begin of block a with frame title text-001.
    parameters: p_date type sy-datum default sy-datum.
    select-options: so_budat for WB2_V_MKPF_MSEG2-budat,
                    so_werks for WB2_V_MKPF_MSEG2-werks_i,
                    so_matnr for WB2_V_MKPF_MSEG2-matnr_i,
                    so_lgort for WB2_V_MKPF_MSEG2-lgort_i.
    selection-screen end of block a.
    select * from WB2_V_MKPF_MSEG2 into
    table it_mseg where
    budat in so_budat and
    werks_i in so_werks and
    matnr_i in so_matnr and
    lgort_i in so_lgort and
    bwart_i = '657'.
    select * from csks into table it_cost
    for all entries in it_mseg where
    gsber = it_mseg-werks_i.
    *Filling BAPI Header Tables
    it_im_header-pstng_date = sy-datum.
    it_im_header-doc_date = sy-datum.
    it_im_gmcode-gm_code = '03'.
    *Filling BAPI Item Tables
    loop at it_mseg.
    read table it_cost with key gsber = it_mseg-werks_i.
    it_mb1a-material = it_mseg-matnr_i.
    it_mb1a-plant = it_mseg-werks_i.
    it_mb1a-stge_loc = it_mseg-lgort_i.
    it_mb1a-batch = it_mseg-charg_i.
    it_mb1a-move_type = 555. " '103'.
    it_mb1a-entry_qnt = it_mseg-menge_i.
    it_mb1a-costcenter = it_cost-KOSTL.
    it_mb1a-gl_account = '530089'.
    append it_mb1a.
    clear it_mb1a.
    clear it_cost.
    endloop.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header               = it_im_header
        goodsmvt_code                 = it_im_gmcode
    *   TESTRUN                       = ' '
    *   GOODSMVT_REF_EWM              =
    IMPORTING
       GOODSMVT_HEADRET              = it_ex_headret
       MATERIALDOCUMENT              = mat_doc
       MATDOCUMENTYEAR               = mat_docyear
      tables
        goodsmvt_item                 = it_mseg
    *   GOODSMVT_SERIALNUMBER         =
        return                        = it_return
    *   GOODSMVT_SERV_PART_DATA       =
    *   EXTENSIONIN                   =
    if sy-subrc = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    * IMPORTING
    *   RETURN        =
    endif.
    But when i execute the above i am getting the following error.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Date and Time          27.01.2009 14:43:06
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "Z_BAPI_FOR_MB1A" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught and
         therefore caused a runtime error.
         The reason for the exception is:
         In the function "BAPI_GOODSMVT_CREATE", the STRUCTURE parameter "GOODSMVT_ITEM"
          is typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "IT_MSEG" has an incompatible fragment view.
    Missing Handling of System Exception
         Program                                 Z_BAPI_FOR_MB1A
    Trigger Location of Exception
        Program                                 Z_BAPI_FOR_MB1A
        Include                                 Z_BAPI_FOR_MB1A
        Row                                     72
        Module Name                             START-OF-SELECTION
    Source Code Extract
    Line  SourceCde
       42 lgort_i in so_lgort and
       43 bwart_i = '657'.
       44
       45 select * from csks into table it_cost
       46 for all entries in it_mseg where
       47 gsber = it_mseg-werks_i.
       48 *Filling BAPI Header Tables
       49 it_im_header-pstng_date = sy-datum.
       50 it_im_header-doc_date = sy-datum.
       51 it_im_gmcode-gm_code = '03'.
       52
       53 *Filling BAPI Item Tables
       54 loop at it_mseg.
       55
       56 read table it_cost with key gsber = it_mseg-werks_i.
       57
       58 it_mb1a-material = it_mseg-matnr_i.
       59 it_mb1a-plant = it_mseg-werks_i.
       60 it_mb1a-stge_loc = it_mseg-lgort_i.
       61 it_mb1a-batch = it_mseg-charg_i.
       62 it_mb1a-move_type = 555. " '103'.
      64 it_mb1a-costcenter = it_cost-KOSTL.
      65 it_mb1a-gl_account = '530089'.
      66
      67 append it_mb1a.
      68 clear it_mb1a.
      69 clear it_cost.
      70 endloop.
      71
    72*>>>> CALL FUNCTION 'BAPI_GOODSMVT_CREATE'*  73   EXPORTING
      74     goodsmvt_header               = it_im_header
      75     goodsmvt_code                 = it_im_gmcode
      76 *   TESTRUN                       = ' '
      77 *   GOODSMVT_REF_EWM              =
      78  IMPORTING
      79    GOODSMVT_HEADRET              = it_ex_headret
      80    MATERIALDOCUMENT              = mat_doc
      81    MATDOCUMENTYEAR               = mat_docyear
      82   tables
      83     goodsmvt_item                 = it_mseg
      84 *   GOODSMVT_SERIALNUMBER         =
      85     return                        = it_return
      86 *   GOODSMVT_SERV_PART_DATA       =
      87 *   EXTENSIONIN                   =
      88           .
      89 if sy-subrc = 0.
      90 CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      91  EXPORTING
    Can u explain why this is coming. Your valuable suggestions are required.
    Thanks,
    Jitesh M Nair

    Hi,
    Try this Code.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            EXPORTING
              GOODSMVT_HEADER       = WF_HEADER
              GOODSMVT_CODE         = WF_CODE
              TESTRUN               = WL_space
            IMPORTING
              MATERIALDOCUMENT      = FS_MATERIAL_DOC
            TABLES
              GOODSMVT_ITEM         = INT_ITEM
              GOODSMVT_SERIALNUMBER = INT_SERIALNO
              RETURN                = INT_RETURN1.
    *VARIABLES for goods movement creation bapi
    DATA : WF_HEADER  TYPE   BAPI2017_GM_HEAD_01,
           WF_CODE    TYPE   BAPI2017_GM_CODE.
    DATA : FS_MATERIAL_DOC   TYPE BAPI2017_GM_HEAD_RET-MAT_DOC,
           FS_SERIALNO       TYPE BAPI2017_GM_SERIALNUMBER,
           FS_ITEM           TYPE BAPI2017_GM_ITEM_CREATE,
           FS_RETURN1        TYPE BAPIRET2,
    data declaration for goods movement creation bapi
    DATA : INT_ITEM     TYPE TABLE OF BAPI2017_GM_ITEM_CREATE,
           INT_SERIALNO TYPE TABLE OF BAPI2017_GM_SERIALNUMBER,
           INT_RETURN1  TYPE TABLE OF BAPIRET2.
    Hope this will help.
    Regards,
    Rohan.

  • "CALL_FUNCTION_CONFLICT_TYPE" runtime error while running tcode BPS0 in BW

    Hi ,
    Can anybody have any idea about this dump error in BW quality system while user running tcode BPS0 and getting this dump repeatedly please help me out on this.
    Error in the ABAP Application Program
    The current ABAP program "SAPLZBSV_BPS_E_PLA_VARIABLES" had to be terminated
    because it has
    come across a statement that unfortunately cannot be executed.
    A function module was called incorrectly.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE'
         not caught in
        procedure "CHECK_FILE_ENTRIES2" "(FORM)", nor was it propagated by a RA
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The call to the function module "RSD_CHKTAB_GET_FOR_CHA_BAS" is incorre
        The function module interface allows you to specify only
        fields of a particular type under "E_CHNTAB".
        The field "L_TABNM" specified here is a different
        field type
    How to correct
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "CALL_FUNCTION_CONFLICT_TYPE" "CX_SY_DYN_CALL_ILLEGAL_TYPE"
    "SAPLZBSV_BPS_E_PLA_VARIABLES" or "LZBSV_BPS_E_PLA_VARIABLESF01"
    "CHECK_FILE_ENTRIES2"
    Thanks & Regards
        Rituraj

    Hello,
    I get the answer. In program personal_data is associated with bapip0002 structure.
    where as in function personal_data is associated with BAPIP0002B. and the structure of  BAPIP0002 is differ to BAPIP0002B.
    minaxi shah

  • ERROR WHILE USING SO_NEW_DOCUMENT_ATT_SEND_API1

    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
    not caught in
    procedure "ENTRY_NEU" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    In the function "SO_NEW_DOCUMENT_ATT_SEND_API1", the STRUCTURE parameter
    "CONTENTS_HEX" is typed in such a way
    that only actual parameters are allowed, which are compatible in Unicode
    with respect to the fragment view. However, the specified actual
    parameter "I_OBJBIN" has an incompatible fragment view.
    *Declararions Used
    *Internal Table declarations
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    *Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    *Work Area declarations
    w_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    w_doc_chng typE sodocchgi1,
    w_data TYPE sodocchgi1,
    w_buffer TYPE string,"To convert from 132 to 255
    Please help me thanks in advance
    Points will be rewarded

    Sending External Mail via ABAP
    REPORT ZSENDEXTERNAL.
    DATA: OBJPACK   LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: OBJHEAD   LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: OBJBIN    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT    LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: RECLIST   LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
    DATA: DOC_CHNG  LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    Creation of the document to be sent
    File Name
    DOC_CHNG-OBJ_NAME = 'SENDFILE'.
    Mail Subject
    DOC_CHNG-OBJ_DESCR = 'Send External Mail'.
    Mail Contents
    OBJTXT = 'Minimum bid : $250000'.
    APPEND OBJTXT.
    OBJTXT = 'A representation of the pictures up for auction'.
    APPEND OBJTXT.
    OBJTXT = 'was included as attachment.'.
    APPEND OBJTXT.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creation of the entry for the compressed document
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TAB_LINES.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    Creation of the document attachment
    (Assume that the data in OBJBIN is in BMP format)
    *OBJBIN = ' \O/ '. APPEND OBJBIN.
    *OBJBIN = ' | '. APPEND OBJBIN.
    *OBJBIN = ' / \ '. APPEND OBJBIN.
    *DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    *OBJHEAD = 'PICTURE.BMP'.
    *APPEND OBJHEAD.
    Creation of the entry for the compressed attachment
    *OBJPACK-TRANSF_BIN = 'X'.
    *OBJPACK-HEAD_START = 1.
    *OBJPACK-HEAD_NUM = 1.
    *OBJPACK-BODY_START = 1.
    *OBJPACK-BODY_NUM = TAB_LINES.
    *OBJPACK-DOC_TYPE = 'BMP'.
    *OBJPACK-OBJ_NAME = 'PICTURE'.
    *OBJPACK-OBJ_DESCR = 'Representation of object 138'.
    *OBJPACK-DOC_SIZE = TAB_LINES * 255.
    *APPEND OBJPACK.
    Completing the recipient list
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    *RECLIST-RECEIVER = 'SAPUSERNAME'.
    *RECLIST-REC_TYPE = 'P'.
    *APPEND RECLIST.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
       DOCUMENT_DATA = DOC_CHNG
       PUT_IN_OUTBOX = 'X'
    TABLES
       PACKING_LIST = OBJPACK
       OBJECT_HEADER = OBJHEAD
       CONTENTS_BIN = OBJBIN
       CONTENTS_TXT = OBJTXT
       RECEIVERS = RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS = 1
       DOCUMENT_NOT_SENT = 2
       OPERATION_NO_AUTHORIZATION = 4
    OTHERS = 99.
    CASE SY-SUBRC.
       WHEN 0.
       WRITE: / 'Result of the send process:'.
    LOOP AT RECLIST.
       WRITE: / RECLIST-RECEIVER(48), ':'.
       IF RECLIST-RETRN_CODE = 0.
          WRITE 'The document was sent'.
       ELSE.
          WRITE 'The document could not be sent'.
    ENDIF.
    ENDLOOP.
    WHEN 1.
       WRITE: / 'No authorization for sending to the specified number',
                'of recipients'.
    WHEN 2.
       WRITE: / 'Document could not be sent to any recipient'.
    WHEN 4.
       WRITE: / 'No send authorization'.
    WHEN OTHERS.
       WRITE: / 'Error occurred while sending'.
    ENDCASE.
    Reward if helpful
    Regards
    Vodka.

  • Error in Background Job:CALL_FUNCTION_CONFLICT_TYPE

    Hi
    We ran one job some 2 or 3 times on the same day but it is getting cancelled now due dump error ABAP/4 processor: CALL_FUNCTION_CONFLICT_TYPE. This dump is coming due to parameter type conflict in the function module JOB_CLOSE.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
    not caught in
    procedure "SUBMIT_JOB" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The call to the function module "JOB_CLOSE" is incorrect:
    The function module interface allows you to specify only
    fields of a particular type under "TARGETSERVER".
    The field "MYNAME" specified here is a different
    field type.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobname = jobname
    jobcount = jobcount
    strtimmed = 'X'.
    strtimmed = 'X'
    TARGETSYSTEM = SY-HOST.
    targetsystem = sy-host
    targetserver = myname
    EXCEPTIONS "QIZK001068
    cant_start_immediate = 1 "QIZK001068
    invalid_startdate = 2 "QIZK001068
    jobname_missing = 3 "QIZK001068
    job_close_failed = 4 "QIZK001068
    job_nosteps = 5 "QIZK001068
    job_notex = 6 "QIZK001068
    lock_failed = 7 "QIZK001068
    OTHERS = 8.
    DATA myname LIKE msxxlist-name.
    Structure MSXXLIST Active
    NAME MSNAME2 CHAR 40 0 Application Server Name
    Function module JOB_CLOSE Active
    TARGETSERVER LIKE BTCTGTSRVR-SRVNSPACE
    Structure BTCTGTSRVR Active
    SRVNAME BTCSRVNAME CHAR 20 0 Server name
    My question is why is this dump coming now after running the same job again, as earlier it got run successfully. Also, do i need to fix this this.
    Edited by: deepti Gandham on May 18, 2010 2:54 PM

    Hi Deepti,
    Check the data types of the parameters TARGETSERVER & MYNAME. They might be different, and hence the error.
    Some one might have changed the types recently. Hence there was no error previously. The error might have come after the change.
    kindly correct the data types so that they match. Or else the error would continue to occur.
    Thanks,
    James

  • Error in using CF_UT_UNIT_CONVERSION in the enhancement of Master data

    Hi ,
    Can anyone please help me in debugging the run time error.
    This is the Run time error i am getting -
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
    not caught in
    procedure "Z_BWL_EXIT_0CUSTOMER_ATTR" "(FUNCTION)", nor was it propagated by a
    RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The call to the function module "CF_UT_UNIT_CONVERSION" is incorrect:
    The function module interface allows you to specify only
    fields of a particular type under "UNIT_OLD_IMP".The field "V_MASUN" specified here is a different
    field type
    Missing RAISING Clause in Interface
        Program                                 SAPLZCA_FG_EXITS
        Include                                 LZCA_FG_EXITSU02
        Row                                     1
        Module type                             (FUNCTION)
        Module Name                             Z_BWL_EXIT_0CUSTOMER_ATTR
    Trigger Location of Exception
        Program                                 SAPLZCA_FG_EXITS
        Include                                 LZCA_FG_EXITSU02
        Row                                     113
        Module type                             (FUNCTION)
        Module Name                             Z_BWL_EXIT_0CUSTOMER_ATTR
    Thanks in Advance,
    sravani Kandy

    Which version you are using ?
    This fm doesnt exists in my system.

  • Error while running tcode wwy1 in r/3

    Hello,
    I am beginner for Internet Transaction Server (ITS).
    while running tcode wwy1 in SAP R/3, ther is an ABAP runtime error as below.
    An exception occurred. This exception is dealt with in more detail below        
    . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',  
    was neither                                                                    
    caught nor passed along using a RAISING clause, in the procedure                
    "USER_COMMAND_0100" "(FORM)"                                                   
    Since the caller of the procedure could not have expected this exception        
    to occur, the running program was terminated.                                  
    The reason for the exception is:                                                
    In the function "BAPI_EMPLOYEE_GETDATA" the STRUCTURE parameter "PERSONAL_DATA" 
    is typed in such a way                                                         
    that actual parameters are not valid, unless they are compatible                
    according to the Unicode fragment view.  
    But when I run test for function  "BAPI_EMPLOYEE_GETDATA", it display the result.
    Can anyone have a clue ?
    Thanks in regards.
    Minaxi shah

    Hello,
    I get the answer. In program personal_data is associated with bapip0002 structure.
    where as in function personal_data is associated with BAPIP0002B. and the structure of  BAPIP0002 is differ to BAPIP0002B.
    minaxi shah

  • Error while calling the Mapping function module for BW Extraction

    Hi
    iam getting runtime error while calling the BW mapping function
    The error description is as shown below.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    <b>Short text</b>
        Type conflict during structure parameter transfer at CALL FUNCTION.
    <b>What happened?</b>
        Error in the ABAP Application Program
        The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
         because it has
        come across a statement that unfortunately cannot be executed.
    <b>Error analysis</b>   
    An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
         not caught in
        procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
         typed in such a way
        that only actual parameters are allowed, which are compatible in Unicode
         with respect to the fragment view. However, the specified actual
        parameter " " has an incompatible fragment view.
    I am passing the EXTRACT_DATA  parameter as specification LIKE with the associated type  - corresponding structure
    Please let me know how can i resolve this issue
    Regards
    Leon

    Dear benarji ,
    I'm having the  same problem help me to correct . I have mentioned below as what error i got.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
          has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught in
         procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
          typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "SFTWORKS" has an incompatible fragment view.
    Missing RAISING Clause in Interface
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     876
        Module type                             (FORM)
        Module Name                             PDF
    Trigger Location of Exception
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     894
        Module type                             (FORM)
        Module Name                             PDF
    Source Code Extract
    Line  SourceCde
      864 **            i_logo             = 'ENJOYSAP_LOGO'
      865 *            IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
      866
      867 ENDFORM.                    "alv_top_of_page1
      868 *&---------------------------------------------------------------------*
      869 *&      Form  PDF
      870 *&---------------------------------------------------------------------*
      871 *       text
    872 *----------------------------------------------------------------------*
    873 *  -->  p1        text
    874 *  <--  p2        text
    875 *----------------------------------------------------------------------*
    876 FORM pdf .
    877
    878 *  *** Smartforms & PDF ***
    879
    880   ssfctrlop-no_dialog = 'X'.
    881   ssfctrlop-preview   = 'X'.
    882   ssfctrlop-getotf    = 'X'.
    883   ssfcompop-tddest = 'ERP7'.
    884   DATA : mcheck LIKE sy-subrc.
    885   CLEAR : fm_name.
    886
    887   "Get Function module name for given smartform
    888   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    889     EXPORTING
    890       formname = 'ZSFDLOS1'
    891     IMPORTING
    892       fm_name  = fm_name.
    893
    >>>>   CALL FUNCTION fm_name
    895   EXPORTING
    896         control_parameters   = ssfctrlop
    897         output_options       = ssfcompop
    898         mrefno               = mrefno
    899 *       P_TITLE              = MTITLE
    900   IMPORTING
    901         document_output_info = st_document_output_info
    902         job_output_info      = st_job_output_info " IT_OTF_DATA
    903         job_output_options   = st_job_output_options
    904   TABLES
    905         it_works_sf          = sftworks
    906   EXCEPTIONS
    907         formatting_error     = 1
    908         internal_error       = 2
    909         send_error           = 3
    910         user_canceled        = 4
    911     OTHERS               = 5.
    912
    913   IF sy-subrc NE 0.
    Advance Thanks

  • Error while running report?  Urgent

    Hi
    I am trying to create report and in that the report should run by taking the current week.
    I have written a customer exit for that and when i run the report i am getting following error
    An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was
    neither handled locally, nor declared in a RAISING
        Message no. RS_EXCEPTION000
    The function call of DATE_GET_WEEK failed; a field may have been assigned to
    the parameter WEEK whose type is not compatible with th
        Message no. RS_EXCEPTION000
    I am using following customer exit
    data: l_curweek  type sy-datum.
       if i_step = 1.
         call function 'DATE_GET_WEEK'
           EXPORTING
             date = sy-datum
           IMPORTING
             week  = l_curweek.
        clear l_s_range.
         l_s_range-low = l_curweek.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'EQ'.
         append l_s_range to e_t_range.
       endif.
    Please help me out.

    This time it gives different errors
    Error for variable  in customer enhancement Z_C_WEEK
        Message no. BRAIN649
    Diagnosis
        This internal error is a deliberate termination, since a program status
        has arisen, that is not allowed to occur.
        The error has arisen for variable Z_C_WEEK in the customer enhancement .
    Procedure
        Please check your customer enhancement.
    Procedure for System Administration
    Variables contain invalid values.
        Message no. BRAIN633
    System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
        Message no. BRAIN299
    Diagnosis
        This internal error is an intended termination resulting from a program
        state that is not permitted.
    Procedure
        Analyze the situation and inform SAP.
        If the termination occurred when you executed a query or Web template,
        or during interaction in the planning modeler, and if you can reproduce
        this termination, record a trace (transaction RSTT).
        For more information about recording a trace, see the documentation for
        the trace tool environment as well as SAP Note 899572.

  • Error when reading a pdf attachment file in sap inbox

    Hi all,
    I have created a RFC which sends mail from an external user to my sap inbox with attachment.
    the problem is with the PDF attachment where when i received the mail in my sap inbox in sbwp, it says that there is an error that it wasnt correctly decode.
    I used the class cl_document_bcs...
    and used the method add_attachment...
    would plz help me out

    this is my code
    FUNCTION ZMAIL_READ.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SUBJECT) TYPE  SO_OBJ_DES
    *"     VALUE(TEXT) TYPE  STRING
    *"     VALUE(SENDER) TYPE  ADR6-SMTP_ADDR
    *"     VALUE(RECEIVER) TYPE  ADR6-SMTP_ADDR
    *"     VALUE(ATTACHMENTS) TYPE  Z_T_XATTACH OPTIONAL
    *"  EXPORTING
    *"     VALUE(MESSAGE) TYPE  STRING
    DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
          lo_bcs_send_request TYPE REF TO cl_bcs,
          l_send type ADR6-SMTP_ADDR ,
          l_rec type  ADR6-SMTP_ADDR .
    data: it_text type table of soli,
          wa_text type soli.
    DATA: lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
    DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    DATA: lv_recipient_uid TYPE uname,
          lv_recipient_mail TYPE adr6-smtp_addr.
    data: lo_message type ref to cx_send_req_bcs value is initial,
          text_val type string.
    data: it_userlist type table of BAPIUSNAME,
          wa_userlist type BAPIUSNAME.
    data: it_selection_range type table of BAPIUSSRGE,
          wa_selection_range type BAPIUSSRGE.
    data: wa_attachment TYPE ZXATTACH,
          attachment_sub type SO_OBJ_DES.
    DATA: xstr type xstring,
          str TYPE string,
          str1 type string,
          it_str2 type table of soli,
          wa_STR2 TYPE SOLI.
    DATA: LOC_CONV TYPE REF TO CL_ABAP_CONV_IN_CE,
          wa_solix type solix,
          it_solix type table of solix,
          wa_soli type soli,
          it_soli type table of soli.
    data result TYPE boolean.
    data: i_ext(10) type c,
          i_type type soodk-objtp.
    wa_text-line = text.
    append wa_text to it_text.
    CLASS cl_bcs DEFINITION LOAD.
    try.
    lo_send_request = cl_bcs=>create_persistent( ).
    catch cx_send_req_bcs.
    endtry.
    * Message body and subject
    data: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
    try.
    lo_document = cl_document_bcs=>create_document(
         i_type = 'RAW'
         i_text =  it_text
         i_subject = subject ).
    catch cx_send_req_bcs.
    catch cx_document_bcs.
    catch cx_address_bcs.
    endtry.
    loop at attachments into wa_attachment.
    attachment_sub = wa_attachment-file_name.
    it_str2 = wa_attachment-attach.
    loop at it_str2 into wa_str2.
      str1 = wa_str2-line.
    try.
    CALL FUNCTION 'SSFC_BASE64_DECODE'
      EXPORTING
        B64DATA                        = str1
    *   B64LENG                        =
    *   B_CHECK                        =
      IMPORTING
        BINDATA                        = xstr
    * EXCEPTIONS
    *   SSF_KRN_ERROR                  = 1
    *   SSF_KRN_NOOP                   = 2
    *   SSF_KRN_NOMEMORY               = 3
    *   SSF_KRN_OPINV                  = 4
    *   SSF_KRN_INPUT_DATA_ERROR       = 5
    *   SSF_KRN_INVALID_PAR            = 6
    *   SSF_KRN_INVALID_PARLEN         = 7
    *   OTHERS                         = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    catch cx_sy_dyn_call_illegal_type.
    endtry.
    CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
          EXPORTING
            INPUT       = xstr
            ENCODING    = 'UTF-8'
    *        REPLACEMENT = '?'
    *        IGNORE_CERR = ABAP_TRUE
          RECEIVING
            CONV        = loc_CONV.
    TRY.
        CALL METHOD LOC_CONV->READ
          IMPORTING
            DATA = STR.
    CATCH CX_SY_CONVERSION_CODEPAGE.
    CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
    CATCH CX_PARAMETER_INVALID_TYPE.
    CATCH CX_PARAMETER_INVALID_RANGE.
    ENDTRY.
    wa_solix-line = xstr.
    append wa_solix to it_solix.
    wa_soli-line = str.
    append wa_soli to it_soli.
    endloop.
    try.
    CALL FUNCTION 'SA_KW_RFC_FILENAME_EXT_GET'
      EXPORTING
       AREA            = 'IWBSOLAR'
        MIMETYPE        = wa_attachment-type
    IMPORTING
       EXTENSION       = i_ext
    catch cx_sy_dyn_call_illegal_type.
    endtry.
    i_type = i_ext.
    if i_ext <> 'pdf'.
    try.
      lo_document->add_attachment(
      EXPORTING
        i_attachment_type = i_type
        i_attachment_subject = attachment_sub
        i_att_content_hex = it_solix ).
           CATCH cx_document_bcs.
    endtry.
    clear wa_solix.
    refresh it_solix.
    else.
    TRY.
      CALL METHOD LO_DOCUMENT->ADD_ATTACHMENT
        EXPORTING
          I_ATTACHMENT_TYPE     = i_type
          I_ATTACHMENT_SUBJECT  = attachment_sub
    *      I_ATTACHMENT_SIZE     =
    *      I_ATTACHMENT_LANGUAGE = SPACE
          I_ATT_CONTENT_TEXT    = it_soli
    *      I_ATT_CONTENT_HEX     =
    *      I_ATTACHMENT_HEADER   =
       CATCH CX_DOCUMENT_BCS .
      ENDTRY.
    ENDIF.
    endloop.
    try.
    lo_send_request->set_document( lo_document ).
    CATCH cx_send_req_bcs.
    endtry.
    wa_selection_range-PARAMETER = 'address'.
    wa_selection_range-field = 'e_mail'.
    wa_selection_range-sign = 'I'.
    wa_selection_range-option = 'EQ'.
    wa_selection_range-low = receiver.
    append wa_selection_range to it_selection_range.
    try.
    CALL FUNCTION 'BAPI_USER_GETLIST'
    * EXPORTING
    *   MAX_ROWS              = 0
    *   WITH_USERNAME         = ' '
    * IMPORTING
    *   ROWS                  =
    TABLES
        SELECTION_RANGE       = it_selection_range
    *   SELECTION_EXP         =
        USERLIST              = it_userlist
    *   RETURN                =
    catch cx_sy_dyn_call_illegal_type.
    endtry.
    read table it_userlist into wa_userlist index 1.
    try.
      lo_sender = cl_cam_address_bcs=>create_internet_address( sender ).
      lo_send_request->set_sender(
         EXPORTING
         i_sender = lo_sender ).
    catch cx_send_req_bcs.
    catch cx_document_bcs.
    catch cx_address_bcs.
      return.
    endtry.
    try.
        lo_recipient = cl_sapuser_bcs=>create( wa_userlist-USERNAME ).
        lo_send_request->add_recipient(
           EXPORTING
             i_recipient = lo_recipient ).
    *         i_express = 'X' ).
      catch cx_send_req_bcs.
      catch cx_document_bcs.
      catch cx_address_bcs.
    endtry.
    try.
    ** Send email
         LO_SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
         lo_send_request->send( EXPORTING
         i_with_error_screen = ' '
         RECEIVING
         result = result ).
         COMMIT WORK.
    CATCH CX_DOCUMENT_BCS.
    CATCH CX_SEND_REQ_BCS INTO lo_message.
    CATCH CX_ADDRESS_BCS.
    text_val = lo_message->IF_MESSAGE~GET_TEXT( ).
    endtry.
    if result = 'X'.
      message = 'E-Mail sent'.
    else.
      message = 'E-Mail not sent'.
    endif.
    ENDFUNCTION.

Maybe you are looking for

  • Hiding a hierarchy column in graph view

    Hi All, In an compound layout I would like to have pivot view and bar chart view. There are two hierarchy columns in criteria. These column should display in pivot view. My requirement is to hide the hierarchy columns in Bar chart view and can we app

  • Creation of material master

    Dear all, While entering of MM01, MM02, MM03 T codes, The system showing the error message - "Record Y1 01 does not exist in Table T133A" - for this what do I do, Plz suggest. reg Vishnu.Ch

  • File Dialog Box often takes a long time to execute

    Hi all The Labview File Dialog Box Express VI sometimes takes 5 to 10 seconds to execute. On other occasions, it executes in a blink of an eye. Why is that so? I have tried to use the older Open/Create/Replace File VI as suggested in one of the forum

  • Error in cheque lot

    Hi All, I am doing a development using event 110.My requirement is to post additional discount passing some validations on receipt of payment through cash desk and cheque lot.Using of payment terms is not possible here due to some specific requiremen

  • Need your suggestions - how to display large file in ASCII and HEX

    Hello, I want to create an application which can read in a large file and switch between displaying ASCII and HEX (formatted a particular way). There are two problems here that I'm not quite sure how to solve. 1. How to switch dynamically between ASC