Skip to Content
0
Dec 09, 2014 at 10:05 AM

Concatenate statement -issue

29 Views

Hi,

In my requirement am having material in one internal table.

itab1[] = 123456..

in another select am passing the itab1 material with *...(123456*)

because in z-table material first stage only there..

while [assing z-table value to mseg means it display all material stages, like 123456-ab

123456-po 123456-iy etc...

so in my code..

IF IT_QTY[] IS NOT INITIAL.

LOOP AT IT_QTY WHERE WERKS IN SO_PLANT.

SO_MAT-OPTION = 'BT'.

SO_MAT-SIGN = 'I'.

SO_MAT-LOW = IT_QTY-MATNR.

SO_MAT-HIGH = IT_QTY-MATNR.

CONCATENATE IT_QTY-MATNR '*' INTO SO_MAT-LOW.

CONCATENATE IT_QTY-MATNR '*' INTO SO_MAT-HIGH.

APPEND SO_MAT.

endloop.

endif.

IF IT_QTY[] IS NOT INITIAL.

LOOP AT IT_QTY WHERE WERKS IN SO_PLANT.

N = N + 1.

READ TABLE so_mat INDEX N.

SELECT MBLNR MJAHR ZEILE BWART MATNR WERKS MENGE FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSQTY

WHERE MATNR eq SO_MAT-low AND

WERKS in so_plant AND

BWART IN (551,552,521,553,522).


so_mat-low = 123456*.

but it is not fetching value from table.Any one give idea???