Application Development and Automation 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: 
Read only

tables

Former Member
0 Likes
435

Hi,

This query is used when some one tries to change payment terms it should display error mesage.

SELECT SINGLE zterm

FROM vbkd

INTO l_zterm

WHERE vbeln EQ vbak-vbeln.

IF sy-subrc = 0.

IF l_zterm NE *vbkd-zterm.

error message

endif.

here i have two doubts

1. what does * represents in *vbkd-vbeln

2.does this query works if you write proper error message.

2 REPLIES 2
Read only

anversha_s
Active Contributor
0 Likes
405

Hi,

1. This is actually a facility provided in abap syntax.

2. It is usually checked while saving a record.

3. For eg.

If we have one variable

EKKO

and another *EKKO

(They both are same only, with same structure)

(but two different variables)

4. The functional meaning, for usage purpose,

of *EKKO is OLDEKKO.

5. While saving the transaction,

the data is saved only if there is any change

in the values.

IF EKKO <> *EKKO.

*--- SAVE

ELSE.

MESSAGE 'NO DATA CHANGED'

ENDIF.

6. We can aswell use any other variale

eg. oldekko

oekko

myekko

etc,

7. But for business meaning,

R/3 has the facility for *

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

. we can use almost everywhere.

2. just copy paste


report azbc.

*--------------------------
TABLES : T001.
TABLES : *T001.

DATA : ITAB LIKE EKKO.
DATA : *ITAB LIKE EKKO.

DATA : NUM TYPE I.
DATA : *NUM TYPE I.

Rgds

Anver

Read only

Former Member
0 Likes
405

Hi Shewta,

*vbkd is an alias of vbkd ( another workarea ).

Yes you can write your own error message.

For error msg check txn SE91.

Hope this helps, Erwan