Application Development and Automation 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: 
Read only

regarding GET and PROVIDE coding

Former Member
0 Likes
921

HI GURUS,

cud u plz explain the given statement:::::HOW does it work.

*****************************

GET pernr.

PROVIDE * FROM p0001

BETWEEN pybegda AND pyendda.

ENDPROVIDE.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
895

Hi ,

Get pernr works as select from table .

and provide * from p0001 is like

select * from p0001 .

endselect .

Please reward if useful.

8 REPLIES 8
Read only

Former Member
0 Likes
896

Hi ,

Get pernr works as select from table .

and provide * from p0001 is like

select * from p0001 .

endselect .

Please reward if useful.

Read only

Former Member
0 Likes
895

Hi ravi,

GET PERNR :

This event fills the data structures of declared infotypes with all records that exists for a personnel number.

Data selection does not delimit the records that retrieved from the database.

then provide ......endprovide:it retreives the data from p0001 table which is in between the dates pybedda and pyendda.

Read only

0 Likes
895

hi srilatha,

cud u plz explain this in a simple way,

********

the answer u have given....

This event fills the data structures of declared infotypes with all records that exists for a personnel number.

Data selection does not delimit the records that retrieved from the database.

Read only

Former Member
0 Likes
895

Hi..

GET:

Use GET to handle two types of events after submitting executable programs: Get events and events at the end of a hierarchy level of a logical database. If during a GET event a list is written, previously an automatic line feed is created.

Provide....

The statements PROVIDE and ENDPROVIDE define a loop through a statement block. In this loop, any number of internal tables itab1 itab2 ... are processed together. A single table can appear several times. For every table itab you must specify a FIELDS clause. After FIELDS you must specify the character * for all components or a list comp1 comp2 ... for specific components of the relevant table. The names of the components comp1 comp2 ... can only be specified directly.

Suresh

Read only

Former Member
0 Likes
895

hi Ravi,

Consider the following example:

tables:
      PERNR.
Infotypes:
      0001,
      0002.

get pernr.
     provide * from p0002 between pn-begda and pn-endda.
            write......
     endprovide.

The GET PERNR statement, pulls all records corresponding to a

personal number from infotypes 0001 and 0002, to internal tables P0001

and P0002 respectively(P0001 and P0002 are not declared in our program,

but they exist in the <b>logical database PNP</b>. There can be multiple

records in these infotypes for a singel pernr, based on BEGDA

and ENDA (validity period).

So <b>Provide...Endprovide</b> is used to loop through these records, one by one..(<b>provide..endprovide</b> can be replace with <b>loop at p0002..endloop</b> statement as well).

Hope this helps,

Sajan Joseph.

Read only

Former Member
0 Likes
895

Hi ravi,

the answer u have given....

This event fills the data structures of declared infotypes with all records that exists for a personnel number.

Data selection does not delimit the records that retrieved from the database.

it means:

it fills the internal table p0001 with records that exists in the pernr

Read only

Former Member
0 Likes
895

Hi ravi,

The GET PERNR statement retrieves all records from the infotype 0001 to the internal table p0001