Application Development 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: 

ABAP

Former Member
0 Kudos
95

hi,

Can anybody expalian what is the meaning for the following code.please expalain me.

i_tab-werks+0(3) = 'TML'

1 ACCEPTED SOLUTION

Former Member
0 Kudos
72

hi,

tml(3 characters) is assignd to itab_werks.

if u wanna clearly,just change tha values.

like 0(3)

1(3)

2(3)

so u can understand clearly

7 REPLIES 7

Former Member
0 Kudos
72

hi,

if i_tab-werks+0(3) = 'TML'.
endif.

It means that if the first three characters of werks is TML of i_tab

Regards,

Santosh

Former Member
0 Kudos
72

hi,

i_tab-werks+0(3) = 'TML'

it means you are assigning the first threecharachters of itab-werks the value tml

Former Member
0 Kudos
72

it is nothing but taking an offset of a field ...

to know more refer to this realated thread

former_member214288
Participant
0 Kudos
72

Hi,

First three characters of WERKS field in I_TAB Header is being replaced with 'TML'.

Which means if I_TAB-WERKS has 'ABCD' before the statement is executed. It will be replaced with 'TMLD'.

Reward if helpful.

Regards,

Ram

Former Member
0 Kudos
73

hi,

tml(3 characters) is assignd to itab_werks.

if u wanna clearly,just change tha values.

like 0(3)

1(3)

2(3)

so u can understand clearly

Former Member
0 Kudos
72

Hi, just try to understand this program

data: begin of itab occurs 0,

t(10) value 'aman',

end of itab.

itab-t+0(3) = 'TML'.append itab.

write itab-t.

HERE THE OUTPUT WILL BE <b>TMLN........</b>

i

Former Member
0 Kudos
72

hi

i_tab-werks+0(3) = 'tml'.

it just indicates the position.

0 indicates the 0th char in a string of 3 char.

0th char -t

1st char -m

2nd char -l

reward if useful.