01-06-2008 6:26 PM
i have implemented screens and additional fields for XD01 using badis CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS.
everything looks fine but does not work in saving, changing, or display modes.
though i can get the activity type, i am unable to send or get data from the screen .
Suggest me what should i do in these methods set_Data and get_data.
all purposeful suggestions would be rewarded.
Edited by: TRY-N-TRY on Jan 6, 2008 7:27 PM
01-06-2008 7:18 PM
Yeah ZSDCU_ADD_FIELDS_GET_DATA is a function module that you have to create and write your code in it.
Using the main program of your function group, create a screen in SE51 and add the fields to it.....
Hope this helps.
Le'me know if you need any info....
Vinodh Balakrishnan
01-06-2008 6:36 PM
i tried to code in the same way as one of the implementations already done and thats using function modules,
but am no able to .
Can any one help me out how to use those function modues.
regards
01-06-2008 6:39 PM
Through methods SET_DATA and GET_DATA of BAdI CUSTOMER_ADD_DATA_CS the system provides you with current data from the standard program or returns the data to the standard program.
Check the OSS Note Note 577502 - Enhancements without modification in customer master record for more information on this ....
***************************************************************************************************************
Add the code as given in the following example.
Find below the Sample code for all the four methods.
Method GET_DATA
method IF_EX_CUSTOMER_ADD_DATA_CS~GET_DATA.
CALL FUNCTION 'ZSDCU_ADD_FIELDS_GET_DATA'
IMPORTING
E_KUNNR = S_KNA1-KUNNR
E_ZZSCPC = S_KNVV-ZZSCPC
E_ZZCSNM = S_KNVV-ZZCSNM
E_ZZDTCM = S_KNVV-ZZDTCM
E_ZZTEXP = S_KNVV-ZZTEXP
E_ZZTSTA = S_KNVV-ZZTSTA
E_ZZCERT = S_KNVV-ZZCERT.
endmethod.
****************************************************
Method SET_DATA
METHOD if_ex_customer_add_data_cs~set_data.
TYPES:
BEGIN OF tab_type,
col1(10),
END OF tab_type.
DATA:
wa_indx TYPE indx,
wa_itab TYPE tab_type,
cl TYPE mandt,
itab TYPE STANDARD TABLE OF tab_type.
wa_itab-col1 = s_kna1-ktokd.
APPEND wa_itab TO itab.
wa_indx-aedat = sy-datum.
wa_indx-usera = sy-uname.
wa_indx-pgmid = sy-repid.
EXPORT tab = itab
TO DATABASE indx(XY)
FROM wa_indx
CLIENT sy-mandt
ID 'TABLE'.
CALL FUNCTION 'ZSDCU_ADD_FIELDS_SET_DATA'
EXPORTING
i_kunnr = s_kna1-kunnr
i_zzscpc = s_knvv-zzscpc
i_zzcsnm = s_knvv-zzcsnm
i_zzdtcm = s_knvv-zzdtcm
i_zztexp = s_knvv-zztexp
i_zztsta = s_knvv-zztsta
i_zzcert = s_knvv-zzcert
i_activity = i_activity.
ENDMETHOD.
*****************************************************************************************
Hope this helps.
Le'me know if you need more.
Vinodh Balakrishnan
01-06-2008 6:45 PM
so this ZSDCU_ADD_FIELDS_GET_DATA function module exports data to s_kna1.
i.e inside e_kunnr = < screen field name >
and this <screen field name> shud be declared in global variables.
is that right?
i will check it out and come back..
Regards
01-06-2008 6:41 PM
01-06-2008 7:18 PM
Yeah ZSDCU_ADD_FIELDS_GET_DATA is a function module that you have to create and write your code in it.
Using the main program of your function group, create a screen in SE51 and add the fields to it.....
Hope this helps.
Le'me know if you need any info....
Vinodh Balakrishnan