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: 

Dialog Programin

Former Member
0 Kudos
118

Hi Gurus,

Am developing the table control in dialog programing using table control wizard for inputing the values. The problem is when i press enter in table control the screen is refreshing and the values is going disappear. To solve this problem i used the below code in PAI.

append itab.

clear itab.

The problem here is when i press enter after the first line item the next value is defaulting the previous one. How to solve this problem. Please help me regarding in this.

Points will be awarded

Regards

Ravi

1 ACCEPTED SOLUTION

Former Member
0 Kudos
98

Replace

append itab.

clear itab.

with

modify itab.

if sy-subrc <> 0.

append itab.

endif.

clear itab.

4 REPLIES 4

Former Member
0 Kudos
98

hi,

refresh the itab.

REFRESH ITAB.

Former Member
0 Kudos
99

Replace

append itab.

clear itab.

with

modify itab.

if sy-subrc <> 0.

append itab.

endif.

clear itab.

Former Member
0 Kudos
98

Hi

for each action you clear the internal table of the Table control

so that when the screen is displayed again from PBO it takes the new value and displays it.

for ENTER it is displaying the other line means you are appending the same line again into the ITAB

remove this Itab and see.

see the sample code of any std program and do accordingly

http://www.sapmaterial.com/tablecontrol_sap.html

step by step procedure with screen shots

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

Also you can see the below examples...

Go to se38 and give demodynpro and press F4.

YOu will get a list of demo module pool programs.

One more T-Code is ABAPDOCU.

YOu can find more examples there.

See the prgrams:

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

http://www.geocities.com/ZSAPcHAT

http://www.allsaplinks.com/files/using_table_in_screen.pdf

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos
98

Hi,

U write like this,

In Module Pool,

PROCESS AFTER INPUT.

LOOP AT IT_SALES1.

MODULE HOLD_DATA.

ENDLOOP.

MODULE USER_COMMAND_9701.

In Report Program,

MODULE hold_data INPUT.

MODIFY <itab[]> FROM <itab> INDEX <tabstrip name>-current_line.

IF sy-subrc EQ 4.

APPEND <itab>.

ENDIF.

ENDMODULE. " HOLD_DATA INPUT

Regards,

Padmam.