10-02-2006 11:20 PM
Hi ABAP Guru's,
I am currently working on a program for the confirmation of a production order.In this case,i need to check the individual status of the production order.I had tried the FM 'STATUS_TEXT_EDIT' which returns the collective status text for a production order.However this field is limited to 40 characters and the additional individual status are not displayed.I would however need a FM which could return the individual status text and not the collective 40 character limited status text.I had tried searching in se37 for a while but to no luck.In case,i cannot find the FM for thus purpose,i would have to code in ABAP to get the individual english status based on the system status(FROM table TJ02T and JEST).As such,if anyone has an answer to my question,i would be greatly thankful so that i can use the FM directly and not code in ABAP.
Waiting to hear back.
Thanks,
Rajiv C
10-03-2006 1:20 AM
Make use of the function module STATUS_READ, just follow this which gives you the Status of a prod ord confirmation.
call function 'STATUS_READ'
exporting
OBJNR = L_AUFNR
ONLY_ACTIVE = 'X'
tables
STATUS = IT_JEST
exceptions
OBJECT_NOT_FOUND = 1
others = 2.
if SY-SUBRC <> 0.
endif.
if not IT_JEST[] is initial.
select ISTAT TXT04
from TJ02T
into table IT_TJ02T
for all entries in IT_JEST
where ISTAT = IT_JEST-STAT
and SPRAS = SY-LANGU.
endif.
Regards
- Gopi
10-03-2006 1:10 AM
Hi,
STATUS_READ returns all the Statuses for the Order(in an internal table) Or if you want to check if particular Status use STATUS_CHECK.
Hope this helps..
Thanks,
Murali
10-03-2006 1:20 AM
Make use of the function module STATUS_READ, just follow this which gives you the Status of a prod ord confirmation.
call function 'STATUS_READ'
exporting
OBJNR = L_AUFNR
ONLY_ACTIVE = 'X'
tables
STATUS = IT_JEST
exceptions
OBJECT_NOT_FOUND = 1
others = 2.
if SY-SUBRC <> 0.
endif.
if not IT_JEST[] is initial.
select ISTAT TXT04
from TJ02T
into table IT_TJ02T
for all entries in IT_JEST
where ISTAT = IT_JEST-STAT
and SPRAS = SY-LANGU.
endif.
Regards
- Gopi
10-03-2006 3:34 AM
Thanks a lot.I have now solved my problem with your suggestions...
Rajiv C