‎2007 Jun 25 9:59 PM
Hi,
In my program, I have an internal table, the number of records in internal table vary depending on a condition, here I mean the number of records in internal table is not fixed. I have to display each records in an I/O field in the screen.
Now I need a step loop to be defined , which displays all the records from internal table.
So I cant define a step loop as fixed.
But if I define it as Variable, for example if my internal table has only 10 records, there are 40 I/O fields displayed in the screen in which 10 I/O fields are filled with the data from internal table, is there any way to avoid the blank I/O fields.
i.e. if my internal table has 20 records only 20 I/O fields with data should be displayed, if it has 30 then 30 I/O fields should be displayed.
Please provide me a solution.
Thanks,
Sridhar
‎2007 Jun 26 3:48 AM
Hi,
You can try in PBO if the field has no value, then use screen-active =1 inside loop at screen.If more fields are required,use some buttons to make the field as visisble in PAI.That if the button is clicked,
loop at screen.
if screen-name eq 'XYZ'.
screen-active = 0.
modify screen.
endif.
endloop.
‎2007 Jun 26 3:37 AM
Hi Sridhar,
Use <b>Table control</b>.
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm">Table control</a>
Rgds,
Jothi.P
‎2007 Jun 26 3:48 AM
Hi,
You can try in PBO if the field has no value, then use screen-active =1 inside loop at screen.If more fields are required,use some buttons to make the field as visisble in PAI.That if the button is clicked,
loop at screen.
if screen-name eq 'XYZ'.
screen-active = 0.
modify screen.
endif.
endloop.
‎2007 Jun 26 3:59 AM
Hi Sridhar,
I have done same kind of requirement ,You can write the code in PBO.
use describe command to get number lines in internal table,now use that value in PBO -> this should pass to Step Loop ,Right now i am not system,I will send you the exact logic what i written.
Thanks
Seshu
‎2007 Jun 26 4:19 AM
Hi Sreedhar,
User describe command to increase the lines of step loops.
DESCRIBE TABLE lt_invmov LINES fill.
tabctrl2-lines = fill.
Regards,
Line
‎2007 Jun 26 4:27 AM
Hi All,
Thanks for your inputs, please provide me an example program, either paste the code or mail the code to write2sridhar@gmail.com.
Thanks,
Sridhar
‎2007 Jun 26 6:35 PM
Hi All,
Thanks for your inputs, the issue is solved.
Thanks,
Sridhar