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

include program

Former Member
0 Likes
556

Hello,

can we write as follows

AT SELECTION-SCREEN.(this is in main program)

&----


***Include program for custom at selection screen

*&----


&*

INCLUDE zhrtiratsel.

And in include program.

SELECT SINGLE pernr

FROM pa0105

INTO p0105

where usrid = sy-uname.

like as above can we retrive data or not?

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
533

Yes you can do that but you need to put your internal table definition in another include so it can be used everywhere. Else, use a subroutine for the same.

Regards,

Amit

Read only

Former Member
0 Likes
533

Write as below ...

INCLUDE zhrtiratsel.

AT SELECTION-SCREEN.(this is in main program)

&----


***Include program for custom at selection screen

**&----


&

Perform get_data.

Write this in the include zhrtiratsel.

form get_data.

SELECT SINGLE pernr

FROM pa0105

INTO p0105

where usrid = sy-uname.

endform.

Read only

Former Member
0 Likes
533

hi

good

yes you can do like this to fetch the data using the include.

thanks

mrutyun^

Read only

Former Member
0 Likes
533

Hi,

Yes you can.

Thanks,

Sriram Ponna.