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

Module pool

manubhutani
Active Contributor
0 Likes
687

Hi

I have to make a button NEXt and PREVIOUS

to see the next or previous record..

Can anybody plzz tell me

Is there any standard button for this or i have to write some co for a simple button?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
669

Hi Gaurav,

There are no standard buttons.Try to create the buttons and capture the OK_CODE. Write the corresponding code to display the particular records.

Check these links.

Vey useful link:

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

Other links:

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm

Regards,

Priyanka.

5 REPLIES 5
Read only

Former Member
0 Likes
670

Hi Gaurav,

There are no standard buttons.Try to create the buttons and capture the OK_CODE. Write the corresponding code to display the particular records.

Check these links.

Vey useful link:

http://sap.mis.cmich.edu/sap-abap/abap09/index.htm

Other links:

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm

Regards,

Priyanka.

Read only

Former Member
0 Likes
669

Hi,

You need to create the NEXT and PREVIOS buttons in the Modulepool Program, and assign the OK CODE to that, and in the PAI of that screen you need to write the logic.

In the PAI.

If Sy-ucomm = 'NEXT'.

Pass the next record to the input fields

elseif SY-ucomm = 'PREVIOS'.

Pass the previos record to the input fields.

Endif.

Regards

Sudheer

Read only

Former Member
0 Likes
669

Hi Gaurav,

First tell us is your screen a selection screen or a module pool?

Ravi

Read only

0 Likes
669

Hi

Its module pool.

Read only

Former Member
0 Likes
669

Hi Gaurav,

Go to the layout and assign Function codes to the two buttons.

Lets suppose the FCode for previous button is PREV and next is NEXT.

In the PAI you have to check field sy-ucomm.

If it is PREV you read the previous data,

else read the next data.

If you are not able to follow, ask me.

Ravi.