‎2009 Feb 24 5:20 AM
Hi abapers,
I got 10 records in table with 5 fields i need to validate each record and field.
Can any guide me in this scenario
‎2009 Feb 24 5:24 AM
Hi abapers,
I got 10 records in table with 5 fields i need to validate each record and field.
Can any guide me in this scenario
Hi Jansi,
Are talking of internal table or table control in module pool?
If an internal table, then logic should be as follows:
****If you want to validate data with master data, then get master data for this data.
****Then loop at internal table and apply validations.
LOOP AT itab.
Apply Master Data Validations or Business Validations Here
ENDLOOP.
Let me know your requirement in details.
Regards,
Anil
‎2009 Feb 24 5:24 AM
Hi abapers,
I got 10 records in table with 5 fields i need to validate each record and field.
Can any guide me in this scenario
Hi Jansi,
Are talking of internal table or table control in module pool?
If an internal table, then logic should be as follows:
****If you want to validate data with master data, then get master data for this data.
****Then loop at internal table and apply validations.
LOOP AT itab.
Apply Master Data Validations or Business Validations Here
ENDLOOP.
Let me know your requirement in details.
Regards,
Anil
‎2009 Feb 24 5:24 AM
Hi:
You question is little bit uncleared. Anyway please put your table under loop and mention the condition for validation.
Regards
Shashi
‎2009 Feb 24 5:24 AM
‎2009 Feb 24 5:25 AM
hiii
if only 10 records are there in your table then you can get one by one record using index ..then take field value in variable and use following query
SELECT SINGLE matnr
FROM makt
INTO w_matnr
WHERE matnr = w_matnr.
IF sy-subrc NE 0.
WRITE:
'Invalid Material'.
ELSE.
WRITE:
'Valid Material.'.
regards
twinkal
‎2009 Feb 24 5:30 AM
i think u r asking about modulepool,
in flow logic, after PBO module
loop at table control.
chain.
validation conditions
endchain.
endloop.
‎2009 Feb 24 5:32 AM
hi ambar,
i got the date into internal table after uploading from presentation server,i need to validate the data for all the fields.
‎2009 Feb 24 5:52 AM
one thing still you didn't confirmed whether it is a modulepool or a report
your scenario is littlebit confusing,
if u have data in internal table, validate that data using select statements
if u have data in table control of module pool, then go for chain&endchain.
‎2009 Mar 23 9:01 AM
i got the answer
the scenario i need to validate until all the data is correct first validation after uploading which we handle in pai second validaion after modifying data which we do in data_changed method.
Edited by: Jansi Dorai on Mar 23, 2009 10:01 AM
‎2009 Mar 23 9:10 AM
Hi Jansi,
If you wanna get the records by validating each..you can use 'WHERE' condition in 'SELECT' query.
for example:
DATA: begin of itab occurs 0,
bookid type z12_exam1-bookid,
bookname type z12_exam1-bookname,
bookprice type z12_exam1-bookprice,
end of itab.
SELECT bookid
bookname
bookprice
FROM z12_exam1
INTO table itab
WHERE bookid = 'B001'.
LOOP at itab.
write:/ itab-bookid , itab-bookname , itab-bookprice.
ENDLOOP.
above one is one kind of example without using parameters and select-options.
Regards
Rama Krishna G
‎2009 Mar 23 9:17 AM
hi rama,
I have done the validation already,When i was coding i had a doubt once first time it is validated,when the user is modifying using editable alv,i was having doubt where to validate.so i have handled it in data_changed event.this now i have posted as to make abapers aware about this if anybody has faced this issue