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: 

Update terminated in EKKO table while updating through include structure.

former_member288488
Participant
0 Kudos

Hello Experts,

In the ME31K screen for creating the contract i have added my custom fields for enhancing the functionality and for this i have a include structure in EKKO table.

The screen fields on the ME31K are there in EKKO_CI include structure of the header table EKKO.bUt now when i'm trying to create the contract after filling the required values in screen fields my EKKO table is not getting updated for the Contract no.

when i try to see the contract no through display(ME33K) i get the error message document oes not exist although it get's created and i get the sucess message that document created while doing it through ME31K.

When I try to see the entry of contract no. in EKKO table through SE11 i get the message as "Update Terminate".

I'm not able to understand that why this is happening , Please provide me with your valuable inputs on the same.

Thanks,

Naveen

6 REPLIES 6

Former Member
0 Kudos

Hi,

Check transaction SM13 for detailed error so that you will find where excatly the update was terminated.

BR,

Lokeswari.

0 Kudos

Hi,

I'm getting the error Update Terminated in SM13 and this is happening on the INSERT in EKKO table.

The error i'm getting is -


> Error Info... System error: error during insert in table EKKO

Please help as i'm not able to understand what is the reason here.

Thanks,

Naveen

0 Kudos

Hi,

When i check in SM13 the error is coming in ME_CREATE_DOCUMENT function module.

The update return code is ERROR here.

Thanks,

Naveen

0 Kudos

Hi

As you mentioned, the error is coming from the function module:

ME_CREATE_DOCUMENT

Check whether data is coming or not in the function module, bcoz if data is not there then SY-SUBRC fails....

If sy-subrc fails, then program throws the error message as:

'System Error: error during insert in table &' (EKKO)

For your easy reference, please check the below lines of code which is there in the above function module.

*************************************************************************************************

------- Bestellkopf hinzufuegen -


MOVE nekko TO ekko.

INSERT ekko.

IF sy-subrc NE 0.

MESSAGE a807 WITH 'EKKO'. "'System Error: error during insert in table &' (EKKO)

ENDIF.

*************************************************************************************************

Hope this helps.....

0 Kudos

Hi Siva,

You are correct the error is exactly coming from the lines of code of that you have mentioned.

Actually the update in EKKO works fine when i fill the custom fields added at header level on ME31K screen and then save my contract document but if i fill the line item first and then save the document i have implimented checks through BADI ZME_PURCHDOC_POSTED >> method >> POSTED and i get an error message to fill the cistom fields.

After this when i fill the custom fields added in a subcreen in ME31K and then save my contract document the document gets save perfectly and i get the sucess message but teh contract is not updated in EKKO table and i get update terminated message.

This happening as there is no data coming in ME_CREATE_DOCUMENT function module and the INSERT does not work as it tries to create the duplivate entry it seems in EKKO table.

Now what i think possible solution could be that i will restrict the user on ME31K header details only till the time he enters the values in custom screen fields of the subscreen added.

Please let me know how can i achieve this functionality.

Thanks,

Naveen

0 Kudos

Hi Jai,

In the BADI, ZME_PURCHDOC_POSTED method - POSTED, write the below logic:

If User tries to enter item details (EKPO) at first instead of header details (EKKO), then

Check whether the EKKO table is empty or not, if it is empty, throw an error message as "Please enter custom data at header level first"

endif.

In this manner, we can restrict the user to enter header details first.....

Hope this helps....