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

BADI for customer master

Former Member
0 Likes
2,982

Hi All,

I want to implement badi for customer master. my requirment is as follows.

1) In the general data i want to add a tab page next to contact person.

Say name of tab is 'Temp'.

2) In temp i want 4 text boxs and data entered in it should get updated in ztemp table.

I tried using the badi Customer_Add_Data & Customer_Add_Data_cs for this.

using the above badi was able to add ZTEMP tab in application bar next to cin.

Can you pls help me in this

Point will be rewarded for help ans.

Hi All,

I want to implement badi for customer master. my requirment is as follows.

1) In the general data i want to add a tab page next to contact person.

Say name of tab is 'Temp'.

2) In temp i want 4 text boxs and data entered in it should get updated in ztemp table.

I tried using the badi Customer_Add_Data & Customer_Add_Data_cs for this.

using the above badi was able to add ZTEMP tab in application bar next to cin.

Can you pls help me in this

Point will be rewarded for help ans.

12 REPLIES 12
Read only

Former Member
0 Likes
2,209

Hi,

Have u followed IMG setting for This Enhancement

Financial Accounting -> Account Receivable & Account Payable -> Customer Accounts ->Master Data ->Preparation for Creating Customer Master data -> Adoption of Customers Own Master Data Fields

Here u will have the Different options

But For u

Processing of Master Data Enhancement

Customer Subscreen

are important.

Considering that u have done this.

Please Check have u activated the processing of your own data with the method

CHECK_ADD_ON_ACTIVE of the Business Add-In CUSTOMER_ADD_DATA in the standard dialog.

To update ZTEMP Table U can Update it In the PBO of ur Sub Screen which u have added for Enhancement.

Regards,

Ranjit Thakur.

<b>Please Mark The Helpful Answer.</b>

Read only

Former Member
0 Likes
2,209

Refer the sap note:577502 for the step by step approach:

https://websmp106.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=577502&_NLANG...

By the way, you can have the z fields appended to the KNA1 table itself instead of maintaining in a different table, then follow the following steps:

1)How to create a screen group.

Go to spro.

Search for:

“Prepare Modification-Free Enhancement in Customer Master Rec”

Then define a new screen grOup say Z1.

2)To start with, you have to implement 'CUSTOMER_ADD_DATA' also.

In the method CHECK_ADD_ON_ACTIVE, you should do this:

IF I_SCREEN_GROUP = 'Z1'. “ Screen group defined in SPRO

E_ADD_ON_ACTIVE = 'X'.

ENDIF.

3)In badi implementation for badi 'CUSTOMER_ADD_DATA_CS' method 'GET_TAXI_SCREEN' do this

e_screen = <Screen number>.

e_program = <Screen Program name>. :This should be the main program for the function group of the function modules you create

e_headerscreen_layout = space.

In set data method do something like this:

CALL FUNCTION 'Z_SET_DATA' “Create a new fm

EXPORTING

I_KUNNR = S_KNA1-KUNNR

I_<ZFIELD name> = S_KNA1-<zfield name>

I_ACTIVITY = I_ACTIVITY.

The code inside the z_set_data should be something like this:

V_KUNNR = I_KUNNR.

V_<zfield name> = I_<zfield name>.

V_ACTIVITY = I_ACTIVITY.

Use this fields v_<zfield name> in the screen.

In get data method:

CALL FUNCTION 'Z_SET_DATA' “Create a new fm

IMPORTING

E_KUNNR = S_KNA1-KUNNR

E_<zfielD NAME> = S_KNA1-<ZFIELD NAME>.

CODE INSIDE THE FM.

E_KUNNR = V_KUNNR.

E_ZZSITEID = V_<ZFIELD NAME>.

Regards,

Ravi

Read only

0 Likes
2,209

Hi Ravi,

Requiremnet is to add the feilds to z table .

Alos i did implement the badi.

STEP1: preparemodification-free enhancement

here i decared screen group ZH

function H1

step2: business addin processing of master data enhancement.

hara i wrote coding as following.

method if_ex_customer_add_data~check_add_on_active .

if i_screen_group = 'ZH'.

e_add_on_active = 'X'.

endif.

endmethod.

STEP 3: Business addin customer subscreen.

here coding.

method if_ex_customer_add_data_cs~get_taxi_screen .

if flt_val = 'ZH'.

  • when 'ZH'.

if i_taxi_fcode = 'H1' .

  • when 'HP'.

e_screen = '9000'.

e_program = 'ZH1_SAMPLE'.

e_headerscreen_layout = ' '.

*ENDCASE.

*ENDCASE.

endif.

endif.

endmethod.

When ever execute the XD01, tab appear in application tool bar and its not showing screen inputsfields.

Also when i am debuging the code in method if_ex_customer_add_data_cs~get_taxi_screen doesnot get executed.

please help

Read only

0 Likes
2,209

Did you actiavte the badi implementation?

There is more to do after the 3rd step. See the note 577502 for detailed information.

It is very nicely explained in there.

Regards,

Ravi

Read only

0 Likes
2,209

Hi ravi,

can u send me samle data step wise how to enable tab in general data.

i have done .But tab appear in application server and when i press the tab its showing blank subscreen.PLZ help me on this.

Plz send me step wise how to impliment subscrren in customer master.

this is my mail id: [email protected].

Read only

0 Likes
2,208

Hi Ravi,

i am trying to do with reference node577502. But tab is apper in application tool bar.when i pressed the tab it showing blank screen plz help me on thid issue.

Thanks&Regards,

venugopal.

Read only

0 Likes
2,208

Hi Ravi,

Its working fine for XD01/02 .In Xd03 its showing display mode when i pressed Change<>display button. how to enable that screen in change mode.

I wrote coding in PBO and PAI .If i am in my tab and press the display<>change button its showing editable mode if i go back to general tab and come back to my tab its showing display mode only. please help me on this issue.

Regards,

venu.

Read only

0 Likes
2,208

Ravi,

I have followed the steps the same way you have specified, but still the data is not getting saved to KNVV table.

Pl throw some light to this issue.

Thanks & Rgds

VB

Read only

0 Likes
2,208

Hello Ravikanth,

In the same implementation I did all the steps u provied but the issue is Im not getting the tab in the requried position instead it is getting on the application tool bar.

My requirement is to add an extra tab under which we need to ass around 18 custom fields / tab should come under salesarea tab of VD01 tcode .

Helpfull solutions are appreciated and reqarded .

very urgent

Read only

shishupalreddy
Active Contributor
0 Likes
2,208

Hello All,

Even i also have the same requirement ...i followed all the steps mentioned but the tabpage is not getting in the sales area tab instead it is being placed on the application tool bar ...

any help appreciated and rewarded.

Read only

shishupalreddy
Active Contributor
0 Likes
2,208

Hello Guys,

I had the same requirement and for me also the tab is not geting displayed int he required area instead it is being displyed in the appl tool bar .

helpfull answers will be rewarded .

urgent

thanks

Read only

shishupalreddy
Active Contributor
0 Likes
2,208

Hello Guys,

I had the same requirement and for me also the tab is not geting displayed int he required area instead it is being displyed in the appl tool bar .

helpfull answers will be rewarded .

urgent

thanks