How to create one primary key for each vendor

Hi all
i am doing IDOC to jdbc scenario
i am triggering idoc from R/3 and the data is going into DB table vendor through XI.
structures are as follows:
sender side: ZVendorIdoc (this is a customized IDOC , if i triger IDOC for multiple vendors then it triggers only 1 idoc with multiple segment )
Receiver side:
DT_testVendor
    Table
        tblVendor
            action UPDATE_INSERT
            access                     1:unbounded
                cVendorName         1
                cVendorCode        1
                fromdate                1
                todate                    1
             Key1
                cVendorName         1
if i trigger idoc for multiple vendors ,for example vendor 2005,2006 and 2010 . then i can see that the only key comes from the very first field (2005) and the whole record for vendor 2005,2006 and 2010  goes into the table with this(2005) as a primary key
now again if i send data for these three vendor 2005, 2006 , 2010, in which record for the vendor 2005 is same and for 2006 and 2010 are different than it takes 2005 as a primary key and it does not update the data in the table.
my requirement is like this:   for each vendor there should be one unique key assigned.
                                          for above said example there should come three keys one for each vendor .
could you please help me how to do this???????????

Hi,
  In Mapping Make the statement is 0-unbounded.For each vendor create a statement.This will solve your problem.
Regards,
Prakasu.M

