Need to fill a new field in table EKKO

Hi all,
i created a new field (ZZCODE) in the table EKKO. Well, now i would like to fill this field when the user save his purchase order. Which user-exit or BADI can i use ?
I tried a lot but either i can't change the parameters values either the FM is not raise.
Thanks for help.

HI CECG,
Yesterday itself i tried this example,
i will forward u the document to ur mail id,
plz provide me the mail id so that i will forward u the doc..
STEP-BY-STEP PROCEDURE FOR SCREEN EXIT IN ME21n TRANSACTION
Introduction:
                    SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
                    To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
Requirement:
                     You have to add the custom field in SAP standard table EKKO. Then we have to place the field in ME21N screen. When user enters any input into the field it should get updated in the database.
Note:
                     EKKO table is meant for Purchasing document header, you should add the field in the header level for ME21n screen. There you are provided with customer sub screens where you can add the field in the screen.
In EKKO table
include : cl_ekkodb
in that u can add the field u want
Procedure:
1.     You have to create a field in the Custom Include of standard table, after creating activate it.
2.     Double click on the include then you can add your custom field here.
Find out the Required Enhancements:
1.     Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton ‘Information system’.
MM06E005 : CUSTOMER FIELDS IN PURCHASING DOCUMENT
2.     Then mention the particular package name of the transaction you need to      enhance. Then you will be shown the list of Enhancement components for that particular package.
3.     Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
MM06E005 is the Enhancement component we are using here.
Development
Creating a Project to include the enhancement:
1.     Go to transaction CMOD and create a project.
2.     Enter a description for the project.
3.     Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
4.     Click on the components in Application Toolbar.
5.     Here you will be shown the function module exits, screen exits and Include tables.
6.     Click on the custom screen SAPLXMO6 – 0101 in which it suits the requirement of adding the custom field to the layout.
7.     Click on layout and go to get from dictionary and select the field you need to add and click ok.
8.     Place the field in the layout and activate it.
9.     After that you come back and check the respective function module in which you need to implement the code. So, we need to import the data from sub screen for purchasing document header. Therefore we have chosen  the  EXIT_SAPMM06E_008.
10. Write code in the Function Exits to synchronize the programs:
                       Now, code has to be written in the function modules EXIT_SAPMM06E_008 so that data flows to and fro between the main SAP program and custom sub screen program. Double clicking on the exit we get the following screen.
11. Double click on the include and write the required code inside it. Then activate it.
12. Now come back and activate the entire project.
13. Now go to ME21n transaction and create a purchase order by giving all the mandatory fields including custom field we have created. Go to SE16n, check whether the field got updated in the database or not.
Finally it gets updated in the database.
IF U PROVIDE ME UR MAILID I CAN SEND U THE DOCUMENT WHICH IS VERY CLEAR FOR PURCHASE ORDER
PLZ REWARDS POINTS IF HELPFUL,
Ganesh.

