2013 Apr 10 7:44 AM
Hello,
In QM01 , When we enter notification F1 , we have one material field where we enter material.
Currently list of all Materials are coming from where user has to search material corresponding to Sale Order.
Now My Requirement :
When I entered Sale Order, then corresponding to that Sale Order only Materials are available in F4 help.
Same Requirement for Batch Number Also.
PLease give me solution.
Thanks
Jyoti
2013 Apr 10 9:12 AM
Hi,
Try like this,I am giving one example.
1)At selection screen on value request for p_vbeln. "sales order.
select vbeln from vbap into table it_vbeln.
Then use Function module like this.
2)call func f4if_int_table_value_request
exp
retfield = 'p_vbeln'
value_org = 'S'
Tables
value_tab = it_vbeln
ret_tab = it_ret1
excep.....
Then
pass
3)p_vbeln = it_ret1-fieldval.
4)Now select matnr (material number)
select matnr from vbap into table it_matnr where vbeln = p_vbeln.
the use at selection screen again.
then pass value to same fm again.
5)call func f4if_int_table_value_request
exp
retfield = 'p_matnr'
value_org = 'S'
Tables
value_tab = it_matnr
ret_tab = it_ret2
excep.....
6)Donot forget to declare all internal table properly.
like this
data : it_retl1 like ddshretval occurs o with header line.
declare other it_vbeln,it_matnr also.
use parameters also porperly.
see also this.
Hope it will solve your problem.
Thanks
Gourav.
2013 Apr 10 9:44 AM
My Requirement is for Dialog Programming and Matnr is Standard field
2013 Apr 10 10:03 AM
Hi,
In this case.
You can go to that field's data element(matnr) & have a look ,there is search help present or not.
Then You can use that ,otherwise You have enhance standard search help like this.
Thanks
Gourav.
2013 Apr 10 10:15 AM
Hi Jyoti,
Create your own search help and assign in dialog programming for material number.
or if u don't want use customize search help means ,then go with append search help
already mentioned by vinit joshi & kumar .
2013 Apr 12 11:56 AM
2013 Apr 12 12:01 PM
go with append search help to standard search help MAT1 .
see the below link for step by step reference.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8047f84e-7973-2c10-548a-ab4cb1c3c...2013 Apr 10 9:21 AM
Create a append search help to standard search help MAT1 which will search based on sales order and one for batch.
Basically you will create search helps based on material and Sales order and material and batch. And you will append these to std search help.
2013 Apr 10 10:42 AM
Hello,
Go through the following link:
http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ee45446011d189700000e8322d00/frameset.htm
Anand Kumar