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: 

Problem with search criteria

Former Member
0 Kudos
83

hi,

i am using the module pool program.

in the first screen i am using two fields and one table control.

1st field is:partner no.

2nd partner name.

in the table control also 5 fields.

if i enter the name in the name field,in the back end it sholud search for two fields(firstname and lastname),and get the data ,search senarios are like this.

here i am using the inner join because number and name is from different tables.

1)search only with number.

2)search only with name.

3)search with combinations(both number and name).

4)search with wild charecter.

if any one have any idea pls let me know.

4)

4 REPLIES 4

Former Member
0 Kudos
58

can you explain it more clearly...

wht is ur requirement..?

uwe_schieferstein
Active Contributor
0 Kudos
58

Hello Rammohan

If field "partner no" means the number of the <b>SAP business partner</b> (data element BU_PARTNER) then you could use search help <b>BUPA</b>.

Regards

Uwe

Former Member
0 Kudos
58

hi,

i am using two fields to search .

1) is partner number

2) partner name.

partner number has to be come from ztable,

partner name has to be come from but000.

but in the fron end only one field should be there.

if i give the input inthe front end,in the back end it has to search two fields (ex:first name and last name) and get the data.

for this i am using the inner join.

following is the code.

SELECT Fpartner FZ_CLASS_LEVEL_ID F~Z_CLASS_RANGE_ID

fZ_CLASS_TYPE_ID FSEQNO FZ_IND_SECTOR FZ_OBJID F~Z_CUP_SUB_CLASS

PNAME_FIRST pNAME_LST2 FROM Zclient_CLASS AS F

INNER JOIN but000 AS

P ON Fpartner = Ppartner

INTO CORRESPONDING FIELDS OF TABLE itab_name WHERE

Fpartner = partnerno and Pname_first in r_name. "or p~name_lst2 in r_name.

how to handle this.

0 Kudos
58

Check by changing below.

SELECT Fpartner FZ_CLASS_LEVEL_ID F~Z_CLASS_RANGE_ID

fZ_CLASS_TYPE_ID FSEQNO FZ_IND_SECTOR FZ_OBJID F~Z_CUP_SUB_CLASS

PNAME_FIRST pNAME_LST2 FROM Zclient_CLASS AS F

INNER JOIN but000 AS

P ON Fpartner = Ppartner

INTO CORRESPONDING FIELDS OF TABLE itab_name WHERE

F~partner = partnerno and

( Pname_first in r_name or pname_lst2 in r_name ).