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: 

Module Pool with Table Control.

Former Member
0 Kudos

Hi,

I have developed two screens .

in the first screen the user enters the data and press the Next Push button then

in the second screen it should display data in the table control.

For that purpose I have written code.

when the user press Next Button then I wrote like this.

case ok_code.

when 'NEXT'.

CALL SCREEN '9001'.

ENDCASE.

AND In the PBO Event of the Screen 9001 I have written a Function Module to Popup the data

in the table control.

But the problem is when the user press the Next Button it is displaying table control without

data. But when the press the Back button and again he press the Next Button then it is displaying.

So, Where is the Problem ?

How can I correct it ?

Bye,

Satya.

1 ACCEPTED SOLUTION

former_member491305
Active Contributor
0 Kudos

Hi,

I think you are fetching the data into the internal table after the loop pass for the table control in PBO event.Make the data fetching before the loop pass in table control.

Process Before Output.

Module fetch_data.

Loop at itab with control tc cursor tc-current_line.

Endloop.

4 REPLIES 4

former_member491305
Active Contributor
0 Kudos

Hi,

I think you are fetching the data into the internal table after the loop pass for the table control in PBO event.Make the data fetching before the loop pass in table control.

Process Before Output.

Module fetch_data.

Loop at itab with control tc cursor tc-current_line.

Endloop.

0 Kudos

Thank U Very Much.

My Problem has been solved.

Bye,

Satya.

Former Member
0 Kudos

u should display the data when the user presses the NEXT button. so, write code to select data in PBO and display the data when user presses NEXT button...

Former Member
0 Kudos

Hi

IN PAI

case ok_code.

when 'NEXT'.

select the data into an internal table using the entered fields in the first screen.

so data is there in ITAB.

CALL SCREEN '9001'.

ENDCASE.

in PBO.

between loop..

MOVE the internal table data to the table control fields

endloop.

see the help for TC

syntax:

CONTROLS .

if you only want to determine the row of the table control. SY´-SUBRC allows you to check if the cursor is placed in a row of a table control.

u need to comment the performs of table control fields and write ur own perform statements. And u have to declare the table control fields as separate internal tables.

Go through this urls.

www.saptechnical.com

www.sap-img.com

Check the below links.

http://www.planetsap.com/howdo_a.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm

http://sap.niraj.tripod.com/id25.html

Reward points for useful Answers

Regards

Anji