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

Matchcode for field EKKO-ANGNR

Former Member
0 Likes
810

My requirement is to create a matchcode for the field EKKO-ANGNR and the matchcode should be available only if the contract is of type CABO. In the case of other types of contract, the matchcode should not be available.

My question is how do we attach the matchcode to the field and how to do we restrict the display of the matchcode depending on the contract type.

Thanking you in advance.

My requirement is to create a matchcode for the field EKKO-ANGNR and the matchcode should be available only if the contract is of type CABO. In the case of other types of contract, the matchcode should not be available.

My question is how do we attach the matchcode to the field and how to do we restrict the display of the matchcode depending on the contract type.

Thanking you in advance.

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
717

better create search help exit for the same.

Read only

former_member302911
Active Participant
0 Likes
717

Hi,

it is not very easy, you can create a custom Match Code for this Field of EKKO, after this you can manage it with an custom Exit Function like this http://wiki.sdn.sap.com/wiki/display/Snippets/ImplementingSearchHelp+Exits.

Angelo.

Read only

Former Member
0 Likes
717

Hi Maheshsingh,

Try this:

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

PERFORM MATCHCODE_S_ANGNR.

FORM MATCHCODE_S_ANGNR.

SELECT *

INTO TABLE it_ekko

FROM ekko

WHERE .... fieldname EQ 'CABO'

IF sy-subrc IS INITIAL.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ANGNR'

dynpprog = Program nane

dynpnr = '1000'

dynprofield = 'S_ANGNR'

value_org = 'S'

TABLES

value_tab = it_ekko

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

ENDIF.

ENDFORM.

Hope this information is help to you.

Regards,

José

Read only

Former Member
0 Likes
717

Hello,

The first issue is how to attach a matchcode to the field EKKO-ANGNR.

I tried using the "Fixed value Append" in the domain ANGNR but since the domain did have a value range before it is not adding the new values.