Application Development 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: 

Enhancement in Vendor Master

Former Member
0 Kudos

Dear all,

I need to add one field in Vendor master(XK01/XK02/XK03), Please suggest approach to follow - Enhancements or BADI implementaion.

Kindly suggest with the steps.

Thanks and Regards,

Ravindra Reddy

16 REPLIES 16

Former Member
0 Kudos

Raveendra

You can use

BADI: VENDOR_ADD_DATA

Method: SAVE_DATA.

Hope this helps.

0 Kudos

Hi Amith,

Thanks for the info, i am aware of these BADi, but i would like to know what is the procedure to follow.

1. Is it required to add a field in LFA1?

2. Screen field addition or Using BADi create subscreen if so steps

3. Flow logic if any

Thanks and Regards,

Raveendra

0 Kudos

1. Is it required to add a field in LFA1?

If you want to add there you can addelseyou can update the ztables also. Depends on whats your requirement.

2. Screen field addition or Using BADi create subscreen if so steps

Create your Function group in IMG

Financial accounting (new) -> Accounts Receivable and Accounts Payable -> Vendor Accounts -> Master Data -> Preparations for Creating Vendor Master Data -> Adoption of Customer's Own Master Data Fields -> Prepare Modifications-Free Enhancement in Vendor Master Record.

in the method GET_TAXI_SCREEN,

IF flt_val = 'Z1' "Screen Group

AND i_taxi_fcode = 'ZTEST1'. "<-- Tab Function code

e_screen = '100'. "<----screen number

e_program = 'SAPLZTEST1_CUST'. "<--Function Group (Main program name of the function group)

e_headerscreen_layout = 'B'.

ENDIF.

Ceate a screen 100(subscreen type) for 'SAPLZTEST1_CUST.

3. Flow logic if any

depends on your requirement once again where it is required to put

0 Kudos

This message was moderated.

0 Kudos

Hi

Requirement is add a field in Control tab of Vendor master (only a flag - checkbox).

Which table control?

Anyway it seems you need to change a standard dynpro, doesn't it?

If it's so the BADI is not good for you: it's to add new screen, not to change standard screen.

Max

0 Kudos

Ravindra,

The BADI is to add a new screen to the Vendor Master.

If you need to add the field to the standard screen , if there is not screen exit, which as I know is not there for

Vendor Master. If the screen exit isnt there then we need to modify the standard screen with the access key from

the service market place.

If you just want to add the field to the LFA1 table then all you need to do is just append the field to the table thru SE11.

And there is a BADi to update the field when saving the Vendor Master.

Thanks,

Sneha SIngh.

0 Kudos

Hi Max/Sneha,

Yes I need to add a new custom field(Only flag field - with check box) in the Control Tab under Vendor master.

If the BADI is for the new screen then I can add a new screen and only have this field in that screen.

Suggest if any good approach to solve this problem.

Sneha,

Thanks for your information, I want the field on the Control Tab of Vendor master.

Is there any way to do it ?

Thanks and Regards,

Raveendra

Edited by: Raveendra Reddy on Sep 30, 2009 9:59 PM

0 Kudos

Raveendra,

Give me your email id.

I will send you the detailed document I have on the enhancement.

If you want to have only one field in the new screen , wont it look akward?

Probably modifying the standard screen is the option.

You would need to append the field to the table and put the field in the screen.

Thats all you will need to do. The program will take care of the rest of the things.

Thanks,

Sneha Singh

0 Kudos

Hi Sneha,

Thanks for the help, yes you are right but we dont have other option instead of going with one field. Also as a best practice its better to add a new screen than coloing the std screen, if you think that is good option pl. let me know.

Kindly send me all the details to me.

Please note : raveendra.reddybs at g m a i l

Thanks and Regards,

Raveendra

0 Kudos

hi Amith,

As you gudied me i have done the following:

1. Added one field in LFA1 in append structure

2. Using BADi create subscreen if so steps:

As described by i have created an entry in "Prepare Modifications- Free Enhancement in Vendor master Record".

Screen group "ZT" and Function code "ZTIT".

Also you said to create an Function Group in IMG , i didnt get that also you asked me to create subscreen?

Please help me how to go ahead now onwards, will be great ful if you provide me all the steps which you have done it.

Kindly help me.

Thanks and Regards,

Raveendra

0 Kudos

Hi Ravi,

Please note:

1. Using this "modification free enhancement" (these BAdIs) you cannot include a field in any of the standard screens of vendor master transactions. There are few fields which can be included using config, but not all. I won't be able to help you with config, your consultant would know more about it. Using this enhancement, you will see a new button on the vendor master transactions which will take you to the custom tab area which can have as many as 32 tabs. You might need just one.

2. To the question if you have to append fields to LFA1 / LFM1 or any other vendor tables... or create a Z Table depends purely on the design of the proposed solution to the requirement. You, along with your consultant, would be best person to analyse and figure it out. For example, if key fields are similar to LFM1 and you want to store data at Purch. Org level, you will of course store it in LFM1. However you can also create a Z Table but why would you do that when you can make use of append structures in LFM1.

Implementing enhancement:

I hope you have already gone through the documentation that is next to each node in SPRO. That is quite explanatory. Please also go through SAP Note 580266 which is a 8 page document explaining how-to implement this enhancement. That will clear all your doubts.

Goto SE80, create a function group. Then create a screen (subscreen) in that function group, add fields and controls and do all the programming for PAI and PBO.

If your function group is ZV01, the program name would be SAPLZV01

In method VENDOR_ADD_DATA_CS~GET_TAXI_SCREEN of your implementation,


  IF i_taxi_fcode = '<whatever you defined>'.
    e_screen = '9000'.
    e_program  = 'SAPLZV01'.
  ENDIF.

After this you would be able to see your screen on click of the button in vendor master transactions.

I hope you have collected enough info. to start. Just do it, and if you face any problems, post back. Try yourself first.

Good Luck,

Aabhas

0 Kudos

Hi Amith/Aabhas/Snhea,

I followed the same way what you have told, its perfectly working with respect to Display.

1) But still i am not able to change the values in the custom screen (new screen), as the fields greyed out, i can see only in display mode.

How to make it enable in XK01 and XK02? also i want to know how to pass the values back to standard tables.

I have appended the field in LFA1.

Please suggest.

2) Addition to this i want to diable the button on Vendor master (Which i have added in using this BADI) based on Company code, is that possible?

Thanks in advance.

Thanks and Regards,

Raveendra

0 Kudos

Hi ,

Yes , u have to create a function group , in that u have to craete a screen as subscreen.

and that scrren should contain ur addittional filed, and for disabling and enabling u can write the following code in the pbo status.

MODULE STATUS_0001 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

*To make the screen field display only

LOOP AT SCREEN.

IF sy-pfkey+3(1) = 'A'. "Display

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

Note 1: here u put a break-point on IF sy-pfkey+3(1) = 'A'. and check , wht u r getting is for display,

then this will disble for display transaction or else it will be enabled.

note2. The screen field u should refer to the table , and it shoulb be input possible.

If u have any concern , u can ask ...

Rajendra

0 Kudos

Hi Rajendra,

Thanks for the info, I know the disabling the screen fields but i am looking for the disabling the button in Vendor master.

We have created a button using BADI in Vendor master, based on the Purchase org or Compnay code i have to disable the button which we have added in the Vendor master.

Hope you got what i am looking for.

Thanks and Regards,

Raveendra

pansy_leung
Explorer
0 Kudos

Can the customer fields be saved in z tables other than the enhanced structure of LFB1. 

Former Member