Tuesday, October 19, 2010

Data Retrieval Using Program in abap query

Retrieving Data Using Program
Sometimes a situation arises when an ABAP query’s automatic data retrieval facility is not enough to get the desired results. In that case, the steps up to creating the functional area are the same. Only difference is that on the Title and Database screen specify a structure in the field Table and select the field Data Retrieval Using Program.
The default report name given by the system can be overwritten.
This report needs to be defined before hand – because it is used as a model while generating the query report. Thus the report itself remains unchanged but based on that another one is created.
Note: Ensure that the report is free of syntax errors and has the same fixed point arithmetic settings as the functional area.
General Format Of the Report
A typical report of this type will have the following format:
Report .
Tables: .
Parameters: .
Select-options: .
Data: <>.
* This comment should always be after data declarations.
Beginning of a loop to retrieve each record and place it in the field string tab.
Select, do-enddo, loop, etc.
.
* This comment should always be the last statement in the loop.
At this stage the data will come into the field string.
Endselect, enddo, endloop.

No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites