Application Development 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: 

User Status of Wbs element little peculiar

Former Member
0 Kudos

Hello Experts,

I am faciing a problem while displaying the user status of the WBS element

In the selection screen

select-options: SO_ESTAT for t30jt-estat.

When the user gives the inpur as not equal to <b>STOP</b>

In the output I am displaying

Proj WBS Element Userstatus like this

P.1213 P.1213 NOUP ANGB STOP

P.1213 P.1213.010 NOUP ANGB STOP

P.1213 P.1213.020 NOUP ANGB STOP

<b>P.1213 P.1213.030 STOP

P.1213 P.1213.040 STOP</b>

But the problem is when the input is not equal to STOP I need to display all the WBS element which do not have STOP status.

But the user status here is a text and a sinlge column so it is difficult for to seperate the status for these types of inputs.

Waiting for ur reply

Thanks in Advance

Best Regards,

Vasanth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

ESTAT is the internal number that is stored in the TJ30 table, which looks something like 'E0001', E0002....etc.

You change the code like:

data: begin of i_estat occurs 0,

estat like tj30t-estat,

txt04 like tj30t-txt04,

end of i_estat.

select-options: SO_ESTAT for tj30t-txt04.

select txt04 estat into table i_estat from TJ30T where

TXT04 in SO_ESTAT.

Then you can use these statuses to do further processing.

Regards

Subramanian

13 REPLIES 13

Former Member
0 Kudos

I think you may have to use TJ30T-TEXT04 for your select-option.

But, TEXT04 is case sensitive.

Thanks,

Santosh

Former Member
0 Kudos

Hi,

ESTAT is the internal number that is stored in the TJ30 table, which looks something like 'E0001', E0002....etc.

You change the code like:

data: begin of i_estat occurs 0,

estat like tj30t-estat,

txt04 like tj30t-txt04,

end of i_estat.

select-options: SO_ESTAT for tj30t-txt04.

select txt04 estat into table i_estat from TJ30T where

TXT04 in SO_ESTAT.

Then you can use these statuses to do further processing.

Regards

Subramanian

0 Kudos

Hello Subramanian,

Thanks for ur reply. I have refered SO?ESTAT to tj30t-txt04 only.

But in the output list the status of the WBS are concatenated to one text field.

Now my problem is if the user gives the status as NE STOP then I need to ignore the WBS with atleast a STOP status.

Please show a way for this.

Vasanth

0 Kudos

Hi,

You have to refer to the table JEST also for the status.

If say estat = E0002 and TXT04 = 'CLSD' , and now you have all the estat with you.

Check JEST table if INACT field = 'X' for ESTAT = 'E0002' and you should also pass the OBJNR. Pls check what OBJNR the WBS Element has. [ Since PS is not implemented in our system, I cannot give u a hint on this ].

Hope this helps.

Regards

Subramanian

0 Kudos

Hello Subramanian,

Evrything is okay with the final table.

I am selecting all the records from the table with the OBJNR from JEST table.

But the thing is while filling the output table.

See for one WBS there may be many user statuses.

For example take a WBS P.1452.010.0(PR123456789)

For this WBS I am having staustes like STOP NOUP ANGB etc.

So if I select data from JEST and PRPS for the WBS I will get like this

PR123456789 E0001 NOUP

PR123456789 E0002 ANGB

PR123456789 E0003 XXXXX

PR123456789 <b> E0004(STOP)</b> and etc

If the user dont want to see the WBS without STOP state

Since this WBS is hving the stop state the user dont want it the output.

But it is displayed in the output like this.

<b> P.1452.010.0 NOUP ANGB XXXXX STOP</b>

So when filling the final table I have to take step to avoid this WBS filled in the table. Here I need to compare the status table and the range table.

Please throw a light for this,

Vasanth

0 Kudos

What i understand here is, you get STOP as one of the user status for a particular WBS and you need to filter out this if user's input is "NE STOP".

And, as you have OBJNR, you use FM "ALM_ME_READ_USER_STATUS" to fill your final output table by filter user status 'STOP'

I may be wrong in understanding your req.

Thanks,

Santosh

0 Kudos

Hello Santhosh,

Thanks for ur reply.

U understood my requirement correctly. But in the range table it will be like this

<b>I NE STOP</b>. Here how can I filter out the whole WBS. PLease suggest.

Vasanth

0 Kudos

Hi Vasanth,

In the JEST table itself there is a field INACT.

If INACT = 'X', it means it is not active. That check for E0004 and INACT = 'X', you will get the desired values. If STOP is set, then INACT = ' ' i.e. space.

Hope this helps.

Regards

Subramanian

0 Kudos

Hello Subramanian,

See these things are clear for me.

Iam having one itab1 which has all the details of the WBS element like description, User responisble, Level etc..

Second Itab2 for User status and system status. I need to fill these thing in a final table to show the output.

If a WBS has three status then the Itab2 will have

PR123456789 E0001 ABCD

PR123456789 E0002 ASDS

<b>PR123456789 E0001 CLSD</b> This will not be available in the Itab2 since this entry will not be selected in from the JEST table.

So in this case I have to eliminate the OBJNR PR123456789 to be filled from the final table. HOpe u understood the problem.

Vasanth

0 Kudos

I was just thinking something like this. You may work more on this if you feel this is useful to you in anyway.

READ YOUR RANGESTABLE WITH KEY SIGN = I

OPTION = NE

LOW = 'STOP'.

IF SY-SUBRC EQ 0.

  • FILLING YOUR FINAL OUTPUT TABLE

LOOP AT YOUR WBS INTERNAL TABLE.

1. Call FM ALM_ME_READ_USER_STATUS

READ TABLE USER_STATUS WITH KEY USER = RANGESTABLE-LOW

IF SY-SUBRC NE 0.

APPEND YOUR FINAL OUTPUT TABLE

ENDIF.

ENDLOOP.

ENDIF.

Thanks,

Santosh

0 Kudos

Hello Santhosh,

U r right, but the selection will be Dynamic. In some case user wants to see only the WBS with STOP status in that I should I do....

Vasanth

0 Kudos

You will have to check for all the options EQ NE etc and accordingly filter the values from the FM and append to your final table.

Thanks,

Santosh

0 Kudos

Hi,

The JEST table will be filled only when there is a change in the status.

You may do onething. Read all the statuses from the JEST table for each of the OBJNR, irrespective of STOP status is active or inactive.

Loop through first internal table.

check if there exists atleast an entry in the second internal table which has user status as specified in the selection screen which has INACT = space.

if there is no entry, then delete all entries in internal table 2 with PR number = first internal table PR number.

delete the current entry in the first internal table.

else.

move-correspinding first internal table value to another temp_table.

move all the corresponding fields from second internal table to temp_table.

Endloop.

Does this help?

Regards

Subramanian