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

how to read particular record in lsmw

Former Member
0 Kudos

hi, i have problem reading record in lsmw. I have 10 record in flat file i want to read 1 to 5 records and 8 to 10 records. No need to read 6 and 7th records what is the solution please guide me.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

u can do one thing..in the step "Maintain Field Mapping and Conversion Rules" define a counter in __GLOBAL_DATA__ section and in __BEGIN_OF_RECORD__ event increment the counter. And then in the same event check the counter value and based on the counter value decide whether u want to do the processing or not. If u do not want to process the record then use CONTINUE statement to skip the current record and goto the next one.

6 REPLIES 6

Former Member
0 Kudos

enter the which records you want in the READ DATA ---> Transaction number like select parameters...

0 Kudos

thanks for your reply. Yes i can give 1 to 5 records or 8 to 10th records. i want to read both the record rang at a time how i can give.

Former Member
0 Kudos

u can do one thing..in the step "Maintain Field Mapping and Conversion Rules" define a counter in __GLOBAL_DATA__ section and in __BEGIN_OF_RECORD__ event increment the counter. And then in the same event check the counter value and based on the counter value decide whether u want to do the processing or not. If u do not want to process the record then use CONTINUE statement to skip the current record and goto the next one.

0 Kudos

thanks for your reply. I want dynamic select records how i can do that.

0 Kudos

Maintain ur dynamic selection criteria in a custom table.Then read the records from it and match with the counter value...and follow the same process as mention in my earlier mail.

Former Member
0 Kudos

Hi,

Write your logic in conversion routine t oremove those records.

Regards,

Manoj Kumar P