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

How to Replace Hardcoding

sreeramkumar_madisetty
Active Contributor
0 Likes
874

Hi Folks

My requirement is : I have to send the script output as PDF attachment to several users.

I got the required thing but that is achieving only by hard coding the spool number as:

DATA: l_spoolno LIKE tsp01-rqident VALUE '0000024884'.

Afterwards i am converting this spool to pdf and attaching the pdf to the mail.

I need to remove this hard coding now.

Can anyone please suggest me how i can do that.

<b>Points are assured for needful answers.</b>

Regards,

Sreeram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
834

Hi..,

We generally use constants in these cases..!!

like

<b>constants : c_spool type tsp01-rqident value '0000024884'.

DATA: l_spoolno LIKE tsp01-rqident VALUE c_spool.

</b>

regards,

sai ramesh

6 REPLIES 6
Read only

Former Member
0 Likes
834

hi,

well, use parameters or select-options...

raj

Read only

Former Member
0 Likes
835

Hi..,

We generally use constants in these cases..!!

like

<b>constants : c_spool type tsp01-rqident value '0000024884'.

DATA: l_spoolno LIKE tsp01-rqident VALUE c_spool.

</b>

regards,

sai ramesh

Read only

Former Member
0 Likes
834

Sree Ram,

assign the spool number to the variable u have declared already, L_SPOOLNO. and convert it to the PDF or whatever u want.

or else, u can go for Parameters for single spool request generation, Select-options for more spool requests.

Sujatha.

Read only

Former Member
0 Likes
834

Hi,

You have to get the spool number, and that is: SY-SPONO.

Regads,

Read only

Former Member
0 Likes
834

hi

if u r passing spool number as string then

<b>create a goto --> text element -->text symbol

create a text symbol</b>

use that text symbol as following

<b>DATA: l_spoolno LIKE tsp01-rqident VALUE text <text synmbol></b>

regards

ravish

<b>plz reward points if helpful</b>

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
834

It's answered