Modify Key Field Values of a table through Table Maintenance Generator

Hi All,
   I have created a z table with below structure. In this fields upto Valid To are all key fields. This is to ensure that consistant valid record get stored in the table.
MANDT     MANDT     CLNT     3     0     Client
VKORG     VKORG     CHAR     4     0     Sales Organization
VTWEG     VTWEG     CHAR     2     0     Distribution Channel
SPART     SPART     CHAR     2     0     Division
SKU     MATNR     CHAR     18     0     Material Number
LZONE     LZONE     CHAR     10     0     Transportation zone to or from which the goods are delivered
VALID_FROM     ZVALID_FROM     DATS     8     0     Valid From
VALID_TO     ZVALID_TO     DATS     8     0     Valid To
PLANT     WERKS_D     CHAR     4     0     Plant
SNP_TZONE     ZSNP_TZONE     CHAR     20     0     APO Transportation Zone
ERDAT     ERDAT     DATS     8     0     Date on Which Record Was Created
ERNAM     ERNAM     CHAR     12     0     Name of Person who Created the Object
AEDAT     AEDAT     DATS     8     0     Changed On
AENAME     AENAME     CHAR     12     0     Last changed by
I have created a Table Maintance program through the Table Maintenance Generator. And for that I have assigned a t code.
I can able to create new entires but i can not able to modify Valid_from and Valid_to entries of existing records.
Initially those two fields were in display mode but i went to its module pool program and made then as input enabled. But what the vales I was entering, its not getting saved in database. When we change the values of those fields and save it, the system is saying No Data Change.
Any inputs how to solve this issue. I can not make VALID_FROM and VALID_TO fields as non key.
Regards,

Hi,
  As you have already said that the value for valid to is a part of the key so you should not have any issues when this value is changed and the value is saved using the table maintainence generator, but in case you want to save values where the value for valid from has changed but the key is same we would not be able to save as there is already a value for the key, so if you want to save these values there are two ways 1 would either to delete the existing value value and create the new value or to have one more field as the key field like a counter so when the value is saved with a key the value is saved with counter as 1 and then ever next time for the new values increase the value of the counter.
In order to save these values use event 5 and put you code there.
You can also carry out checks for new aithorization in that event also.
Regards,
Himanshu

