Example 1: Submitting a report using ranges for select-options
* Define range for ltak-tanum
RANGES: r_tanum FOR ltak-tanum.
* Read values from database tabel into the range
* These values are later used for select-options in the report
SELECT * FROM ltak
WHERE lgnum = w_lgnum AND "Warehouse number/complex
vbeln = w_screen1000-io_vbeln. "Transfer order number
MOVE ltak-tanum TO r_tanum-low.
MOVE 'I' TO r_tanum-sign.
MOVE 'EQ' TO r_tanum-option.
APPEND r_tanum.
ENDSELECT.
* Submit report with range
SUBMIT zmm00100 WITH p_tanum IN r_tanum.
Example 2: Submitting a report from ABAP with selection criterias
TYPES: tt_selection TYPE STANDARD TABLE OF rsparams.
DATA: l_iblnr TYPE st_iblnr,
* Define internal table and work area for select-options
l_selection TYPE rsparams,
li_selection TYPE tt_selection.
* Create selectIon table
LOOP AT gi_iblnr INTO l_iblnr.
CLEAR l_selection.
l_selection-selname = 'IM_IBLNR'. "Option name
l_selection-kind = 'S'. "S= select options P=Parameters
l_selection-sign = 'I'. "Sign
l_selection-option = 'EQ'. "Option
l_selection-low = l_iblnr-iblnr. "Value
APPEND l_selection TO li_selection.
ENDLOOP.
* Submit report
SUBMIT rm07idif WITH SELECTION-TABLE li_selection AND RETURN.
ABAP,ABAP report,Interactive Report,ALV grid,ALV list,IDOC,User Exit,RFC,Smartform,sapscript,ABAP Performance,Remote Function Module( RFC ),Function Module,Modularization techniques,ABAP tools,ALV report Generator,ABAP Interview Questions,BDC,BAPI,ALE,BADI, EDI,InternalTable,DataStructure,LSMW,Domain,DataElement,Basis and Administration ,ABAP HR development,ABAP Debugger,BW,ExceptionHandling,Download FI, CO, MM, PP, SD, PM, PS, QM, SM, HR, BW, APO,ABAP Tutorial
Search on this Website
Friday, December 7, 2007
Submitting another report using select-options or ranges
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment