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: 

Table-Control : Entry gets wiped off

Former Member
0 Kudos

In my screen program I have used a table-control to let the user enter a record.While entering the data the "Tab" works well to move to different fields of the table-control and the data gets saved also.

But after entering the record and without saving if I press the Enter key, the whole entry gets wiped off.

How to overcome this please suggest.

Alok

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Alok,

In module programming, there are cases when the values get cleared when they are passed from Screen to abap program. To overcome this, point your screen fields to a work area / header line. In the PAI, have the following code :

CASE SY-UCOMM.

WHEN ' '.

**now append the workarea (screen contents) to internal table

ENDCASE.

If it still gets cleared, read the entries from the internal table in your pbo. Also make sure that your code in the flow logic is correct -- u'll have to loop thro the internal table alongwith the table control. If you're still not convinced, send me the code and i'll do my best.

Regards

5 REPLIES 5

Former Member
0 Kudos

Hi Alok,

Put a break point in PAI at case statement where you are checking the function code and check out are you able to reach the point when you press enter.

reagrds,

Kiran I

gopi_narendra
Active Contributor
0 Kudos

Make sure u use the modify statement in the PAI of the table control module

for reference see the program related to table control.

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

Regards

- Gopi

Former Member
0 Kudos

Hi Alok,

My guess would after the loop end loop.

you are inserting the recort into internal table when sy-ucomm eq 'SAVE'.

BUT WHEN YOU ENTERING IT THE RECORD IS NOT INSERTED IN TO THE INTERNAL TABLE.

PLS DO POST THE CODE IF YOU NEED FURTHER ASSISTANCE,BECAUSE ALL IAM DOING IS JUST TAKING A GUESS.

thanks

0 Kudos

Dear Venki,

Thanks for responding to my query.

That's not the case dear. My data is getting saved in my table if I 'save' the entry without pressing 'Enter'. But before saving if I press the ENTER, the entry gets wiped off from the table-control.

Please have a look at DEMO_DYNPRO_TABCONT_LOOP. In this demo program also if you add a new entry in the table control and press 'Enter' before actually saving, the entry gets cleared from the table control. It's the same scenario.

In waiting from your reply.

If possible give me your phone no. so that I communicate to you in a better way.

Regards,

Alok.

Former Member
0 Kudos

Alok,

In module programming, there are cases when the values get cleared when they are passed from Screen to abap program. To overcome this, point your screen fields to a work area / header line. In the PAI, have the following code :

CASE SY-UCOMM.

WHEN ' '.

**now append the workarea (screen contents) to internal table

ENDCASE.

If it still gets cleared, read the entries from the internal table in your pbo. Also make sure that your code in the flow logic is correct -- u'll have to loop thro the internal table alongwith the table control. If you're still not convinced, send me the code and i'll do my best.

Regards