2008 Feb 12 8:30 AM
hi,
SELECT ebeln
bukrs
ernam
lifnr
spras
FROM ekko INTO CORRESPONDING FIELDS OF
TABLE g_it_ekko WHERE lifnr IN r_lifnr.
DESCRIBE TABLE g_it_ekko LINES n.
grid-lines = n.
IF sy-subrc = 0.
MESSAGE s002(zsan) WITH n.
ELSE.
REFRESH g_it_ekko.
MESSAGE e000(zsan) WITH n.
ENDIF.
the message is gettig triggered first but the refresh statement is not getting triggered. i want the refresh statement should be triggered first and then the message.plz help.
thanks & regards,
santosh.
2008 Feb 12 8:47 AM
Hi,
Here the refresh statement is executed at first before the message statement executes.
Since the message is of error type, it stops here.
Regards
Vadi
Hi,
Here the refresh statement is executed at first before the message statement executes.
Since the message is of error type, it stops here.
Regards
Vadi
2008 Feb 12 8:34 AM
Hello Santhosh,
Problem is with error message. Note that error message will stop the further execution of the program. So, your refresh statement won't work here. just write the refresh statement in front of the error message. It will work.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
2008 Feb 12 8:34 AM
then remove the refresh statement from the if condition and then place before the if condition, becaue if the records are fetched then the message displays if not fetched then it refreshes the internal table and then it pops up the message.
2008 Feb 12 8:35 AM
Hi Santosh,
Refer the code below.
IF sy-subrc = 0.
MESSAGE s002(zsan) WITH n.
ELSE.
Clear g_it_ekko
REFRESH g_it_ekko[].
MESSAGE e000(zsan) WITH n.
ENDIF.
Hope this helps.
Manish
2008 Feb 12 8:35 AM
Hi Santosh,
Put a break-point in else statement and check in debug whether the control is going to that statement.
There is no issue with your refresh statement.
Regards,
Gaurav.
2008 Feb 12 8:37 AM
Try changing ur code like below
SELECT ebeln
bukrs
ernam
lifnr
spras
FROM ekko INTO CORRESPONDING FIELDS OF
TABLE g_it_ekko WHERE lifnr IN r_lifnr.
IF sy-subrc = 0.
DESCRIBE TABLE g_it_ekko LINES n.
grid-lines = n.
MESSAGE s002(zsan) WITH n.
ELSE.
REFRESH g_it_ekko.
DESCRIBE TABLE g_it_ekko LINES n.
grid-lines = n.
MESSAGE w000(zsan) WITH n. "warning msg
ENDIF.
2008 Feb 12 8:47 AM
Hi,
Here the refresh statement is executed at first before the message statement executes.
Since the message is of error type, it stops here.
Regards
Vadi
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |