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: 

TSV_TNEW_PAGE_ALLOC_FAILED

Former Member
0 Kudos

HI

I wrote an user exit to populate the E1EDP19 segment with qualifier 999 of the Quotes.Orders idoc with VBAP.PRODH data . I used the Include ZXDEU02 for it.

My code was

DATA: WA_E1EDP19 LIKE E1EDP19.

LOOP AT INT_EDIDD.

CASE INT_EDIDD-SEGNAM.

WHEN 'E1EDP19'.

MOVE INT_EDIDD-SDATA TO WA_E1EDP19.

WA_E1EDP19-QUALF = '999'.

WA_E1EDP19-IDTNR = XVBAP-PRODH.

MOVE WA_E1EDP19 TO INT_EDIDD-SDATA.

APPEND INT_EDIDD.

WHEN OTHERS.

ENDCASE.

ENDLOOP.

I saved and activated it and as a result when the Quotes are processed i get a " termination of update" message in my inbox.

I looked for the short dump and it says TSV_TNEW_PAGE_ALLOC_FAILED.

I am not sure why thi sis happening. Is my code picking up huge amount of data ??

Is my logic/code wrong ?

How can i correct this problem ?

If you have alternative codes for this , please provide me.

Thanks a lot .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try this way:

LOOP AT INT_EDIDD.

IF INT_EDIDD-SEGNAM EQ 'E1EDP19'.

MOVE INT_EDIDD-SDATA TO WA_E1EDP19.

WA_E1EDP19-QUALF = '999'.

WA_E1EDP19-IDTNR = XVBAP-PRODH.

MOVE WA_E1EDP19 TO INT_EDIDD-SDATA.

MODIFY INT_EDIDD INDEX SY_TABIX.

ENDIF.

ENDLOOP.

*reward if solved

12 REPLIES 12

former_member589029
Active Contributor
0 Kudos

You are running out of memory when you append the segment. It seems to me like an infinite loop.

You are looping at the IDOC segments.

If segment is E1EDP19

You move the content in a Workarea

You overwrite some values

And you append segment E1EDP19

Is there a reason for the append? Because if you just want to change that segment a modify would be more appropriate.

However - assumed we are at index 10 in the table when you append E1EDP19 it will be appended as 11 and the next loop will find E1EDP19 at index 11 and will append another one at index 12 => you never end appending until there is no memory left.

Hope that helps,

Michael

0 Kudos

sounds logical will try by moving the append statement out of the loop .

0 Kudos

Hi Michael

I think you are right , when i put the append statement outof the loop it actually worked , an idoc was created , but with syntax errors . which says that the logic is to be corrected.

You said something abt the modify instead of Append statement can you expalin the code for it please ..

Thank you

Former Member
0 Kudos

try this way:

LOOP AT INT_EDIDD.

IF INT_EDIDD-SEGNAM EQ 'E1EDP19'.

MOVE INT_EDIDD-SDATA TO WA_E1EDP19.

WA_E1EDP19-QUALF = '999'.

WA_E1EDP19-IDTNR = XVBAP-PRODH.

MOVE WA_E1EDP19 TO INT_EDIDD-SDATA.

MODIFY INT_EDIDD INDEX SY_TABIX.

ENDIF.

ENDLOOP.

*reward if solved

0 Kudos

Hi Sreejith

IT almost solved the problem , its creating idocs wih out any errors , BUT IDTNR in the segment E1EDP19 is missing . Our main aim is to get the XVBAP-PRODH into the IDTNR field of E1EDP19 segment with qualifier 999.

I know it almost there , but strangely even though the code says WA_E1EDP19-IDTNR = XVBAP-PRODH. it doesn't show up there ..

Thanks Guys

0 Kudos

Hey Sudheer,

In that exit xvbap is not filled, the vbap data is in table DXVBAP.

Hope that solves it,

Michael

0 Kudos

Hi Michael

If i give DXVBAP instead of XVBAP , the syntax check says DXVBAP doesn't exist but XVBAP exists. So i guess its not the problem.

Thanks anyway

0 Kudos

Oh, if you are using a different exit then you might have different tables, I was referring to inlude ZXVEDU02.

Anyway, just set a breakpoint and make sure that the xvbap field is set to a value, if it is then check in the debugger where that field is overwritten again.

Regards,

Michael

0 Kudos

Hi Everybody

Problem solved , it wasn't getting the VBAP-PRODH bcos thrers no value in that filed for that particular qutation. when i gave some values it worked as i wanted.

Thank you Sreejith for the code, You were spot on. Thanks Michael for pointing out the infinite loop.

former_member589029
Active Contributor
0 Kudos

The question is if you want to modify the existing segment or if you need to create a new segment. In case you want to modify the existing segment you can do the following:

WHEN 'E1EDL24'.

  • header line is not filled => get data and save index

lv_tabix = sy-tabix.

READ TABLE idoc_data INTO ls_idoc_data INDEX lv_tabix.

  • This is item level => determine the matnr first

ls_e1edl24 = ls_idoc_data-sdata.

CALL FUNCTION 'Z_SDB_GET_ISBN_FROM_MATNR'

EXPORTING

x_matnr = ls_e1edl24-matnr

x_id_type = gc_type_0008

IMPORTING

y_isbn = lt_isbn

EXCEPTIONS

no_mapping_found = 0

invalid_input = 0

not_unique = 0

zlogic_error = 0

OTHERS = 0.

  • get the ISBN

READ TABLE lt_isbn INTO ls_isbn INDEX 1.

IF sy-subrc EQ 0.

  • copy the ISBN

ls_e1edl24-matnr_external = ls_isbn-identcode.

ls_idoc_data-sdata = ls_e1edl24.

MODIFY idoc_data FROM ls_idoc_data INDEX lv_tabix.

ENDIF.

This is an example where I update the ISBN number in the MATNR_EXTERNAL field of that segment.

Regards,

Michael

Clemenss
Active Contributor
0 Kudos

please mark question as answered.

Regards,

Clemens

Former Member
0 Kudos

Thank you