PP

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

What I tried to explain is first select all from JEST within your requested stat

us. Then make the link to e.g. CAUFV using JEST-OBJNR. Delete 'OR' from OBJNR an
d use this as AUFNR.
Use tables TJ02 and TJ30T (field TXT04) to link JEST-STAT to the status.
I think this is much faster the first select all production orders and then chec
k the status in JEST.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
types: begin of ty_jest,
OBJNR like jest-objnr,
STAT like jest-stat,
INACT like jest-inact,
STAT1 like jest-stat,
INACT1 like jest-inact,
end of ty_jest.
data: wa_com_jest type ty_jest.
data: tb_com_jest type standard table of ty_jest.

...
select dlv~objnr dlv~stat dlv~inact
pcnf~stat pcnf~inact
into table tb_com_jest
from jest as dlv
inner join jest as pcnf
on pcnf~objnr = dlv~objnr
where dlv~stat = 'I0012' "DLV
and dlv~inact = ' ' " status active
and pcnf~stat = 'I0010' "PCNF
and PCNF~inact = ' ' . " status active
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
loop at tb_com_jest into wa_com_jest.
select single objnr stat inact from jest into wa_jest_CNF where
objnr = wa_com_jest-objnr and
stat = 'I0009' and inact = ' '. "CNF
if sy-subrc <> 0.
.......
endif.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Goto CAUFV
get the field - CAUFV-OBJNR
Pass this in JEST in field = OBJNR, object number and INACT = space
you will get severail entries for field STAT.
pass this field entries STAT to tabel TJ02T and field - ISTAT, language = EN
you will get status in the field TJ02T-TXT04 and text in field - TJ02T-TXT30.

or simply use FM- STATUS_TEXT_EDIT


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
get OBJNR from Table AUFK for ur prod. order and pass OBJNR in FM : STATUS_TEXT_
EDIT
&&&&&&&&&&&&&&&&&&&&&
TJ02T
JEST
T-CODE--->BS23

You might also like