Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Fri Jan 22, 2010 2:26 pm Post subject:
To YuriT: Это лишнее
Вот пример, сразу понятнее станет
Code:
TYPE-POOLS: vrm.
DATA: wa_t130m TYPE t130m.
DATA: vrm_id TYPE vrm_id,
vrm_list TYPE vrm_values,
value LIKE LINE OF vrm_list,
bildtab TYPE TABLE OF mbildtab WITH HEADER LINE.
PARAMETERS: p_matnr TYPE matnr MEMORY ID mat,
p_pstat AS LISTBOX VISIBLE LENGTH 30 OBLIGATORY.
INITIALIZATION.
SELECT SINGLE * FROM t130m INTO wa_t130m
WHERE tcode = 'MM02'.
IF sy-subrc IS INITIAL.
CALL FUNCTION 'SELECTION_VIEWS_FIND'
EXPORTING
bildsequenz = '01' " Standard
pflegestatus = wa_t130m-pstat
TABLES
bildtab = bildtab[]
EXCEPTIONS
call_wrong = 1
empty_selection = 2
OTHERS = 3.
REFRESH vrm_list.
vrm_id = 'P_PSTAT'.
LOOP AT bildtab.
value-key = bildtab-pstat.
value-text = bildtab-dytxt.
APPEND value TO vrm_list.
IF sy-tabix = 1.
p_pstat = bildtab-pstat.
ENDIF.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = vrm_id
values = vrm_list.
ENDIF.
START-OF-SELECTION.
SET PARAMETER ID 'MAT' FIELD p_matnr.
SET PARAMETER ID 'MXX' FIELD p_pstat.
CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
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.