06-13-2006 1:29 PM
Hi All,
I need to add custom fields to the Customer create transaction (XD01). Can anyone tell me the feasibility of having screen-exits or BADIs to acheive the same? I have searched for screen exits but could found none, and regarding BADI's i found these CUSTOMER_ADD_DATA, CUSTOMER_ADD_DATA_CS and CUSTOMER_ADD_DATA_BI. Unfortunately there is no default code assigned to these BADI's. Please tell me how we can acheive the requirement. we dont have any include too in the KNA1 table hence i feel going with APPEND structure.
Thank You
Yugandhar K
06-13-2006 1:33 PM
Hi Yugandhar,
See the documentation in se18 for CUSTOMER_ADD_DATA_CS .
If you don't have it, here it is:
<i><b>Application component: LO-MD-BP-CM, FI-AR-AR-N
Package: VS
You use the Business Add-Ins (BADI) CUSTOMER_ADD_DATA_CS and BADI CUSTOMER_ADD_DATA for processing enhancements in the customer master record. You use the BADI CUSTOMER_ADD_DATA_CS to integrate your own subscreens in the standard dialog. You can process your own data (add-on data) on these subscreens.
For more information, see the documentation of the individual methods.
Ensure that:
In Customizing for the customer master, under Transfer Customer Master Data Fields, you have prepared the modification-free enhancement of the customer record so that you have defined a screen group with name and have labeled the tab pages
You have 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.
The Business Add-In is not activated in the standard.
The Business Add-In is filter-dependent.
You can use the Business Add-In more than once.
Due to the filter dependency of the Business Add-In, you have to specify a filter. Choose the screen group selected in your Customizing settings as the filter.20000003
You can use the Business Add-In to integrate subscreens in the standard dialog of the customer master. On these subscreens you can enable the processing of your own data.</b></i>
06-13-2006 1:37 PM
Hi,
you can try this BADI <b>CUSTOMER_ADD_DATA_CS</b>
using that you can add the Tab page.
Regards
vijay
06-13-2006 1:41 PM
Hi,
in the method <b>GET_TAXI_SCREEN</b>
<b> e_screen = '0100'.
e_program = 'SAPLZ_CUSTOMER_MASTER'.
e_headerscreen_layout = ' '.</b>
you have to give this and here we created the FM and created the screen 100 and added all the fields.
and you have to use SET_DATA and GET_DATA methods.
Regards
vijay
06-15-2006 8:21 PM
Hello all,
I am also attempting to add custom fields to the customer master (KNA1), via an append. And, I'm also trying to use the BAdI's CUSTOMER_ADD_DATA, CUSTOMER_ADD_DATA_CS and CUSTOMER_ADD_DATA_BI to work with these fields.
The fields I'm adding are simple text data. No special processing.
So far, I have exposed a new button on the XD01, XD02 and XD03 transactions. When I push the button I get a screen with the new Tab that I defined, but there are no data entry fields displayed (it's just blank).
I'm not clear on how to expose, or work with, my new append fields on my new screen/tab.
I very new to SAP, so I would appreciate as much detail as possible on how to expose my append fields. (I'm assuming I need to use the SET_DATA and GET_DATA methods, but how?)
Thank you.
Allan
06-20-2006 2:26 PM
Hi developers (strugglers)
I spent the last two hours setting up this stuff here.
So you follow the SPRO way and do everything they say.
What they don't say:
1.you make an own z program with your subscreens
2.by VENDOR_ADD_DATA you put something like this to method CHECK_ADD_ON_ACTIVE:
Aktivierung Zusatzfelder für ZDB
if i_screen_group = 'Z1'.
e_add_on_active = 'X'.
endif.
3.by VENDOR_ADD_DATA_CS you put something like this to get_taxi_screen
CASE i_taxi_fcode.
Premier
WHEN 'Z1_SRCE1'.
e_screen = '0100'.
e_program = 'ZPM_SCREENEXIT_MK02'. " your own program
e_headerscreen_layout = ' '.
Deuxiem
WHEN 'Z1_SRCE2'.
e_screen = '0110'.
e_program = 'ZPM_SCREENEXIT_MK02'.
e_headerscreen_layout = ' '.
ENDCASE.
4. you make sure, that everything is active
5. you make sure, that the texts are translated in the customizing table to all the languages you use (otherwise you don't see the button)
take care
Zsolt
06-21-2006 8:37 PM
Hi Zsolt.
I hoped I wouldn't have to create a program, and that the BAdI would handle everything.
Anyway, I have done as you explained and I now have a screen with my fields that can display/update.
Thank you again, Zsolt. I will award points.
Allan
10-17-2006 1:22 PM
whats this "i_taxi_fcode" in the below example code?
In the "Prepare Modification-Free Enhancement in Customer Master Rec, we will give one entry with FCODE and number .. whts the significance of the above 2 fields?
thanks in advance
10-17-2006 6:18 PM
Hello Mahesh B
In short
The Number field determines the display order of the Tabs on your new screen. The i_taxi_fcode parameter is the text you entered, or will enter, in the Function Code field on the Label Tab Pages.
In long
In the IMG activity Prepare Modification-Free Enhancement in Customer Master Record, you add a Screen Grp code (e.g. Z1) and a description. Then you select Z1 and double-click the Label Tab Pages folder on the left.
Now, add one or more records in this Label Tab Pages screen. Each record you add will cause a Tab to be displayed on your new Z1 screen (once you implement the screen with a program as described in earlier posts).
The fields of the Label Tab Pages records are:
- NUMBER, which determines the order that the Tabs will be displayed;
- FUNCTION CODE, this is passed to the BAdI as i_taxi_fcode;
- DESCRIPTION, which becomes the Label displayed on the Tab; and
- ICON, which, if entered, will display beside the Label on the Tab.
Example records:
10, Z1_TR1, Tab1description, <blank icon field>
20, Z1_TR2, Tab2description, <Some Icon>
I prefixed my FUNTION CODEs with the screen group (e.g. Z1_TR1 and Z1_TR2).
More than one BAdI can be implemented in the system at the same time, so you should use the Screen Grp (e.g. Z1) and/or the Tab FUNCTION CODE (i_taxi_fcode - e.g. Z1_TR1) to determine when to execute your custom code.
Below is an example implementation of the get_taxi_screen method in the customer_add_data_cs BAdI.
If a user were to click on the second Tab of the Z1 screen group, the Z1_TR2 case would be executed and screen 200 would display on this Tab screen. If the user clicked back to the first tab, the Z1_TR1 case would be executed and screen 100 would display on this Tab.
method if_ex_customer_add_data_cs~get_taxi_screen .
case flt_val.
when 'Z1'.
case i_taxi_fcode.
when 'Z1_TR1'.
e_screen = '0100'.
e_program = 'Z_PROGRAM_NAME'.
e_headerscreen_layout = ' '.
when 'Z1_TR2'.
e_screen = '0200'.
e_program = Z_PROGRAM_NAME'.
e_headerscreen_layout = ' '.
endcase.
endcase.
endmethod.
Hope this helps.
Allan
07-11-2006 9:54 PM
This is really good information regarding adding custom fields to customer master. Can anyone send me an example of how to create the customized z-program with subscreens. I am an abaper but never had the opportunity to create this kind of program. I am familiar with the screen painter.
07-19-2006 4:48 PM
Hello Marcia,
I used the following program as a guide:
DEMO_SEL_SCREEN_AS_SUBSCREEN
There are other screen related demo programs, as well.
In case you don't have the above program in your system, I have pasted the code below.
Allan
report demo_sel_screen_as_subscreen.
selection-screen begin of screen 1100 as subscreen.
selection-screen begin of block b1 with frame title text-010.
parameters: p1(10) type c,
p2(10) type c,
p3(10) type c.
selection-screen end of block b1.
selection-screen end of screen 1100.
selection-screen begin of screen 1200 as subscreen.
selection-screen begin of block b2 with frame title text-020.
parameters: q1(10) type c obligatory,
q2(10) type c obligatory,
q3(10) type c obligatory.
selection-screen end of block b2.
selection-screen end of screen 1200.
data: ok_code type sy-ucomm,
save_ok type sy-ucomm.
data: number(4) type n value '1100'.
start-of-selection.
call screen 100.
module status_0100 output.
set pf-status 'SCREEN_100'.
endmodule.
module cancel input.
leave program.
endmodule.
module user_command_0100 input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'BUTTON1'.
number = 1100.
when 'BUTTON2'.
number = 1200.
endcase.
endmodule.
at selection-screen.
message s888(sabapdocu) with text-030 sy-dynnr.
06-19-2008 6:23 PM