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

retain posnr values

Former Member
0 Likes
823

Hello Experts,

have designed a table control where i need item line in the range from 10 to 300.

I have written this on PBO.

But my issue is :

I get these item lines from 10 to 300 in this column.

If suppose a user enters a material number on item line 30 after 10 than item line 20 should get deleted.

So in my PAI in my loop at itab I delete itab when matnr eq space.

But what happens is that even the item line from 10 to 300 gets cleared when i delete the internal table of table control but I want to retain these item lines in my table control and later on delete it.

Thanks and Regards,

Nikhil.

Hello Experts,

have designed a table control where i need item line in the range from 10 to 300.

I have written this on PBO.

But my issue is :

I get these item lines from 10 to 300 in this column.

If suppose a user enters a material number on item line 30 after 10 than item line 20 should get deleted.

So in my PAI in my loop at itab I delete itab when matnr eq space.

But what happens is that even the item line from 10 to 300 gets cleared when i delete the internal table of table control but I want to retain these item lines in my table control and later on delete it.

Thanks and Regards,

Nikhil.

6 REPLIES 6
Read only

Former Member
0 Likes
781

Hi

Before deleting from your table control internal table, store the data in a temporary table (global declaration) and every time you refresh your module pool screen, the temporary table data should be transferred (in the PBO) to the table control itab. Refresh the temp table.

Let me know if this is clear.

Thanks

Sourav

Read only

0 Likes
781

Hi Sourav,

Not clear mate which temp table you are saying.

Can you explain me in detail which screen or internal table I have refresh.

Thanks,

Nikhil.

Read only

0 Likes
781

Hi

You are deleting the entries from your internal table. But you would also like to store that data fro future use. Right.

In that case what you need to do is create a temporary table of the same structure as of your internal table. Before deleting the entries from the main itab. move the data to this temp table.

And use this temp internal table as ur main table whenever u call back the screen.

Next time when u again delete, first refresh the itemp, assign the values of main itab and then the same way.

PAI....
if not itemp[] is initial.
  itab[] = itemp[].
  refresh itemp.
endif.
module delete.

module delete.
 itemp[] = itab[].
 delete itab...
endmodule.

Check and let me know if this works.

Thanks

Sourav

Read only

0 Likes
781

Hi Sourav,

I tried your logic but it doesnt work.

The problem what I am facing is the enduser should not fill up the item lines manually in table control.

If suppose the user doesnt write matnr for item line 20 after writes for10 and than for 40 than in my table control should have rows like 10 than 40 and the rest follows.

Hope you understood what I meant to say..

Thanks,

Nikhil.

Read only

0 Likes
781

Hi Nikhil,

I think I understood your point. For any line in your itab, if the user doesn't input the value for MATNR, that line should not be displayed. Am I rite.

in this case the logic I mentioned above should work.

In PAI, you have to write this code.

itemp[] = itab[].
DELETE itab where matnr is space.

and then display your table control. Once the user do something and then again press some button or ..., then in the PBO itself you can assign the temp data to your main itab. In that way, every time the original data will be processed.

Thanks

Sourav

Read only

0 Likes
781

Hi Sourav,

Still not working may be i need to find some other solution anyways thanks for your help man.

Thanks,

Nikhil.