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: 

Input Disappeared after pressing enter in table control

Former Member
0 Kudos

Hi Guru's,

I am facing one problem in adding table control on a custom development.

I create the table control through wizard , and when I am executing the report and put some values and press enter , immediately the inputted values got disappeared.

I have gone through some SDN posting on that , but the problem is still exist. I debug the program and see that in PAI , the below code

MODIFY IVBAP

FROM IVBAP

INDEX TBLCTRL-CURRENT_LINE.

is executing and it gives sy-subrc = 4.

Originally no data is inserted into table so in PBO it shows blank.

Can anyone please suggest how to solve this problem .

Thanks,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

->Restrict your code between the proper sy-ucomm values.

->Do you have some clear <internal_table> statement? See if that is restricted between proper function code values

8 REPLIES 8

Former Member
0 Kudos

Hi,

->Restrict your code between the proper sy-ucomm values.

->Do you have some clear <internal_table> statement? See if that is restricted between proper function code values

0 Kudos

Hi nitwick,

When I press enter no values comes into sy-ucomm , and I didn't use any clear statement also. Still the problem exist.

Thanks.

0 Kudos

Hi,

If you are trying to do some SAVE operation, then see to it that your relevant portions of code are restricted between sy-ucomm = 'F_SAVE'. This will not enable the code to get executed when sy-ucomm = space (i.e when you press Enter).

And please share your code.

kesavadas_thekkillath
Active Contributor
0 Kudos

how did you code in PAI loop..endloop .

former_member1245113
Active Contributor
0 Kudos

Hi

In PAI.

loop at itab.
module modify_tab.
endloop.

in Program.

module modify_tab.
describe table itab lines tc-lines.
if tc-lines > tc-current_line. " Depending on your requriment you may need to use < (Less than Symbol)
"also(Check in Debug)
append itab.  " IF a new Line is entered in the Table Control by User
else.
modify itab index tc-current_line. " IF an Existing Line is modified by User.
endif.
endmodule.

Cheerz

Ram

former_member217544
Active Contributor
0 Kudos

Hi,

Check this link. You will find the changes that you need to implement in PBO for this.

Regards,

Swarna Munukoti.

Former Member
0 Kudos

Please put the fields which are part of the table control in CHAIN... END CHAIN in the flow logic of that Screen.

Former Member
0 Kudos

Dear All,

Thanks for all of your reply.

I have checked the program and find that it is happen due to not executing of MODIFY statement initialy.

So I put the below code like

MODIFY IVBAP

FROM IVBAP

INDEX TBLCTRL-CURRENT_LINE.

IF SY-SUBRC <> 0.

APPEND ivbap.

ENDIF.

And this code solve my problem.

Thanks