Application Development and Automation 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: 
Read only

Table control

Former Member
0 Likes
943

I have problem with table control. When user fill field and press enter field is cleared. Table control is made with wizard

Message was edited by:

Aleksic Slobodan

10 REPLIES 10
Read only

Former Member
0 Likes
918

u need to modify the internal table in PBO and display the internal table.

Read only

Former Member
0 Likes
918

HI,

You need to write the code for this one, what ever the user enters in the table control, we normally fill up in a internal table, so fill the internal table with the values which the user enters in the table control.. and in PBO pass it back to the table control .....

Regards

Sudheer

Read only

Former Member
0 Likes
918

I have code in PAI which call method on chain :modify it_table .

modify IT_OUTPUT

from WA_OUTPUT

index RACUNI-current_line.

When I go to debugger i see wa_output, but it_output not update.

Read only

Former Member
0 Likes
918

I found solve for this problem but this slove is not happy. When user click insert row value in field stay.

Read only

0 Likes
918

Hi ,

THE PROBLEM IS TO DO WITH CHAIN ENDCHAIN

YOU HAVE ALL YOUR FIELDS IN BETWEEN THE CHAIN ENDCHAIN.

WHEN THE USER PRESS ENTER ALL THE FIELDS WHICH ARE AFTER THE PROCESSING FIELD IN pai would get there value deleted.

LET ME KNOW

IF POSSIBLE POST THE CODE.

THANKS

VENKI

Read only

0 Likes
918

This is my PAI code on the subscren 102.

PROCESS AFTER INPUT.

*&spwizard: pai flow logic for tablecontrol 'RACUNI'

loop at IT_OUTPUT.

chain.

field WA_OUTPUT-BROJPL.

field WA_OUTPUT-BROJST.

field WA_OUTPUT-BELNR.

field WA_OUTPUT-REFERENCA.

field WA_OUTPUT-IZNOS.

field WA_OUTPUT-SIROVINA.

field WA_OUTPUT-JM.

field WA_OUTPUT-CENA.

field WA_OUTPUT-UGKOL.

module RACUNI_modify on chain-request.

field WA_OUTPUT-CHECK

module RACUNI_mark on request.

endchain.

endloop.

module RACUNI_user_command.

this is module.

module RACUNI_modify input.

MODIFY IT_OUTPUT

from WA_OUTPUT

index RACUNI-current_line.

endmodule.

module RACUNI_mark input.

data: g_RACUNI_wa2 like line of IT_OUTPUT.

if RACUNI-line_sel_mode = 1

and WA_OUTPUT-CHECK = 'X'.

loop at IT_OUTPUT into g_RACUNI_wa2

where CHECK = 'X'.

g_RACUNI_wa2-CHECK = ''.

modify IT_OUTPUT

from g_RACUNI_wa2

transporting CHECK.

endloop.

endif.

modify IT_OUTPUT

from WA_OUTPUT

index RACUNI-current_line

transporting CHECK.

endmodule.

*&spwizard: input module for tc 'RACUNI'. do not change this line!

*&spwizard: process user command

module RACUNI_user_command input.

OK_CODE = sy-ucomm.

perform user_ok_tc using 'RACUNI'

'IT_OUTPUT'

'CHECK'

changing OK_CODE.

sy-ucomm = OK_CODE.

endmodule.

Read only

0 Likes
918

Hi,

I guess this should solve your problem for definite.

Remember this when ever you are table control with wizard TO MAKE THE FOLLOWING CHANGES..

Make the following changes and it will work

MODULE RACUNI_MODIFY." ON CHAIN-REQUEST.

module RACUNI_modify input.

MODIFY IT_OUTPUT

from WA_OUTPUT

index RACUNI-current_line.

if sy-subrc ne 0.

insert WA_OUTPUT INTO IT_OUTPUT index RACUNI-current_line.

endif.

endmodule.

check the syntax of inserting from wa.

i guess iam correct with the syntax

REWARDSS POINTS IF HELPFUL

tHANKS

VENKI

Read only

Former Member
0 Likes
918

hi, Welcome to SDN....

When you do it with Wizard, check out for Refresh/Clear statements in PBO and comment it,

Regards:-

Santosh.

Read only

0 Likes
918

I'm run program in debugger and found module where wa_output fills it_output and sy-subrc is 4. I don't know why is that happened, because structure it_output is equal wa_outuput and index = 1.

Read only

0 Likes
918

Hi,

I don't whther this the bug with table control and my opinion is that when you have the vertical scroll bar this issue arises.

you have loop endloop in pai right.

when you do validation for each field between loop end loop.

if have 20 records in itab and in your screen you can see 100 records ata time,for next 10 ten records you have pull the scroll bar right

at anytime the loop runs for only 10 times even though you have 20 records starting from 1 to 10 or 2 to11 or 11 to 20,

say its from 1 to 10 and if 11 record is wrong and you have error mess for that but it wont display until you move the scroll bar.

even the validation should be done out side the loop if you have scroll bar but gain the user would be confused because you cannot see the record because he can see only 10 records at a time and again in your sytem the loop may run for 10 and the same program in my screen it would run for 14 times . i don't the reason behind and i have faced this problem a while ago and after through reseracha nd with the help of others and complaints from users i recognised this .

Hope this should be helpful

Thanks

VENKI