12-15-2006 8:04 AM
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
12-16-2006 5:54 AM
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
12-15-2006 8:45 AM
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
12-15-2006 8:49 AM
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
12-15-2006 3:33 PM
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
12-16-2006 5:36 AM
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.
12-16-2006 5:54 AM
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