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: 

Table data extraction

Former Member
0 Kudos

Hi everyone.

I need to select distinct AUFNR OBJNR from AUFK for Plant in select screen and Order number in Selection screen.

Next I need to select the Orders from the above list with system status (TJ02T-TXT004) in the selection screen into another internal table.

The logic is -

from AUFK, we get OBJNR.

using this OBJNR in JEST table and TJO2T table, I need to extract the orders with the status in the selection screen.

Logic to use JEST, JSTO and TJ20T for getting the system status is --

SELECT SINGLE d~txt04 INTO l_zztxt04 (variable or table field)

FROM aufk AS a

INNER JOIN jest AS b ON aobjnr = bobjnr

INNER JOIN jsto AS c ON aobjnr = cobjnr

INNER JOIN tj20t AS d ON cstsma = dstsma

AND bstat = destat

WHERE a~aufnr = l_aufnr " Production Order

AND b~inact = ' '

AND d~spras = sy-langu

Please help me out how I can achieve this.

Thanks,

Lakshmi

1 REPLY 1

former_member188685
Active Contributor
0 Kudos

Instead of Doing selects on the JEST table etc. you can use the Function

STATUS_TEXT_EDIT , for this pass the OBJNR which you got it from the AUFK table. and get the status.