Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP QUERY With own coding part

Former Member
0 Kudos
737

HI Friends,

What is free coding part section...Could please any body tell about coding part section(event) like

1.Start -of -selction

2.top.of page.

3.Intialization

4.Record processing

5.End of selection(before list)-->when this event is triggered

6 End of selection(after list)-->when this event is triggered

7.<b>free coding</b>

please explain clearly....what is usage of the events

Thanks & regards

Mani R

9 REPLIES 9

Former Member
0 Kudos
140

Free coding is an event in SAP Query

Whateven code you have place in free coding will be trigerred after all the events are done..

0 Kudos
140

Hi Abhay Chauhan ,

Thanks for ur reply.....but got error in query...info set have no error suscessfully generated..... please explain all events.....

please tell me......

Thanks & regards

Mani R

0 Kudos
140

Can u tell me the error...

If you care coding anything in any of the events u have mentioned.. amke sure you declare that variable in data declaration part.

<b>info set have no error suscessfully generated</b> this particular message is not an error, if any error is encountered then the infoset wont be generated...

If the infoset is generated then there is no error in infoset...

Sometimes some warning messages will be given by the system whne generating the infoset... that wont craete any problem..

I hope now its clear...

Please reward points if helpful.

0 Kudos
140

hi,

Thnaks for ur reply.......that error is "Statement is not access".when i execute the query this error will be generated....i coded on free code event......

please tel me....

Thanks&regards

Mani R

0 Kudos
140

Y dont you debug the query?

run your query and then go to se38, u will get the report name for the query...

go to the code put a break poing and debug

0 Kudos
140

hi,

Thanks for ur frequent reply...My requirement is ...i want to extract data from sap to text file with pipeline delimitation...so i included code for that requirment(in event free code)... But abap query propose the systax error "statement is not acessible"

<b>if abap query will do that process(pipeline delimitation) means how or not means why?</b> please tel me....

if it use useful i will assigh reward points....please

Regards

Mani R

0 Kudos
140

hi,

Thanks for ur frequent reply...My requirement is ...i want to extract data from sap to text file with pipeline delimitation...so i included code for that requirment(in event free code)... But abap query propose the systax error "statement is not acessible"

<b>if abap query will do that process(pipeline delimitation) means how or not means why?</b> please tel me....

if it use useful i will assigh reward points....please

Regards

Mani R

0 Kudos
140

Hi Mani,

Free-coding is codes you put in after the function module's endfunction.

function <>

...

endfunction.

( this is where you put free coding, this code you put here should be form...endform. other codes will generate syntax error)

Cheers.

Former Member
0 Kudos
140

The events are similar to events inabap pgm .

More Info :

SAP Query (S): Code area

In an InfoSet you can define a coding that is transmitted to the generated query program. In this, you must choose between various coding areas, each according to the program run:

DATA Coding

Global data declarations; always transmitted

START-OF-SELECTION / END-OF-SELECTION / TOP-OF-PAGE

Correspond to the time of the same name when the list is processed. (sometimes have no meaning when using output over the list viewer)

GET / GET LATE

Only with InfoSets using logical databases. The assignment to one

section of the logical database is necessary here. Only tables on the access path are addressed here.

Record processing

Corresponds to the GET coding with InfoSets without a logical database. As there is no hierarchical view of the data, all the join tables are addressed.

Free Coding

This coding area is added at the end of the query program. You can define FORM routines here, for example, which you call in the other coding areas.

Coding for evaluating additonal fields/structures.

Is only tranmitted if these fields are also used in the query.

AT SELECTION-SCREEN

Serves to execute checks in the selection screen. Selections for a logical database can also be checked.