Similar Messages

  • Need to add a new field to XD01 under company code data tab

    Hi,
    I need to add a new field under Company code data of XD01 under Account Management tab.
    I came to know two BADI's CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS can be used for this. But for these BADIs we need to create a sub screen.But for my requirement I need not use a subscreen just to add a field.
    Please let me know how to do this?

    Hello Pavan,
    Do you have any solution for this issue? I only can creat a new tab but hi prefer as you, creat a field Company code data of XD01 under Account Management tab.
    I read that is not possible, this is true?
    Best Regards,
    Eduardo Paiva

  • ADDING A NEW FIELD IN TABLE MAINTENENCE GENERATOR

    I HAVE A REQUIREMENT OF ADDING A FIELD TO DATA BASE TABLE .
    THAT ADDED FIELD SHOULD BE ABLE TO MAINTAIN IN TABLE MAINTANENCE GENERATOR WHICH IS ALREADY THERE.
    CAN YOU GUYS TELL ME HOW TO ADD NEW FIELD IN TABLE MAINTENENCE GENERATOR.
    PLEASE TELL ME HOW TO DO THIS .
    I AM USING 4.6C

    Hi
    Add a field to existing table and delete the maintenance generator and re create the same
    Regards
    Shiva

  • Need to insert two new fields in T-code - QA32

    Dear Experts,
      I need to insert two new field names(customer name & vendor name) infront of QA32 screen.Please kindly let me know the user exit for the enhancement to add the fields in QA32 screen.
    Thanks in Advance,
    Prasath

    In QA32 selection screen ->shift+f4 (Dynamic selection)->procurement--->vendor
    >sales & distribution--->Customer
    These are default available !!
    In Layout also these fields are available

  • Updating custom field in table EKKO within user exit when PO is saved

    I am trying to update a custom field in table EKKO when a PO is saved.  I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005.  Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table.  But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved.  In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there.  My code sample is below.  What I am doing wrong?
    data:
      CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
      g_zhdrcstcenter like ekko-zhdrcstcenter,
      FIELD-SYMBOLS <F1> type any.
    if i_ekko-ekorg = '5401'.
      ASSIGN (char) to <F1>.
      g_zhdrcstcenter = <F1>.
      move '0000113322' to g_zhdrcstcenter.
      <F1> = g_zhdrcstcenter.
    endif.
    Thanks!
    Sarah Smyth.

    Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
    In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change...  SAP does warn this method is for "internal use".  Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need.

  • Purchase order : user-exit to fill new field in table EBAN

    Hi,
    in EBAN table i created a new field named ZTYPE_SITE. Now i would like to fill this field when i save my purchase requisition. I don't found the user-exit or BADI to do that.
    Thanks for help.
    Cheers.

    up

  • Need to add a new field to the Schema for MDM Syndicator

    We are running MDM 5.5 SP6.
    We have a requirement to add a new field and syndicate the new field to the our Procurement System.
    I was able to add the new field to the repository and schema in SAP MDM Console.  However, when I went into the Syndicator to map the new field (which I do see) to the new Schema field, I don't see the new field to map in the Schema.
    How can I change the existing syndication jobs (11 of them) to use the new Schema?  Or do I have to recreate all of them?
    Thank you in advance!!!

    Hi Janynne,
    I hope you have modify the Syndication XSD(add new field) and then load it in XML Schema table of MDM Console, right ?
    If you have done it, now open MDM Syndicator>Go to File>Open, select the required Remote system and Available map.
    Now your existing map will be loaded which has not the required added field, Now again, go to file-->Export.
    Give file name and save this syndication map on your Desktop. Once you have done this.
    Go to File>New>Select respective remote system and Type as XML Schema if you have loaded this XSD in Console else select Type as XML Schema file and select the modified XSD (added new field XSD) from Desktop. Once it is loaded, import the existing syndication map(which you have exported as said above) which should have all the fields mapped, now in target side you will have here new added field too, map it with required source field in Item Mapping and then go to file>Save as>select the required Remote system and give new map name. Use this map for exporting files for future reference.
    Also, if your are using Port Concept, you need to change the Properties Map and XML Schema in Port of MDM Console.
    Regards,
    Mandeep Saini

  • Adding New Field in table control

    Hi all,
    I am going to add one new field in existing table control ,which already contains nearly 20 fields, so my field should be21st field,
    here when I am going to add new field , I need to add the field from work are from the same program. So , I am  selecting the option Get from Program, here I am getting the error the field  does not exist in the generated version of the program.
    Regards,
    Siddivinesh Jogu

    Hi,
      I think you forgot to activate the program after creating the new field in the internalt able so first ensure the program is properly activated and then try the same.
    Regards,
    Himanshu

  • Help needed on adding 2 new fields.

    Hi gurus,
    I have a existing data model which is from the flatfile to ods to cube. The new user requirement is for 2 new fields which would be based on a existing field that is already there in the data model. the change is going to be based on a existing field that is field A.
    The user have now provided with a new flatfile which is a lookup table, this flatfile this flatfile relates the existing field A with new fields Field B and C. the way in which the fields A,B and C are related are Field A is the lowest catagory in the hierarchy and field B is a sub catagory and Field C is the main catagory.
    i need to bring in these 2 new fields can out there help me out on how to handle this scenario. the lookuptable they have provided me is static and it is a flatfile table.
    FIELD A FIELD B FIELD C
        A                  A1            B1
        B                    A1           B1
        C                   A1            B1
        D                   A2            B1
        E                   A2            B1
        F                   A2            B1
       G                    A3            B2
       H                    A3             B2
    Points will be given.

    Hi,
    Relationship which you are pointing out is like parent-child.
    You can maintain field A as masterdata bearing with Field B & C
    as navigational attributes of it. Even it infoprovider you make it as Navigational.
    Hope this thought will hepl you solve your prob.
    Bobby

  • Append new fields to table

    Hello,
    If add a new field to a table (append structure) and I switch Off what happens to the information if the table fields was already used?
    Above all, what happpens when you switch off the fields in the table or structure are still available? I made a test and even if it´s switch off I can go to SE16 and made changes....
    Kind Regards.

    hi sagarika ,
      Here you go with the steps ,
    1) Modifing the  structure already appended to a DB table .
        Open the DB  table in change mode, double click on the structure name and bring it to the change mode for modification , and here add the needed fields in the structure , save and activate it . The new structure will then be reflected in your table .
    2) creating a structure and appending it to the DB table !
       go to Txn SE11 -> select the radio button data type -> give a name to it and select the create tab -> choose structure ->give the component name and component type save and activate  !
       again go to SE11 -> give the table name -> choose the change button -> u'll reach the table fields screen -> here you have option for APPEND Structure -> append the structure to your main table .. thats it ...
    Regards,
    Ranjita

  • How to add new field to table control data not displayed

    hi
    I have added some nwe fields to already existing table control added three new fields...
    though the recoreds are inserted in teh table properly with the three new fields user id data and time fields
    but on display only the data is not shown in these three columns though the data is coming in internal table...but not to the screen output
    pls suggest where the problme may be
    nishant

    First try the small button Configuration on top right of the table control, as displayed when you run the program. Hit 'Administrator' and see if the fields are checked as invisible. Uncheck them, activate and save.
    If the fields are not in that list at all, then check if the table control is initialized for the screen you use. For example
    CONTROLS: tc_ent_lines TYPE TABLEVIEW USING SCREEN '0100'.
    but you copied your screen and use the same table control in the new screen 0200. Then all you have to do is
    REFRESH CONTROL 'TC_ENT_LINES' FROM SCREEN '0200'.
    before you show the screen.

  • Need to create a new row in table with same data as Primary key, but new PK

    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kale

    user9970447 wrote:
    Hello Gurus ,
    I have a table with one column as primary key, I need to create a new row in the table, but with same data as in one of the rows, but with different primary key, in short a duplicate row with diferent primary key ..
    Any ideas of how it can be done without much complication?
    Thanks in advance for your reply.
    Reards,
    Swapneel Kalesomething like
    insert into mytable values ('literal for new pk',
                                           select non-pk-1,
                                                    non-pk-2,
                                                    non-pk-n
                                           from mytable
                                           where pk-col = 'literal for existing pk')

  • Need to Add a new Field to FamAddPG

    Hi All,
    We are trying to add a new field Start Reason Id field in to a view object FamilyMembersVO.
    This field should be able to be entered and updated in the FamAddPG (oracle/apps/ben/selfservice/enrollment/webui/FamAddPG) .
    We were able to identify VO and extend the VO and were able to personalize the page and add the field.
    However there is no related Entity Object (EO).
    When we try to enter the field it is erroring, we try to modify the related controller (CO) and Application module (AM), however didn’t work.
    So our question in order to add a field to a VO, when there is no related EO what should we do.?.
    What are the objects we need to extend and what all objects we need to modify? i.e VO, EO AM etc.
    Any pointers help would be much appreciated.
    Thanks In Advance!!
    Best Regards,
    Kiran Ravuri

    Hi Kiran,
    You didn't mention what error you got after extending the VO, there may be different errors, different reasons and hence different solutions.
    Second Insert/Update/Delete happens in AM --> AM just handles the transaction but insert/Update/Delete happens through code written in AM is not true.
    If VO is EO based then we enter the data on page and submit the page then this data will posted to EO and and on commit it will be saved in database automatically.
    Please specify the error, then we will be able to suggest you something.
    Regards,
    Reetesh Sharma

  • How to fill a new field in communication structure KOMPAZD

    Hi,
    I have added a new field ZKNRZE to structure KOMPAZD. It should be filled with the partner payer (KOMK-KNRZE) How can I fill this field? Which user-exit do I have to use?
    Thanks and regards.

    Hi Carmen Alvarez,
          You should use the USEREXIT_PRICING_PREPARE_TKOMP (module pool SAPLV60A, program RV60AFZZ) to move the value.
    Thanks,
    Mariano.

  • Need to create a new field that is a lookup

    How do I do a lookup from a new field? I need to pull the list of account contacts from within an opportunity.

    Hi George,
    I hope u have created new fields as a date field now u want to update the same date field with the status change date, for the same u can use ORDER_SAVE badi, create u r own implementation and use method Prepare(on save), u can use u r own logic and update the date field on the basis of status change.
    Regards,
    DD's

