Skip to Content

Abap sintax doubt *

Hi

I am analysing some code of a program

In some point i got the following code

IF sy-subrc IS INITIAL.
%vtweg% = ls_cli-vtweg.
EXIT.
ENDIF.

My question is: what means the % ?

It is a wildcard? Or it means something else?

Thank you and best regards

João Lages Fernandes

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 10, 2017 at 01:16 PM

    The ABAP naming convention "alpha numeric plus _, must start with a character", is not checked in full by the syntax check. Of course, it should not be broken more than absolutely necessary.

    The program DEMO_CHARACTERS_IN_ABAP_NAMES demonstrates which characters can be used where.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2017 at 05:58 AM

    Hi

    Please let us know how %vtweg% was declared.

    Mostly %vtweg% is just a variable that was declared and nothing related to wildcard in this

    particular scenario.

    In general % is a wild character in sap. If we want to get all the materials which ends with 11 from MARA table we use the below statement.

    SELECT * FROM MARA INTO TABLE IT_MARA WHERE matnr LIKE '%11'.
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 06, 2017 at 05:30 AM

    % is not WILD CARD in this scenario..it is just a naming convention.... and wild card means to select specific records like HOT KEY Concept in SE11....

    Add comment
    10|10000 characters needed characters exceeded