Application Development and Automation 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: 
Read only

Runtime Error when Posting Invoice with text added (MIRO)

Former Member
0 Likes
2,332

Hi Gurus,

We are getting a shortdump (runtime error) when we post certain invoices in MIRO. This happens when we input some text in the text field or add some text to the NOTE tab.

We are having exception ERROR_DP raised in the program c_textedit_control.

If the text field is blank and nothing is writing in the NOTE tab, the invoice gets posted with no problem.

Has anyone come accross this issue before and how did you solve it please.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,738

This is a standard SAP transaction. Have you looked for notes??

Rob

12 REPLIES 12
Read only

Former Member
0 Likes
1,739

This is a standard SAP transaction. Have you looked for notes??

Rob

Read only

0 Likes
1,738

Yes, I've searched for notes. I can't find any.. Maybe I'm searching wrong i dont know.

But still zero with notes.

Read only

0 Likes
1,738

Then you should raise a message directly with SAP. The forum can't help much here.

Rob

Read only

0 Likes
1,738

Hi,

Kindly check the SAP Note : 814358.

Thanks & Regards,

Harish

Read only

0 Likes
1,738

This SAP note is for SAPGUI 6.20 patch 40, Basis 4.6.

We are running ECC 6. Is this going to be compatible?

Read only

0 Likes
1,738

How do I raise a ticket with SAP on this. What are the steps to do this? I know its done in the Market place.

Read only

0 Likes
1,738

Hi Basil,

Go to https://websmp203.sap-ag.de/support and enter your user name and password. Click the tab 'Help & Support' and under that 'Report a Product Error'. From there, it's fairly intuitive.

Brenda

Read only

former_member182371
Active Contributor
0 Likes
1,738

Hi,

check this thread:

Best regards.

Edited by: Pablo Casamayor on Apr 27, 2011 8:30 AM

Read only

Former Member
0 Likes
1,738

Hi.

I had th same problem because of customer user exit (or BADI) implementation.

In the before_save we made some additional processing with COMMIT WORK.

This lead to the short dump: text is read from edit control object twice, after the first reading there is a standard logic...perform delete_edit_control_object on commit. So when we placed a commit in the user exit, object was deleted and the second try to read text caused dump. It's quite specific case, but may be it will be useful.

Read only

Former Member
0 Likes
1,738

Posted this to SAP help desk.. Found out that there was a commit statement that was causing the issue in one of the userexit.

Read only

0 Likes
1,738

Hi Basil,

I have the same problem in ECC 6.0.

Did you solve it?

Did you remove the statement commit_work in customer user exit (or BADI)?

Thanks in advance.

Felipe Fernandes

Read only

Former Member
0 Likes
1,738

are u processing thru BADI, then it is very easy there are interfaces and methods for handling texts. u sud not get any error and plz never write commit work in BADI.

May be i cud provide more help if u share more details but let me tell more but let me share one recent development that i did.

In ME59n when we do PR TO PO then texdts sud be copied to header text in PO and get reflected in PO. the coding is like below may be can give some clues wid ur MIRO stuff.

METHOD if_ex_me_process_po_cust~process_header.
*--------------------------------------------------------------------------*
*  Author        : Prasenjit Bist                                          *
*  ID            : PRBIST                                                  *
*  Date          : 04.08.2011                                              *
*  Changes       : New Devlopment                                          *
*  Change Request:                                                         *
*--------------------------------------------------------------------------*
*  Description: To copy LSP information in PO                               *
*--------------------------------------------------------------------------*
  

TYPES:

BEGIN OF ty_text,

auto_pr_po TYPE zman_auto_pr_po,

plant TYPE zman_plant,

vendor TYPE zman_vendor,

lsp_vendor TYPE zman_lsp_name,

contract_no_text TYPE zman_contract_no_text,

END OF ty_text.

TYPES:

BEGIN OF ty_address,

ort01 TYPE ort01_gp, " city

ort02 TYPE ort02_gp, " district

pfach TYPE pfach, " PO Box

