Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Tue Jan 22, 2008 12:30 pm Post subject:
Все что происходит в подпрограмме - лишнее, на мой взгляд. Я немного код переработал.
Code:
DATA: IT_MCH1 TYPE STANDARD TABLE OF SFLIGHT,
WA_MCH1 TYPE SFLIGHT.
FIELD-SYMBOLS: <FS_TAB> TYPE STANDARD TABLE.
SELECT * FROM SFLIGHT INTO TABLE IT_MCH1.
ASSIGN IT_MCH1 TO <FS_TAB>.
PERFORM PROC_TABLE TABLES <FS_TAB>.
WRITE /.
WRITE / 'FS table values after'.
LOOP AT <FS_TAB> INTO WA_MCH1.
WRITE: / WA_MCH1-CARRID, WA_MCH1-CONNID.
ENDLOOP.
*&---------------------------------------------------------------------*
*& Form PROC_TABLE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->FS_TAB text
*----------------------------------------------------------------------*
FORM PROC_TABLE TABLES FS_TAB.
WRITE / 'FS table values before'.
LOOP AT FS_TAB INTO WA_MCH1.
WRITE: / WA_MCH1-CARRID, WA_MCH1-CONNID.
IF WA_MCH1-CARRID = 'LH'.
DELETE TABLE FS_TAB FROM WA_MCH1.
ENDIF.
ENDLOOP.
ENDFORM. " proc_table
Теперь поясню:
1. Филд-симбол объявлен как таблица, передавать его надо в подпрограмму через TABLES.
2. В подпрограмме Вы уже начинаете работать с филд-симболом, но через таблицу FS_TAB, т.е. все уже реализовано относительно темы топика.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.