Requirment of two records in One Idoc
Dear Expert
Requirement is such that like:
Currently there is one condition Record in system as :
Site Vendor Article Tax Valid From Valid To Tax Code
111 100000 2000000 5% 01.01.2011 31.12.999 V0
Now User Inserting A new record As ;
111 100000 2000000 10% 11.11.2011 31.12.9999 V0
In this case if we triggered data through BD21 , Two Idoc are generating form SAP for Both Change Records
But Client requirement is such that both change records should flow in One Idoc.
How it can be done , what are those setting in SAP.
Thanks & Regards,
Surendra
Hi Oliver
Thanks for your reply.
Actually we want multiple segment of *E1KOMH* in one Idoc.
As this is already happening in our Quality client but in production is coming differently.
We utmost check all the setting related with idoc(Both client have same setting)
Can u suggest something more to resolve this as change in BADI , User Exits is the last option.
Regards,
Surendra
Similar Messages
-
Combine values from two records in one query
Hello.
Is it possible to combine two record - only one column value?
With one query we get these results:
A____B____C____D____E_______F_______G______H
+++++++++++++++++++++++++++++++++++++++++
28___84___P___16____________1____02.06.09___1
28___84___p___8_____________1____02.06.09___1
28___84___S___16____________1____02.06.09___1
28___84___T___12____________1____02.06.09___1
28___84___1___137___________1____02.06.09___1
28___84___5___18___66,42____1____02.06.09____1
28___84___6___14____________1____02.06.09___1
28___84___8___17___214,2____1____02.06.09___1
If there is a record with column C value 'p', then column value 'D' should be added to record with C value 'P' and 'S': result should be like this:
No 'p' record and values (D column) for 'P' and 'S' should be a summed by 8 from record 'p'.
A____B____C____D____E_______F_______G______H
+++++++++++++++++++++++++++++++++++++++++
28___84___P___24____________1____02.06.09___1
28___84___S___24____________1____02.06.09___1
28___84___T___12____________1____02.06.09___1
28___84___1___137___________1____02.06.09___1
28___84___5___18___66,42____1____02.06.09____1
28___84___6___14____________1____02.06.09___1
28___84___8___17___214,2____1____02.06.09___1
And this should be restricted to column A value.
Any idea?
Thanks.
Edited by: DejanH on Jun 2, 2009 11:39 AMOK, that's a messy requirement, here's one for 'p' but no 'P' (and 't' but no 'T'), and you can expand that for others yourself.
WITH test_data AS (
SELECT 28 A, 84 B, 'p' C, 8 D, NULL E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, 'S' C, 16 D, NULL E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, 'T' C, 12 D, NULL E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, '1' C, 137 D, NULL E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, '5' C, 18 D, 66.42 E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, '6' C, 14 D, NULL E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL UNION ALL
SELECT 28 A, 84 B, '8' C, 17 D, 214.2 E, 1 F, TO_DATE('02.06.09','DD.MM.YY') G, 1 H FROM DUAL)
-- end test data
SELECT td1.A, td1.B, td1.C,
CASE WHEN td1.C IN ('P', 'S') THEN NVL(td1.D,0) + NVL(td2.D, 0) ELSE td1.D END D,
TO_CHAR(td1.E * 100, 'fm99990,09') E, td1.F, td1.G, td1.H
FROM test_data td1
LEFT JOIN (
SELECT A, SUM(D) D
FROM test_data
WHERE C= 'p'
GROUP BY A) td2
ON (td1.A = td2.A)
WHERE C != 'p'
GROUP BY td1.A, td1.B, td1.C, CASE WHEN td1.C IN ('P', 'S') THEN NVL(td1.D,0) + NVL(td2.D, 0) ELSE td1.D END, TO_CHAR(td1.E * 100, 'fm99990,09'), td1.F, td1.G, td1.H
UNION
SELECT td1.A, td1.B, UPPER(td1.C) C,
SUM(td1.D) D,
TO_CHAR(td1.E * 100, 'fm99990,09') E, td1.F, td1.G, td1.H
FROM test_data td1
WHERE td1.C in ('p', 't')
GROUP BY td1.A, td1.B, UPPER(td1.C),TO_CHAR(td1.E * 100, 'fm99990,09'), td1.F, td1.G, td1.H
ORDER BY 1
A B C D E F G H
28 84 1 137 1 02-JUN-09 1
28 84 5 18 66,42 1 02-JUN-09 1
28 84 6 14 1 02-JUN-09 1
28 84 8 17 214,20 1 02-JUN-09 1
28 84 P 8 1 02-JUN-09 1
28 84 S 24 1 02-JUN-09 1
28 84 T 12 1 02-JUN-09 1
7 rows selected. -
Hi
I am using a Z function module to process an incoming idoc (custom process code).
While using the test tool WE19, I am trying to process an idoc. When I am using Inbound Function Module tab, the idoc is processing normally. But when I am using Standard Inbound, it is giving me message Idoc saved but cannot or should be processed.
Idoc was in status 64.
I tried debugging and found that idoc (while processing from Standard Inbound) in FM IDOC_STATUS_WRITE_TO_DATABASE, it is giving an error message because two status are present for the same Idoc.
While processing from Inbound function module, there is only one status in FM IDOC_STATUS_WRITE_TO_DATABASE and idoc is processing successfully.
Please advice, if anyone know why it is happening and how it is happening. I have not searched for SAP notes.Hi,
Check in your partner profile inbound parameters what options is selected. Trigger Immediately or Trigger by background program. Select Trigger immediately and try processing the idoc once again.
KR Jaideep, -
Getting data of two records in one line using SQL
Hi,
We have a COMPANY_RESEARCH table that maps companies to the Research Universes that do research on them. This table has:
COMPANY_ID VARCHAR2(100), foreign key to COMPANY table.
RESEARCH_UNIT_ID CHAR(1)
Valid values for RESEARCH_UNIT_ID are 1(US Equity), 2(Canadian Equity) and 3(Debt security).
Within my COMPANY_RESEARCH_ID table, I have:
COMPANY_ID RESEARCH_UNIT_ID
aaaa 2
aaaa 3
How can I write a SQL query that gives me the output?
Company Id Equity Debt
aaaa Canada Yes
My attempt was as below:
select
FILTERED_COMPANIES.COMPANY_ID as Company,
DECODE(FILTERED_COMPANIES.RESEARCH_UNIT_ID,'1','US','2','Canada','3','N/A') As Equity,
DECODE(FILTERED_COMPANIES_1.RESEARCH_UNIT_ID,'1','N/A','2','N/A','3','Yes') as Debt
FROM
select distinct
company_id, research_unit_id
from company_research_relation
)FILTERED_COMPANIES,
select distinct
company_id, research_unit_id
from company_research_relation
)FILTERED_COMPANIES_1
WHERE
FILTERED_COMPANIES.COMPANY_ID = FILTERED_COMPANIES_1.COMPANY_ID
AND FILTERED_COMPANIES.RESEARCH_UNIT_ID = FILTERED_COMPANIES_1.RESEARCH_UNIT_ID
but that produces output as below:
Company Id Equity Debt
aaaa Canada N/A
aaaa N/A Yes
Thanks in advance..Hi,
how about this one?
SELECT select_equity.company_id, enquity, dept, select_equity.research_unit_id, SELECT_dept.research_unit_id
FROM
(SELECT company_id, research_unit_id, DECODE(RESEARCH_UNIT_ID,'1','US','2','Canada','3','N/A') enquity FROM company_research) select_equity,
(select company_id, research_unit_id, DECODE(RESEARCH_UNIT_ID,'1','N/A','2','N/A','3','Yes') Dept FROM company_research) SELECT_dept
WHERE select_equity.company_id = SELECT_dept.company_id
AND enquity != 'N/A'
AND dept != 'N/A';
Regards,
Gerd -
Hi
I have a table as
Table 1
ID phonetype number 1 number2 number3
1 off 32123 23233 45455
1 res 43545 45455 45543
1 cell 34232 63453 45432
now I want to combine them into a single record as
id phone1 num1 num2 num3 phone2 num1 num2 num 3
1 off 32123 23233 45455 cell 34232 63453 45432
please help me in this
thankstry this...
with tab_1 as
(select 1 ID, 'off' phonetype , 32123 num1, 23233 num2, 45455 num3 from dual union all
select 1, 'res', 43545, 45455, 45543 from dual union all
select 1, 'cell', 34232, 63453, 45432 from dual),
tab_2 as
(select 1 id, 'ABC' name from dual)
select tab_1.id,tab_2.name,
max(decode(rn,1, tab_1.phonetype)) phonetype1,
max(decode(rn,1, tab_1.num1)) num1,
max(decode(rn,1, tab_1.num2)) num2,
max(decode(rn,1, tab_1.num3)) num3,
max(decode(rn,2, tab_1.phonetype)) phonetype2,
max(decode(rn,2, tab_1.num1)) num11,
max(decode(rn,2, tab_1.num2)) num12,
max(decode(rn,2, tab_1.num3)) num13
from (select id,phonetype,num1,num2,num3, row_number() over (partition by id order by id) rn from tab_1) tab_1,tab_2
where tab_1.ID = tab_2.ID group by tab_1.id;
ID NAM PHON NUM1 NUM2 NUM3 PHON NUM11 NUM12 NUM13
1 ABC off 32123 23233 45455 cell 34232 63453 45432 -
How many maximum records can be stored in One IDoc
Hi experts!!
Please let me know what is the maximum capacity of an IDoc. i.e.,
How many maximum records can be stored in an IDoc?
ex: abc,9807,bangalore
xyz,8976,mysore....... here two records are thr...if u have one lack records like this can we store all the records in one IDoc,....
Thanks in advance,
Sunil K ShettyHi Sunil,
Idoc structure is
1. Control record,
2. Data rord,
3. Status record.
1.Control record: contain only who is sender,who is receaver, /which type of data,Idoc number.
IT store the all control records in one table: EDIDC
2.Data Record: it contains the data records.(multiple records)
It stores the data records sre stored in one table: EDIDD
3.Status records: It show the stutus of the record. (It is multiple)
The status records are stored in one table: EDIDS
Rewords some points.
Rgds,
P.Naganjana Reddy -
Merging two records in a single record for the same matnr,werks and bwart.
Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
Then there should be only one record for the same matnr,werks,bwart.
Any suggestion would be appreciated.
Regards,
Amithi,
You can COLLECT statement only if all non key fields are numeric.
This statement Adds all such fields and give us a single record.
Regards
Sumit Agarwal -
Read-only report for two records
I have a table that has two records per one parent record.
I want to display these two records on a page containing read-only fields (items) of the parent record.
I was thinking of just having two regions each of which would perform a SELECT to pull it's respective record.
Would I have to create fields for each record to load the fields into and then make each field be read-only?
I did this to load one of the records into a form:
select field1, field2 into px_field1, px_field2 where...
I just wondered if there was an easier way other than creating two sets of fields to hold each record.
I tried some of the canned reports using the wizard. Easy enough to pull the two records but the formatting goes a mile to the right and this page is to be used for printing.
Thanks,semaphore,
Have you considered using a Master Detail form. The forms have record navigation and the detail columns of the form can be altered to Display As Standard Report Column making them read only. As well, the Master part of the form can also be configured to be read or display only.
Jeff -
How I can do this update, when I have two records (one primary key, no seq)
How I can do this update in pl\sql
Here is the table with some data
CREATE TABLE INSERT_TE
PIDM VARCHAR2(8),
FORM_ID VARCHAR2(2),
TEACHER VARCHAR2(30)
INSERT into INSERT_TE
PIDM,
FORM_ID,
TEACHER
SELECT
'1106651',
'TE',
'Teacher, Alber Howard'
from dualcommit;
INSERT into INSERT_TE
PIDM,
FORM_ID,
TEACHER
SELECT
'1106651',
'TE',
'Teacher, Alber2 '
from dualcommit;
INSERT into INSERT_TE
PIDM,
FORM_ID,
TEACHER
SELECT
'2321241',
'TE',
'Teacher, Silly Billy '
from dualcommit
You are going to ended with something like this: In a cursor..
PIDM FORM_ID TEACHER
1106651 TE Teacher, Alber Howard
1106651 TE Teacher, Alber2
2321241 TE Teacher, Silly Billythen I need to update a table
if the there is only one record like this one 2321241 TE Teacher, Silly Billy
not problem I do this
UPDATE saturn.sarchkl
SET
sarchkl_receive_date = SYSDATE,
sarchkl_activity_date = SYSDATE,
sarchkl_source = 'U',
sarchkl_source_date = SYSDATE
WHERE
sarchkl_pidm = v_pidm3
AND sarchkl_receive_date IS NULL
AND sarchkl_term_code_entry = p_term
AND sarchkl_admr_code = 'REC1'But if there is a PIDM (pk) with two records
PIDM FORM_ID TEACHER
1106651 TE Teacher, Alber Howard
1106651 TE Teacher, Alber2 I need to do 2 updates (notice the AND sarchkl_admr_code rec1 for the firs and rec2 for the second
The first record should update the table when the condition is sarchkl_admr_code = 'REC1' and the second record with the
condition is sarchkl_admr_code = 'REC2'
UPDATE saturn.sarchkl
SET
sarchkl_receive_date = SYSDATE,
sarchkl_activity_date = SYSDATE,
sarchkl_source = 'U',
sarchkl_source_date = SYSDATE
WHERE
sarchkl_pidm = v_pidm3
AND sarchkl_receive_date IS NULL
AND sarchkl_term_code_entry = p_term
AND sarchkl_admr_code = 'REC1'and
UPDATE saturn.sarchkl
SET
sarchkl_receive_date = SYSDATE,
sarchkl_activity_date = SYSDATE,
sarchkl_source = 'U',
sarchkl_source_date = SYSDATE
WHERE
sarchkl_pidm = v_pidm3
AND sarchkl_receive_date IS NULL
AND sarchkl_term_code_entry = p_term
AND sarchkl_admr_code = 'REC2'I am doing this in pl\sql, I don't have a sequence in the table INSERT_TE, how I know that the first record in
1106651 TE Teacher, Alber Howard
1106651 TE Teacher, Alber2 update a rec1 and the second updates when sarchkl_admr_code = 'REC2',
I guess I can create a sequence, but I am inserting a table from a select satement, I am getting the error
ORA-02287: sequence number not allowed here, when I try to do the following:
INSERT INTO SYTEACH
SYTEACH_PIDM,
SYTEACH_ID,
SYTEACH_TEACHER,
SYTEACH_SEQ
SELECT
DISTINCT
spriden_pidm,
sarchkl_admr_code,
szsform_form_id,
szsform_schl_off_type||', '||szsform_schl_off_firstname||' '||szsform_schl_off_lasttname teacher,
SZSFORM_SEQ.NEXTVAL
FROM saturn_midd.szsform, saturn.spriden, saturn.sarchkl
WHERE spriden_ntyp_code = 'CAPP'
AND szsform_common_app_id = spriden_id
AND spriden_pidm = sarchkl_pidm
AND sarchkl_admr_code = 'REC1'
AND szsform_form_id = 'TE'
What is the simple way of doing this update..Hi,
you said:
>
But if there is a PIDM (pk) with two records
PIDM FORM_ID TEACHER
1106651 TE Teacher, Alber Howard
1106651 TE Teacher, Alber2
>
No! pks are unique! (otherwise we don't call them pk)
For your table you could define a unique like this:
PIDM column + a sequence. (new column):
ALTER TABLE INSERT_TE ADD(TEACH_SEQ NUMBER)
UPDATE INSERT_TE x
SET TEACH_SEQ =
(SELECT n
FROM (SELECT ROWID rid,
ROW_NUMBER() OVER(PARTITION BY pidm ORDER BY TEACHER) n
FROM INSERT_TE t) s
WHERE s.rid = x.ROWID)
PIDM FORM_ID TEACHER TEACH_SEQ
1106651 TE Teacher, Alber Howard 1
1106651 TE Teacher, Alber2 2
2321241 TE Teacher, Silly Billy 1I need to do 2 updates (notice the AND sarchkl_admr_code rec1 for the firs and rec2 for the second
The first record should update the table when the condition is sarchkl_admr_code = 'REC1' and the second record with the condition is sarchkl_admr_code = 'REC2'
>
normally no.
but you can (now) do
select PIDM, FORM_ID, TEACHER, 'REC'||TEACH_SEQ TEACH_SEQ from INSERT_TE
PIDM FORM_ID TEACHER TEACH_SEQ
1106651 TE Teacher, Alber Howard REC1
1106651 TE Teacher, Alber2 REC2
2321241 TE Teacher, Silly Billy REC1and use the last column for you update ...
Edited by: user11268895 on Aug 20, 2010 2:01 PM -
Split one IDoc into two IDocs ?
hello all,
I wanna split one IDoc into two IDocs in XI?
how can implement it?
plx give some suggestions.
thx in advance
best regards
Yaning
Message was edited by:
Yaning LiuYaning,
Please find the below blog for changing the ocurrences of IDOC
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
Best regards,
raj. -
Comparing two data records of same IDOC
Hi,
In PI, we need to compare two data records of same IDOC to figure out if what type change occurred. For example, BENFIT3 IDOC contains data records tilted "E1BEN04". When there are multiple "E1BEN04" data records, then we need to compare the data inside them to see whether name, or data of birth or SSN is changed.
Has anybody came across this before. Your help is much appreciated.
Thanks
-TejaIf it is very few fields then you could use graphical mapping to determine the changes.
-
Two records are repeated in report..but differ on one column that is amount
Hi SAP GURUS.........
I have a report that is containing one of the columns as wbs element.Now when i execute a report i am gettin two records of the same wbs element.one is having the amount (in figures),while the other record dont have amount values.
Can u explain me why this is happening i mean two records which are same in every respect expect the amount values.???
Thanks!!!
Shashi Sharma.Hi Sashi,
Do you have WBS element as only one column in your report or there are any other column also present in drilldown?
Because if there are multiple columns then though the value of WBS element is same but due to different value of other characteristic you are getting multiple rows in the report.
Regards,
Durgesh. -
Two prices for one material in sales order according condition type
Hi,
I configure the condition type according to following condition record:
Plant/ Sales Organization/ Distribution channel/ Material / Customer
(because system should calculate two prices for one material in two plants)
In the sales order screen, when user firstly select material , quantity, plant , system calculate the related price correctly but if user select the material and quantity and enter and after that select the plant, system will show the error message in pricing procedure and to have a price for material, user should update the price in the price condition in sales order.
It is so difficult for user to update one by one, because there are several sales orders which need to update.
Is it any way to solve this problem?
Thanks,> In the sales order screen, when user firstly select material , quantity, plant , system calculate the related price correctly but if user select the material and quantity and enter and after that select the plant, system will show the error message in pricing
Hi,
Why to let the user press Enter button before entering plant value Obviously, system will give error, because it doesnt get all the required value based on which you have maintained condition records.
Ask the user to enter all the value at item level otherwise you will have go for the option that you are doing currently.
It is said prevention is better than cure
Hope you get some inputs
regards,
Sagar -
Mapping Issue: one IDoc to multiple IDocs concerning incoming segments
Hi,
i want to devide one incoming IDoc to two or more outgoing IDoc's of same type concerning the appearance of one segment.
Incoming is:
<IDOC BEGIN=""> 1...1
<EDI_DC40 SEGMENT="">
</EDI_DC40>
<..>
<Z1MOV SEGMENT=""> 0..99999
</Z1MOV>
</IDOC>
Target should be:
for each Z1MOV one IDOC.
<IDOC BEGIN=""> 1...1
<EDI_DC40 SEGMENT="">
</EDI_DC40>
<..>
<Z1MOV SEGMENT=""> 0..1
</Z1MOV>
</IDOC>
I already did the occurance change, like imported target IDoc with changed attribute maxOccurs="unbounded".
I mapped the segment Z1MOV to IDOC but when Z1MOV occurs more than one time the target gets generated only one time. I changed the occurance of the IDoc to maxOccurs="unbounded".
What do i have to do to make it run?!
brCan someone help?
When i switch to debug while testing message mapping i get following:
Close tag
Close tag
Start tag
Targetelement /ZIDOC/IDOC[2]/BEGIN kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. Zielelement /ZIDOC/IDOC[2]/BEGIN kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt.
I hope you can get the idea of this error because i can't tanslate.
But the BEGIN is required for each message so how to get rid of it. This also concerns the SEGMENT-tag under each Segment of the IDoc.
br -
Flatfiles with different structures to one IDoc
Hi,
I did'nt found any valuable information about an N:1 scenario where 2 Flatfiles are to be mapped to one IDoc.So, some elements of the Message1 should be mapped with some segments of the idoc and some elements of the Message2 should be mapped with other segments of the same Idoc.I've seen also the patterns of the SWCV SAP BASIS 7.00.It's clear that I should use forks with correlation for the two messages.But I don't know it would be the Messge Mapping that makes the N:1 Transformation step.Every where i.e blogs,forums the flatfiles have the same structure.
I would be grateful for some precise suggestions
Thanks
GeorgeHi,
In the message mapping we can do in the below mentioned way.
In the message mapping we have 3 tabs, Design, Test and Messages. By default it is Design, now you select Messages tab, and add the 2 source(flat) files by using the add(+) symbol. now your sender contains 2 flat files and just drag and drop the required idoc at the receiver side and do the mapping as usual.
Maybe you are looking for
-
Hello, I have made a VI using DAQmx vi's. The VI uses shift registers to store DAQ tasks and other (internal) information. I have implemented several modes of operation (enum control with a case structure) like 'init', 'read AD', 'config AD' etc. If
-
Forget the password for backup file
I just backup my file but i forget the password of my backup file So anyone know how to fix these please tell me thank you .
-
New update top bar cuts off screen
Not sure of another way to describe it but the tops of certain apps and games is completely obscured now by the time and battery life bar at the top.
-
Disc Utility for Parallels Prep and Memory Issue
I'm having no luck with starting threads on the Parallel's forum so here I go: A question about configuring. I'm going to be installing Parallels 3.0 and have a Power Pro with two 500 GB internal drives. My Mac Apps and OSX are on one drive with the
-
How to script all prefs ?
How do I script adobe indesign (Win) prefs and presets? I would like to scripts all the entries on the Preferences menu, is this possible and how do you do it? I have tried to copy the: C:\Documents and Settings\%username%\Application Data\Adobe\InDe