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

Parameters table to store hardcoded values

Former Member
0 Likes
1,532

All,

I was wondering if there is a table that exists to store hard coded values.

In my program, I need to retrieve a characteristics in table ausp where atinn = '0000000002’.

When created in TST, the value was not '000000002' but '0000000011’.

I want to avoid hard coding the value '0000000011’ in the query and instead retrieve it from a table.

I know I can create a custom table, but I was wondering what is the best practice for hard coded value and if a table already exists for this?

Thanks in advance,

Isabelle

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
852

Do not sue the ATINN field at all, this number is generated and may be different between systems. Always use the characterisitic name instead. You can get this value by going to table CABN, field ATNAM.

Regards,

Rich Heilman

3 REPLIES 3
Read only

Former Member
0 Likes
852

Hi Isabelle,

You don't need to have a table to store hard coded values.

YOu can declare parameters for the user to enter the values:

parameters p_atinn type ausp-atinn default '0000000011’.

or use constants statement like this:

constants c_atinn type ausp-atinn value '0000000011’.

REgards,

Ravi

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
853

Do not sue the ATINN field at all, this number is generated and may be different between systems. Always use the characterisitic name instead. You can get this value by going to table CABN, field ATNAM.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
852

Thank you for your help.

Isabelle