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

F4 Help forMaterial

Former Member
0 Likes
1,985

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

8 REPLIES 8
Read only

gouravkumar64
Active Contributor
0 Likes
1,581

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.

http://wiki.sdn.sap.com/wiki/display/ABAP/Filtering+F4+Help+values+in+Table+control,+based+on+other+...

Hope it will solve your problem.

Thanks

Gourav.

Read only

0 Likes
1,581

My Requirement is for Dialog Programming and Matnr is Standard field

Read only

0 Likes
1,581

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.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-edc983384...

Thanks

Gourav.

Read only

0 Likes
1,581

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 .

Read only

0 Likes
1,581

I already mention my desired field is in standard t-code

Read only

0 Likes
1,581

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...


Read only

former_member189779
Active Contributor
0 Likes
1,581

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.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8047f84e-7973-2c10-548a-ab4cb1c3c...

Read only

Anand71
Active Contributor
0 Likes
1,581