Context Problem when using Use One As Many
Hi SapGuru's.
i have got a requirement in an IDOC To File Interface where the segments in the IDOC are like E1LFA1M->E1LFM1M->E1WYT3M
THE Test data is like below
<?xml version="1.0" encoding="UTF-8"?>
<ns0:IDOC_Test_Mt xmlns:ns0="urn:sap.shoprite.co.za:ecc.md">
<ZCREMAS>
<IDOC>
<E1LFA1M>
<LIFNR>0000641065</LIFNR>
<E1LFM1M>
<EKORG>1001</EKORG>
<E1WYT3M>
<PARVW>BA</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>LF</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>RS</PARVW>
</E1WYT3M>
</E1LFM1M>
</E1LFA1M>
<E1LFA1M>
<LIFNR>0000641065</LIFNR>
<E1LFM1M>
<EKORG>1002</EKORG>
<E1WYT3M>
<PARVW>BA</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>RS</PARVW>
</E1WYT3M>
</E1LFM1M>
</E1LFA1M>
<E1LFA1M>
<LIFNR>0000641065</LIFNR>
1002
</E1LFA1M>
<E1LFA1M>
<LIFNR>0000641065</LIFNR>
<E1LFM1M>
<EKORG>1004</EKORG>
<E1WYT3M>
<PARVW>BA</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>LF</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>RS</PARVW>
</E1WYT3M>
</E1LFM1M>
<E1LFM1M>
<EKORG>1005</EKORG>
<E1WYT3M>
<PARVW>BA</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>LF</PARVW>
</E1WYT3M>
<E1WYT3M>
<PARVW>RS</PARVW>
</E1WYT3M>
</E1LFM1M>
</E1LFA1M>
</IDOC>
</ZCREMAS>
</ns0:IDOC_Test_Mt>
the Target xsd is like below :
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="urn:sap.shoprite.co.za:demo.trans" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap.shoprite.co.za:demo.trans" xmlns:p1="urn:sap.shoprite.co.za:bluecube">
<xsd:import namespace="urn:sap.shoprite.co.za:bluecube"/>
<xsd:element name="Vendor_masterTest1" type="p1:Vendor_masterTest"/>
</xsd:schema>
the EKORG Field from source is mapping to Purchase Organisation(field) in target file .
so here when i use one as many and iam mapping EKORG->MAP WITH DEFAULT ->USE ONE AS MANY and as in the above test data if there are multiple E1LFM1M's the first paramter of Use one as many is getting 2 ekorg's in only one context but here i want them to be created on separate context(please have a look at 4th E1LFA1M in the test data to get clear idea.
can any of you help me in this.
regards.
Varma
Hi,
Try this.
Source Code:
IDOC
--->E1LFA1M
-->E1LFM1M
--> EKORG = 1000
--> E1WYT3M
--> E1WYT3M
-->E1LFM1M
-->E1LFM1M
--> EKORG = 1001
--> E1WYT3M
--> E1WYT3M
-->E1LFM1M
--> EKORG = 1006
--> E1WYT3M
--> E1WYT3M
Output:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:target xmlns:ns0="http://test">
<Data>
<M>1000</M>
</Data>
<Data>
<M>1000</M>
</Data>
<Data>
<M></M>
</Data>
<Data>
<M>1001</M>
</Data>
<Data>
<M>1001</M>
</Data>
<Data>
<M>1006</M>
</Data>
<Data>
<M>1006</M>
</Data>
</ns0:target>
Use below Mapping:
Use If then Else Function.
1. If condition: E1WYT3M Exists
2. Then pass E1WYT3M
3. Else Pass E1LFM1M with "Map with Default"
Lets Consider Output of this step as "A".
Use One As Many.
First Input: E1LFM1M to exists to Split By Each Value
Second and Third Input will be Out Put of "A" (Above Step).
Lets Consider Out put of this Step as "B"
Use If without Else.
If "B" is true then pass "A" to exists.
Out put of this to Remove context to Target Vendor Master Node. In my sample it will be Node "Data"
Now for Mapping of Field Purch Org/In my case field "M"
Use If without Else.
If "B" is true then Pass "C". Output of this to Split by each value to target.
For C:
Use if then else
if E1WYT3M exists then pass EKORG else pass constant blank.
Hope its clear!!
-Gouri
Similar Messages
-
I use LabVIEW 7.1 but I have some problem when, I use LabVEW to read the data from serial communication.
I use LabVIEW to read the data from serial communication then, i open the example (.vi) from Serial Communication - Advanced Serial Write and Read from LabVIEW Example. BUT it have some error message that : Error - 1073807202 occured at property node in visa configure serial port (instr).vi -> advance serial write and read .vi
this error code is undefined. no one has provide a description for this code, or you might have wired a number that is not an error code to the error code input.
I don't know why? please help me. thank you.When I copy that code into "Explain Error" I get: "VISA: (Hex 0xBFFF009E) A code library required by VISA could not be located or loaded."
You may have a bad install of VISA or the wrong version of VISA loaded. Try re-installing VISA. You can get the latest version from the NI support site: http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BBB002C0E91?opendocument&node=1....
Also ensure that you are not pointing the example towards a serial port that does not exist.
Please let us know what you find and what gets this working for you.
Rob -
What types of containers need to be used for one-to-many relationships
While looking at toplink examples, I noticed that synchronized containers only are being used for one-to-many relationships even though it's not required by the documentation.
Is it required?
Also how does merge affect it? I'm gettning concurrent modification exceptions from time to time, while using iterators for containers from these relationships.
Does it mean that I have to use enumeration on vectors only and toplink merge isn't atomic? So there is no isolation when toplink merges the data from unit of work into identity maps?
There is nothing about thread-safety and threading aspects of accessing containers for CollectionMapping based relationships. Please advise.Non synchronized containers can be used but may require some extra code to handle concurrent access. If you are accessing the objects from the shared cache (not cloned in a UnitOfWork) then you will need to isolate your iteration within a synchronized block, synchronized on the collection itself, or handle the ConncurrentModificationException if they happen rarely.
Because these are shared instances of these collections other threads may be writing to them while they are being read from.
--Gordon -
I have been using Firefox for about two years. For about a month now I have been unable to view any Google advertisements that run on YouTube pages alongside and under videos. This is important for my business. I would like to stay with Firefox, but this is only a problem when I use Firefox and is not a problem with Internet Explorer or Google Chrome as I checked. I tried uninstalling Firefox and all plugs ins and add ons and then reinstalling it. This did not work. Firefox seems to be blocking the Google codes that enable the ads to run on the pages. I look forward to your help. Thank you.
CS2 is very old and reached its "end of life" a while back. So probably won't run on modern operating systems. If you can still run it, you'll need to uninstall what you have and re-install with the download link below to activate it.
Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
Nancy O. -
Hi! Has anybody succeeded in using Presonus Audio box 22 vsl with Os Mountain Lion? They doesn´t seem to connect.
No problems when i used with Snow Leopard. I upgraded: Now Kreonika is not happy. Not happy at all!In cases like this, if you have an Apple store near by, they will most likely install the OS free of charge for you, if you can't bring your Apple ID along to prove you've paid for it.
Would that work out for you? -
1. The procedure called by CUSTOM.pll causes the problem when we use f60gen
When CUSTOM.pll contains a call to a package that in turn calls a remote package, the CUSTOM.pll compile hangs forever.
1. The procedure called by CUSTOM.pll causes the problem when we use f60gen. Though same procedure compiles successfully using "alter procedure compile" command.
2. We have observed the problem happens due to synonym present on the remote database(db link).
It doesn’t work if you are calling SYNONYM on remote database. It works, for calls to tables or procedures or packages in remote database if that object is OWNED DIRECTLY by the account to which dblink is connecting to.
select object_name, object_type from user_objects@NH_SCM_ICE.DB.ATT.COM ;
OBJECT_NAME OBJECT_TYPE
FA_LOCATIONS SYNONYM
FND_FLEX_VALUES SYNONYMThe database link is created under the APPS user in the local database but connects to a different user (SWCS_ICE_SUPCHAIN) in the remote database.
The user in the remote database does not own any objects. It only has synonyms to objects owned by apps and others.
Incidentally, the hang also happens when trying to describe the remote package from the application tier (8.0.6.3 sqlplus) but the describe works fine from the DB tier (10gR2 sqlplus). -
I have a problem when I use the headphone. Music starts immediately and Siri starts as well
I have a problem when I use the headphone. Music starts immediately and Siri starts as well
I am having this issue also. It started after I downloaded You Tube apps.
-
Dear Apple,
I have a problem when I use "iTunes Gift Card" to shop in a game which is called "Puzzle & Dragons"(パズル&ドラゴンズ). I cannot buy anything in the game and the system shows the following message: "please contact itunes support to complete this transaction".
Could you help me to solve the problem? Thank you very much!
Best Regards,
tatClick here and request assistance.
(79862) -
Having a problem when scrolling through one clip: a different clip scrolls through point and time simultaneously. Can you please assist us?
First question: this is a Captivate forum, are you sure that you have a Captivate problem (with cpvc or an imported video)?
-
i'am using ACS and cisco 3600 to perform wireless mobility using GPRS.
now i'm having a problem when one of my GPRS scanner (Fujitsu) can't access to ACS using EAP.
that GPRS scanner must used PAP to access to ACS.
But, my other GPRS Scanner (Symbol) can access.
please advicei'am using ACS and cisco 3600 to perform wireless mobility using GPRS.
now i'm having a problem when one of my GPRS scanner (Fujitsu) can't access to ACS using EAP.
that GPRS scanner must used PAP to access to ACS.
But, my other GPRS Scanner (Symbol) can access.
please advice -
Problem when printing " " using XSL
I have a problem when printing the "<" .It is always printed as
"<" in the HTML file.
I wish to transfer a Javascript text . I tried
using CDATA . This is an extract of a portion in my XSL File
which uses CDATA.
<![CDATA[
function createLOV(lov_name, array_touse) {
document.writeln("<select name='" + lov_name + "'>");
for (var i=0; i < array_touse.length; i++) {
document.writeln("<option value='" + array_touse[i] + "'>" +
array_touse[i] + "</option>");
}]]>
And this is what the HTML file contains
function createLOV(lov_name, array_touse) {
document.writeln("<select name='" + lov_name + "'>");
for (var i=0; i < array_touse.length; i++) {
document.writeln("<option value='" + array_touse[i] + "'>" +
array_touse[i] + "</option>"); }
document.writeln("</select>");}
I tried using the <xsl:text disable-output-escaping="yes"> but in
vain.
If i use < or &x3C; , i still get < in the HTML file.
How do I solve this problem. I'm using XSQL Servlet with JSDK2.1
both running on Sun Solaris2.6 .
Thanks in advance,
Suresh
nullSuresh Seetharam (guest) wrote:
: I have a problem when printing the "<" .It is always printed
as
: "<" in the HTML file.
: I wish to transfer a Javascript text . I tried
: using CDATA . This is an extract of a portion in my XSL File
: which uses CDATA.
: <![CDATA[
: function createLOV(lov_name, array_touse) {
: document.writeln("<select name='" + lov_name + "'>");
: for (var i=0; i < array_touse.length; i++) {
: document.writeln("<option value='" + array_touse[i] + "'>" +
: array_touse[i] + "</option>");
: }]]>
: And this is what the HTML file contains
: function createLOV(lov_name, array_touse) {
: document.writeln("<select name='" + lov_name + "'>");
: for (var i=0; i < array_touse.length; i++) {
: document.writeln("<option value='" + array_touse[i] + "'>"
+
: array_touse[i] + "</option>"); }
: document.writeln("</select>");}
: I tried using the <xsl:text disable-output-escaping="yes"> but
in
: vain.
: If i use < or &x3C; , i still get < in the HTML file.
: How do I solve this problem. I'm using XSQL Servlet with
JSDK2.1
: both running on Sun Solaris2.6 .
: Thanks in advance,
: Suresh
Currently, the parser does not support the xsl:output and
output-escaping mechanisms. We plan on adding support for this
in a future release.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
When I'm in Firefox and try to forward an email in aol email I cannot access my contact list when I click on the to/bcc/cc . When I use Internet Explorer I have no problem accessing my contact list at all.
First make sure Settings > Facebook > Contacts is turned off. Tis might be different from what you described in your question.
Then open your Contacts app and check carefully what is there for your son and grand daughter's contact info. Correct if necessary. -
Premiere cs4 exporting audio problem when I use desktop editing mode
Hi.... I recently use a desktop editing mode when I create my new sequence ! I have a 480X270 16/9 ratio.... so when I export my sequence FLV in encoder... everything is ok for audio setting ... but when I put my movie on the Internet or just playback in adobe media player, I have no sound !!!! I don't know what is the problem....
Thanks for help me !!!!Thanks for your quick respond and support !!!!!
1- multiplexing = FLV
2- audio default : codec mpeg layer III
3 - i'm on pc
4 - I use a jcplayer for my website and in local playback i use adobe media player
I think that everything was ok in audio setting if i see my setting, but when i use a default sequence setting and I export I have sound.... when i use desktop sequence setting i lost my sound when i export !!!!!!
is very strange !!!!
Thanks again -
Having audio problems when I use Facetime, any ideas?
When I use Facetime on my 4S, the video shows & I can hear the person on the call but they cannot hear me!
try rebooting
hold down the home and power buttons untill the apple appears -
Occurs the problem when i use bapi BAPI_SALESORDER_CREATEFROMDAT2
hi:
the first time a salesorder can be creat successfully,
but when i used it again in a short time ,system will give out a RUNTIME ERROR 'PXA_NO_FREE_SPACE'.
>> Short dump has not been completely stored. It is too big.
No PXA storage space available at the moment.
<b>What happened?</b>
The current ABAP/4 program had to be terminated because there
was no space available to load it.
Each ABAP/4 program to be executed is stored in a central
storage area that is divided between all users.
This area was too small to hold all currently active programs for all
users.
The current program, "SAPLV05E ", had to be terminated because a capacity limit
has been reached.See the following example:
REPORT ZSALESORDER.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
DATA: lt_schedules_ink TYPE STANDARD TABLE OF bapisdhead1
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
v_text10 = 'Complete delivery'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
*Complete delivery
header-COMPL_DLV = p_autlf.
header-COMPL_DLV = 'X'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item category
itemx-ITEM_CATEG = 'X'.
APPEND item.
APPEND itemx.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000020'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Fill schedule lines
lt_schedules_in-itm_number = '000020'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000020'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
Maybe you are looking for
-
Hi lots going wrong with my music library, artwork is muddled up and also losing tracks because of this, also unable to download latest version of itunes and finally i cannot burn my music to disc. i have an external hard drive and a fairly large lib
-
Hi All, I have a strange issue, where in when we eneter a material into sales order(VA01/Va02), there is a customized pricing condition type which is triggered. But the problem is, the condition base value appears zero and net value is calculated acc
-
HT1338 I cannot use my FineReader 12.04 with OS X Yosemite version 10.10.
I get a message saying " You can't use this version of the application FineReader with this version of OSX. You have FineReader 12.0.4. I bought Fine Reader using App Store. How can I get it to work?
-
SQLs for performance statistics in 10g
I need help in getting this information. Can somebody please provide the sqls. I don't seem to get this from AWR. 1. #transactions/sec 2. Physical reads/sec 3. Logical reads/sec Database is 10.2.0.2 with RAC Thanks
-
Compressing an infocube with agregate
Hi all, I hade compressed an infocube with agregate. In the infocube manage (RSA1), the compress status are OK (infocube and agregate), but the job compress run always, it did not stop . Can you explain me the possible reasons please ? Thank you in a