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

What is hard-code/ hardcoding?

Former Member
0 Likes
9,060

Morning all,

A very basic basic question.....

What does it means:

1) to hard code/ hardcoding?

2) read the hard code?

May thanks,

Amanda

7 REPLIES 7
Read only

amit_khare
Active Contributor
4,111

Anything coming between Quotes* ' ' * is termed as Hard Coding also using of numbers directly is also termed as hard coding.

Read only

abapdeveloper20
Contributor
4,111

Hi,

Generally Hardcode means...assigning CONSTANT VALUES..

Like...

SELECT * from MARA where MATNR EQ '00000000456'.

Note:

1.In Programming HARDCODING SHOULD BE AVOIDED.

2.Hardcode increases program dependency.

Reward if helpful

~Lakshmiraj~

Read only

Former Member
4,111

Hi,

Hardcoding means giving/assigning static value to variable.

Eg; WA_EKKO-LIFNR = '0000000121'.

This is Called hardcoding During execution it will take the value of WA_EKKO-LIFNR as 0000000121.

Reading the Hardcoded Value means to read the value during runtime foe some fetching purpuse.

regards

Sandipan

Read only

Former Member
4,111

like LAKSHMIRAJ said

when you want to change something you need a programmer ...

regards

Read only

4,111

And also,

During preparation of Techical specification , the programmer has to keep some information about the HARDCODED fields and the reason for being it is hardcoded.

This helps the people who will change the code in future.

Pls Note:

There should be no hard coded DATE manipulation in any program that is moved to the PRODUCTION environment.

Reward if useful

Rgds,

Lakshmiraj

Read only

Former Member
0 Likes
4,111

hi,

To hard code or hard coding (also, hard-code/hard-coding, hardcode/hardcoding) refers to the software development practice of embedding input or configuration data directly into the source code of a program or other executable object, or fixed formatting of the data, instead of obtaining that data from external sources or generating data or formatting in the program itself with the given input.

For example.

If a Windows program is programmed to assume it is always installed to C:\Program Files\Appname and someone tries to install it to a different drive for space or organization reasons, it may fail to install or run after installation.

Read only

SergioFerrari
Active Contributor
0 Likes
4,111

This message was moderated.