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

table for user status field in CJ20n transaction project defination

Former Member
0 Likes
3,845

HI ALL,

what is table for user status field in CJ20n transaction project defination creation. This field is in Basic Data tab.

Thanks.

Very useful, All the related tables are described.

3 REPLIES 3
Read only

Former Member
0 Likes
2,036

Hi,

Check the Tables

TJ02

TJ02T and

JEST

reward if useful

regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
2,036

Hi,

Check following tables for Usre status:

TJ30 - User status

TJ30T - Texts for user status

TJ20 - Status profile

JEST - Object status

JSTO- WBS status profile.

Check this code:

*-----------------------------------------------------------------------
*-----------------------------------------------------------------------
REPORT zps_get_userstatus .

PARAMETERS: p_posid LIKE prps-posid.

*-- Constants
CONSTANTS: gc_yes(1)     TYPE c                 VALUE 'X',
           gc_no(1)      TYPE c                 VALUE ' '.

*-- Variables
DATA: l_objnr LIKE prps-objnr.

*-- Internal tables
DATA: BEGIN OF lit_jest OCCURS 0,
       objnr LIKE jest-objnr,
       stat  LIKE jest-stat,
     END OF lit_jest.

DATA: BEGIN OF lit_jsto OCCURS 0,
       objnr LIKE jsto-objnr,
       stsma LIKE jsto-stsma,
      END OF lit_jsto.

DATA: BEGIN OF lit_status OCCURS 0,       "Combination of JEST & JSTO
          objnr LIKE jest-objnr,
          stsma LIKE jsto-stsma,
          stat  LIKE jest-stat,
        END OF lit_status.

DATA: BEGIN OF lit_usrsta OCCURS 0,       "Uer status for all wbs
         objnr LIKE jest-objnr,
         stsma LIKE jsto-stsma,
         stat  LIKE tj30t-estat,
         txt04 LIKE tj30t-txt04,
       END OF lit_usrsta.

DATA: BEGIN OF lit_usrtxt OCCURS 0,       "User Status text - TJ30T
        stsma LIKE tj30t-stsma,
        stat  LIKE tj30t-estat,
        txt04 LIKE tj30t-txt04,
      END OF lit_usrtxt.

* get WBS object number
SELECT SINGLE
     objnr FROM prps
           INTO l_objnr
           WHERE posid = p_posid.

* get WBS active status from table JEST
SELECT
      objnr
      stat
           FROM jest INTO TABLE lit_jest
           WHERE objnr =  l_objnr AND
                 inact <> gc_yes.

* get WBS status profile from table JSTO
SELECT
      objnr
      stsma FROM jsto
            INTO TABLE lit_jsto
            WHERE objnr =  l_objnr.

* combine JEST and JSTO table for user status
LOOP AT lit_jest.
  IF lit_jest-stat CP 'E++++'.
    READ TABLE lit_jsto WITH KEY
                        objnr = l_objnr.
    IF sy-subrc = 0.
      lit_status-objnr = lit_jest-objnr.
      lit_status-stsma = lit_jsto-stsma.
      lit_status-stat  = lit_jest-stat.
      APPEND lit_status.
    ENDIF.
  ENDIF.
  CLEAR: lit_jsto, lit_status.
ENDLOOP.

*  get text for user status
SELECT DISTINCT
         stsma
         estat
         txt04 FROM tj30t
               INTO TABLE lit_usrtxt
               FOR ALL ENTRIES IN lit_status
               WHERE stsma = lit_status-stsma AND
                     estat = lit_status-stat  AND
                     spras = sy-langu.
*-----------------------------------------------------------------------
*-----------------------------------------------------------------------

Let me know if you have any question.

Regards,

RS

Read only

0 Likes
2,036

Very useful, All the related tables are described.