Similar Messages

  • How to genarate Primary Key for each record in XI  Mapping

    Hi,
    I need to genarate primary key for each record in the paylod in mapping..
    Eg: if i have a 10 reacords i need to have a primary key for each record..starting with the
    Record      Primary key
    First            001
    Secound      002
    Tenth         010
    If i need to write any user defined funtion... can any one provide the code for it.
    Thanks
    Amaresh

    Hi Bavesh,
    I will explain with the example:
    XML:
    <Record 1>
    <Primary key>
    <value1>
    <value2>
    </Record 1>
    <Record 2>
    <Primary Key>
    </Record 2>
    like above i will be getting n number of recored and in each record i need  to genarate primary key in XI.and the key sould be in sequence...
    like for the first record 1 secound 2 like that primary key should add to the privous Primary key.
    and this is for each payload.
    Thanks
    Amaresh

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • I have 2 iphones4! Do I have to create one apple id for each device or I can have both in one apple id? I'm asking cause I'm trying to run findmyiphone app for both devices!

    I have 2 iphones4! Do I have to create one apple id for each device or I can have both in one apple id? I'm asking cause I'm trying to run findmyiphone app for both devices!

    Here's what I do. My wife and  I each have an iPhone. We each have our own Apple ID. I also have another totally separate Apple ID. The ONLY thing that one has been used for was to set up Find my iPhone for our phones and my iPad. There is no reason the MobileMe setting for find my iphone can't be something completely different from your regular Apple ID UNLESS you already use MobileMe, in which case the 2 conflict in ways I don't understand as I don't subscribe to it.

  • It is necessary to create one header data for each file to be sent to CDFS.

    hi GUYS
    my sce anrio is FILE-XI-PROXY
    REQUIREMENT IS
    SOURCE FILE                      TARGET FILE WILL BE
    H1                                             H1                        H1                    H1
    I1                                               I1                         I2                      I3
    I2                                                F1                        F1                    F1
    I3                                           
    F1
    It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
    Thanks
    NAG

    aa

  • Is it possible to create many primary key for a table?

    hello sir/mam.
    i am selva, i am new to abap,
    is it possible to create many primary key for a table?
    please guide me.

    Hi Selva,
    Many Primary Keys = Composite Key.
    i.e some set of columns will enable you to identify a unique row from a set of rows in the table.
    This can be achieved by checking the primary key check box in se11.
    Hope it helps.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • How to create an inspection lot for each line item of the Purchase order?

    Hi,
    How to create an inspection lot for each line item of the Purchase order ?
    In detail if possible.

    Hi
       please check this
    [thread|Create Inspection Lot;

  • How to create a account key for application type M ?

    Hi Guys,
    How to create a account key for application type M ? and link the same with
    Gl account.
    thanks.

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • How to create a foreign key for the table from two different tables?

    Hi All,
    I have a three table like below. In the below table SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK will be having the primary key for NAME column. The same SAMPLE_CONS3_CHECK table also having the primary key for NAME column and forieign key for SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK tables. See the below code 2
    code 1:
    CREATE TABLE SAMPLE_CONS_CHECK
            (NAME VARCHAR2(10),
            SERIES  VARCHAR2(5)
    CREATE TABLE SAMPLE_CONS2_CHECK
            (NAME  VARCHAR2(5),
             MODEL  NUMBER
    CREATE TABLE SAMPLE_CONS3_CHECK
            (NAME  VARCHAR2(5),
             MODEL_NO  NUMBER
            )code 2
    alter table SAMPLE_CONS_CHECK
    add constraint SAMPLE_CONS_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS2_CHECK
    add constraint SAMPLE_CONS2_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS3_CHECK
    add constraint SAMPLE_CONS3_CHECK_pk primary key (NAME)
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK1 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS_CHECK
        NAME
    ) ON DELETE CASCADE;
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK2 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS2_CHECK
        NAME
    ) ON DELETE CASCADE;From the above schenario i am able to insert the data to SAMPLE_CONS3_CHECK table. But the parent data is already available in the parent table. The problem is here two different constarints from two different tables. While inserting, it is checking from both the tables whether the parent is exist or not.
    How can i solve this problem? Can anyone halp me about this?
    Thanks
    Edited by: orasuriya on Aug 8, 2009 2:02 AM

    Actually the design is completely incorrect.
    What you say is
    I have
    'foo', 'foo series'
    'foo','foo model'
    'foo',666
    By virtue of table3 referring to both table1 and table2.
    This means you actually need to have 1 (one) table:
    'foo','foo series','foo model', 666
    And the 'problem' disappears.
    Sybrand Bakker
    Senior Oracle DBA

  • How to create a primary key

    Hello - New to Oracle and was wondering what is a good way to create an auto-incrementing primary key for a table. I have done this so far:
    Created a new sequence cst_swq begin with 1 increment by 1.
    CREATE OR REPLACE TRIGGER CST_TRIG
    BEFORE INSERT
    ON COOKIE_SALES
    REFERENCING NEW AS NEW
    FOR EACH ROW
    BEGIN
    SELECT CST_SEQ.nextval INTO NEW.SALE_ID FROM dual;
    This does not really work for me. Help with the code or a better idea to create primary key is much appreciated, thank you.

    adi26 wrote:
    This does not really work for me. What does that mean?
    In which way does this approch not meet your requirements?
    BTW: after 200+ posts you should have learned how to use tags...
    bye
    TPD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to create one inbound delivery for multiple purchase order?

    Hi Experts,
    Please let me know how can I create one inbound delivery for multiple purchasing documents(PO or SA)? 
    Is there a configuration needed for this?  If yes, please let me know the configuration to make this happen.
    Appreciate your help on this.  Right answers will be rewarded.
    Thank you.
    with regards,
    Muthu Ganapathy.

    Hi,
    my situation is:
    - a WM managed warehouse, society A;
    - a HU managed warehouse (without WM), society B;
    - a purchasing process of HU from society A towards society B.
    Society B have a scheduling agreement; when a delivery schedule appears, in society A born a sales order and a delivery. After the registration of the delivery good issue, an idoc transfer information for inbound delivery creation.
    This process is ok without WM, but with a WM managed warehouse the idoc has the following problem:
    "V51VP - item was not found - process cancelled".
    Can you help me to transfer these HU?

  • How to create a connection key for an intranet

    I'm trying to create a connection key for a client of ours to
    update a page on their intranet. The intranet is only available
    internally. How do I go about doing this?

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • How to create one GR document for mutiple Purchase orders

    Can you please explain me in SAP - How to create one Goods Receipt document for reference of Multiple purchase orders.

    Dear Tanuj,
    Both Rama & Stephen are correct.
    You can take Single GR for Multiple PO either in MIGO or MB01 as long as that POs belongs to same vendor.
    In MIGO, after putting the PO press,enter,  again give the next PO of that vendor .
    If this solve your problem, close the issue.
    With Regars,
    Krishna Reddy

  • LSMW me51n, how to create one PR document for all the records in the  file

    HI all,
    I need to create LSMW for t-code me51n -Create Purchase Requisition. I`m using Bapi BUS2105, method CREATEFROMDATA, idoc message type PREQCR, basic type PREQCR03. The problem is that the LSMW is creating different idoc and different PR document for every record in the source file. My requirement is to create one PR document for one source file (Every source file is different Purchase Requisition) . I`m trying to do this with writing some code(global functions ) in the 'Mapping and conversion rules'  events - BEGINOF_TRANSACTION_, ENDOF_TRANSACTION__..., but i`m not very sure what exactly i`m doing .
    Please help me resolve this problem, any help will be appreciated .
    Best regards, Emil Milchev.

    Thank you for you answer.
    But I have found faster way of doing it - two source structures, one HEADER and ONE ITEM.
    HEADER: one empty text field and identificator for it.
    ITEM: everything else.
    Then everything was just fine, i`ve mapped the different IDOC segments by PREQ_ITEM fields (equal values in the source file : 10-10-10..., 20-20-20,.... etc.) and put all required fields for my LSMW
    SOURCE FIELDS:
    Z_ME51N_V2 - MASS_UPLOAD - CREATE create
    Source Fields
    UPFILE                    upload file
                IDENT                          C(010)    ident
                                               Identifing Field Content: header
                TEXT                           C(001)
                UPFILE2                   123
                    IDENT                          C(010)    ident
                                                   Identifing Field Content: item
                    BSART                          C(004)    Document type
                    BANFN                          C(010)    Purchase requisition number
                    BNFPO_FOR_MAP                  N(005)    Item number of purchase req. for MAPPING acc.
                    BNFPO                          N(005)    Item number of purchase requisition
                    KNTTP                          C(001)    Account assignment category
                    PSTYP                          C(001)    Item category in purchasing document
                    MATNR                          C(018)    Material Number
                    WERKS                          C(004)    Plant
                    LGORT                          C(004)    Storage Location
                    MENGE                          N(013)    Purchase requisition quantity
                    EKGRP                          C(003)    Purchasing group
                    KONNR                          C(010)    Number of principal purchase agreement
                    KTPNR                          N(005)    Item number of principal purchase agreement
                    LIFNR                          C(010)    Desired Vendor
                    FLIEF                          C(010)    Fixed Vendor
                    AFNAM                          C(012)    Name of requisitioner/requester
                    PREIS                          AMT4(011) Price in purchase requisition
                    ABLAD                          C(025)    Unloading Point
                    WEMPF                          C(012)    Goods Recipient
                    PS_POSID                       C(024)    Work Breakdown Structure Element (WBS Element)
                    KOSTL                          C(011)    COST_CTR v bapito ?
                    NAME1                          C(040)    Name1 - Name of an address
                    NAME2                          C(040)    Name2 - Name of an address 2
                    STREET                         C(060)    Street
                    DELIVERY_DATE                  C(008)    Date on which the goods are to be delivered
                    TEXT                           C(132)    item text
    STRUCTURE RELATIONS :
    Structure Relations
    E1PREQCR              Header segment                                               <<<< UPFILE  upload file
               E1BPEBANC             Transfer Structure: Create Requisition Item                  <<<< UPFILE2 123
               E1BPEBKN              Transfer Structure: Create/Display Requisition Acct Assgt    <<<< UPFILE2 123
               E1BPEBANTX            BAPI Purchase Requisition: Item Text                         <<<< UPFILE2 123
               E1BPESUHC             Communication Structure: Limits                              <<<< UPFILE2 123
               E1BPESUCC             Communication Structure: Contract Limits                     <<<< UPFILE2 123
               E1BPESLLC             Communication Structure: Create Service Line                 <<<< UPFILE2 123
               E1BPESKLC             Create Comm. Structure: Acct Assgt Distr. for Service Line   <<<< UPFILE2 123
               E1BPESLLTX            BAPI Services Long Text                                      <<<< UPFILE  upload file
               E1BPMERQADDRDELIVERY  PO Item: Address Structure BAPIADDR1 for Inbound Delivery    <<<< UPFILE2 123
                   E1BPMERQADDRDELIVERY1 PO Item: Address Structure BAPIADDR1 for Inbound Delivery    <<<< UPFILE2 123
               E1BPPAREX             Ref. Structure for BAPI Parameter EXTENSIONIN/EXTENSIONOUT   <<<< UPFILE2 123
    MAINTAIN FIELD MAPPING AND... :
    the MAPPING between two IDOC`s segments:
    In first segment:
    E1BPEBANC                      Transfer Structure: Create Requisition Item
             Fields
                 PREQ_NO                      Purchase requisition number
                                     Source:  UPFILE2-BANFN (Purchase requisition number)
                                     Rule :   Transfer (MOVE)
                                     Code:    E1BPEBANC-PREQ_NO = UPFILE2-BANFN.
                 PREQ_ITEM                    Item number of purchase requisition
                                     Source:  UPFILE2-BNFPO (Item number of purchase requisition)
                                     Rule :   Transfer (MOVE)
                                     Code:    E1BPEBANC-PREQ_ITEM = UPFILE2-BNFPO.
    In second segment :
    E1BPEBKN                       Transfer Structure: Create/Display Requisition Acct Assgt
               Fields
                   PREQ_NO                      Purchase requisition number
                   PREQ_ITEM                    Item number of purchase requisition
                                       Source:  UPFILE2-BNFPO_FOR_MAP (Item number of purchase req. for MAPPING
                                       Rule :   Transfer (MOVE)
                                       Code:    E1BPEBKN-PREQ_ITEM = UPFILE2-BNFPO_FOR_MAP.
    After that everything was OK .

Maybe you are looking for

  • Duplicate payment

    Hi, I have a following case -- There are two duplicate payment lots created -  X and Y . Then all items in Y lot are reversed. But in the FBL3N , duplicate entries can be seen. Is there any process missing ? Thanks. Nachiket

  • Acrobat Pro 8.1.3 always opens in browser

    As a result of Adobe recently automatically updating my Acrobat 8 Pro to version 8.1.3 it now always opens clicked PDF links in IE7 browser window, even though EDIT/PREFERENCES/INTERNET "Display PDF in browser" is UNTICKED in both Acrobat Pro and Acr

  • Query Selection Box Descriptions

    When I set up selections options in the 'WHERE' statement the selection fields default to standard text such as: Posting Date                          Greater or equal Posting Date                          Smaller or equal Description in Foreign Lang

  • SEM-BCS  Enh 5.0 in SEM-BW 605 as per 1171344

    any rumors on when a new version ([currently 7|https://service.sap.com/sap/support/notes/1171344]) is coming to the market? looking at prior versions it should happen any time now.

  • "Message Driven Bean" doesn't work with Sun App Server

    Hello all, i have a little bit problems, running a simple "Message Driven Bean" under the Sun App Server. The deployment of it works fine, but after starting the SUN App Server i get the following error message: An error occurred during the message-d