pstlz TYPE pstlz, " Postal code

region TYPE regio, "Region (State, Province, County)

telf1 TYPE telf1, "1st telephone number

telf2 TYPE telf2, "2nd telephone number

telfx TYPE telfx, "Fax number

land1 TYPE land1,

END OF ty_address.

DATA:

  • get the header level details

ls_mepoheader TYPE mepoheader,

lt_purchase_order_items TYPE purchase_order_items,

ls_purchase_order_items LIKE LINE OF lt_purchase_order_items,

  • get the line item details

lt_mepoitem TYPE STANDARD TABLE OF mepoitem,

ls_mepoitem TYPE mepoitem,

lt_textlines TYPE mmpur_t_textlines,

ls_textlines LIKE LINE OF lt_textlines,

  • TEXT TYPES

lt_texttypes TYPE mmpur_t_texttypes,

ls_texttypes LIKE LINE OF lt_texttypes.

DATA: l_name TYPE thead-tdname,

ls_header TYPE thead,

lt_lines TYPE STANDARD TABLE OF tline,

ls_lines TYPE tline,

l_tdobject TYPE thead-tdobject,

l_metafield TYPE mmpur_metafield.

DATA: ls_text TYPE ty_text,

l_text(50).

DATA: l_continue(1).

DATA: l_pass_vendor TYPE lifnr,

l_pass_plant TYPE werks,

l_name1(35).

  • fetch the address

DATA: ls_address TYPE ty_address,

l_landx TYPE landx.

CONSTANTS: lc_id TYPE thead-tdid VALUE 'F01',

lc_langu TYPE thead-tdspras VALUE 'E',

lc_object TYPE thead-tdobject VALUE 'EKKO'.

CONSTANTS: lc_set(1) VALUE 'X',

lc_vendor(11) VALUE 'Vendor: ',

lc_lsp_vendor(11) VALUE 'LSP Vendor:',

lc_contract_no_text(14) VALUE 'Contract Text:'.

CLEAR: l_continue.

IF sy-uname EQ 'PRBIST'.

  • Read the header data

ls_mepoheader = im_header->get_data( ).

*#############################################################################

  • read teh item level data.

  • break prbist.

lt_purchase_order_items = im_header->get_items( ).

LOOP AT lt_purchase_order_items INTO ls_purchase_order_items.

  • The item attribute of the structure is reference to line item

ls_mepoitem = ls_purchase_order_items-item->get_data( ).

APPEND ls_mepoitem TO lt_mepoitem.

ENDLOOP.

  • CHECK VENDOR IS THE ONE WE WANT.

SELECT SINGLE name1 FROM lfa1 INTO l_name1 WHERE lifnr = ls_mepoheader-lifnr.

  • First read the vebdor name based on LIFNR.

TRANSLATE l_name1 TO UPPER CASE.

IF ( l_name1 EQ 'LSP1' ) OR ( l_name1 EQ 'LSP2' ).

LOOP AT lt_mepoitem INTO ls_mepoitem.

TRANSLATE ls_mepoitem-werks TO UPPER CASE.

IF ls_mepoitem-werks EQ 'FI01'.

l_continue = lc_set.

l_pass_vendor = ls_mepoheader-lifnr.

l_pass_plant = ls_mepoitem-werks.

EXIT.

ENDIF.

ENDLOOP.

ENDIF.

IF l_continue EQ lc_set AND sy-tcode EQ 'ME21N'.

  • Call the POP UP screen to display LPS information.

CALL FUNCTION 'ZMAN_LSP_POP_UP'

EXPORTING

im_vendor = l_pass_vendor

im_plant = l_pass_plant

IMPORTING

ex_text = l_text.

  • GET Text Object (TTXOB)

im_header->if_longtexts_mm~get_textobject(

IMPORTING ex_tdobject = l_tdobject

ex_metafield = l_metafield ).

  • GET TEXT IDS

im_header->if_longtexts_mm~get_types(

IMPORTING ex_texttypes = lt_texttypes ).

  • CHECK TEXT TYPE 'F01' EXISTS.

