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.
Showing results for 
Search instead for 
Did you mean: 

Input on

Former Member
0 Kudos

hello all,

i am using input on command,after we enter the input data in list, this data can be used for reprocessing.

Ex: i am displaying list,internal table contains this that one field is input enable(input on),after entering the data in field , i want process the itab again with data entered in that field.

can any one suggest me.



0 Kudos

Hello Srinivas

In my opinion there are never any good reason for using "input on" - its a trap made by SAP to tempt inexperienced programmers to make bad programs.

If you want input from user you should write a modulepool with dynpros instead of a report.

Anyway this is some of the things you have to do:

1) After the user entered data in your field your users have to enter a user command via push-button, function key, menu or other.

2) You catch the user command with "at user-command" or "at line-selection".

3) You read the input from screen with "read line"

With the "read line" command you read a line from the list as a text string - you have to find the position of your field in this string an validate the input yourself - there is no automatic validation of numeric fields format, date format etc.

You also have to make your own system to identify what line in the list was updated and what record in the internal table this list line is connected to. For this you will find the "hide" command usefull.

Finally I will repeat there are no good reason to try to program all the above - most of it is much easier and secure if you create a dynpro/module pool.

Best regards

Thomas Madsen Nielsen

Former Member
0 Kudos

Hi Thomas Madsen Nielsen ,

i agree with u wht u said,but here my scenario is different,ok tell me table control can be put in a loop,

ex : i have a screen 1000. in invoice no,invoice date and vendor code. if we enter the input data in to this fields and press enter .

next screen 2000 will be come with data in table control .here some fields are input enabled user can enter the data and reprocess it. up to now it good.

but here the screen 2000 will be displayed with no of table controls ,i mean we have a field ASN_NO, and ONE VENDOR CONTAIN Number of ASN_NO'S for one day,and for one ASN_NO we have to display the po no.item no,m/l,Challan Item No.,Challan Qty,Actual Qty and so on..., in this actual qty will be input enable,and you know that one PO contain no of items,and we don't know the how many ASN_NO FOR THAT VENDOR, so that table control will be display dynamically. NUMBER OF TABLE CONTROLS DISPLAYED .

Tell me it is possible to display the no:of table controls in one screen dynamically at runtime.



0 Kudos

Hi Srinivas

Ok in this case I agree with you. With this screen design you can't use a dynpro.

I have a program just like this and I understand the problem.

However I must say: If in any way possible you should redesign the program to avoid this.

As I said - I have a program like this - and it's a nightmare to make changes to this program.

Good luck.


Former Member
0 Kudos

Hi Thomas ,

can u send me the code what u have,i tried but not getting correct output.

pl send the code to this id

Your help will be greatly appreciated.



Former Member
0 Kudos


Could you please post your code that is causing the problem.

If you need to keep your itab in sync with changes on list, you need to:


2. use a DO..ENDDO loop

3. Issue the statement READ LINE sy-index INTO <wa>

4. If sy-subrc EQ 0, modify your itab against <wa>

5. In the end, set sy-lsind = sy-lsind - 1 (to stay at current list level).

Hope this helps.

Former Member
0 Kudos

Hello Srinivas,

I have not understood your description perfectly, but I cannot accept the proposition that <i>we cannot use a dynpro in this case...</i>And that is what motivates me to make this post. From what I have understood I would like to make a few suggestions which you might want to consider.

1. The list that you want to display is likey to contain a huge number of entries, Am I right? In such a case the user would have to scroll down the list to make changes to the actual quantity. This is not a very preferable situation. Interactive lists are best suited when the amount of data displayed is less.

2. You have said that the number of table controls will be determined at run-time (dynamically). But all the table controls will have the same line-type (in other words, they will all be displaying the data from only one internal table). Is that correct ?

If yes, then it should also be true that these table controls will have some fields which change less frequently.

Now, let us say, for example, that the screen 1000 (selection-screen) has a select-options for vendor. The user is free to enter multiple vendors. If it were possible, you might want to display the data for each vendor in a separate table control. Since you cannot have a variable (dynamic) number of table controls, the other alternative (dynpro-based, good UI design) is to have a dropdown on your screen and have only one table control. The user can select a different vendor from the dropdown and you can display the data for that vendor in your table control. And if the user changes a field and selects another vendor without saving it, you can even throw a pop-up saking the user if he wants to save the data....And you can make the UI much more user-friendly with such options that you have in case of a DYNPRO....

Now, in your case, you might want to have a different parameter in the dropdown instead of the vendor.

Please tell me if I have not properly understood your requirement or if you think this solution cannot be adopted for your case.


Anand Mandalika.