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

ABAP

Former Member
0 Kudos
432

hi,

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

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
409

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
Read only

Former Member
0 Kudos
409

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

Read only

Former Member
0 Kudos
409

hi,

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

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

Read only

Former Member
0 Kudos
409

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

to know more refer to this realated thread

Read only

former_member214288
Participant
0 Kudos
409

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

Read only

Former Member
0 Kudos
410

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

Read only

Former Member
0 Kudos
409

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

Read only

Former Member
0 Kudos
409

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.