‎2008 Mar 30 5:41 AM
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.
‎2008 Mar 30 4:47 PM
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.
‎2008 Mar 31 4:49 AM
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.