09-20-2008 8:19 AM
Hi,
In My report,
I have 2 fileds 1st is material group and 2nd is material number.
I want
If I select the any material group in material group field,
I want in F4 ,all the material and its description under that group and material type will be FERT .
How can I do it.
Thanks
Kumar
09-20-2008 8:55 AM
Hi Kumar,
I think i clearly understood your requirement as follows...
If you select a particular Material Group, you need only that group Material num ber and its description in your Material Number field. Right?
Fo this you need to dynamically read the value of Material Group Field. For this you can make use of the FM - DYNP_VALUES_READ.
How to use this FM.
CLEAR: field_value.
REFRESH dynpro_values.
field_value-fieldname ='<Material Group>'.
APPEND field_value TO dynpro_values.
* FM to Dynamically Read Values From Selection Screen Fields
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
*To Read the Dynamic Value.
READ TABLE dynpro_values INDEX 1 INTO field_value.
After this you can write a querry with a where condition using the above fetched Material Group. Then use that FM for Search Help -- F4_IF_.....
09-20-2008 8:23 AM
09-20-2008 8:29 AM
Hi,
Create a zsearch help according to your requirement and Use below function module:
F4IF_FIELD_VALUE_REQUEST
and use after the event:
at selection-screen on value-request for P_field.
Regards,
09-20-2008 8:37 AM
Hi Dear,
Please use the statement
At selection-screen on value Request for <Fieldname>
Then call the function module
Se37-
F4inthelp*
anyone u can use.
Enjoy.
Arbind
09-20-2008 8:40 AM
Hi kumar,
selection-screen begin of block b1 with frame title text-001.
select-options:plant for marc-werks no-extension , s_mtart for mara-mtart no-extension no intervals.
parameters : search(20) type c.
selection-screen end of block b1.
from mara-mtart table automatically you will get the F4 button (values list ).. I think so need of FM and search help...
waiting for your awards.
From maddy,
09-20-2008 8:55 AM
Hi Kumar,
I think i clearly understood your requirement as follows...
If you select a particular Material Group, you need only that group Material num ber and its description in your Material Number field. Right?
Fo this you need to dynamically read the value of Material Group Field. For this you can make use of the FM - DYNP_VALUES_READ.
How to use this FM.
CLEAR: field_value.
REFRESH dynpro_values.
field_value-fieldname ='<Material Group>'.
APPEND field_value TO dynpro_values.
* FM to Dynamically Read Values From Selection Screen Fields
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
*To Read the Dynamic Value.
READ TABLE dynpro_values INDEX 1 INTO field_value.
After this you can write a querry with a where condition using the above fetched Material Group. Then use that FM for Search Help -- F4_IF_.....