Академический Документы
Профессиональный Документы
Культура Документы
Community WIKI SAP Community Welcome, Guest Login Register Search the Community
ABAP Query
Created by Mohamed Azharuddin, last modified by Smruti Ranjan Mohanty on Oct 09, 2013
ABAP/4 Query is a pow erful report to generate simple reports. Mainly, there are four different w ays to define data source in ABAP/4 query.
This document describes how ABAP/4 Query retrieves data using an External program.
In order to create an ABAP query , one has to do the follow ing.
then
Error rendering macro 'code': Invalid value specified for parameter 'lang'
REPORT ZEXAMPLE.
TABLES: BKPF, ZEG_STRUCT.
DATA : BEGIN OF ITAB OCCURS 0,
BELNR LIKE BKPF-BELNR,
GJAHR LIKE BKPF-GJAHR,
MONAT LIKE BKPF-MONAT,
BUKRS LIKE BKPF-BUKRS,
END OF ITAB.
SELECTION-SCREEN BEGIN OF BLOCK INPUT WITH FRAME TITLE TEXT-T01.
PARAMETERS: P_CODE LIKE BKPF-BUKRS.
SELECTION-SCREEN END OF BLOCK INPUT.
*Query head
<Query_head>
Error rendering macro 'code': Invalid value specified for parameter 'lang'
START-OF-SELECTION.
SELECT BELNR GJAHR MONAT BUKRS FROM BKPF INTO TABLE ITAB
WHERE BUKRS = P_CODE.
LOOP AT ITAB.
CLEAR YOUTPUT_STRUCT.
MOVE ITAB TO YOUTPUT_STRUCT.
ENDLOOP.
Query body
<Query_body>
Save and Activate this report. Then go to SQ02 transaction to create an infoset. Infoset ->Generate. Go to SQ03 to create a user group. Enter user group name and click on Create button.Enter
description and save it in your development class.In the next screen , click on 'Assign Infosets' button. Here you select the infoset that you have created as show n below and save it. Go to SQ01.
Select the user group that you have created. Then enter the query name and create. It w ill show the list of infoset that you have created. Choose the infoset you w ant. Choose BasicList Button In
the right side of the screen you adjust the output field w idth, background color etc.Go back and select the menu option Query -> Generate Program.Then Execute this Query.
No labels
https://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Query 1/1