Modify fields in Append Structure

Hi there,
I am driving crazy about append structures. We appended a few fields to KNA1 - e.g. a field that keeps a version number (every time a record changes we want to increment the version starting with 1 at creation time).
We found a lot of material about how to append structures and actually, it's fairly simple to extend KNA1 with append structures. But HOW can someone update those fields?
We tried user exit EXIT_SAPLVV01_001 and BAdI IF_EX_CUSTOMER_ADD_DATA-SAVE_DATA to populate those fields at commit of customer data. In both scenarios, we don't have CHANGING or EXPORTING parameters. So, we tried to update the table directly, e.g.
method IF_EX_CUSTOMER_ADD_DATA~SAVE_DATA .
DATA: w_kna1 type kna1.
select single *
  from kna1                            " Customer master table
  into w_kna1
  where kunnr = I_KUNNR.
w_kna1-sap_version = w_kna1-sap_version + 10.
update kna1 from w_kna1.
break-point.
endmethod.
Now, when we execute VD02 the program stops at the given break-point and we see the data changed in KNA1. But the record gets updated by the SAP program SAPMF02D (underlying program of VD02), of course as we cannot manipulate the KNA1 record in the internal table of SAPMF02D.
Is there any way to store information into append structures at save time (within the same transaction) without customizing standard programs?
Many thanks for your help

Hi Maic,
Normally for append structures to standard tables, code is written in user exits where it is mandatory to change existing SAP objects (user exits exist are provided by SAP and you need change key).
For additional functionality to the existing flow of transaction, we use BADIs and customer exits (through CMOD).
Your requirement suits the first point above.
Annyways, try using method GET_DATA in badi CUSTOMER_ADD_DATA_CS. This has changing parameter for KNA1.
Ramesh.

