Skip to Content
0
Former Member
Jun 05, 2008 at 04:32 AM

Urgent: Deletion Indicator in Purchase Requisition

234 Views

Hi Gurus,

I had one requirement in Purchase Requisition. If the number of items increase by 36 , there should be an error saying that maximum items reached but once that item is deleted that error should disappear.

I have written the coding in an Exit: EXIT_SAPLMEREQ_010.

And the coding is :

IF gs_eban-bsart = gcz902.

LOOP AT gt_eban INTO gs_eban

where loekz is initial.

LOOP AT gt_ebkn INTO gwa_ebkn WHERE banfn = gs_eban-banfn

and bnfpo IN r_bnfpo.

  • recherche division- ordre interne

LOOP AT ot_div into gwa_div WHERE ot = gwa_ebkn-aufnr AND div = gwa_ebkn-bnfpo.

ENDLOOP.

IF sy-subrc NE 0.

gwa_div-ot = gwa_ebkn-aufnr.

gwa_div-div = gwa_ebkn-bnfpo.

APPEND gwa_div TO ot_div.

ENDIF.

ENDLOOP.

ENDLOOP.

DESCRIBE TABLE ot_div LINES n.

IF n >= 37.

  • case sy-ucomm.

  • WHEN 'MESAVE'.

MESSAGE e111(zpfr) with n.

exit.

  • ENDCASE.

ENDIF.

ENDIF.

So now the exit is working fine......but when i go to delete that extra item it is not getting deleted , so while saving the information message comes that no data changed.

So ho wto delete that extra item.

Do anyone have reply....

thanks in advance.