‎2006 Aug 28 3:41 PM
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
‎2006 Aug 28 3:44 PM
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
‎2006 Aug 28 3:44 PM
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
‎2006 Aug 28 3:46 PM
>>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
‎2006 Aug 28 3:47 PM
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
‎2006 Aug 28 3:47 PM
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
‎2006 Aug 28 3:51 PM
The fourth offset "+4" is the fifth character in the string.
If l_date = 2006012, then l_date+4(3) would equal 012.
‎2006 Aug 28 3:51 PM
Thanks to all of you....really appriciate your help and responce which u have given in very fast.
‎2006 Aug 28 3:52 PM
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
‎2006 Aug 28 5:57 PM
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