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

Messages/insert system variable in message

Former Member
0 Likes
1,488

Hello ,

I am writing short report , and after i delet e some lines from db i would like to have message with text

e.g. ' 25 lines deleted '. I created text symbol 002 containing text " lines deleted" but i do not know how to

insert system variable sy-dbcnt in front of it . Please have a look at source code below .

Thank you

source code

REPORT ZMM4R82 message-id sy .

data gv_date type sy-datum.

data gv_no_days type n length 3 .

selection-screen begin of block A1 with frame TITLE text-001.

parameters pdays like gv_no_days default '60' .

selection-screen end of block A1.

at selection-screen.

gv_no_days = pdays .

pdays = '60'.

gv_date = sy-datum - gv_no_days.

delete from zdocktostock where ddate < gv_date.

Message text-002 type 'S' .

1 ACCEPTED SOLUTION
Read only

abhishek_shukla3
Explorer
0 Likes
919

hi ,

Please concatenate system variable SY-DBCNT and TEXT-002 to one character type variable using CONCATENATE statement. Then while using MESSAGE statement pass this variable name to it.

3 REPLIES 3
Read only

abhishek_shukla3
Explorer
0 Likes
920

hi ,

Please concatenate system variable SY-DBCNT and TEXT-002 to one character type variable using CONCATENATE statement. Then while using MESSAGE statement pass this variable name to it.

Read only

0 Likes
919

DATA : var1 (40)

CONCATENATE sy-dbcnt ' ' text-002 INTO var1.

MESSAGE s999(message-class used) WITH var1.

Read only

Former Member
0 Likes
919

After

delete from zdocktostock where ddate < gv_date.

You have to use

Concatenate TEXT-002 SY-DBCNT into V_string separated by Space.

Message V_STRING type 'S'.