We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-dev] Problem with SELECT statement and JOIN into internal table

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by Chekker
on Aug 25 at 7:39 PM
Dear all,
I am trying to program a follow-up action (function module) in a service notification, that should update the service order header status.
However, I have a problem with a SELECT statement: Nothing is read into the internal table ITAB_STAT_UPDATE. Communication structure I_VIQMEL brings data across.
Could someone please let me know what the problem is?
Thanks,
Chris
TABLES: AUFK, JEST.
DATA: WA_STAT_UPDATE LIKE JEST,
ITAB_STAT_UPDATE LIKE SORTED TABLE OF JEST WITH NON-UNIQUE KEY OBJNR WITH HEADER LINE.
SELECT B~STAT
B~INACT
B~OBJNR
INTO CORRESPONDING FIELDS OF TABLE ITAB_STAT_UPDATE
FROM AUFK AS A
INNER JOIN JEST AS B
ON A~OBJNR = B~OBJNR
WHERE A~AUFNR = I_VIQMEL-AUFNR AND
B~INACT = '' AND
B~STAT = 'E*'.
LOOP AT ITAB_STAT_UPDATE INTO WA_STAT_UPDATE.
CALL FUNCTION 'I_CHANGE_STATUS'
EXPORTING OBJNR = WA_STAT_UPDATE-OBJNR
ESTAT_INACTIVE = WA_STAT_UPDATE-INACT
ESTAT_ACTIVE = 'E0011'.
ENDLOOP.
__.____._
Copyright © 2009 CEB Toolbox, Inc. and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251

0 comments:

Post a Comment

T r a n s l a t e to your language