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

Query Regarding HTML code in ABAP editor.

Former Member
0 Likes
734

Hi all,

I have a variable in which I am writing HTML code like this given below..

it_message = '<HTML><BODY><FONT FACE="ARIAL" size="2">Please find the

attached excel sheet having <br>outstanding data for the period v_sdate to v_edate </BODY></HTML>'.

my problem is that how should I pass the variables v_sdate & v_edate so that in output it will print the values of these variables. In this scenario its printing the variable v_sdate & v_edate as text.

please help me out.

Thanks

Rajeev

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
679

Hi Rajiv

Try enclosing the two with '&'.

Like &v_sdate& &v_edate&.

Hope this helps.

Harsh

5 REPLIES 5
Read only

Former Member
0 Likes
680

Hi Rajiv

Try enclosing the two with '&'.

Like &v_sdate& &v_edate&.

Hope this helps.

Harsh

Read only

0 Likes
679

Hi Harsh,

I have tried but its not working ...

its printing the same as &v_sdate& &v_edate&

Thnaks

Rajeev

Read only

Former Member
0 Likes
679

Hi,

Refer to the following code.

CONCATENATE 'The following are the datilas of inactive PU/DUs'(003)

'.<BR><BR>'

INTO wa_message SEPARATED BY space.

APPEND wa_message TO gi_messages.

  • Create table to populate the output

wa_message = '<table border=2>'.

APPEND wa_message TO gi_messages.

wa_message = '<tr>'.

APPEND wa_message TO gi_messages.

*Header of columns in table

wa_message = lc_table_header.

APPEND wa_message TO gi_messages.

wa_message = '</tr>'.

APPEND wa_message TO gi_messages.

*Populate Internal Table values into an html table in output.

>> LOOP AT gi_hrp1000 INTO wa_hrp1000.

>>wa_message = '<tr>'.

>> APPEND wa_message TO gi_messages.

>>wa_message = '<td>'.

>> APPEND wa_message TO gi_messages.

>> wa_message = wa_hrp1000-objid.

>>APPEND wa_message TO gi_messages.

>>wa_message = '</td>'.

ENDLOOP.

*Close table

wa_message = '</table>'.

APPEND wa_message TO gi_messages.

  • To send mail to reqiured receivers if there is no inactive PU/DU

ELSE.

CONCATENATE 'No inactive PU/DU found in given range'(004)

'.<BR><BR>'

INTO wa_message SEPARATED BY space.

APPEND wa_message TO gi_messages.

ENDIF.

Hope it helps.

Regards,

Rajesh Kumar

Read only

0 Likes
679

Hi Rajesh,

Is It necessary to print just two values I should follow that much process.

Thanks

Rajeev

Read only

0 Likes
679

Hi Rajeev,

You just need this part to print values. The other things are for displaying header and table header in case you want the data to send in email as tabular format.

LOOP AT gi_hrp1000 INTO wa_hrp1000.

wa_message = '<tr>'.

APPEND wa_message TO gi_messages.

wa_message = '<td>'.

APPEND wa_message TO gi_messages.

wa_message = wa_hrp1000-objid.

APPEND wa_message TO gi_messages.

wa_message = '</td>'.

wa_message = '</tr>'.

APPEND wa_message TO gi_messages.

This will concatenate your value in internal table gi_messages.

gi_messages is a table of type solisti1.

Regards,

Rajesh Kumar