Optional Segments in IDocs
How do Optional segments in Idocs gets triggered ? Iam generating Idocs on R/3 Side and optional segments seems to be not getting created when I see on WE05 Tcode.
My Question is does these segments will be created automatically if there is a data ?
Please clarify
Hi Ram,
There needs to a specific coding for filling the segments be it optional or anyother. I believe the filling of the segment is being done in SAP R/3 and there might not be a code to fill these optional segments.
Just simply write a code where you are filling other segmemts for the IDoc in case it's not there and it should work.
Hope this helps.
Nishant
Message was edited by: Nishant Rustagi
Similar Messages
-
How to mention the occurences for repeated and/or optional segments in cc?
Hi,
How to mention the Record Structure occurences for repeated and/or optional segments in communication channel?
Sample Structure of the Input Message Type:
Invoic01 (Message Type)
IDoc
-E1EDK01 (1 occurence) (sub segment of IDoc)
-E1EDP01 (0..unbounded occurences) (sub segment of IDoc)
-E1EDP02 (0..1 occurence) (sub segment of E1EDP01)
-E1EDP26 (0..2 occurence) (sub segment of E1EDP01)
-E1EDPT1 (0..1 occurence) (sub segment of E1EDP01)
-E1EDPT2 (0..1 occurence) (sub segment of E1EDPT1)
-E1EDS01 (0..3 occurence) (sub segment of IDoc)
Can anybody please give any idea?
Yogi.Hi Yogi,
Why you need adapter module?
Actually this is called as module processor program which will be used to enhance the adapter functionality.
Please see the following PDF documents to develop the Module processor programs.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd83b3
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9913a954-0d01-0010-8391-8a3076440b6e
help : http://ifr.sap.com
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6f83d790-0201-0010-629d-ab5bf10c94e4
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7bf6e190-0201-0010-83b7-cc557eb76abe
Some weblogs for JAVA mapping for IDoc mapping
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
Difference in using java,xslt,message mapping
Please clearly ask your question.
What is your input file, and file structure you are receiving, and what is your scenario.
Then only you will get correct solution.
Regards
Chilla.. -
How to generate a new segment in IDoc for multiple occurance of Control Num
Hi Experts,
In my scenario, i need to generate a new segment in IDoc(Target Structure) based on Control Number Field in the Source Structure.
The segment need to be created for multiple occurance of the Control Number.
Ex:
Control Number - 100 appears 5 times in Source Structure.This control Number is mapped to one of the Field in the Segment of IDoc.
Now my requirement is to generate the Segment 5 times with respective to this Control Number.
please help me out to resolve this issue.
Thanks,
Kish.Hi,
Here is the XML Structure of my Source:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:GoodsReceipt_MT xmlns:ns0="urn:WOL-com:XI:data:HJ:10">
<row>
<CONTROL_NUMBER>111</CONTROL_NUMBER>
<LINE_NUMBER>1111</LINE_NUMBER>
<CONTROL_NUMBER_2/>
<OUTSIDE_ID/>
<WH_ID>111111</WH_ID>
<LOCATION_ID/>
<HU_ID>11111</HU_ID>
<NUM_ITEMS/>
<ITEM_NUMBER>111111</ITEM_NUMBER>
<CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
<LOT_NUMBER>11111</LOT_NUMBER>
<UOM>11111</UOM>
</row>
<row>
<CONTROL_NUMBER>111</CONTROL_NUMBER>
<LINE_NUMBER>12222</LINE_NUMBER>
<CONTROL_NUMBER_2/>
<OUTSIDE_ID/>
<WH_ID>12222</WH_ID>
<LOCATION_ID/>
<HU_ID>1222</HU_ID>
<NUM_ITEMS/>
<ITEM_NUMBER>112222</ITEM_NUMBER>
<TRAN_QTY>112222</TRAN_QTY>
<CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
<LOT_NUMBER>12222</LOT_NUMBER>
<UOM>1122222</UOM>
</row>
<row>
<CONTROL_NUMBER>222</CONTROL_NUMBER>
<LINE_NUMBER>2222</LINE_NUMBER>
<CONTROL_NUMBER_2/>
<OUTSIDE_ID/>
<WH_ID>22222</WH_ID>
<LOCATION_ID/>
<HU_ID>222222</HU_ID>
<NUM_ITEMS/>
<ITEM_NUMBER>2222222</ITEM_NUMBER>
<TRAN_QTY>22222222</TRAN_QTY>
<LOCATION_ID_2>33333333</LOCATION_ID_2>
<CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
<LOT_NUMBER>22222</LOT_NUMBER>
<UOM>22222</UOM>
</row>
<row>
<CONTROL_NUMBER>333</CONTROL_NUMBER>
<LINE_NUMBER>3333</LINE_NUMBER>
<CONTROL_NUMBER_2/>
<OUTSIDE_ID/>
<WH_ID>33333</WH_ID>
<LOCATION_ID/>
<HU_ID>33333</HU_ID>
<NUM_ITEMS/>
<ITEM_NUMBER>333333</ITEM_NUMBER>
<TRAN_QTY>33333333</TRAN_QTY>
<CONTROL_NUMBER_3>LR</CONTROL_NUMBER_3>
<LOT_NUMBER>33333</LOT_NUMBER>
<UOM>333333</UOM>
</row>
</ns0:GoodsReceipt_MT>
Now Control_Number 111 occurs 2 times, 222 & 333 occurs 1 time.
Now one IDoc for 111,222 & 333 should be generated.
But Control_number 111 appears 2 times.
Now the data in the 2 rows should be passed to Single IDoc by repeating the segments inside the IDoc.
As u said i changed the Occurance of IDoc to 0...unbound and imported as External Definition. I have done upto Generating IDoc for each unique Control_Number.
I stuck up at repeating the Segments in the IDoc.
So please help me out.
Thanks,
Kish. -
Options to create IDOC in IDOC Flatfile
Hi,
we have requirement to process a fixed length file and map that structure to a standard IDOC and that IDOC has to be written out as IDOC flat file.I just want to get different opinions to see whether there are any other options other than using ABAP mapping like mentioned in that standard How to Guide IDOC XML to IDOC Flatfile.
My scenario is Fixed length file ->XI->IDOC Flatfile-->SAP(through File port with RSEINB00 Report)
I know there is module available in PI7.1,but we are still in PI7.0 with SP18 and no plans to up grage yet.
In the file I get single header,multiple details and single trailer records and I have to create multiple IDOCs(that many number of Detail Records) from a single file.So,I think I need to use BPM first to convert multiple IDOC to single IDOC and then use the ABAP mapping to convert IDOC XML to IDOC Flatfile.like two steps.
so I am thinking to avoid BPM,ABAP mapping and to see different options to create an IDOC flat file and the receiving SAP system can read the IDOC flatfile using standard File port.Receiving SAP is is very low version(I think 3.0) which is not supporting IDOC adapter communication from XI.
please suggest different options to get IDOC Flatfile or even directly sending IDOC (with ALE connection) that has been created after the mapping from ffixed length flatfile to standard IDOC.
Thank you in adavance.
Babu> In the file I get single header,multiple details and single trailer records and I have to create multiple IDOCs(that many number of Detail Records) from a single file.So,I think I need to use BPM first to convert multiple IDOC to single IDOC
Hi Babu,
When PI reads the file from source system, it will read all the data into Single XML file and in message mapping just do 1:N mapping to create multiple IDOCs from single XML. You dont have to use BPM for this requirement.
You wait for better solution from other for 2nd part of your requirement i.e IDOC-XML to IDOC Flat file conversion.
Have a great day.
Cheers,
Jag -
How to isolate error with a record/segment in IDOC with multiple records
I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
1. How can I pre-processed the IDOC to remove those control characters?
Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
Thanks in advance.Split the IDoc.
with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
U have to do this in the context of IDoc.
If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment SEG001 field FLD03 has a special character *</b>.
If U wanna pass this string to source/target, U can do in error messages branch in BPM.
U must use BPM for splitting the IDoc, since it is multi-mapping.
reg.,
Yallabandi. -
How can create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version
Hi All,
Can any one help, how to create SEGMENTS and IDOC TYPE in BADI in ECC 6.0 version.This is my task.
Given BADI name was----VENDOR_ADD_DATA_BI .
ThanksAnil,
look at this thread ..may be this helps you.
Re: 824 IDOC and BADI/User Exit
sateesh. -
In exit EXIT_SAPLKD01_001 populate custom segment of idoc ext. cremas05
Hi,
I am using EXIT_SAPLKD01_001 where I need to populate 2 custom segments for idoc extension cremas05.
I have created a function module separately where I have populated the 2 structures that is of same type as the segment structure.
In the exit I have called the function module where the structures are populated.
Now my question is how to populate the custom segments from the function module structures directly in the exit.
Thanks and Regards
PHi
Now I'm able to do this.... closing the thread. -
E1EDKT1 segment in Idoc INVOIC02
Hi,
Im getting the following error when sending an INVOIC02 Idoc to ECC:
"Error: Segment 'E1EDKT1', segmentnumber '000010' not correct in structure INVOIC02"
I already refreshed the IDoc metadata and I see the segment in the repository and IDX2. The connection to the backend works fine: when I remove this segment the Idoc is processed succesful. What could be causing this problem?Hi Iddo Rijsdijk,
It solved my issue as well. Thanks.
- Netrey -
How to get optional segments of Basic type ORDERS05
Hi All,
I am using ORDERS05 Basic type for one implementation where I need to use segment E1CUCFG of this basic type but it is not coming as this is optional segment. Please let me know how to get it.
Thanks !!Hi,
In WE30, I can see the segment E1CUCFG for ORDERS05, If you want to use that, you will have to populate the same.
Regards,
Amitava -
Hello all,
I am working on idoc to idoc scenario, i have to map a segment to idoc, exact requirement is
" If there are 10 "E1P12" segments in the inbound IDOC then we need to create 10 outbound Delins IDOCs, each with 1 E1EDP10 segment.
Can anyone provide me the steps to follow in this scenario.
Thanks for all your help.one more
For every Idoc generated on the target side the header data is populated frm source Idoc.(i.e) the same header repeated 4r all idocs right???
In order to do tat u need to write a simple udf
public void Test(String[] a,String[] b,ResultList result,Container container)
//write your code here
for (int i=0; i<a.length;i++)
result.addValue(b[0]);
use this udf under all header element(eg.element1 under header tgt side)
then mapping ll be
E1EP12----->
Test-------->Split By Value---->element1
src element----> -
Segment to idoc..
Hello all,
I am working on the scenario where i need to mapp a segment to idoc.
means if i am having 10 segments then 10 idocs should get created.
If there are 10 EDP10 segments in the inbound IDOC then we need to create 10 outbound Delins IDOCs, each with 1 EDP10 segment.
I have to display the header part from other segment with each idoc created.
Please explain in detail.
Thanks for all your help.Hi siddhesh,
Try the below logics...
It will working fine for me in Orders IDOC.
If you have a Multiple E1EDPO1 for each E1EDPO1 need to create a
Each IDOC.
and also Each IDOC have Only one E1EDPO1.
But Header segments Like EIEDKO1 comes only one time.
This also should be enable each IDOC in the Receiver.
First for Multiple IDOC:
E1EDPO1Remove ContextSplitByValue(Each)Collapse ContextIDOC
Second for enable each E1EDPO1 for each IDOC:
E1EDPO1SplitByValue(Each)E1EDPO1
other elements need to simple map.
Like..
Posex--Posex
Action--Action
Third For header need to use Each IDOC:
EIEDKO1(Context IDOC) ---
E1EDPO1(Change the context to IDOC)---UseOneAsMany-E1EDKO1
E1EDPO1 ---
Other elements also need to map like above.
Consider the field ACTION
ACTION(Context IDOC) ---
E1EDPO1(Change the context to IDOC)---UseOneAsMany-ACTION
E1EDPO1 ---
In useoneasmany we need to keep first and second node context should be same.
Regards,
Prakasu -
How can i check the segment in idoc.
hi gurus,
how can i check the segment in idoc.please help me asHi Rohit,
In WE02/05 U can view the IDocs.
Since u r having the IDoc with u, Double click the Idoc no. and it will take you to screen where it will show you all the segments of IDoc. Here you can check which segment is giving error.
Go to WE60/63 which shows the detailed documentation in the MySAP environments if u have been using the old 4.6c systems. In 6.10 since the documentation is not available ,modify your personal settings to show the documentation by default; In 6.10 in transactions WE60 and WE63, documentation is no longer generated by default for the segment fields when the documentation is generated. To activate the generation of the documentation from the corresponding data elements, proceed as follows: WE60/WE63. > Goto > User settings. Here you must set the indicator for 'Display of the documentation' under 'Display attributes for IDOC types' and then save the change. Now the documentation is also displayed for the segment fields when WE60/WE63 is executed.
**Reward points if u find this useful.
Thanks & Regards,
gyanaraj -
Limit the no of segments per IDOC to less than the current default value
Hi friends,
please help me in the following issue.
The possibility to limit the number
of segments per IDOC to less than the current default value.
Purpose is to limit the traffic of IDOCs between systems.
How to solve this issue to avoid traffic
Thanks in advance.
Regards
SandeepHi Kiran,
Actually we are using standard ones at that time we are getting prolems. When using custom developed ALE's
we are putting segment size is less.To decrease segment size is there any filtering at the sender side? To change segment size may be nedd to take help form SAP.
But if have filtering at any level from sender side need to confirm before consult SAP.
Regards
Sandeep -
Filling up segments of Idoc of Invoice List
Hi!
Invoices and Invoice List are beeing created... everything would be fine, but some fields are missing in the Invoice List while existing in Invoices.
I guess I need to find the code where these fields are filled up for Invoices and to add this code to appropriate place for Invoice List. How to do this?
I think that needed segments are existing for Invoice List, just not filled up...
By the way, how to find out Idoc number of Invoice List? If I have it, I could compare segments with Idocs of Invoices.
Any ideas?
Will reward,
Mindaugas.I saw the Function module -
Please look at code at :
Include program : LVEDFF0R
FORM REDUCTION_TABLE_CREATE.
PERFORM IDOC_SEGMENTS_READ.
PERFORM IDOC_ACTIVE_SEGMENTS_SET.
ENDFORM. " REDUCTION_TABLE_CREATE
Keep the break point at form routine and debug the the function module
If you do not know how to do debugging then use following way :
keep the break point in form routine above as i said
Create invoice or invoice list
when you maintain output type in invoice or invoice list -
Now click on Further data ->select peridoc scheduling-> back and save it.
Run RSNAST00 Program
Output application : V3
Object key : Invoice or invoice list number
Output type : RD00 or LR00
Medium = 6(EDI) ,A (ALE)
when you execute the program and it will goto debugging.
Thanks
Seshu -
How to look for a particular field in the segments of IDOC ?
Hi,
I am looking at a particular IDOC which I will use to do data trasfer from lgacy to R/3 using BAPI in LSMW. Now I know a field which is required to create a given business transaction when igrating data. But there are 100's of segments on the IDOC.
Is there a way I can see if the given field is present in any of the IDOC segment ? I don't want to dig though each and everys egment and find it out...
Regards,
RajeshTry using WE09..There you have the option of searching by the idoc data..CHeck in the bottom of the selection screen
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
Maybe you are looking for
-
Ipod not found - will not sync; restored and lost everything. Please help.
To whom it may concern, My iPod Classic has worked perfectly for the few years I've had it. I only use it a few times a month on average so it's still in really nice shape. Earlier today, I went to sync it like I do every couple of weeks whenever I a
-
Security, htmlentities question
I've been reading about how htmlentities is supposed to convert special characters into harmless versions when used with inserts and updates, etc. So, I tested an insert form of mine with a script that redirects to an example.com site. (I found the s
-
Adobe Designer 7.0 - XML parsing error when data connection to XML with UTF-16
Hi all <br /> <br />I need to change my data connection xml file to use UTF-16 instead of ISO-8859-1. When I connect the file with the UTF-16 encoding, I receive the following error <br /> <br />Invalid XML: Xml parsing error: encoding specified in X
-
ME51N - Match-Code for field AFANAM
Hi experts, Can anyone tell me if it´s possible to create a match code for the field: Name of requisitioner/requester (AFNAM), on the transaction ME51N - Item overview? Regards, Leonel Fernandes
-
Comunication between applets (please help)
I have an applet that connects to a servlet, which connects to a database. Signing the applet made it possible to access it from client machines. However, there is another applet (in the same html page), which receives a message from the first applet