Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Fetching records from PA0001 table using field SNAME

Dear Gurus,

I suppose to make a web service using FM which take input of name and in return, deliver all information about that name from PA0001 and PA0002. How can i do this?

For example: There are 2 record of names "ABC XYZ" and "ABC EFG" in PA0001. Field is SNAME in PA0001. But it can only bring record if we give full name to field SNAME like "ABC XYZ". But i want that if user enter just "ABC" it bring all records that have name "ABC". I mean if i pass just "ABC" to field SANAME, it should bring  "ABC XYZ" and "ABC EFG".

how can i write a select query for this purpose. I tried using this but it does not work.

select * from PA0001 into CORRESPONDING FIELDS OF TABLE itab

   where SNAME = ' *ABC* ' .

How can i do this? Kindly help.


Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question