Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM SO_NEW_DOCUMENT_SEND_API1 short dump

Former Member
0 Kudos

hello experts,

im using the FM SO_NEW_DOCUMENT_SEND_API1 to send email. my program encounters short dump.

here is my code:



* p_text_alert = The Maximum Blocked Time limit has been exceeded for DL13LT. in 0082
* lt_receptores-rec_id = AVISOLOG0082
* text-006 = doesnt matter

Data: lv_obj_desc TYPE SODOCCHGI1.

  Data: lt_receptores TYPE somlreci1 OCCURS 0 WITH HEADER LINE,
           lt_cuerpo     TYPE solisti1  OCCURS 0 WITH HEADER LINE.

  REFRESH lt_receptores.
  concatenate 'AVISOLOG' p_werks Into lt_receptores-receiver.
  lt_receptores-rec_id   = lt_receptores-receiver.
  lt_receptores-rec_type = 'U'.
  APPEND lt_receptores.
 

  REFRESH lt_cuerpo.
  lt_cuerpo-line = ( p_text_alert ).
  APPEND lt_cuerpo.
 

  Clear lv_obj_desc.
  lv_obj_desc-obj_descr = text-006.


  CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
      document_data           = lv_obj_desc
      commit_work             = 'X'
    TABLES
      object_content          = lt_cuerpo
      receivers               = lt_receptores.

this is the description of the dump:

" Unable to interpret "The Maximum Blocked Time limit has been " as a number. "

error analysis:

" An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was not

caught in

procedure "F_SEND_VIOLATION_MAIL" "(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 program attempted to interpret the value "The Maximum Blocked Time limit

has been " as a number, but

since the value contravenes the rules for correct number formats,

this was not possible. "

what canbe the cause of the dump?

thanks a lot for future replies.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

But in which line the dump occurs?

It seems it has tried to insert the string "The Maximum Blocked Time limit has been" in a numeric variable:

I suppose the dump should be here:

lt_cuerpo-line = ( p_text_alert ). <----


Max

6 REPLIES 6

Former Member
0 Kudos

Hi

But in which line the dump occurs?

It seems it has tried to insert the string "The Maximum Blocked Time limit has been" in a numeric variable:

I suppose the dump should be here:

lt_cuerpo-line = ( p_text_alert ). <----


Max

0 Kudos

hello max,

the error occured in this line;

REFRESH lt_cuerpo.
*>>>>>>  lt_cuerpo-line = ( p_text_alert ).*
  APPEND lt_cuerpo.

0 Kudos

Hi

Yes I know

I've simulate that line and I've got the same dump, if you need to transfer the text to lt_cuerpo-line u should write:

  • lt_cuerpo-line = ( p_text_alert ). <-----Wrong line

lt_cuerpo-line = p_text_alert. <------Right line

But why have u write lt_cuerpo-line = ( p_text_alert )?

Max

0 Kudos

actually, this work unit has been assigned to me for enhancement.

i already applied the changes you've seen and its working.

thansk a lot. .

Former Member
0 Kudos

Hi,

This code might be helpful...

CLEAR: gs_packing_list,
         gs_reclist.
  REFRESH: gt_packing_list[],
           gt_reclist[].
 
* Fill the document data.
  DESCRIBE TABLE gt_message LINES gv_cnt.
  READ TABLE gt_message INTO gs_message
                                INDEX gv_cnt.
  gs_doc_chng-doc_size   = ( gv_cnt - 1 ) * 255 + STRLEN( gs_message ).
  gs_doc_chng-obj_langu  = sy-langu.
  gs_doc_chng-obj_name   = 'CONJOB'.
  gs_doc_chng-obj_descr  = text-017.
  gs_doc_chng-sensitivty = 'F'.
 
* Fill the receiver list
  gs_reclist-rec_date    = sy-datum.
  gs_reclist-rec_type    = 'U' .         " For Internet Address
  gs_reclist-com_type    = 'INT'.
  gs_reclist-notif_ndel  = c_x.
  gs_reclist-receiver    = p_email.       "Email addr of Recip
  APPEND gs_reclist TO gt_reclist.
  CLEAR gs_reclist.
 
  gs_packing_list-transf_bin = space.
  gs_packing_list-head_start = 1.
  gs_packing_list-head_num   = 0.
  gs_packing_list-body_start = 1.
  DESCRIBE TABLE gt_message LINES gs_packing_list-body_num.
  gs_packing_list-doc_type   = 'RAW'.
  APPEND gs_packing_list TO gt_packing_list.
 
  gs_packing_list-transf_bin = c_x.
  gs_packing_list-head_start = 1.
  gs_packing_list-head_num   = 0.
  gs_packing_list-body_start = 1.
  DESCRIBE TABLE pt_attachment LINES gs_packing_list-body_num.
  gs_packing_list-doc_type   = 'RAW'.
  gs_packing_list-obj_descr  = gv_atch_name.
  gs_packing_list-obj_name   = gv_atch_name.
  gs_packing_list-doc_size   = gs_packing_list-body_num * 255.
  APPEND gs_packing_list TO gt_packing_list.
 
* Send the document
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
       EXPORTING
            document_data              = gs_doc_chng
            put_in_outbox              = c_x
       TABLES
            packing_list               = gt_packing_list
            contents_txt               = gt_message
            contents_bin               = pt_attachment
            receivers                  = gt_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.

Regards

Milan

former_member555112
Active Contributor
0 Kudos

HI,

You are passing the text 'The Maximum Blocked Time limit has been " as a number' into some field which is of numeric type.

Check the same.

Regards,

Ankur Parab