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

serch help code

Former Member
0 Likes
811

I have created a serch help exit FM. Now I want to fetch record by the following logic:

If user enter MATNR on the input screen in search help tab.

corresponding Batch,plant,stor loc etc will be selected (Batch validaton are there).

Where do I write the code and how?

5 REPLIES 5
Read only

BH2408
Active Contributor
0 Likes
766

HI,

write in the FM what ever u have created and assign that to Search help.

data: it_selopt like ddshselopt occurs 0.

data: wa_selopt like line of it_selopt.

if callcontrol-step = 'SELECT'.

it_selopt[] = shlp-selopt[].

loop at it_selopt into wa_selopt.

case wa_selopt-shlpfield.

when 'BATCH'.

write logic here.

( Same like the logic )...

endloop.

endif.

Regards,

Bharani

Read only

Former Member
0 Likes
766

Thanks a lot.

I am giving my exact requirement.

MATNR (Material Number) Not mandatory field

MATKL (Material group) Not mandatory field

Batch (Batch Number) Not mandatory field

Output

Plant Storag

e loc

Material

Number

Batch

Number

Expiry

date

No of

Packs

Concent

ration

Units

When only Material number is entered on the input screen

Go to MARA table- Take MARA-MATNR and take relevant material type MARA-MTART

and come to variant table check if this is ZFE2 material type then execute the below else

stop it.

Select data from MARA table

MARA-MATNR put this in the material number column

MARA-MATKL put this in material group column

MAKT-MAKTX put this in material description column

Go to MCH1 table

Select all the batches MCH1-CHARG where MCH1-VFDAT>Today date

There are many combination.

User enters batch first also.

please explain my first logic so I can understand fully.

Thanks in advance.

Read only

Read only

Former Member
0 Likes
766

HI

My search tab will appear in some specific material type.where will I define it?

Read only

Former Member
0 Likes
766

how to populate date field in record_tab?