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

Read and verify data from internal table

Former Member
0 Likes
544

Hi All,

Im new to abap .Could anyone help me on below of my queries with some code supported for my references.

Internal table : i_input

Company Code (prps-pbukr)

WBS element(prps-pspnr)

1) Check If any columns in upload file without any values, if yes display errors message with the column name.

2) If above found an errors. How to remove the data from the internal table (i_input) before i proceed with verification on WBS and company code.

3) Validate the wbs element & company code in table PRPS if it is exist.

if not, display errors message like - XXX WBS does not exist and

- XXX company code does not exist.

Thanks in advance.

2 REPLIES 2
Read only

Former Member
0 Likes
497

Hi,

If you are using file upload use the method GUI_UPLOAD of the class CL_GUI_FRONTEND_SERVICES.

Then you will get the data into internal table that you have declared in your program.

Then loop at the internal table and check record by record for the conditions you are having.

Delete the record which you want by using the statement DELETE TABLE .....

Hope this helps.

Read only

Former Member
0 Likes
497

Hi,

2) SORT i_input by company code.

DELETE i_input where company code eq space.

DELETE i_input where wbs eq space.

In above statement empty data records will get removed .So no need of raising error messages.