Similar Messages

  • EEWB - In BP, adding a new field regenerates append structure

    Hello,
    After adding or deleting a field using EEWB, I have the following issues -
    1. The new append structure that was created for BUT000 gets regenerated
    2. Field labels get overwritten by field names
    3. The order in which the fields were seen on the screen gets altered
    Is this a known behavior of EEWB?  How to alleviate this?
    Thanks!

    Thanks for your input Satish!
    I searched using the application component suggested and the keyword and it was not very useful. 
    Some more details -
    I created some new fields using EEWB.  When you go to transaction BP, the standard tabs are displayed - ex - address, bank data, notes, etc.  But now there is a new tab - Customer Data that has my custom fields on it. 
    In the backend, SAP has created an extend structure for table BUT000 that has these fields in it. 
    When I go to this extend structure, my fields are there with a ZZ prefix - Ex: ZZFIELD1, ZZFIELD2, etc.  If you go to the details of these fields in data dict - transaction SE11, the Field labels - Short, Medium, Long and Heading are the same as the field names.  Ex: in the first case, the four field labels will be - ZZFIELD1.  I then changed the field labels to something meaningful - Ex: Renter name and rental date.  After generating the structure, these labels are then displayed on the Customer data tab.  So far so good.
    However if I add a new field - ZZFIELD3, then all the label names that I had given (Ex: Renter name and rental date) get erased and replaced by the fieldnames again. 
    Also the order in which the fields were diplayed gets altered.  Ex: earlier the Customer data screen was showing - ZZFIELD1, ZZFIELD2.  Now it shows - ZZFIELD3, ZZFIELD2, ZZFIELD1. 
    I hope I have explained this issue.

  • Field in Append Structure for Generic Datasource

    Hi:
    I created a Generic Datasource based on a view. After that, I created an Append to the Extraction Structure to include a field not originally on the view (and not related to any table in the view) to be calculated using customer exit in CMOD.
    At the moment of activating the Datasource, this new field doesn't appear in the selection window but in RSA6 it shows there with options "Hide Field" and "Field only Known in Customer Exit" checked.
    Again, I try to edit the Datasource but this field is not in the list to change those two checks.
    Any idea?
    Thanks.
    Luis Sales

    Dear Luis Sales,
    I was having the same requirement. I tried it hard for removing the tick mark on the HIDE option. But it was not working at all.
    I tried these steps.
    1. From RSO2 went to Extract structure. Edit Mode-> append structure.
    2. Appended required fields and activated both append structure and extract structure.
    3. Back to datasource and Save it.
    4. Came out of transaction RSO2. ( latter Logged of system )
    5. after re login - RSA6 selected given Datasource and change. there I could change the selection of HIDE field. ( Even earlier I was not able to do that)
    May be these steps help you out.

  • BI : Datasource 0FI_GL_4 , Fields in Append structure

    Hi Experts,
    I have done extraction for 0FI_GL_4 which contains standard fields. I have appended the structure in 0FI_GL_4 and added the below two fields with description:
    USNAME : User Name:
    UBHKT  : G/L Account Number for Our Bank Account / Bank Sub-Account.
    I am going to use customer exit Exit_SAPLRSAP_001 and created Project in CMOD. I need to write the code in it, but I wanted to know as to from which table should I populate the data for fields USNAME & UBHKT. Kindly advise.
    is there any single table from which i can fetch both the fields ?? Kindly advise.
    Thanks & regards,
    M.S
    Edited by: M.S on Feb 11, 2010 12:01 PM

    I would advise you not to use cmod for the fi_gl_4 extractor - there is a std BW user exit provided called BTE 5021 inside the extractor already for that purpose - have a look at OSS 410799 for info on how to use it
    However - for the usnam you do not need to cmod or BTE anything - just put them exactly as the are in the user append structure  ci_bsisfor the datasource - do not prefix them with a ZZ or a Y as you would normally do
    Those fields exist on bkpf
    The extractor does  a move corresponding on and will automatically copy the field contents with no coding at all
    I havent tried it for some time with bkpf records so it may or not work - if it doesnt use the BTE 5021 to read the data
    With regards to the UBHKT I am slightly confused - this will always be the saknr on the bseg record (which you already have in BW on the extractor (0glaccount) for those postings to gl bank accounts.. we will need more functiona linput as to why they want it and in what circumstance

  • Extractor Checker: How to see fields in APPEND structure?

    Hi Experts
    I have added a new field to a datasource (0CUSTOMER_ATTR). My logic is in place in include ZXRSAU02.
    I run the Extractor Checker and then check the result list to see that my logic is working. However.. i can't find a way to view all of the fields in the datasource. The Display List button shows a select range of fields (not even all of the standard structure), and unlike SE16, there doesn't seem to be a way to customise the list view to see the fields that I'm interested in (especially my appended field). I've tried all the menu options..
    Does anyone know a way to do this? Without seeing the field in the result, i can't verify my changes in the checker.
    thanks
    tony

    There is one button called current looks like variant click on it in RSA3 display.
    You will be able to hide or display fields.
    Hope this helps.
    Edited by: Praveen G on Oct 10, 2008 3:14 AM

  • Lost Append structure on adding standard field in exctractor 2LIS_13_VDITM

    Hi,
    In 2LIS_13_VDITM i have appended structure. Now i required to pull in another standard field from from the extractor from LBWE maintenance.
    One doing that and activating ii somehow lost the custom appended structure from the extract structure.
    I came to know this while replicating it into BW where it gave error about missing fields from the extractors.
    Have anyone faced similar issue. If yes can you please let me know why this happened and how can i get those fields back in to the structure.
    One way i know is by comparing it with the Q system i can manually append that structure again.
    Please let me know.
    Thanks a lot for responding.
    Ritesh

    Hello Ritesh,
    Are you adding the new field through append structure of the existing one or new one (Only one append structure is possible).
    If in the same append structure , then check whether that structure is active and consistent.
    If everything is ok, then check the hide option in the datasource (RSA6) whether its unchecked.
    Hope it helps
    Thanks
    Chandran

  • Order of append structure

    Hi,
    I have in VBAK an append structure starting with ZY...
    I want to add a new append structure starting with ZA... at the end of the table but when I add the structure it goes before the one starting with ZY..
    How can i put it at the end of the table? Can anyone help?
    Thanks,
    Catalin

    Hi
        Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.
    Click on the append structure tab and opt to create new
    structure.
    Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures; customers can add their own fields to any table or structure they want.
    Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it
        Customers can add their own fields to any table or structure they want.
    The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure should also reside in the customer namespace, that is the field names should begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP

  • Appending structures to fbl5n

    hi people. .
    I created a struct:ZINV_FBL5N with 4 fields and need to append them to RFPOS structure and RFPOSX structure.
    But when i try to do i get the error that the struct already exists. Also while creating the structure I have not used data element as shown in the pics below.
    Please guide.

    Hi,
    You first created the structure ZINV_FBL5N and then tried to create append structure. Actually, you should have done the following things. Firstly, you should press append structure;  then create; give a name to the structure; add the fields and activate the structure. The new fields added would then reflect in RFPOS and RFPOSX structure. In your case, system issued a message because you created the structure, and then tried to create append structure with the same name.
    The standard way of adding customized fields to append structure is to create a structure,say ZABC add the fields. Press append structure, create an append structure with different name ( name starts with ZZ* or YY* ) and then add the structure ZABC using  .include ( include structure from the menu )
    e
    Regards,
    DPM

  • Help me Pl.. Changing APPENDED STRUCTURE

    Hi ,
    I am trying to Change the Appened structure to add extra fields. That Append structure was created by Other developer. So I took Owner for that request, But still it's not allowing me change to Structure. Saying error
    <b>"Transport objets from Package Z001 to target /RELEASED/ only". </b>
    The object is stored in Z001 package. In change request there is no Target system specified...
    Pl.. Help me  how can i add field into Appended Structure( main sturcutre is -LISTVBAP)
    Thanks,
    Suba

    Hi Suba,
           You can create your own structure. All you have to do is that...
    1. Goto Transaction Code SE11 and type a new structure name zxxxx or yxxxx.
    2. Click the fields tab.( After finishing the techniqual settings & maintenance settings)
    3. There in the first column type <b>'.include'</b>
    4. In the second column type <b>'type'</b>
    5. In the third column type <b>'listvbap'</b>
    i.e is the structure name.
    6. Now you can add the fields you want to add in your new created structure zxxxx or yxxxx.
    7. It's always good practice to do like this.
    Hope it helps.
    Regards,
    Maheswaran.B

  • Issues with a Z field in an append structure of VBAP when calling BAPI

    We have added a Z field on table VBAP with an append structure. It is a flag field. We want to change its value with the BAPI BAPI_SALESORDER_CHANGE. We have also created the append structure in API structures
    THe return message of the bapi gives us a success message for the modification. But when we go to the se16 we still see the field as blank, not with the X suposed to be there.
    We are succesfully calling the BAPI_TRANSACTION_COMMIT.
    What can cause us this problem? What can we do to solve it??
    Thank you!
    Artur.

    Hi Artur,
    this blog could help you:
    [Updating custom fields on VBAP and VBAK using BAPI_SALESORDER_CREATEFROMDAT2|/people/kevin.wilson2/blog/2009/09/30/updating-custom-fields-on-vbap-and-vbak-using-bapisalesordercreatefromdat2]
    Regards,
    Andrea

  • Update field of an Append Structure

    Hi! I need help!!
    I made an extension using Append Structure  (I Added a owner field) of a standart table ( EBAN ) about "purchase requisition".
    I want to update this field when a new purcahse requisitions is created , using the bapi BAPI_REQUISITION_CREATE.
    anynone kown how to do it?

    hi Ariel,
    use BAdI <b>ME_PROCESS_REQ_CUST</b> and choose appropriate method
    to polulate the structure (BAPIPAREX) with the newly updated field, before PR is updated.
    Hope this helps,
    Sajan Joseph.

  • Can we modify the attributes(structure-fields) of NUMKR structure

    can we modify the attributes(structure-fields) of NUMKR structure?

    NUMKRS Infotype 0000
    Country grouping
    comapny code
    Personal area
    personla subarea
    employee group
    employee subgroup
    so did u assigned number ranges for employee subgroups
    Internal number ranges will be given by the system
    and external by the consultants
    check and let me know if there is any issues
    have u done in this manner

  • VBAP append structure field on Overview screen 4900

    Hi,
    I have created an append structure on VBAP with a ZZ field and have included this field on the table control in the overview (sub)screen 4900 in SAPMV45A. 
    I have put the field in a number of the PAI CHAIN statements, but whenever I enter a value in the field and hit Enter, the value disappears.
    Does anyone have a definitive list of places that I need to change code to stop the field contents dissappearing?
    Many thanks,
    Andrew

    Hi - I have the issue of presenting ZZ fields from VBAP in the Item overview screen 4900. From your conversation I cannot see any solution to your similar issue. Did you do modifcations or is there a SAP way to include ZZ fileds in the 4900 screen?
    Please respond.
    Best regards Steen Pedersen

  • Update VBRK append structure field

    Hi,
    I have added append structure field in VBRK.
    While doing billing cancellation, i have to update a value in this field for the billing number.
    I have coded this in a user exit.
    I ve called another program and written coding for updation. DB_UPDATE_TABLE FM  used for updation.
    The value is getting updated in the table. But once it came to the user exit, the value of the field is gone from the table.
    What could cause this issue?
    Thanks in advance.
    Ezhil

    Hi,
    1. Please check in the program that are you clearing the internal table any where ?
    2. If you are using the submit statement you can use with return statement .
    3. Other Export that internal table to memory inside the program and import that same internal table in the  user exit.
    Hope this might helps you to solve your problem.
    With Regards,
    Sumodh.P

  • Donu00B4t  see the fields after to change the append structure

    Hi experts,
    My problem is the following. I enhanced a Extraction Structure, I activated the append structure, and I assigned the Infosource to the datasource and it was ok. Then, I had to do some changes to the append structure, I again activated it, replicate the datasource, but I don´t see the changes. When I replicated the datasource for first time I saw the fields of the append structure, even I did the transfer rules. Then, when I did the changes I could not see more the new changes, but I can see the fields that they have not been changed.
    The changes were:
    - I changed the name of the one field because it was longer of 16 car. (before ZZ_CLASSIFICATION, after ZZ_CLASSIFCAT).
    - I added two fields more.
    I am not sure How works the RSA3 transaction. On it I entered the datasource name and I pressed the "Strat Extraction" and the system show to me a message "1558 register selected", then I pressed "Display List" but I can´t see the changes
    Do you have any idea about what happen?
    Thanks

    Hi Leonel,
    Usually, when I try to enhance my DS, I delete DS-IS assignment. Then do what you've done already. If you don't delete the assignment first, then often the old info remains.
    So, delete this assignment and repeat all steps again.
    Best regards,
    Eugene

Maybe you are looking for

  • Submitting multiple forms with one Submit button?

    I'm working to create a web app for the iphone and am using an apple developed css within an html page. In doing so I have created three forms within the single page and would like to submit them simultaneously with one submit. I've looked and tried

  • Is it possible to upload Excel data in SAP ?

    Hi everybody, I just joined the forum u2013 nice to meet all of you. We have to input in SAP a huge amount of customer invoices (A/R) from an Excel File and I was thinking if it is possible to set up all the required fields and to automatically uploa

  • Skype Video Call

    J just want to say that Video Call in Windows Live Mesenger (MSN) is far more stable than in Skype, always problemes with the connection.  

  • Where to put utility jar (used by EJB's and war)

    Hello all, In many cases when you create a web application including EJB's and a WAR file packaged together in an EAR file, you need some utility classes that are used in the EJB's as wel as in the servlets in the WAR. The utility classes might for e

  • [svn:osmf:] 13994: Updating source path to control bar plugin.

    Revision: 13994 Revision: 13994 Author:   [email protected] Date:     2010-02-05 00:47:30 -0800 (Fri, 05 Feb 2010) Log Message: Updating source path to control bar plugin. Modified Paths:     osmf/trunk/apps/samples/plugins/ControlBarPluginTest/.acti