Skip to Content
0
Former Member
Nov 11, 2008 at 03:59 AM

problem in the code

23 Views

Hi,

I am working on a code and it is giving problem that where the Work center field is empty it is making the last field repeated having the Work Center . here 's d code :-

LOOP AT T_MAPL INTO W_MAPL.

LOOP AT T_PLAS INTO W_PLAS WHERE PLNAL = W_MAPL-PLNAL AND PLNNR = W_MAPL-PLNNR.

W_FTAB6-PLNKN = W_PLAS-PLNKN.

LOOP AT T_PLPO INTO W_PLPO WHERE PLNNR = W_PLAS-PLNNR AND PLNKN = W_PLAS-PLNKN.

W_FTAB6-MATNR = W_MAPL-MATNR.

W_FTAB6-PLNTY = W_MAPL-PLNTY.

W_FTAB6-PLNAL = W_MAPL-PLNAL.

W_FTAB6-WERKS = W_MAPL-WERKS.

READ TABLE T_PLKO INTO W_PLKO WITH KEY PLNAL = W_MAPL-PLNAL PLNNR = W_MAPL-PLNNR.

W_FTAB6-KTEXT = W_PLKO-KTEXT.

W_FTAB6-PLNNR = W_PLPO-PLNNR.

W_FTAB6-VORNR = W_PLPO-VORNR.

W_FTAB6-LTXA1 = W_PLPO-LTXA1.

W_FTAB6-KTSCH = W_PLPO-KTSCH.

W_FTAB6-ARBID = W_PLPO-ARBID.

W_FTAB6-BMSCH = W_PLPO-BMSCH.

W_FTAB6-MEINH = W_PLPO-MEINH.

W_FTAB6-VGW04 = W_PLPO-VGW04.

W_FTAB6-VGE04 = W_PLPO-VGE04.

READ TABLE T_CRHD INTO W_CRHD WITH KEY OBJID = W_PLPO-ARBID.

W_FTAB6-ARBPL = W_CRHD-ARBPL.

W_FTAB6-VERWE = W_CRHD-VERWE.

W_FTAB6-OBJTY = W_CRHD-OBJTY.

W_FTAB6-OBJID = W_CRHD-OBJID.

READ TABLE T_CRTX INTO W_CRTX WITH KEY OBJID = W_CRHD-OBJID.

W_FTAB6-KTEXT_UP = W_CRTX-KTEXT_UP.

READ TABLE T_MARC INTO W_MARC WITH KEY MATNR = W_MAPL-MATNR.

W_FTAB6-LGPRO = W_MARC-LGPRO.

APPEND W_FTAB6 TO T_FTAB6.

ENDLOOP.

ENDLOOP.

ENDLOOP.

Plzz provide me guidlines that how should i remove the filling of the records which does not have the Work Center. (ARBPL)