Application Development and Automation 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: 
Read only

search help - problem

Former Member
0 Likes
414

Hi All,

i have created a search help with input parameters. i have a material number as a input field and other parameters as well and MARA is the selection table. When i enter material no, say XX_XXXXX* in the input field, i expect to get all the materials in that pattern in the hitlist. Problem is matnr stored in other format in MARA say XXXXXXXXXX. So its returning null entries..

how to handle this problem

Regards

Shekhar

3 REPLIES 3
Read only

learnsap
Active Participant
0 Likes
371

Hi,

For an single character wild card you need to use '+' instead of '_'. So try using + in place of _ for the wild card search. It might resolve your problem.

Regards,

Ramesh

Read only

Former Member
0 Likes
371

Hi Ramesh,

its not a single character wild card. I mean to say Matnr is stored in that format.. ex: 9C_73929922

Regards

Mahesh

Read only

Former Member
0 Likes
371

Hi Shekar..

this is sample code just copy and execute. it to set your desired result..i think it will set you requirement.

******************************

SAMPLE CODE:

-


REPORT ZGSHELP .

tables: vbak,vbap,likp,lips.

parameters: p_vbeln like vbak-vbeln.

at selection-screen on p_vbeln.

ranges: gr_vbeln for vbak-vbeln.

data: begin of gt_vbeln occurs 0,

vbeln like vbak-vbeln,

end of gt_vbeln.

data: gv_repid type sy-repid,

gv_dynnr type sy-dynnr.

gr_vbeln-sign = 'I'.

gr_vbeln-option = 'CP'.

gr_vbeln-low = p_vbeln.

append gr_vbeln.

select vbeln

from vbak

into table gt_vbeln

  • where vbeln in gr_vbeln."5000000355

where vbeln like '50000005'.

if sy-subrc eq 0.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'VBELN'

DYNPPROG = gv_repid

DYNPNR = gv_dynnr

DYNPROFIELD = 'P_VBELN'

tables

value_tab = gt_vbeln.

endif.

******************************

UR's

GSANA