Need Mapping logic for the following scenario
Hi everyone,
I need a mapping logic for the following scenario.
For the same order no with same material no, the quantity should be summed and only one idoc should be created.
For the same order no with different material no, no need to sum the quantity and only one idoc should be created.
For example:
Source Structure:
Ord No Mat No QTY
12 1 2
13 1 3
13 2 1
12 2 4
15 1 5
14 3 7
12 1 6
Target Structure:
Ord No Mat No QTY
12 1 8
12 2 4
13 1 3
13 2 1
14 3 7
15 1 5
Thanks in Advance
Try the graphical mapping as shown below using concat with a space as delimite and UDF to split the value again by space.
1. Idoc node
(RootContext)
OrdNo
|concat[ ] -> sort[asending] -> SplitByValue -> collapseContexts -> Idoc
MatNo case sensitive [ValueChange]
(RootContext)
2. OrdNo
OrdNo(RC)
|concat[ ] -> sort[asending] ->SplitByValue->collapseContexts->SplitByVale-> UDF to fetch ordno -> OrdNo
MatNo(RC) case sensitive [ValueChange] [eachValue] (return var1.split(" ")[0];)
3. MatNo
OrdNo(RC)
|concat[ ] -> sort[asending] -> SplitByValue ->collapseContexts->SplitByVale-> UDF to fetch ordno -> MatNo
MatNo(RC) case sensitive [ValueChange] [eachValue] (return var1.split(" ")[1];)
4. Qty
[asending,case sensitive]
-- sortByKey -----> formatByExample -> sum ->Qty
OrdNo(RC) | | ^
|concat[ ] -> | Qty(RC) |
MatNo(RC) | |
--sort[asending]-> SplitByValue
case sensitive [ValueChange]
Regards,
Sunil Chandra
Similar Messages
-
Need best Architecture design for the following scenario
Hi Experts,
I need best architecture design for the following scenario:
Sender: Mail
Receiver: if sender body contain u201DApproveu201D, then call SOAP adapter, If SOAP adapter execute successfully, then send Mail(SOAP adapter executed successfully) and SMS . So receiver is SOAP, Mail and SMS.
My current approach issue:
Three message mapping:
Mapping1: mail to SOAP
Mapping2: mail to Mail
Mapping3: mail to SMS
In interface determinant>u201DSelect all three operation mappingu201D> u201Cselect order at runtimeu201D.
Issue in current approach: For me first SOAP adapter should complete successfully, after that only my Mail and SMS operation mapping should execute:
But problem is before success of SOAP adapter engine, Mail and SMS mapping completed or integration engine executed.
Note: There is possible to fail the SOAP request in adapter engine.
Kindly help me --> u201CAm I going correct way or want to change the architectureu201D?
Thanks for advance!!
Regards, KumarWhat do you mean by successful execution of soap call? Are you talking about Successful response (happy flow) from the soap call instead of application error ? Then based on the response you want to decide sending mail and sms. How big call is your soap ? If your soap interface is very simple I can give the other possible way.
Sender sends the message, use mapping to read the content and then do soap call in the mapping itself and after seeing the soap response decide about two receivers (mail and SMS). If your soap call is very simple one, you can go for it. Otherwise I would not recommend this. The reason is you loose some visibility regards to monitoring during soap call in the mapping.
Other option is go for CCBPM. Here you receive the message, use send step to soap interface which is sync step. Then after seeing the response create another block with fork steps each for two senders mail and sms. If response bad then dont proceed or execute the next block. Simply use exeception or control step to jump out from the block, -
Provide the java code for the following scenario.
Hi Experts,
I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
so that it becomes easy........
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Kindly provide the java code.
Thanq very much in advance..what i have understood from ur example is that u want to generate an idoc for unique combination of Order-no and Mat_No
if yes then chk the below mapping..
change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
1)
Order-no
----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
Mat_No
2)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
Mat_No
3)
Order-no
-----------concat[;]---sortbykey----------------------- \
Mat_No / \
Date--------------- / \
----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
Order-no /
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
4)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
Mat_No
5)
Order-no
-----------concat[;]---sortbykey
Mat_No /
Quantity --------------- /
----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
Order-no
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
UDF1:
String [] temp= a.split(";");
return temp[0];
UDF2:
String [] temp= a.split(";");
return temp[1]; -
Conversion logic for the following!!
Hi,
Experts
can you help me to build a conversion logic for the following
1.BKPF-BLART .setting it to 'ZF'.
2.BKPF-MONAT derived from posting date
3.BKPF-WAERS set to GBP
4.Dr/.Cr indicator BSEG-SHKZG.
If Posting Key (BSEG-BSCHL) is u201840u2019 then this indicator (BSEG- SHKZG)is u2018Su2019 (Debit)
If Posting Key (BSEG-BSCHL) is u201850u2019 then this indicator (BSEG- SHKZG)is u2018Hu2019 (Credit)
5.a)If Cost Object Type is u2018Cu2019 (= Cost Centre), then Cost Collection Object Id shall be mapped to BSEG- KOSTL.
BSEG- PRCTR should be derived from the Cost Centre Master data CSKS- PRCTR.
Effective date should fall between the validity dates CSKS-DATAB and CSKS-DATBI
b)If Cost Object Type is u2018Iu2019 (= Internal Order), then Cost Collection Object Id shall be mapped to BSEG- AUFNR.
BSEG - PRCTR should be derived from the Internal Order Master data AUFK-PRCTR
c)If Cost Object Type is u2018Wu2019 (= Work Breakdown Structure element), then Cost Collection Object Id shall be mapped to BSEG-PROJK.
BSEG - PRCTR should be derived from the WBS Master data PRPS-PRCTR
d)If Cost Object Type is u2018Pu2019 (= Profit Centre), then Cost Collection Object Id shall be mapped to BSEG - PRCTR.
6.Ledger Group BKPF-LDGRP. Set it to u2018Blanku2019 so that the document is posted to all ledgers.
7.Set BSEG-KOKRS (Controlling Area) to 1000.Please do not dump your specs here expecting others to do you work.
matt -
Can anyone tell me the field name, table name for the following scenario?
Hi All,
Can anyone tell me the field name and the respective table name for the following scenario's?
1. A report to list all the materials to which Invoice is done and delivery is pending.
2. A report for Order tracking.
3. A report, which gives PO(Purchase Order), Pricing details.
4. A report, which calculates the MATERIAL COST. It will select all the material issued for the entered service order number from stock.
Thanks & Regards,
P.Gowrishanker
Edited by: Gowrishanker pari on Jun 1, 2008 8:58 AMI believe that OmniVision Technologies has the contract for the 3gs.
-
Need mapping columns for the table ic_whse_inv in R12.
Hi Guys,
We are upgrading to R12, and I need mapping for the following columns in the table ic_whse_inv
to the Tables in R12.
SAFETY_STOCK ,REORDER_POINT ,FIXED_LEADTIME, PURCHASE_IND
Can you guys help me?
Thanks\Kiran S.Hi,
I have already gonr through the OPM release 12.1 migration documents provided in 376683.1.
The metalink ID1098353.1 is somewhat helpful for me in analyzing the transactions duting upgrade phase. However, I still not able to get the exact replacement for ic_loct_inv in R12. Your assistance is really required and appreciated.
Thanks -
What is the appropriate data expiration / eviction scheme for the following scenario
We currently have an expiration scheme through which data entries in cache-A get expired after the cache hits a certain size. The LRU entries are expired after the max threshold is reached. But the issue is that certain entries in the cache are rendered meaningless without the other entries. There is a virtual grouping of entries in this cache.
Is there an expiration scheme that can be defined through which a group of entries can be deleted in one shot, and how can this policy be enforced.
The other way i would percieve this to work is to separate the currently virtually grouped entries into their own individual caches. This seems the logical thing to do, except for the issue being that we would still like to keep all these caches in the same service, and have an eviction policy defined at the service level instead of at the cache level.
Is it possible to define an eviction policy at the service level, for example to satisfy the below scenario.
Service-A has 10 caches in it [cache-1, cache-2, ....., cache-10]. And there is a limit of 10GB defined on the service. So, if the total utilization of all the caches in Service-A reaches 10GB, an entire cache from amongst [cache-1, cache-2, ....., cache-10] will need to be cleared and the memory be made available. Which one of the caches to be cleared will depend on which cache satisfies the LRU condition. So, maybe the entire cache-5 should be deleted if the entries in this cache was the oldest used.
Please let me know if the above scenario can be implemented.
Thanks
SumaxRicardo Pedro Rodrigues Ferrão wrote:
> Hi Eugene,
>
> Ill try to explain it better.
>
> For example the business unit A is portable pc and I have this business unit in both companies and what I want in management consolidation is to consolidate data by the business unit portable pc joining data from both companies.
>
> Thanks.
Ricardo,
I had similar business scenario in my earlier project and the expectations were almost same.
I created one consolidation area (legal consolidation) under one single data basis and assigned business area as sub-assignment. All the consolidation functions are executed by the business users based on legal cons requirements purpose, while the reports can be generated for both legal and management consolidation.
In management consolidation reporting, your expectations can be met easily. The header will be business area, while line item data will be companies wise (if you would like the data to display that way).
For more information, you can check the threads created by me. -
Extract file...I want the logic for the following case.
Hi Guys,
i_final having the following inputs.
I_FINAL
MATNR MAKTX CHARG
SK45 PROSK A
SK45 PROSK
SK45 PROSK 02/2007
BP013 PROSK
BP014 PROSK 02/2007
I want the following output.
I_FINAL
MATNR MAKTX CHARG
SK45 PROSK A
SK45 PROSK 02/2007
BP013 PROSK
BP014 PROSK 02/2007
In the above case for MATNR-SK45 if CHARG is space & has other entries then it should not display SPACE in the CHARG field.
In case of BP013 if CHARG is space & has no Other entries means, no other line items, it should display the SPACE in the CHARG field.
NOTE: No duplicate records for the Field CHARG.
can you tell me the logic using the above example ..
Please help me.I need Urgent..Exactly what issues are you having with the autonaming? What is the file name going to be based on? There are all sorts of conversion functions. You might need to convert a number to a string and then something like the Build Path or String to Path functions. The Write LabVIEW Measurements File has an option to autoname files. You can look at how it's done there by simply right clicking on the function and selecting Open Front Panel.
-
How to plan Failover for the following Scenarios in Flex-connect mode.
The following queries are in respect to AP High availability (not SSO fail over or Controller HA), meaning if one controller fails, the AP will be failing over to the secondary controller which is in a different Geo location. the AP will be in Flex-connect mode with local switching and local auth. in this scenario, following are my queries
1: If i have an SSID that has an interface group linked to it, can i fail it over on other controller where there may be a single WLAN linked to it.?
2:Do we need the subnet masks to be same at both ends?
3: if i have an SSID with open authentication, can i configure the remote network SSID with no authentication?
4: can any one link me up with a document that explains configuration case study of the flex-connect mode fail over scenarios.
All the help given would be really appreciated.
Thanks.hi Scott,
Sorry for replyimg late. and thanks for your reply and suggestion.
it did help me a lot, but now i am in a tiff.
the thing is my client has following existing scenario:
he has 6 disparate locations with a standalone 5508 WLC at each location.
he is now planning to configure AP failover for every location.
we are using the Flex-connect design as he has not procured a HA-SSO license.
also the WLC are not in same location.
the Flex-connect design is with Local Switching and local Auth.
there are 2 SSID which are causing me issues.
1: SSID A is linked to an interface group which has multiple vlans.
2: SSID B shares its WLAN interface with another SSID (the wlan is split between 2 different SSID)
we need local switching for these and also they need to have local auth.
so if i remove the interface group for SSID A and use a bigger subnet, what will be the best possible mask to use considering that the ARP and DHCP broadcast shouldn't choke up the network (existing subnets are /21 and /22). or any workaround to minimise the network activity.
and for SSID b what is the configuration i would need to do on the secondary controller or is it just that the SSID needs to be present on the controller and the mask need not be same.
sorry for troubling you and thanks in advance
Niiketan Sutar. -
Need a Query for the following Output
I have a table name Table1. some of the data are like the following
EmpCode ProductCode Quantity
20006 IMPLSA 5
20006 LACJDT 10
20006 LIVLSU 15
20006 PEPPSU 11
20006 SAFMTA 12
20006 SUCFTA 17
21475 IMPLSA 2
21475 LACJDT 7
21475 LIVLSU 4
21475 PEPPSU 8
21475 SUCFTA 12
20409 IMPLSA 11
20409 LACJDT 13
20409 LIVLSU 9
20409 SAFMTA 7
20409 SUCFTA 5
21112 IMPLSA 2
21112 LIVLSU 18
21112 PEPPSU 20
21112 SAFMTA 22
21112 SUCFTA 15
Here no of EmpCode and ProductCode are not fixed.
And i need the output like this
ProductCode 20006 21475 20409 21112
IMPLSA 5 2 11
2
LACJDT 10 7 13 0
LIVLSU 15 4 9 18
PEPPSU 11 8 0 20
SAFMTA 12 0 7 22
SUCFTA 17 12 5 15
I know that it may be solved by dynamic pivot. but i never write any dynamic pivot query.
So Please Help me.DECLARE @EmpList varchar(max),@SQL varchar(max)
SELECT @EmpList = STUFF((SELECT DISTINCT ',[' + CAST(EmpCode AS varchar(15)) + ']'
FROM Table1
ORDER BY ',[' + CAST(EmpCode AS varchar(15)) + ']'
FOR XML PATH('')),1,1,'')
SET @SQL='SELECT ProductCode,' + @EmpList +
' FROM table1 t
PIVOT(SUM(Quantity) FOR EmpCode IN (' + @EmpList + '))p'
EXEC (@SQL)
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Need function modules for the following...
Hello experts,
Is there an function module that I can use for:
1. get the last date for a given year
2. get the exchange rate for a given document number in a span of 5 years -
for example, I need to get the exchange rate of doc. number 0000000123
for the year 2000, 2001, 2002, 2003, 2004 and 2005(maximum of 5 years)
Help would be greatly appreciated.
Again, thank you guys and take care!Hi,
To use CALCULATE_EXCHANGE_RATE_N, you just have to pass the required parameters like foreign amount/currency and local amount/currency, instead you can query the table TCURR for the same data, remember to convert the 'DATE' to internal format before sending it in to the fm/table, you can refer the following code, this might help,
WRITE V_date TO LV_DATUM USING EDIT MASK '__.__.____'.
CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
EXPORTING
INPUT = LV_DATUM
IMPORTING
OUTPUT = LV_DATUM.
Retrieve the Exchange rate from Custom table for the Exchange
select ukurs from tcurr
into tcurr-ukurs
up to 1 rows
where kurst = 'M'
and fcurr = komk-waerk
and tcurr = komk-HWAER
and gdatu >= LV_DATUM.
endselect.
Rgds, -
Need calculation sum for the following expression
Hi All,
Please help me in doing SUM to the following expression.
How to SUM the following expression. Please reply me ASPA.
=iif(Fields!AdhocHourCharge.Value*Fields!ChargedAdhocRate.Value+Fields!RoutineHoursCharge.Value*Fields!ChargedRoutineRate.Value<>0.00,(Fields!AdhocHourCharge.Value*Fields!ChargedAdhocRate.Value+Fields!RoutineHoursCharge.Value*Fields!ChargedRoutineRate.Value),0)Hi Rasul,
if all fields are having numerical data than use below expression:
=Sum(iif((Fields!AdhocHourCharge.Value*Fields!ChargedAdhocRate.Value+Fields!RoutineHoursCharge.Value*Fields!ChargedRoutineRate.Value)<>0.00,(Fields!AdhocHourCharge.Value*Fields!ChargedAdhocRate.Value+Fields!RoutineHoursCharge.Value*Fields!ChargedRoutineRate.Value),0))
otherwise you may have some problem with your field's datatype on the RDL as any field is in string format rather than numerical format so for this you need to use CINT function to convert them in numerical format as:
=Sum(iif((Cint(Fields!AdhocHourCharge.Value)*Cint(Fields!ChargedAdhocRate.Value)+Cint(Fields!RoutineHoursCharge.Value)*Cint(Fields!ChargedRoutineRate.Value))<>0.00,(Cint(Fields!AdhocHourCharge.Value)*Cint(Fields!ChargedAdhocRate.Value)+Cint(Fields!RoutineHoursCharge.Value)*Cint(Fields!ChargedRoutineRate.Value)),0))
I hope it will work.
Live life with joy and happiness! Avanish -
Block Service A/P Invoice for the following Scenario
Hi,
if i m making a Service Purchase order for the Total Amount of INR 1200
and based on tat document i m making a Service A/P invoice For the Total Amount Of INR 700
Now if i m again going to make the A/P invoice based on the Same Purchase Document then we are finding the Total Amount for the INR 1200 instead of INR 500
Wat to do in order to Achieve this, can anybody help me out
Thanks in AdvancePerumal kumarar
The issue that you are having is not a standard SAP functionality. SAP always keeps track of the Balance Open Amount on the Service PO and only copies the balance to the AP Invoice (in your case)
How did you Create the AP Service Invoice. Did you use Copy to from the PO or did you actually go to the AP Invoice selected the Vendor and did a COPY FROM and selected customize and changed the amount?
Suda -
Hi friends need your help for the following !
How to populate an idoc type.
Is it only by writting a report program like
"master idoc distribute" or also by NACE.
When i am using NACE then i must have the baic idoc type cretaed with ALE configured ??Hi,
It is not always by using NACE. If ur making use of standard IDOC types Like
ORDERS05
MATMAS06
DEBMAS etc for the salesorder and purchase orders etc then u can go for the
T.codes : BD10 for MATMAS05,
BD12 for CREMAS06,
BD14 for DEBMAS04 for the MM01, VD01 and MK01/XK01 T.codes Respectively.
If u r dealing with NACE then u should know the basic idoc for which u r using NACE and Messgae type .
There u will cofigure and assign the OUTPUTYPE and assign those outputtype to the respective T.code.
Regards. -
How to do Mapping for the following Scenario
Hi All,
I am doing File 2 File Multimapping Scenario with out using BPM Concept but, My result was Struck at Message Mapping.
Source Target
Message Message1 Details Details
Name Name
ID ID
Message2
Details
Name
ID
I am getting Runtime Exception at Message Transfermation error if i do the one 2 one direct mapping....
so, How to do the Mapping for thei Scenario?
WIth Regards,
MaheshHi Farooq,
I am using Split and Merge.
Source XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/SplitAndMerge" targetNamespace="http://sap.com/xi/XI/SplitAndMerge">
<xsd:import namespace="http://tcs.com/Demo" />
<xsd:element xmlns:p0="http://tcs.com/Demo" name="Messages">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Message1" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="p0:BPM_In_MT" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Target XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/SplitAndMerge" targetNamespace="http://sap.com/xi/XI/SplitAndMerge">
<xsd:import namespace="http://tcs.com/Demo" />
<xsd:element xmlns:p0="http://tcs.com/Demo" name="Messages">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Message1" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="p0:BPM_Out_MT" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Message2" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="p0:BPM_Out1_MT" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Thanks
Mahesh
Maybe you are looking for
-
Problems with pages and mountain lion
Hey i just updated my iwork, and installed mountain lion, solely for the iwork icloud feature. I do a lot of work on my ipad and it would be very useful if they would sync with my macbook. But unfortunately when i create a new document in pages for t
-
Hi Frnds, i have scenario. Where i get header ,Detail and Footer. Header contains few of the fields including with identifier. Trailor record contains record count and line count with identifier But where we dont have an identifier in detail.But deta
-
Profit Center Derivation : Asset Accounting (New General Ledger) ?
I have configured & activated new GL Accounting in my system (ECC 6.0). All my splitting & derivation is working except for transactions related to assets. Whenever I try to do a posting against asset, I get following generic error. Balancing field "
-
How to shift column in Goods movement overview
Dear gurus(sap pp consultant), this is related to earlier thread which was answered by you, i am able to drag the required column,but i did not find the table setting tab, i am working on 4.7 version please suggest....
-
MX922 wireless LAN setup problems with iMac
I am trying to setup my new MX922 printer with a new imac. During the original setup phase, I got a message instructing me to press the "WPS" button on the "access point" for 3 seconds. Before I could figure out what the heck either a WPS button or a