SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Сохранение select-options в таблице и передача в программу



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Максим
Специалист
Специалист



Joined: 27 Sep 2007
Posts: 61

PostPosted: Fri Dec 28, 2007 12:49 pm    Post subject: Сохранение select-options в таблице и передача в программу Reply with quote

Нужно сохранить select-options в z-таблице и получить в другой программе. Какой должна быть структура этой таблицы?
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 46
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Fri Dec 28, 2007 1:29 pm    Post subject: Reply with quote

Недавно подымалась тема Передача range как параметра в Perform - она очень "созвучна" с Вашей проблемой.
В общем виде z-таблица должна иметь структуру:
SIGN TYPE SIGN
OPTION TYPE OPTION
LOW и HIGH - типизированы как нужный Вам параметр.
Back to top
View user's profile Send private message Blog
vga
Мастер
Мастер


Age: 190
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Dec 28, 2007 1:40 pm    Post subject: Reply with quote

Можно использовать структуру RSSELECT и EXPORT/IMPORT to memory, если программы запущены в пределах одной сессии.
При асинхронном вызове IMPORT obj1 ... objn FROM DATABASE
Code:
TABLES mara.
SELECT-OPTIONS : so_matnr FOR mara-matnr.
DATA: lt_rs TYPE TABLE OF rsselect WITH HEADER LINE.

lt_rs-FIELDNM = 'MARA-MATNR'.
LOOP AT so_matnr.
  MOVE-CORRESPONDING so_matnr TO lt_rs.
  APPEND lt_rs.
ENDLOOP.

EXPORT lt_rs TO MEMORY ID 'ZRS'.

free lt_rs.

* second program.
IMPORT lt_rs FROM MEMORY ID 'ZRS'.

RANGES: r_matnr FOR mara-matnr.

LOOP AT lt_rs WHERE FIELDNM = 'MARA-MATNR'.
  MOVE-CORRESPONDING lt_rs TO r_matnr.
  APPEND r_matnr.
ENDLOOP.

LOOP AT r_matnr.
  write: / r_matnr-low.
ENDLOOP.
Back to top
View user's profile Send private message Blog Visit poster's website
Lord
Профессионал
Профессионал



Joined: 10 Sep 2007
Posts: 168

PostPosted: Sat Dec 29, 2007 1:08 am    Post subject: Reply with quote

Используйте транзакцию STVARV для сохранения в таблицах TVARV и TVARVC
SELECT-OPTIONS и PARAMETERS с их именами.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.