Skip to Content
0
Former Member
Jul 16, 2008 at 08:41 PM

Time out when running program in Foreground

27 Views

Hi Friends ,

I am doing BOM explosion on 4911 materials with one material at a time .After the BOM explosion I need to make sure that I get the correct component by getting the MRP controllers for those components and comparing them with the one on selection screen .

This is the code below. Please advise and your thoughts on this .

Thanks !

Teresa.

LOOP AT t_mattmp.

SELECT matnr

stlan

stlal

INTO (mkal-matnr,

mkal-stlan,

mkal-stlal)

FROM mkal

WHERE werks = p_pwwrk AND

verid IN s_veri1 AND

matnr = t_mattmp-nrmit.

ENDSELECT.

IF syst-subrc = 0 .

REFRESH: xstpox,

xmatcat.

CLEAR: xstpox,

xmatcat.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

ftrel = ftrel

altvo = pm_altvo

aufsw = ' '

auskz = pm_ausch

bagrp = pm_bagrp

beikz = pm_beikz

bessl = pm_bessl

bgixo = ' '

brems = ' '

capid = 'PP01'

datuv = syst-datum

emeng = qty

erskz = pm_erskz

erssl = pm_erssl

mbwls = ' '

mtnrv = t_mattmp-nrmit

mktls = 'X'

mehrs = ' '

mmory = ' '

postp = pm_postp

sanko = pm_sanko

sanfr = pm_sanfe

sanka = pm_sanka

sanin = pm_sanin

sanvs = pm_sanvs

svwvo = 'X'

rndkz = ' '

rvrel = pm_rvrel

schgt = pm_schgt

stkkz = pm_stkkz

stlal = mkal-stlal

stlan = mkal-stlan

werks = p_pwwrk

vrsvo = 'X'

IMPORTING

topmat = xcstmat

dstst = xfeld

TABLES

stb = xstpox

matcat = xmatcat

EXCEPTIONS

alt_not_found = 1

call_invalid = 2

material_not_found = 3

missing_authorization = 4

no_bom_found = 5

no_plant_data = 6

no_suitable_bom_found = 7

OTHERS = 8.

LOOP AT xstpox.

CLEAR marc-dispo.

SELECT SINGLE dispo

INTO marc-dispo

FROM marc

WHERE werks = p_pwwrk

AND matnr = xstpox-idnrk

AND dispo IN s_disp.

IF syst-subrc = 0 .

MOVE xstpox-idnrk TO t_matc-matc.

MOVE t_mattmp-nrmit TO t_matc-nrmit.

APPEND t_matc.

EXIT.

ENDIF.

ENDLOOP.

ENDIF.