02-10-2010 11:23 AM
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?
02-10-2010 11:34 AM
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
02-11-2010 6:01 AM
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.
02-11-2010 6:03 AM
02-11-2010 6:57 AM
HI
My search tab will appear in some specific material type.where will I define it?
02-12-2010 10:43 AM