on 10-10-2006 11:29 AM
Hi all,
I have got a strange problem, i am not able to create multiple child records for an existing customer.My scenario is like this:
1) One Syncbo has customer(Header table) and two child items(010-email,020-address).
So for an existing customer if we want to create 2 email records at a time, we not not able to create 2 records.
Suppose if we create two records 1 and 2, only record 2 comes back to the client and record 1 gets updated in backend with customerID as 00000(so not able to be replicated back to MW)
My modify bapi is working fine.
Can any one help me out.
Thanks,
Karthick
Hi Karthik,
I think there is a some problem the way the Create BAPI is creating data in the Backend. If the Key field is Numeric field we generate R3key in the Middleware and then send it to the backend. Just check of the child records keys are Numeric or not.
Also try to debug by putting a break point at the time of creation of child items and find out if the customer id is being populated with value or not at the child item. If not then you may have correct the logic to populate the key with value from the header.
Thanks...
Preetham S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Preetham,
Yes our primary keys are numeric.
I have found the problem.
I have debugged it and i found that MW generates some R/3 keys before entering into the Modify bapi.
The scenario is like this, email child table has primary key as sequence no. and header table primary key is customerid.
In backend, email table has foreign key as customerID.
2 records are created with initially sequence no and customer id as 000000 and bapi has the logic to insert customerid as TOP and generate new sequence no. to email table.
But what happend here is before entering into the bapi logic, mw is generating the first created
Sequence no 1 customer ID 00000
Sequence no 0 customer ID 00000
So the bapi logic is searching for sequence no. 0000 so that it will generate new sequence no.
But in the above case it indentifies the first record as the existing child record to be modified and it modifies and places it in backend as it is.
And coming to second record it will treat it as 000 and generate new sequence no.
This problem is only for BAE,U7A systems
For MI4 system we have a similar application its working fine there(Able to create multiple child records)
I have made Bapi logic to populate the key with value from the header for modify.
The problem is that as MW generates R/3 keys automatically to sequence no. in the above case, so bapi will treat sequence no. 1(above) as an existing sequence no. and try to modify it, any ways i have made bapi logic to indentify customerid as top-customerid(Now the problem with language dependent table-not able to fill data.)
Is this change(Assigning r/3 keys) from the Middleware was newly made?
But the same is working fine for MI4 system.
My question is that if there are changing going on in Middleware, accordingly we need to change our bapi code logic?
Any ways 10x a lot your very answer was helpful for me, i was able to solve my problem to some extent.
Thanks & Regards,
Karthick.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.