Skip to Content
avatar image
Former Member

CUSTOMER_ADD_DATA_CS , set_data, get_data

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 06, 2008 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2008 at 06:41 PM

    Hi,

    have a look at this thread:

    badi-customeradddatacs-not-appearing-on-screen

    Best regards.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2008 at 06: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2008 at 06: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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