TYPES: BEGIN OF itab_tx,
tcode LIKE tstct-tcode,
ttext LIKE tstct-ttext,
END OF itab_tx.
DATA: itab_tx TYPE itab_tx OCCURS 0 WITH HEADER LINE,
tx TYPE itab_tx,
itab_file LIKE sval OCCURS 0 WITH HEADER LINE,
p_file LIKE rlgrap-filename,
returncode LIKE sy-subrc,
filestring TYPE string.
DATA: BEGIN OF fields OCCURS 2.
INCLUDE STRUCTURE sval.
DATA: END OF fields.
* text-001 = Transaction Selection
SELECTION-SCREEN BEGIN OF BLOCK transx WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_tcode FOR tstct-tcode,
s_sprsl FOR tstct-sprsl.
SELECTION-SCREEN END OF BLOCK transx.
* text-002 = Download Option
SELECTION-SCREEN BEGIN OF BLOCK dld WITH FRAME TITLE text-002.
PARAMETERS: p_dnld TYPE c AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK dld.
AT SELECTION-SCREEN OUTPUT.
p_file = 'C:\SAPTXlist.xls'.
p_dnld = 'X'.
MOVE 'I' TO s_sprsl-sign.
MOVE 'EQ' TO s_sprsl-option.
MOVE 'EN' TO s_sprsl-low.
APPEND s_sprsl.
START-OF-SELECTION.
REFRESH itab_tx.
SELECT * FROM tstct INTO CORRESPONDING FIELDS OF TABLE itab_tx
WHERE tcode IN s_tcode AND sprsl IN s_sprsl.
IF sy-subrc <> 0.
MESSAGE s265(sf).
ELSE.
SORT itab_tx BY tcode.
LOOP AT itab_tx.
WRITE: /1 itab_tx-tcode(20),
AT 20 itab_tx-ttext.
ENDLOOP.
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.