cancel
Showing results for 
Search instead for 
Did you mean: 

Production Order User status

0 Kudos

Hi guru's

I have a requirement for the report, I need to get the User status(ONLY QHOD) from the production order along with the DATE when it is changed to QHOD from UHOD.

I need that DATE on the report.Is it possible? if not , kindly suggest an alternative.

Thanks
POPPY

Accepted Solutions (1)

Accepted Solutions (1)

former_member201849
Contributor
0 Kudos

Hi Poppy

Please go through the below procedure.

1. Go to AUFK table and pass the Order Number (AUFNR) and get Object Number (OBJNR).

2. Pass the Object Number to JEST table and get the STAT (Status starts with 'I' denotes System             Status and Status starts with 'E' denotes User Status).

3. Pass the STAT to JCDS table to get the time and transaction.

Please check and confirm.

Regards

Suresh.M

0 Kudos

HI suresh

Correct ans,


Thanks for the help.

Popppy

Answers (3)

Answers (3)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello POPPY,

Reply by SP RO is better. (He is incorrect in mentioning table TJ02 which belongs to System status)

Reply by vinodh takes into operations area which is not your requirement.

Now my reply


1.Get OBJNR value of Order (not any operation)

This you'll get from AUFK table by inputting the AUFNR value (Order no).

OR

Concatenate 'OR' and the 12character Order number into a variable which will be OBJNR.

Example: Iif the Order number is 44001122, then the 12chr Order number will be 000044001122 and the OBJNR will be OR000044001122.

2.Get the user status code from table TJ30T

Pass value QHOD into the field TXT04, status profile (this you will find if you click on the 'i' icon in your screen)  into the field STSMA and value E into SPRAS field.

Let's suppose you got a value E0003 from field ESTAT of the table.

3. Get the Change docs from table JCDS.

Pass this OBJNR value you got in step1 into OBJNR field of the JCDS table, status code E0003 into the field STAT, you can give the tcode (like CO02 if you are sure) in the field CDTCODE and  INACT field to be equated to blank.

Now if you get several rows, you will sort them by field CHGNR descending and use 'Delete adjacent duplicates' to have only the record having higest CHGENR.

This row gives you the userID (USNAM), Change date (UDATE), Change time (UTIME) etc.

A sample select statement used for Plant maintenance situation


SELECT objnr unam udate utime chgnr FROM jcds INTO TABLE ijcds WHERE stat = 'E0003'  AND inact = ''  AND  cdtcode  IN  ('IW32', 'IW22' AND  objnr  IN  so_objnr.

SORT ijcds BY objnr chgnr DESCENDING.

DELETE ADJACENT DUPLICATES FROM ijcds COMPARING objnr.

I hope you've got full clues to develop your syntax. I'm sure you knew that the ultimate teacher while coding is the Debugging tool.

Good luck

KJogeswaraRao

Former Member
0 Kudos

hi,

  1.pass order number to afko table and get aufpl.

2. pass aufpl from afko table to aufpl~afvc table and get objnr number.

3.now to pass objnr to objnr~jcds table and get stat ,udate and utime.

4. to check the status of order pass stat to stat~tj02 table and get status of order.

regards,

vinodh

former_member184701
Active Contributor
0 Kudos

your tables are

JCDS

JEST

TJ02

ask your abaper to help