Dear Guru's
Good day. I Need some help for an issue. Currently i have a program to display the list of work order. I am also fetching the status of the work order by objnr in viaufkst and getting the status text using FM STATUS_TEXT_EDIT. Now my issue is only need display the work order with Status REL . In case if the work order is with Status TECO i need to delete the particular work order from the internal table. .Please kindly assist. below is the code I'm using to get status.
SELECT SINGLE objnr FROM viaufkst CLIENT SPECIFIED INTO g_objnr
WHERE mandt = sy-mandt AND aufnr = wa_get_mic-aufnr.
IF g_objnr IS NOT INITIAL.
CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
client = sy-mandt
flg_user_stat = 'X'
objnr = g_objnr
only_active = 'X'
spras = sy-langu
bypass_buffer = 'X'
IMPORTING
* ANW_STAT_EXISTING =
* E_STSMA =
line = line
* USER_LINE =
* STONR =
* EXCEPTIONS
* OBJECT_NOT_FOUND = 1
* OTHERS = 2
Thanks and Regards
SBM