READ TABLE lt_texttypes INTO ls_texttypes WITH KEY tdid = lc_id.

IF sy-subrc EQ 0.

  • UPDATING ITEM TEXT.

MOVE: l_tdobject TO ls_textlines-tdobject,

ls_texttypes-tdid TO ls_textlines-tdid,

'*' TO ls_textlines-tdformat.

  • break prbist.

ls_text = l_text.

  • CONCATENATE l_text ls_texttypes-tdtext INTO ls_textlines-tdline.

  • CONCATENATE ls_text-vendor

  • ls_text-plant

  • ls_text-lsp_vendor

  • ls_text-contract_no_text

  • INTO ls_textlines-tdline SEPARATED BY space.

  • APPEND ls_textlines TO lt_textlines.

    • INSERT VENDOR

  • CLEAR ls_textlines-tdline.

  • CONCATENATE lc_vendor ls_text-vendor INTO ls_textlines-tdline SEPARATED BY space.

  • APPEND ls_textlines TO lt_textlines.

  • INSERT LSP VENDOR

CLEAR ls_textlines-tdline.

CONCATENATE lc_lsp_vendor ls_text-lsp_vendor INTO ls_textlines-tdline SEPARATED BY space.

APPEND ls_textlines TO lt_textlines.

  • INSERT CONTRACT TEXT.

CLEAR ls_textlines-tdline.

CONCATENATE lc_contract_no_text ls_text-contract_no_text INTO ls_textlines-tdline SEPARATED BY space.

APPEND ls_textlines TO lt_textlines.

  • INSERT A BLANK LINE.

CLEAR ls_textlines-tdline.

APPEND ls_textlines TO lt_textlines.

  • INSERT addreSS CAPTION.

CLEAR ls_textlines-tdline.

MOVE 'Address:' TO ls_textlines-tdline.

APPEND ls_textlines TO lt_textlines.

break prbist.

  • READ THE ADDRESS

SELECT SINGLE ort01 " city

ort02 " district

pfach " PO Box

pstlz " Postal code

regio "Region (State, Province, County)

telf1 "1st telephone number

telf2 "2nd telephone number

telfx "Fax number

land1 "COUNTRY

FROM lfa1 INTO ls_address WHERE lifnr = ls_mepoheader-lifnr.

  • GET COUNTRY

SELECT SINGLE landx FROM t005t INTO l_landx WHERE spras = 'E' AND land1 = ls_address-land1.

  • INSERT ADDRESS DETAILS.

CLEAR ls_textlines-tdline.

CONCATENATE ls_address-ort01 ls_address-ort01 INTO ls_textlines-tdline SEPARATED BY space.

APPEND ls_textlines TO lt_textlines.

  • INSERT COUNTRY.

CLEAR ls_textlines-tdline.

MOVE l_landx TO ls_textlines-tdline.

APPEND ls_textlines TO lt_textlines.

  • TELEPHONE DETAILS

CLEAR ls_textlines-tdline.

CONCATENATE 'Tel:' ls_address-telf1 '/' ls_address-telf2 INTO ls_textlines-tdline.

APPEND ls_textlines TO lt_textlines.

  • FAX DETAILS.

CLEAR ls_textlines-tdline.

CONCATENATE 'Fax:' ls_address-telfx INTO ls_textlines-tdline.

APPEND ls_textlines TO lt_textlines.

  • SAVE THE HEADER LONG TEXT.

im_header->if_longtexts_mm~set_text(

EXPORTING im_tdid = ls_texttypes-tdid

im_textlines = lt_textlines ).

ENDIF.

ELSEIF l_continue EQ lc_set AND sy-tcode EQ 'ME59N'.

  • No need to display POPUP simply read the values and show.

if not

ENDIF. "(l_continue = 'X' and transaction code is ME21N or ME59N)

CLEAR l_continue.

ENDIF. "(sy-uname)

ENDMETHOD.

Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:15 AM

Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:21 AM