Supported by
Supported by Inetum

How to ask if the line exists without seeming fashioned

images/thumbnail.jpg - Thumbnail

Long ago, you used the expression “groovy, man”. Later came “great, man”. Then there was “cool”. Today you say “awesome”. It’s important not to get confused and not make a fool of yourself.

And how do you ask an internal table if a line exists exists?

DATA: t_kunnr TYPE STANDARD TABLE OF kunnr.

In the past you asked like this:

READ TABLE t_kunnr TRANSPORTING NO FIELDS WITH KEY TABLE_LINE = i_kunnr.
IF sy-subrc = 0.
* Porreiro pá!!!!!
ENDIF.

Now you asked like this:

IF line_exists( t_kunnr[ TABLE_LINE = i_kunnr ] ).
* Altamente!!!!!
ENDIF.

Get it right to avoid being embarrassed.

But please note that this only works from release 740 on.

Thank you Custódio Oliveira for the tip.

Thank you Simon Webster for the photo.

O Abapinho saúda-vos.