Maybe you are looking for

  • Urgent : Not able to replicate customer from R/3 to CRM system.

    Hi All, I am performing the following steps in the testing system. 1. Defining the request through the t-code R3AR2. 2. Starting the request through the t-code R3AR4. After the above steps, I do not see any BDoc being generated (t-code SMW01) and whe

  • System Monitoring Issue.

    Dears , We are using Solman 7.0,SP16 on Oracle 10.2.0.2. We are configuring System Monitoring for our ECC5(DEV,QAS,PRD) landscape on it. Now for it I added system in SMSY then assigned them in logical comp as per their role and then assigned that log

  • MDX Case Statement not working

    Hi have written the following MDX statement to create a new column calledl 'Aon Group' and group the Policy Broker Names into 2 values, either 'Aon' or 'All Other': WITH Member [Measures].[Aon Group] as Case when [Broker].[Policy Broker Name - Big 6]

  • Problems running Software Update and Disk Utility

    I had automatic updating turned on in the Software Updates control panel, so I believe the system tried to apply the 10.4.6 automatically and somehow failed. Ever since, when I try to run Software Update it hangs while trying to connect to the intern

  • I am getting negative numbers when trying to empty the trash.

    I am trying to delete files from an external disk where I had my time machine backup. I dragged the files to the trash and tried to delete them. It now says Items to delete: -99,661 What can this mean and how do I now empty my trash? Thanks, Tim