‎2008 Feb 02 11:54 AM
Hi
my requirement is i need to select material, plant, storage information with the movement type (BWART) having 2 in the second character.
Movement type is of char data type with length 3. I need those records where BWART has the second character to be 2.
EX: 120, 120, etc...
I wrote the condition as:
LOOP AT IT_MSEG INTO WA_MSEG.
IF WA_MSEG-BWART+2(1) EQ '2'.
WA_MSEG2-BWART = WA_MSEG-BWART.
APPEND WA_MSEG2 TO IT_MSEG2.
ENDIF.
ENDLOOP.
But I'm getting all types of movementtypes.
This condition is not working. pls help me. thank u.
‎2008 Feb 02 11:58 AM
Hi,
try this.
LOOP AT IT_MSEG INTO WA_MSEG.
IF WA_MSEG-BWART+1(1) EQ '2'.
WA_MSEG2-BWART = WA_MSEG-BWART.
APPEND WA_MSEG2 TO IT_MSEG2.
ENDIF.
ENDLOOP.Cheers,
Will.
‎2008 Feb 02 11:58 AM
Hi,
try this.
LOOP AT IT_MSEG INTO WA_MSEG.
IF WA_MSEG-BWART+1(1) EQ '2'.
WA_MSEG2-BWART = WA_MSEG-BWART.
APPEND WA_MSEG2 TO IT_MSEG2.
ENDIF.
ENDLOOP.Cheers,
Will.
‎2008 Feb 02 12:03 PM
Smith,
Its working now. Thank u very very much yaar. u saved my time.
I thought it is 2(1) but my calculation went wrong. Once again a lot of thanks to u mate.