Issue in segment creation for File to IDOC mapping
Hi,
I have file with many feilds, i need to create a segment in IDOC for unique combination of 2 feilds.
eg:
408
430050
segment
208
430050
segment
208
430050
208
460100
segment
208
452010
segment
408
432000
segment
208
432000
segment
the value for the combination of first column and 2nd column are equal it should trigger one segment instead of 2segments else(for different combination) trigger the segment
eg from table:
in table for 208,430050 is occuring twice but it should trigger only one segment(unique combinations of 2 columns), for all other combinations it should trigger one segment for each.
Hi Swapna,
You can use below mapping.
UDF:
Execution type : All Values Of Context
public void removeDuplicates(String[] context, ResultList result, Container container) throws StreamTransformationException{
HashSet<String> hashSet = new HashSet<String>();
for (int i = 0; i < context.length; i++) {
if (hashSet.add(context[i]))
result.addValue(context[i]);
else {
result.addSuppress();
Reards,
Praveen.
Similar Messages
-
Namespace Creation for file to idoc scenario
Hi ,
while creating new namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
system :..............
Client .................
Pl confirm the above system and client to be mentioned is of XI server or R/3 system.
Further when we go for
imported objetcs ->
IDOCS -import of sap object-->
Application server Name :....................
System No:..............................
User :.................
Name :................
Pwd:.................
Pl confirm the above data to be mentioned is of XI server or R/3 system.
pl help.Hi,
<b>while creating new namespace in integration repository for file-> XI-> idoc scenario ( that is data is to be pushed from a file to R/3 using idoc ) we have to enter the connection data viz:
system :..............
Client .................
Pl confirm the above system and client to be mentioned is of XI server or R/3 system.</b>
Ans <b>R/3</b>
<b>Further when we go for
imported objetcs ->
IDOCS -import of sap object-->
Application server Name :....................
System No:..............................
User :.................
Name :................
Pwd:.................
Pl confirm the above data to be mentioned is of XI server or R/3 system.</b>
Ans: <b>R/3</b>
Regards, -
Flat File to IDOC Mapping requirement to generate Multiple Segments
Hi Experts,
I got a requirement were i have 2 records in a file and i need to generate 2 IDOCs with multiple segments in it.
FILE :
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
Idoc should generate 2 IDOCs with multiple segments as shown below
I have imported the IDOC and changed the occurrence to " unbounded "
The Basic IDOC Type : WMMBID02
I need to generate Multiple segments of E1MBXY1
i.e.., First IDOC should contain two E1MBXY1 segments
Second IDOC should contain Four E1MBXY1 segments
IDOC1 : WMMBID02
Segment : E1MBXY1( 2 segments)
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
IDOC2 : WMMBID02
Segment : E1MBXY1 ( 4 segments)
10/01/2010 101 KRNA ic_quantity 30-0257 3526 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 30-0257 3521 1 1 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3526 1 2 ea 110000 10
10/01/2010 101 KRNA ic_quantity 90-0005 3521 1 2 ea 110000 10
Can anyone suggest me how to generate IDOCs with multiple segments
what are multiple ways of generating it
Whether it can be achieved using Multi-mapping or I need go for UDF
If any one has done has done this type of requirement ,please share the points.
Thanks
SaiBasically you need to generate idoc per record in the flat file. During fcc conversion you convert flat file to xml structure at the sender side. In the mapping use xml file structure source and idoc as receiver structure. You just export idoc and update the idoc segment 1 to unbounded. Please follow the michael blog for file to idoc multimapping without bpm. Yes without bpm it is possible.
see this link... This will answer your requirement.
https://wiki.sdn.sap.com/wiki/display/XI/File%20to%20Multiple%20IDOC%20Splitting%20without%20BPM
>Whether it can be achieved using Multi-mapping or I need go for UDF
you dont need udf for this. -
Hi,
I could like to create an UDF for file to IDoc secenario.
Srouce:
MTCashPosting_
Header
CashPosting
PubDiv
DocType
DocDate
PostDate
RefDocNo
HeaderTxt
Customer
Value
Currency
ExchangeRate
Ledger
Item
Material
TaxValue
VAtValue
Trailer
Traget: (IDOC Type: FIDCCP02 Message Type: FIDCC2)
FIDCCP02
IDoc (Under FIDCCP02)
Begin (Under IDoc)
EDIDC40_:DISABLED
E1FIKPF (Under IDoc)
E1FISEG (Under E1FIKPF)
Segment
buzei
bschl
shkzg
mwskz
dmbtr
hkont
matnr
"The secenario is the 'Value,TaxVAlue & VatValue' should be handled by replicating E1FISEG like (HAve used External definition for IDoc)"
Value -> Line item 1
IF TaxValue exists->Line Item 2
IF VatValue exists-> Line item 3
Finally Line item 4 for cerdit.All above are debit
Value____________UDF______________E1FISEG
TaxValue_________|
VatValue_________|
Value____________UDF______________DMBTR
TaxValue_________|
VatValue_________|
How should I map?? Inputs plzzzzzHi
I am not sure whether my understanding is correct.
As per my understanding
You need to duplicate E1F1SEG segment 4 times as there are 4 conditions
and those nodes need to be enabled or suppressed based on your condition .
Regards
sandeep -
Issue in PO creation for Direct Material Procurement.
Hi Experts,
I am working with SRM 7.0 Classic Scenario.
I have no issues with SC creation for indirect materials with Account Assignment.
But when I select Order as Direct material in SC for any material with out account assignment on Approval of SC PO is created in SRM system as Extendended Classic Scenario even though I have not activated Extended classic scenario.
Kindly help me out in this issue how can I order as DIRECT MATERIAL WITH Classic scenario.
Regards,
B.N.Karthikeyan.karthi
it is standard behavior,
but you can do one thing .
BBP_CREATE_BE_PO_NEW BADI - TRY . CLEAR THE ACCOUNT ASSIGNMENT .Thats all . check it up with technical resoucre.
but you have to decide by developemnt what are the materials are PO with account / without account assignment
br
muthu -
Alert Configuration for File to IDoc scenario
I have followed Alerts : Step-by-Step /people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions
and configured Alerts for file to IDoc scenario.
But the problem is, I did not notice any alerts being generated. I could notice the IDocs being posted to destination system. So I was going through Alerts-Troubleshoute Guide. In intension to maintain monitoring level, I clicked Configuration tab. But I did not notice my sender and receiver system there to maintain.
Can any body help me to detail out the procedure to add sender and receiver systems to maintain the monitoring level?
Regards,
Suraj Kumarhi Suraj,
WHich SP version are you on??
If you are on Sp14 or above, then unfortunately, Michal's Trouble Shooting for Alerts will not help.
From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note <b>870232</b> for this info.
Next, to test if your Alerts have been defined correctly, go to SE38. In the program , type RSALERTTEST and then click on EXECUTE button ( F8 ). In the next window, it will ask you for your ALERTCATEGORY. Just give the name of your ALERT CATEGORY and click EXECUTE.
If you have configured your alerts correctly, you will receive a message that tells ALERT IS GENERATED and will give the ALERT ID.
Now, go to your Run TIme workbench and then select ALERT INBOX and see if you have got the ALERT message in your ALERT INBOX.
If this is working fine, then the last step, implement the note 913858.
Regards,
Bhavesh -
Lookup issue for File to Idoc scenario-- Urgent Pls.
Hi All,
Iam doing File to IDoc scenario with one file --> any of 3 R/3 systems.
Routing has to be done dynamically using a lookup file, based on the incoming GLN code and last character of the Order Reference number.
The last character of the Order ref Num will have A,B or C.
Where, ' A' for R/3 152 Client
' B' for R/3 142 Client
'C' for R/3 132 Client.
1. PlantGLN_Routing lookup file :
DestinationSystem, Plant GLNCode, Partner Number,
A, 5000243000473, GDKDVRC152,
B, 5000243000473, GDKDVRC142,
C, 5000243000473, GDKDVRC132,
A 500034000487 GDKDVRC152,
B 500034000487 GDKDVRC142,
C 500034000487 GDKDVRC132,
By Using DestinationSystem and Plant GLN Code as lookup key --> I need to get the value of partner system.
2. IdocCtrlLookup
Purpose: To read the IdocCtrlLookup file to populate the Idoc control segment
Now based on the partner system from previous table --> I need to get the details of Sender Port , Sender Partner Type , Sender Partner Function , Sender Partner Number , Rx Port , Rx Partner Type , Rx Partner Function , Rx Partner Number.
Please help me how can acheive this scenario with the help of lookups.
Its very urgent.
Regards
Krupakar.HI,
Here you would have to use one mapping for dynamic routing , based on this create IM and use it in receiver determination.
the another mapping is general to file to idoc.
see the dynamic routing link here
Dynamic Configuration of Some Communication Channel Parameters using Message Mapping -
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Also if you know the field name the context object can be defined for partner no that can be used in receiver determination in condition. to particular partner no in receiver determination.
Regards
Chilla -
Mapping Requirement for File to IDOC
Hi All,
I have a requirement related to Mapping and need your help on this. There is a financial posting Interface and the data is being fetched from database using strored procedure.
The source file is having structure like as shown below
<FIExport>
<resultset>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
<field4>29</field4>
<field5>3</field5>
</row>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
<field4>48</field4>
<field5>3</field5>
</row>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
</field4>
<field5>3</field5>
</row>
<row>
<headerid>12346</header id>
<field2>5</field2>
<field3>1</field3>
<field4>2</field4>
<field5>3</field5>
</row>
<row>
<headerid>12347</header id>
<field2>5</field2>
<field3>1</field3>
<field4>2</field4>
<field5>3</field5>
</row>
</resultset>
</FIExport>
Condition:
For creating target structure follwoing conditions are required
1) IDOC at receiver side will be created as per unique header id therefore in the current source structure 3 Idocs will be created for 3 unique header id like 12345 , 12346 , 12347
2) Target EIFISEG which is line item will be created based on per row per unique header id under each IDOC and there has to be 2 SEGMENTS (2A & 2B ) per row based on the VAT amount presence and also two additional E1FISEG has to be created statically per idoc for BSCHL = 34
so for the above source structure the target should have number of EIFISEG as follows:
As there are 3 rows for header id 12345, therefore under IDOC1 the number of EIFISEG will be
since VAT Amount(field 4) is present therefore for 2rows of 12345 header id IDOC it will generate 2X2=4 , E1FISEG segments (each for 2A & 2B) and 1 E1FISEG for 3 row of header id IDOC 12345.
In addition to this 2 additional segment will be created for BSCHL=34( it's duplicate segment of E1FISEG, so no issues in this)
Total number of E1FISEG segments in IDOC for header id(12345) will be = 4 + 1 + 2 = 7 segments
Similarly for IDOC with header id (12346) the total number of EIFISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
Similarly for IDOC with header id(12347) the total number of E1FISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
So the target strcuture should look like:
Target Structure
IDOC1 for header id= 12345
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
E1FISEG5
field 2
E1FISEG6
field 2
E1FISEG7
field 2
IDOC1 for header id= 12346
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
IDOC1 for header id= 12347
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
Please help me to complete this mapping requirement as it seems to be complex.
Thanks & Regards
PrabhatHi,
There was one typo mistake, the TARGET structure will be
Target Structure
IDOC1 for header id= 12345
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
E1FISEG5
field 2
E1FISEG6
field 2
E1FISEG7
field 2
IDOC2 for header id= 12346
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
IDOC3 for header id= 12347
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
Thanks & Regards
Prabhat -
Partner Profile for file to IDOC scenario
Hi experts,
I am doing file to Idoc scenario. I did the ALE configuration steps between XI and r/3. For sender (ThirdParty) system, I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
Thanks
ManojHi,
>>I defined Business system. While defining partner profiles in WE20 I got confused, whether to Give XI logical system Name or Third party logical system name. Please clarify..........
in most cases you will only use one logical system in WE20
this will be XI's logical system - and you can route all the traffic
via this logicail system - this is the most popular case
for more about IDOCs and XI have a look at my book:
Mastering IDoc Business Scenarios with the SAP XI
http://www.sap-press.com/product.cfm?account=&product=H1935
Regards,
Michal Krawczyk
http://mypigenie.com - XI/PI FAQ -
For file to IDOC scenario, do i need to make a partner profile in XI ?
for a file--->XI--->IDOC scenario, do i need to make a partner profile in XI(for the R/3 system which is going to receive the IDOC),
or only a port maintenance in idx1 will do.....hi Sudheer,
yes u need to maintain partner profile in R/3
Check below link in WIKi for complete File to IDOC
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/fileToIDOC&
Sachin -
Pass through scenario in SAP PI with no mapping for File to IDoc and Idoc to file scenarios
Hi Experts,
Can i have step by step process in SAP PI for pass through scenario with no mapping in case of file to Idoc and Idoc to file both cases please.
What objects i can skip.
My PI system is 7.3 dual stack.
I have seen below blogs, still its confusing to me.
When and how to create an scenario in SAP PI without mapping objects.
Pass Through Scenario with no Mapping in PI 7.1
Appreciate your help on this.
Regards,
Mohan.Hi Mohan
In pass thru interface you don't need to create any ESR objects, only ID objects are required.
Just Create a Receiver Determination and Receiver Agreement for your scenario (no need for Interface Det. and Sender Agreement).
Specify the IDOC in the Sender Interface and namespace as urn:sap-com:document:sap:idoc:messages
Or instead of creating objects manually, Run the wizard with Idoc name/namespace in sender/receiver interface
Regards
Osman -
Multiple Operations for File to IDoc scenario
Hi all,
I have a file to IDoc scenario where two IdocXML files (one for INSERT and one for CHANGE of Business Object) have to be picked up by file adapter and transfered to SAP System. In respect to the multiple operations PI 7.1 can handle I would like to create one Service Interface for the Business Object and two operations (INSERT and CHANGE).
Unfortunately I am not able to use the operation in the sender agreement, so I can't specify the comm-channel for the operations, only for the interface.
So, can I use multiple operations in a file scenario (respectively in a non Web Service scenario)??
Thanks a bunch,
ManfredThe scenario is pretty easy. I just want two different files to be read by one Comm Channel with one Sender Agreement.
They are both transferred to the same receiver. I just wanted to test one scenario using multiple operations.
In your blog you described that you should not use two operations with the same set of messages (synchronous/asynchronous). In my case both are asynchronous but I already tried it with one being sync and the other one async. Where did you actually get this information, it puzzles me a little since SAP does the same in its preconfigured Enterprise Services as far as I know.
In the Trace for pipeline step Interface determination in SXMB_MONI it says:
<Trace level="1" type="T">...There is no Interface Determination configured for receiver party and receiver service BS_RECEIVER</Trace>
<Trace level="2" type="T">Check conditions for (Inb: Party Srvc If) BS_RECEIVER SI_..._Out</Trace>
<Trace level="2" type="T">...valid InbIf without Condition: SI_..._Out</Trace>
<Trace level="2" type="T">Number of receiving Interfaces:1</Trace>
So it finds the Outbound Interface in Receiver side which is wrong since I specified the Inbound Interface in the Interface determination. Did anyone of you already encounter such a behaviour? I already deleted and recreated all routing objects but without any success.
Thanks,
Manfred -
Suggestions for File to IDOC Scenario
Experts,
Here is the requirement A Legacy System will Produce the Customer data file and we have to transform certain data and post it to DEBMAS.
As Part of the information in the file there is a field Which could have a value Update,Amend or Delete.
My Question is How do it handle this.
Please give me your valuable thoughts.
Is it Possible to go for File2IDOC here?
Thanks
Vasu.Hi Vasu,
If Customer data file is of type xml then file to IDOC scenario is preferable.
Else you have to convert Customer data file to xml first and then proceed for that you can use content converson feature of File Adapter.
The information for Update,Amend or Delete will be provided by customer or you have to decide it based of data in table?
if it is provided by customer then you can go for ABAP Proxy for that take help of ABAPers.
If you have to decide the Update,Amend or Delete logic.
Then fetch the data from table compare it with incoming data decide the Action and then perform the action this can also be handled in ABAP Proxy.
Reward Points if HElpful
Thanks
Sunil Singh -
Help!! - File to Idoc Mapping with Nested structure
Scenario:
I have an inbound file that has three nested records.
eg. A00, B00 and C00. C00 is nested structure of B00 and B00 nested structure of A00. All these structure can repeat N number of times in a file.
How do I map this to IDoc structure that have one segment each for the three structures in the file and nested in the same way.
Question: How is the parent child relationship established?
Suppose I have a file
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
A00 5678 Joe 22
B00 US 23456
If I make a nested structure and then say in the file conversion properties that A00 go to segA and then B00 go to segB, but then when I come back to A00, how do I move the data to the A00?
Thanks in Advance
RgdsFrom what you have layed out, you can create a data type with 3 children, all 1..unbounded cardinality, each containing their own elements. You say they are nested, but the example you gave isn't nested... it's just A's followed by B's followed by C's. If that is the case, you can then use a data type w/ 3 subelements (A, B & C) and each of those is actually a container with the real attributes of that line in your file. (I can email you a schema quickly if you need it)
If you are saying they can occur like this:
A00 1234 Sam 29
B00 london LE3 XYZ
B00 US 123456
C00 2 XYZ
B00 US 23456
C00 2 XYZ
THEN they are nested - ie B's & C's repeat under any A. Then you must create segment B as a subelement of segment A instead of on the same level, then bury C under B. (I find this easiest w/ a text tool rather than inside XI, as I can cut/paste segments where I want them to belong...)
Good luck with setting up content conversion on that file adapter... We have done this a few times, and it can be quite interesting.
If you have trouble with the schema, you can post your email & I can give you a quick example.
Message was edited by: Amanda Derringer -
Hi all
I dont know much about idocs. I am creating a file to idoc scenario. i have done with(hope so) all the other settings, design and configuration. BUt dont know how to do the mapping.how the control segment fields have to be mapped. what are the mandatory fields in idoc?Hi Aarthi,
You can leave the control records of the Idoc blank since XI fills them up. This is because XI would be the sender for the idoc. If you select "Header mapping" then you have to map control records else not.
Also in the idoc data segments all fields with a red dot are mandatory. If you do not have a field from the file to map with the mandatory idoc field then either you can suppress it or map it to a constant.
Hope this helps.
Regards.
Maybe you are looking for
-
How do I transfer Hotmail contacts to iPad as a pop3 account
I hope you can help. I just got my ipad. I want to use my Hotmail account on my ipad. I spent several hours the first day figuring the right settings. When I delete messages from the iPad, I don't want the messages to be deleted from my computer. And
-
I need help with 'Documents & Data' taking up all the space on my iPhone
Hello, I have searched for days on the internet for a way to solve my problem but nothing and I really mean NOTHING seems to work at all. I can't buy any software either. When I go into Settings>iCloud Documents & Data are off and have been off all
-
Font Issue in Acrobat 9 pro and X pro
Fonts are not displaying properly after selecting the text with Touc-up tool in Acrobat 9 pro and X pro how to solve this issue?
-
Strange NUMC, Can anyone please Define NUMC.
Hi Experts, I have experienced a Strange things with NUMC. How ever you define your Numc (straight or dictionary ref like "DATA: value1 TYPE pa0000-pernr) or what ever. I have seen different results different scenarios as shown in below example. REPO
-
Problem with weblogic.Deployer in 8.1
I have a problem with weblogic.Deployer. My application deploys and works fine if I manually copy the ear or the exploded form into weblogic's applications\ directory (hot deployment). But, if I use the weblogic.Deployer tool, it fails with the follo