Similar Messages

  • Can we change key field values in table maintenance

    Hi,
      I have created Z-table and table maintenance for the same...
    In table maintenance..Can we change key field values??
    Is there any posibility????
    Rayudu

    you can do it in this way.
    open sm30->tablname->edit
    snow select the row(s)->copy->change the keyfield values-back->save.
    no in that sm30, select records with old primary key and delete->save.
    so you got all field similar for those record under modification, only the key field changed.

  • Key Field Value in FCC

    Hi Experts,
    I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format.
    I am using FCC to convert CSV into XML.
    In the FCC, I have used keyFieldValue parameter. For the Header Record, the Key Field Value is constant "H"; for Trailer Record the key field value is constant "T".
    However for Data Record, the key field value is not constant. The first character of Key field of Data Record will always be "D", but rest of the Alphabets can change.
    Sample File:
    "H","3.04",22/10/2009,16:31:12
    "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    "T",1393.27,1393.27,8
    Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    I have no clue, if this can be converted into XML through FCC.
    Any help will be highly appreciated.
    Regards,
    Varun

    >
    Varun Agarwal wrote:
    > Sample File:
    >
    "H","3.04",22/10/2009,16:31:12
    > "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    > "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    > "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    > "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    > "T",1393.27,1393.27,8
    >
    > Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    >
    > I have no clue, if this can be converted into XML through FCC.
    > Any help will be highly appreciated.
    >
    >
    > Regards,
    > Varun
    Write a simple module. The module will do a replace of the Dxx fields to D (you can use simple regex function for this)
    After the module, use the messagetransformbean to do the FCC for you.
    The module might sound complex, but trust me its a simple logic you need to implement and you can easily do the FCC with the messagetransformbean

  • How can we hide the non key field values in the sm30 display

    hello experts,
    I have to protect the non key field values in the sm30 display , can u help me out wat changes i have to do in the layout.

    Hello Gopal,
    What do you mean by 'protecting' your non-key field value?
    1) You want to display it, but make it non-changeable
    A - Make the field as output-only in screen, as already answered by a preivous collegue
    2) You do not want to display this field at all
    A - Goto the DDIC definition of the view (not possible for a table directly), and maintain the required field as a Hidden. After activating, remember to re-generate the maintenance dialogue. Also, please maintain Event 21, in case you want to access/change the value of this field in background.
    3) You want to maintain special validations/checks for the field
    This can be easily done by introducing your modules within the CHAIN-FIELD commands in the PAI of the generated screens.
    Best Regards,
    Rekha

  • Modify form field value

    I have the PDF form with several fields. I want to set the value of one field depending on selection made by the user in other field. I am trying to use if statement but it does not work for me. I have copied below the script I am trying to use.
    form1.#pageSet[0].Page1.Table.Table3[0].Row1.Cell1::change - (JavaScript, client)
    if (oField.rawValue == "Service Alert")
       this.resolveNode("Cell4").rawValue = "A";
    else if (oField.rawValue == "Service Bulletin")
       this.resolveNode("Cell4").rawValue = "B";
    When user selects Service Alert in Cell1 I want the value of Cell4 to be set to A and if Service Bulletin is selected I want the value of Cell4 to be set to B.
    Can someone help me with the script. I have done a bit of searching and tested verious syntax but nothing did work. I hope someone will help me to have it working.
    Regards,
    Tony

    Thank you very much for your help, but it did not work for me. I have decided to reply and to send you the form. Could you please have a look on what I have done and try to fix it. I want to add action to Cell1 to modify Cell4 in row 1 of the form, top on the blue background.
    Regards,
    Tony Pluta
    Engineering Technical Coordinator / Graphics Designer, Engineering
    Rail
    Description: C:\Users\tony.pluta\AppData\Roaming\Microsoft\Signatures\UGLLimited.gif
    16 Broadmeadow Rd | Broadmeadow NSW 2292 | Australia
    Direct: +61 2 9492 1277  | Mobile: +61 403 399 167
    Fax: +61 2 9462 1383
    Email: [email protected]
    Web: www.ugllimited.com<http://www.ugllimited.com/>
    Please consider our environment footprint before printing this e-mail
    From: kvdvijaykumar [email protected]
    Sent: Wednesday, 29 May 2013 4:14 PM
    To: Tony Pluta
    Subject: modify form field value
    Re: modify form field value
    created by kvdvijaykumar<http://forums.adobe.com/people/kvdvijaykumar> in LiveCycle Designer - View the full discussion<http://forums.adobe.com/message/5360639#5360639

  • Add field value to the existing internal table.

    how to add a field value to the existing internal table.
    DATA: BEGIN OF ITAB occurs 0,
                 EBELN TYPE EKPO-EBELN,
                 EBELP TYPE EKPO-EBELP,
                 AEDAT TYPE EKPO-AEDAT,
                 amount(10) type c,
               END OF ITAB.
    select * from ekpo
           into corresponding fields of table itab.
    itab-amount = '2400'.
    loop at itab where ebeln eq 70 .
           write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
             endloop.
    here output is not showing the amount field value.
    please tell me how to solve this problem urgent
    thanks in advance.

    Hi Sekhar,
        First let me know wheather you are assigning some value to the amount field externally to all records? if this is wright means check the below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    v_amount = '2400'.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,v_amount.
    endloop.
    or if you want to modify perticular records in itab  then use below code.
    DATA: BEGIN OF ITAB occurs 0,
    EBELN TYPE EKPO-EBELN,
    EBELP TYPE EKPO-EBELP,
    AEDAT TYPE EKPO-AEDAT,
    amount(10) type c,
    END OF ITAB.
    select * from ekpo
    into corresponding fields of table itab.
    loop at itab.
    itab-amount = '2400'.
    modify itab index sy-tabix (or perticular line number).
    endloop.
    loop at itab where ebeln eq 70 .
    write : / sy-tabix,itab-ebeln,itab-ebelp,itab-aedat,itab-amount.
    endloop.
    Thanks,
    Suma.

  • Key Field Value for File Adapter Sender Wildcard

    Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
    Regards,
    Julio Cesar

    Hi Julio
    File sender adapter will read the file using FCC
    Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
    http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
    Content Conversion ( The Key Field Problem )
    Thanks
    Gaurav Bhargava

  • Wild Card as key field value in Content Conversion

    Hi,
         Can any one please tell me that can a wild card such as '*' be used as key field value.
    Thnx,
    Pravesh Puria.

    Hi Pravesh
    For the file name in the sender file adapter you can use the '*' or '?'(as a placeholder for exactly one character)
    You can also enable the "Advanced Selection for Source File" in the sender file adapter, where you can do two things:
    a)you can specify an exclusion mask for the file name specified above.
    b)you can specify/lits multiple directories with a file name and an associated exclusion mask, e.g. in file name you put ".txt" and in the associated exclusion mask "a". The every file with ".txt" except "a" will be fetched from that directory. 
    Try it out.
    Regards,
    Goekhan

  • File Content Conversion - Key Field Value

    Hi Experts,
    I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :
    I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.
    In the 'Content Conversion' tab, my attributes are as:
    Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?
    Please advise. Thanks a lot.
    Regards,
    Freddy.

    >>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L
    AFAIK it is not possible but lets wait for other experts to comment on this...
    >>Can keyFieldInStructure (add, ignore) parameter help me in this case ?
    No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...
    Chk this:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

  • How to convert flat file to XMl without key field value

    Hi experts,
    I have a input CSV Flat file which has got one HEADER line and Multiple Detail records.
    I do not have any key field value to convert this FLAT file to XML using normal file content conversion.
    Is there any module or Bean which can be used to convert this Flat File to XML.
    Or any other remedy to overcome this problrm.
    Thanks in advance.
    Regards
    Pradeep

    Hi Saurabh,
    Thanks for the reply.
    Ur understanding is perfectly alright.Lets say my file is like below.
    Account Number,Account Name,Currency,Unclear Balance,Account Balance010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
    010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
    010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
    010205000036,SHUBH LAXMI AGENCIES,0.00,0.00,0.00
    010205000037,EMPIRE AGENCIES,0.00,-245.11,0.00
    010205000038,PIONEER AGENCIES,0.00,-696386.00,303614.00
    I am not using the first line in the mappiing.
    Are you saying that I need to ignore the first line while doing the conversion using Recordset OFFSET ?
    Or do I need to make a single structure taking all the fields from header as well as details and while defining the structure I need to ignore the fields from header?
    Please suggest.

  • Content Conversion without key field value

    Hi all,
    I want to do a content conversion which includes a record structure Header,1,Detail,*
    I dont have any key field value in the header nor in the detail. Can this be achived using FCC or should i go for Java.
    Rgds
    Aditya

    Hi Aditya,
    I think if u having multiple records then one shud hav key fields,
    pls check 4th point in this guide
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/troubleshooting%2bthe%2bfile%2badapter
    Also check this discussion::File Content Conversion(SenderFileadapter) fields parameters
    Thanks,

  • Setting primary key field value in jdoPrestore() not flushed to database ?BUG?

    Hello,
    When I set value of primary key field of a new instance in jdoPrestore() new
    value does not get flushed to database - old (default) value get stored
    instead. All other fields assigned in jdoPrestore() get successfully
    flushed except primary key one.
    Alex

    Abe,
    You fixed only part of the problem. Right now if I assign value to a PK
    field in jdoPreStore() it does get flushed but there is another issue - all
    other instances which referenced the one I assigned PK to will not get this
    PK value. Example A references B, in B.jdoPreStore() I generate id for B -
    b.id = 100. When A gets flushed it would not get 100 in its b_id field.
    Specs says:
    This method is called ***before the values are stored from the instance to
    the StateManager***.
    Data store fields that might have been affected by modified non-persistent
    fields should
    be updated in this method. This method is modified by the enhancer so that
    changes to
    persistent fields will be reflected in the data store.
    The context in which this call is made allows access to the
    PersistenceManager and
    other persistent JDO instances.
    I read it as callbacks should be invoked on ALL instances before they get
    stored to StateManager. Does Kodo invoke callbacks for all istances first
    and then store them to instance manager? Based on the problem I am having it
    does not look like it
    Alex
    "Abe White" <[email protected]> wrote in message
    news:[email protected]..
    I just confirmed this as a bug and fixed it. We should be able to post
    the new jars for you soon. Hang in there.

  • Modify the field value in itab1 using itab2

    Hi experts
    I need some help.
    My question is : I have ITAB1 contains IBLNO field it is a legacy value.
    I want to modify this field.
    Another internal table  ITAB2 contains sap, legacy value of IBLNO(Cross refrenced table).my requirement is  IBLNO of  ITAB1 is modified with corresponding sap IBLNO in ITAB2.
    plz help
    Durga Parsad

    Hi Durga,
    You want to get following results -
    1. You have ITAB1 containing IBLNO.
    2. ITAB2 has IBLNO.
    3. Modify ITAB1-IBLNO from ITAB2-IBLNO.
    4. There must be some common value between the two tables. It has to be there otherwise the two records won't match.
    Kindly find the following code for doing so -
    LOOP AT ITAB2 INTO WA_ITAB2.
    * Modify ITAB1 from workarea of ITAB2 for matching records
      MODIFY ITAB1 FROM WA_ITAB2     
        TRANSPORTING IBLNO                " Modify only IBLNO of ITAB1 for matching records
        WHERE FIELD1 = WA_ITAB2-FIELD1.   " Some common field between the ITAB1 & workarea of ITAB2  
      CLEAR WA_ITAB2.
    ENDLOOP.
    Hope this helps.
    PS If the answer solves your query, plz close the thread by rewarding each reply and marking it Solved.
    Regards

  • Gr/ir slip field value is not stored in table mkpf..!!

    dear sap gurus,
        i have a typical problem.. i am doing Transfer posting from one storage location to another. using MB1B with 311 mov type.. and mentioning some values in the gr/ir slip field.. but system is not storing the value in table..
    Can any one say how to solve this.. if i use MIGO_TR then its storinghte value i mentioned in MKPF table..
    Regard,
    Manu

    Hi Manu,
    This GR/GI slip number has only been designed for use in those countries (for example, Italy) whose legislation requires specification of this number for goods that leave the plant and are transported on public roads. In other countries, the material document number printed on the GR/GI slip (in the standard system) is usually sufficient. To enter external  documents, you can use the field Material slip or Delivery note.                                                                               
    If still wants to use this field you are required make relevent settings in config.                                            
    Please go to transaction OMC1.       
    There you will find 4 push buttons.                                        
       1. Activation of GR/IR slip for plant.                                     
       2. Number range grouping code.                                             
       3. Intervals for number range.                                             
       4. Object(here you are assigning the number range for the plant,  storage location and movement type.          
    This will allow you to store GR/IR slip number in MKPF with trx. MB1B
    Regards
    Mauro

  • Using MISSING FIELD VALUES ARE NULL for external table

    I want to place a null for values missing in the sub_account field. Here is my external table:
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    missing field values are null
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1),
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;
    How can I place the MISSING FIELD VALUES ARE NULL for missing values for the sub_account?

    made the change I received this error:
    SQL> select * from ext_INCOMING_ORDERS_table;
    select * from ext_INCOMING_ORDERS_table
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "no": expecting one of: "comma, date_format,
    defaultif, enclosed, ltrim, lrtrim, ldrtrim, notrim, nullif, optionally, ),
    rtrim, terminated"
    KUP-01007: at line 7 column 26
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1) NO PRESERVE BLANKS,
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;

Maybe you are looking for

  • Can a ePub or an App through DPS be 508 accessible?

    Does anyone know if you can make an ePub designed through InDesign 508 accessible? What about a digital publication app built through the Folio/Viewer builders? Thanks.

  • InDesign trial version will not open

    I just downloaded the creative cloud and the trial version of InDesign. Everything seems to have gone fine with the download, however, when I try to open InDesign nothing happens whatsoever. I disabled my firewall, am using WIFI, running Windows 7 Pr

  • Gis data uploading in oracle 10g database

    hello everybody , i am new to oracle 10g ,but i am working in gis field for sometime now.i wanted to know whether there is any method present to upload a gis (shape file)data,and the erdas imagine data, in oracle spatial without going to buy the heft

  • Smart Folders - How do I set it to search one particular folder only?

    I want to set up a Smart Folder that will basically do the following: 1: Look in folder called "Client Work". 2: Find files modified in the last 1 week. That's it. Point 2 I can easily manage, but I can't figure out how on earth I am supposed to set

  • Importing transport request into CE7.1 giving trouble

    Hi All,      When we are trying to import the transport *.sda files into CE7.1. Guided Procedures->Administration->transport--->import transport Requests giving      No endpoint alias has been maintained; create an endpoint alias first. If we try to