on 10-02-2008 3:28 PM
i need to get the production orders which are having the status 'REL' and not 'lkd', DLFL AND DLT AND CRTD....
and i have to use the table to get production orders AUFK.....
i have to pass the functional module to get production order statuses...STATUS_TEXT_EDIT...
my question is how to write the select statement for passing this FUNCTIONAL MODULE and how to use this FM for getting the order status...
I don't think you should be using STATUS_TEXT_EDIT if you don't have the order number to start with.
Try something like:
SELECT objnr
INTO w_rel
FROM jest
WHERE stat in ( select single istat from tj02t where spras = 'E' and txt04 = 'REL' )
AND inact = space.
SELECT SINGLE *
FROM jest
WHERE objnr = w_rel
AND stat in ( select istat from tj02t where spras = 'E' and txt04 in ('LKD', 'DLFL', 'DLT', 'CRTD')
AND inact = space.
IF sy-subrc <> 0.
SELECT SINGLE aufnr
INTO CORRESPONDING TABLE it_aufnr
FROM aufk
WHERE objnr = w_rel.
ENDIF.
ENDSELECT.
This is a quick bit of code, I'm sure you can improve on it.
Edited by: Michael Evershed on Oct 2, 2008 7:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.