Posted: Fri Sep 14, 2007 3:28 pm Post subject: Programs | Управление программами
RS_REFRESH_FROM_SELECTOPTIONS - Current contents of selection screen
Allows submit another report with parameters entered for the current report.
Code:
REPORT Z_REFRESH_FROM_SO.
* The Z1 and Z2 reports have the same parameters...
type-pools: sscr.
DATA: SELTAB TYPE TABLE OF RSPARAMS.
parameters: p_matnr like mara-matnr,
p_matkl like mara-matkl.
START-OF-SELECTION.
*1. some additional logic applied to the report Z1.
* ...
*2. get Z1 parameters and select-options
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = sy-cprog
TABLES
SELECTION_TABLE = SELTAB
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*3. submit Z2 with Z1 parameters and select-options submit Z2 WITH SELECTION-TABLE seltab.
* note: no sy-subrc check is needed
RS_VARIANT_CONTENTS - checks whether any parameters or select options of the variant have changed.
If they have, it outputs an error message (variant obsolete).
Input: report/variant;
Output: variant contents
Code:
parameter: p_varint like vari-variant. "variante
data: i_variant like rsparams occurs 0 with header line.
ranges: r_peps for prps-posid.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
REPORT = 'RKPEP003'
VARIANT = p_varint
TABLES
VALUTAB = i_variant.
loop at i_variant where selname = 'CN_PSPNR' and kind = 'S'.
clear r_peps.
r_peps-sign = i_variant-sign.
r_peps-option = i_variant-option.
r_peps-low = i_variant-low.
r_peps-high = i_variant-high.
append r_peps.
endloop.
if r_peps is initial.
write:/ 'No se ha seleccionado ninguna PEP'.
endif.
RS_COPY_SELECTION_SETS - Copy all variants from one report to another report
RS_REPORTSELECTIONS_INFO - Returns list of selection screen parameters and select-options, including default values
RS_VARIANT_INFO - Returns list of variants for report(s), additional selection criteria allowed
RS_VARIANT_TEXT - Returns variant short text
RS_SUPPORT_SELECTIONS - Assigns the variant values to a loaded report
RS_VARIANT_CATALOG - Standard pop-up window to select a variant for the report
RS_VARIANT_LIST - Maintain report variants:
STATUS=LIST to Display|Delete|Print
STATUS=LIS1 to Choose
RS_CHANGE_CREATED_VARIANT - Modification of a variant without processing the selection screen.
In the table VARI_CONTENTS, you must supply all select-options and parameters of the variant with values. Any selection criteria missing from this table are set to their initial values in the variant. If no value is specified for the structure description (parameter VARI_DESC), all fields - except the name of the last user to make the change, the time of the change, the version and the language - are set to their initial values. The table VARI_TEXT is optional.
RS_SUBMIT_INFO - Gives information about the mode of the current SUBMIT is report sel.screen processing under run|print|variant maint|submit via job etc.?
RS_COVERPAGE_SELECTIONS - Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out.
ENQUEUE_ESFUNCTION - Lock an abap program so that it cannot be executed.
GET_GLOBAL_SYMBOLS - Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
GET_INCLUDETAB - Returns a list of all INCLUDES in a program
RFC_ABAP_INSTALL_AND_RUN - Runs an ABAP program that is stored in the table PROGRAM when the MODE = 'F'. Table WRITES contains the ouput of the program. Allows you to run a program without having the source code in the target system.
RPY_TRANSACTION_READ - Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
RS_HDSYS_CALL_TC_VARIANT - Call transaction with variant
Code:
DATA: l_tcvariant TYPE shdtvciu-tcvariant,
l_xtcvariant TYPE shdtvciu-tcvariant,
tcode TYPE sy-tcode,
l_xclientind,
l_rc TYPE sy-subrc.
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.