2012 Jan 05 11:05 AM
Hi All,
We have the requirement to fill the Search Term (kna1-sortl) based the accounting group and 'kunnr' value.
I.e as per the legacy system number range in brazil we need fill the sortl field based on accoung goup by concating the kunnr value to it.
for Ex: 2GXXXXX0 this number need to filled in sortl field.
where 'X' is repplaced by kunnr value.'2' and '0' are the constant values.Based on accounting group after value '2' we need to add either 'g' or 'S'.
We find one user exit 'EXIT_SAPMF02D_001' but which does not contain the kna1 as the change perameter.
kindly help me on it .if there is any other badi
2012 Jan 05 12:13 PM
Hi,
There is no std user-exit for this (at least we haven't found it as well).
We have created implicit enhancement point implementation athe the end of form AUFRUF_USER_EXIT in include MF02DFEX.
The code should be similiar to following:
ENHANCEMENT 1 YEDSD_EO_ADD_DOC_PREFIX. "active version
DATA:
ltp_doc_prefix TYPE y_dt_docpref.
*--only in creation and change mode
IF T020-AKTYP = 'H' OR
T020-AKTYP = 'V'.
CONCATENATE kna1-ktgrd kna1-kunnr INTO ltp_doc_prefix.
kna1-yydocpre = ltp_doc_prefix.
ENDIF.
ENDENHANCEMENT.
Regards,
Marcin
2012 Jan 06 6:59 AM
i tried with this.no use.it is getting changed back after this code
Edited by: rakibuddala on Jan 6, 2012 8:00 AM
2012 Jan 06 7:16 AM
Hi,
In EXIT_SAPMF02D_001 itself try it like below
field-symbols: <f_kna1> type kna1.
data:lv_string(20) type c value '(SAPMF02D)KNA1'.
assign (lv_string) TO <f_kna1>.
if sy-subrc eq 0.
<f_kna1>-sortl = 'Testing Updation'.
endif.
2012 Jan 06 7:26 AM
IN EXIT_SAPMF02D_001 the kna1 is in importing parameter.it is not in either exporting or changing.
How can i change it from here.
2012 Jan 06 7:31 AM