Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

systemstatus-tjo2t

Former Member
0 Likes
841

Hi

there r many number of system status for a process order i need to coconate these system status and display in one line.

Regards

Rasheed

3 REPLIES 3
Read only

Former Member
0 Likes
742

Hi,

Use function module <b>STATUS_TEXT_EDIT</b>.

UPDATE: Check this code on how to use this FM. We are using this FM at many place to read WBS element status. The only difference for your case is you will be passing the object number of "Process Order" ( instead of wbs element ). I do not know the table of process order. But i am sure that object number must be store in same table as process order number and field must be OBJNR.

Here, you will get all SYSTEM STATUS fiels concatenated in <b>field 'SYSTEM_STAT'</b>

*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
DATA: system_stat   LIKE bsvx-sttxt,
      user_stat     LIKE bsvx-sttxt,
      stat_profile LIKE  jsto-stsma.

l_object = "move you process order object number here OBJNR

CALL FUNCTION 'STATUS_TEXT_EDIT'
     EXPORTING
          client           = sy-mandt
          flg_user_stat    = 'X'
          objnr            = l_object  "Process order object number
          only_active      = 'X'
          spras            = sy-langu
     IMPORTING
          e_stsma          = system_stat
          line             = user_stat
          user_line        = stat_profile
     EXCEPTIONS
          object_not_found = 1
          OTHERS           = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*

Let me know if you need any other information.

Regards,

RS

Read only

Former Member
0 Likes
742

Hi Rasheed,

As you might know, the system status of the work order is stored in TJ02T and the various status that an order can have in its lifecycle , is stored in JEST table.

So you can write a select query to search in the JEST table where the object number contains the order number.

For eg: assume that an order number is 300204240.The corresponding object in the JEST table can be OR000300304240. You can search for the various status in JEST table for a string matching 300204240. You can append all these status into an internal table and then to a string .

Hope this has been of some help to you.

Regards,

SP.

Read only

Former Member
0 Likes
742

rasheed,

suppose you have extracted system statuses in an internal table

DATA : v_string(400).

loop itab.

concatenate itab-status1 itab-status2 itab-status2 into v_string.

If you don't want gaps in between statuses .Use

CONDENSE v_string.

OR If you don't want gaps or / or anything in between statuses .Use

concatenate itab-status1 itab-status2 itab-status2 into v_string seperated by 'put symble whaever you want here'

endloop.

Don't forget to reward if useful...