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 code

Former Member
0 Likes
1,234

freinds,

can u please tell me hte meansing of this code, as i m functional cons and i don't know ABAP code.

loop at DATA_PACKAGE where FISCPER+4(3) eq '000'.

delete DATA_PACKAGE.

what is the meaning of fiscper+4(3) eq 000

thanks in advance

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,083

you are accessing specific positions of that field.

FISCPER+4(3) eq '000'

means, that field FISCPER, 4th,5th,6th position values together becomes 000 or not.

lets say your value for that field is '123456789'

in this case 4-6 positions of that field is '456',which is not equal to '000'

but take another example where the value is '123000789'

in this case 4-6 positions are '000'.

it will enter inside of that LOOP pass.

in ABAP terms,we call this as OFFSET.

Regards

Srikanth

Message was edited by: Srikanth Kidambi

Message was edited by: Srikanth Kidambi

8 REPLIES 8
Read only

Former Member
0 Likes
1,084

you are accessing specific positions of that field.

FISCPER+4(3) eq '000'

means, that field FISCPER, 4th,5th,6th position values together becomes 000 or not.

lets say your value for that field is '123456789'

in this case 4-6 positions of that field is '456',which is not equal to '000'

but take another example where the value is '123000789'

in this case 4-6 positions are '000'.

it will enter inside of that LOOP pass.

in ABAP terms,we call this as OFFSET.

Regards

Srikanth

Message was edited by: Srikanth Kidambi

Message was edited by: Srikanth Kidambi

Read only

suresh_datti
Active Contributor
0 Likes
1,083

>>what is the meaning of fiscper+4(3) eq 000

It is an offset.. ie the value of the 3 char starting from the 4th char in the variable fiscper.. ie the value in the charracters 567 = '000'.

~SUresh

Read only

Former Member
0 Likes
1,083

Hi

fiscper+4(3) eq 000 means if values 4th , 5th , 6th fields of FISCPER is equal to 000

then that corresponding is deleted from DATA_PACKAGE .

Regards

Naresh

Read only

Former Member
0 Likes
1,083

Hi,

loop at DATA_PACKAGE where FISCPER+4(3) eq '000'.

delete DATA_PACKAGE.

Here DATA_PACKAGE is an internal table and it has a field called FISCPER. I guess it is Fiscal Period.

FISCPER+4(3) means 3 characters of FISCPER starting from the 4th character.

for eg.

FISCPER has value 10122006.

So FISCPER+4(3) means starting from 4th character i.e. 101<b>2</b>

(3) means take 3 characters staring from the 4th character.. so 101<b>220</b>06

Now the loop indicates that consider only those records where FISCPER(3 characters starting from the 4th character ) has value 000. If its not 000, then that record wont be deleted and if it is 000, then that record would be deleted.

Best regards,

Prashant

Read only

0 Likes
1,083

The fourth offset "+4" is the fifth character in the string.

If l_date = 2006012, then l_date+4(3) would equal 012.

Read only

Former Member
0 Likes
1,083

Thanks to all of you....really appriciate your help and responce which u have given in very fast.

Read only

Former Member
0 Likes
1,083

Hi

That means it will take the offset value starting at 4 and ending at 6. If those 3 letters are equal to 000, then it will delete that particular record.

I hope You got me.

Regards

Haritha

Read only

0 Likes
1,083

Just want to clarify that 'fiscper+4(3)' will print the 5th,6th & 7th caharcters & not 4,5 & 6 as stated in a couple of replies..

data :w_str(8) value '20060829'.
write: / w_str+4(3).

~Suresh