2007 Feb 05 12:09 PM
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.
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.
2007 Feb 05 12:11 PM
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
2007 Feb 05 12:12 PM
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
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |