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

Former Member
0 Likes
500

Moderator message: please use a more informative subject in future

hi gurus.....

Parameters P_NAME like T023-MATKL+0(6).

In the above parameters stmt wat is the use of +0(6)

Edited by: Matt on Dec 20, 2008 6:43 PM

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
463

Please use a more informative subject in future

In ABAP, n(m) means start at position "n" in the string, and go one for length "m". So T023-MATKL0(6) means first six characters of T023-MATKL.

matt

3 REPLIES 3
Read only

matt
Active Contributor
0 Likes
464

Please use a more informative subject in future

In ABAP, n(m) means start at position "n" in the string, and go one for length "m". So T023-MATKL0(6) means first six characters of T023-MATKL.

matt

Read only

Former Member
0 Likes
463

Thanks for ur reply , but still i am not clear . Wat is the use of POSITION and LENGTH in declaring data objects

PARAMETERS NAME(20) type c.

the above stmt makes length 20 for data object NAME.

but

Parameters NAME like t023-matkl+0(6)

does it makes any sence????

wat is the exact use of this could u plz explain.......

Read only

matt
Active Contributor
0 Likes
463

It defines a parameter with exactly the same format as the first six character of MATKL. I.e. it's identical to

PARAMETERS name TYPE c LENGTH 6.

Why the original programmer didn't just do the above, you'd have to ask him. Perhaps he wanted to provide a semantic reference to MATKL. I.e. give a future programmer, such as yourself, the idea that the parameter is in someway related to MATNR-MATKL. But that is all. It in fact has NOTHING to do with the parameters statement. It is not part of the parameters statement. It is part of data definition.