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

Search Help

Former Member
0 Likes
939

Hi

I need to add a search help to the collective seach help of the material. Is this possible?

I also need to add a F4 search help to a field in the material. How can i do this?

Are any of this changes going to be overwritten with a future upgrade or suport package?

Thank you,

Nuno Silva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
885

<b>1) I need to add a search help to the collective seach help of the material. Is this possible?</b>

<b>2) I also need to add a F4 search help to a field in the material. How can i do this?</b>

Check the following code to get the F4 help in select options.

The following code is for the F4 help to the field G/L Account. Replace the G/L account (HKONT) field with your material field.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-LOW.

SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.

SORT IT_HKONT BY KSTAR.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'HKONT'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_HKONT

RETURN_TAB = IT_RETURN.

IF SY-SUBRC = 0.

READ TABLE IT_RETURN INDEX 1.

MOVE IT_RETURN-FIELDVAL TO HKONT-LOW.

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-HIGH.

SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.

SORT IT_HKONT BY KSTAR.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'HKONT'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_HKONT

RETURN_TAB = IT_RETURN.

IF SY-SUBRC = 0.

READ TABLE IT_RETURN INDEX 1.

MOVE IT_RETURN-FIELDVAL TO HKONT-HIGH.

ENDIF.

<b>3) Are any of this changes going to be overwritten with a future upgrade or suport package?</b>

Search help does not effect any for teh future upgradation or support packages.

Reward points if useful.

7 REPLIES 7
Read only

Former Member
0 Likes
886

<b>1) I need to add a search help to the collective seach help of the material. Is this possible?</b>

<b>2) I also need to add a F4 search help to a field in the material. How can i do this?</b>

Check the following code to get the F4 help in select options.

The following code is for the F4 help to the field G/L Account. Replace the G/L account (HKONT) field with your material field.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-LOW.

SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.

SORT IT_HKONT BY KSTAR.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'HKONT'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_HKONT

RETURN_TAB = IT_RETURN.

IF SY-SUBRC = 0.

READ TABLE IT_RETURN INDEX 1.

MOVE IT_RETURN-FIELDVAL TO HKONT-LOW.

ENDIF.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-HIGH.

SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.

SORT IT_HKONT BY KSTAR.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'HKONT'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_HKONT

RETURN_TAB = IT_RETURN.

IF SY-SUBRC = 0.

READ TABLE IT_RETURN INDEX 1.

MOVE IT_RETURN-FIELDVAL TO HKONT-HIGH.

ENDIF.

<b>3) Are any of this changes going to be overwritten with a future upgrade or suport package?</b>

Search help does not effect any for teh future upgradation or support packages.

Reward points if useful.

Read only

0 Likes
885

Hello Sravan,

Thank you for your answer.

Where do i place the code you gave me?

And how do i create a new elementary search help for the material?

Thank you,

Nuno Silva

Read only

0 Likes
885

Hi Nuno Silva

The code i have given will creat search help dynamically for the Selection Options.

Before the code you need to declare a internal table to pass the same to function module.

<b>DATA: BEGIN OF IT_MAT OCCURS 0,

MATNR LIKE MARA-MATNR,

BEZEICH LIKE MAKT-MAKTX,

END OF IT_MAT.</b>

The code should be given at the event

<b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR MATNR-LOW.</b>

For creating the Elementary search help you have to try the T.Code SE11. where you can create the Elementary search help and Collective Search help also. Collective Search help is collection of Elementary search helps.

Read only

0 Likes
885

Maybe i didn't explain myself, but i need to change the search help in MM02 and MM03 transactions. Not in a Z program.

Best regards,

Nuno Silva

Read only

0 Likes
885

goto spro tcode ie sap img ( implementation guide) there goto click of img->logictics-general ->material master-> define match code object.

first u create search help with the required condition in help view and attached to the searchhelp elementary .

add this elementary search help in spro tcode which i had given above ( click on interfacemethods).

Read only

0 Likes
885

Thank you.

That could do the trick.

Can I use an append search help? And like i asked before, is this change overwritten in future updates?

Thank you,

Nuno Silva

Read only

Former Member
0 Likes
885

Hi Nuno Silva

to get the additional search help for material number or for that matter any other SAP defined field. You will have search help exits defined. for the MATNR standard search help is MAT1(see in SE16). You will find an exit for this search help COM_SE_F4_HELP_EXIT. Steps are given there in Documentation. I think that can help you out in finding the way for new searc help.

to add search help for other fields which does not have any existing search help or search exits attached. You have to look out for user exits or BADIs.If you do not find these then look for OSS notes then.

First change will not get wiped out in upgradation but in second scenario if you are using other than exits, BADIs and OSS then changes might get lost.

Hope I clarify your points.

Thanks and Regards

Amit.

NB. Reward points if answers help you.