Want to generate target structure based on the comparing of records source
Hi Experts
i hava an issue here
I want to generate target sturecture
My requirement is
Source Target
LPLRecordset PurchaseRecordset
a a
b b
c c
d d
Tax(Subrecordset 1
1 2
2
If LPL data is coming it need to populate Purchase Record fields... if tax is coming then it need to populate with LPL with Tax ,
If tax Recordset is coming twice it need to populate Purchase Recordset ..
Plz hep me in this
how to populate the target , If possible with eg
Source
LPLRecordset
a
b
c
d
Tax(Subrecordset
1
2
Target
PurchaseRecordset
a
b
c
d
1
2
If LPL data is coming just it should populate a,b,c,d
If Tax data is coming it need to populate whole purchase record but only 1,2
if tax data is repeating 2 times it should populate whole purchase record twice with only tax data populate in the target
How to map from source to target
Reply me back if you have any queies
Similar Messages
-
Suppress Target structure based on condition
Hi
How to suppress target structure based on condition
Example:
Source is like:
<Details>
<Name>abdc</Name>
<ID>234</ID>
<Address>US</Address>
</Details>
I have two target structures
1:
<Details>
<Name>abdc</Name>
<ID>234</ID>
<Address>US</Address>
</Details>
2:
<Error>
<ErrorID>
</Error>
if Any of the source filed is null then i dont want to map it to source structure. instead I want to assign an error id to ErrrorID node of the target.
example
abc,123,US
abc
in above case second record has two null values
so my target structure should be
<Details>
<Name>abc</Name>
<ID>123</ID>
<Address>US</Address>
</Details>
<Error>
<ErrorID>2nd record has erro</ErrorID>
</Error>
How to acheive this..
Please help us
Regards
Sowmyahi ,
plz try the following mapping
Name-->exist-->if than else-> tuue----->Name
false---(constant)--
error
ID-->exist-->if than else-> tuue----->ID
false---(constant)--
error
adress-->exist-->if than else-> tuue----->address
false---(constant)--
error
regards,
navneet -
Creating a target group based on the BP email address only in CRM
Hi there,
I am currently trying to create a target group based on the business partner email address only.
I have a list of over 1000 email addresses - these email addresses equate to a BP in our CRM system, however I do not have a list of the equivalent business partner numbers, all I have to work on are the email addresses. With these 1000 BP email addresses I need to update the marketing attributes of each of these 1000 BP records in CRM.
What I need is a method to find the 1000 BP numbers based on the email addresses and then use the marketing expert tool (tx. CRMD_MKT_TOOLS) to change the marketing attributes on all of the 1000 BPs.
The issue I am having is how can I find the list of BP numbers just based on the BP email address, I tried creating an infoset based on table BUT000, BUT020 and ADR6 but I after creating attribute list & data source for this I am stuck on what to do next. In the attribute list the selection criteria does not allow me to import a file for the selection range. I can only enter a value but I have 1000 email addresses and cannot possibly email them manually in the filter for the attribute list. I also looked at imported a file into the target group but I do not have any BP numbers so this will not work.
Does anyone know a method where I can create a target group based on the email addresses only without having to do any code?
Any help would be most appreciated.
Kind regard
JoJoHi JoJo ,
The below report will return you BP GUID from emails that is stored in a single column .xls file and assign the BP to a target group.
REPORT zexcel.
* G L O B A L D A T A D E C L A R A T I O N
TYPE-POOLS : ole2.
TYPES : BEGIN OF typ_xl_line,
email TYPE ad_smtpadr,
END OF typ_xl_line.
TYPES : typ_xl_tab TYPE TABLE OF typ_xl_line.
DATA : t_data TYPE typ_xl_tab,
lt_bu_guid TYPE TABLE OF bu_partner_guid,
ls_bu_guid TYPE bu_partner_guid,
lt_guids TYPE TABLE OF bapi1185_bp,
ls_guids TYPE bapi1185_bp,
lt_return TYPE bapiret2_t.
* S E L E C T I O N S C R E E N L A Y O U T
PARAMETERS : p_xfile TYPE localfile,
p_tgguid TYPE bapi1185_key .
* E V E N T - A T S E L E C T I O N S C R E E N
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xfile.
CALL FUNCTION 'WS_FILENAME_GET'
IMPORTING
filename = p_xfile
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
CLEAR p_xfile.
ENDIF.
* E V E N T - S T A R T O F S E L E C T I O N
START-OF-SELECTION.
* Get data from Excel File
PERFORM sub_import_from_excel USING p_xfile
CHANGING t_data.
SELECT but000~partner_guid FROM but000 INNER JOIN but020 ON
but000~partner =
but020~partner
INNER JOIN adr6 ON but020~addrnumber = adr6~addrnumber INTO TABLE
lt_bu_guid FOR ALL ENTRIES IN t_data WHERE adr6~smtp_addr =
t_data-email.
CLEAR: lt_guids,ls_guids.
LOOP AT lt_bu_guid INTO ls_bu_guid.
ls_guids-bupartnerguid = ls_bu_guid.
APPEND ls_guids TO lt_guids.
ENDLOOP.
CALL FUNCTION 'BAPI_TARGETGROUP_ADD_BP'
EXPORTING
targetgroupguid = p_tgguid
TABLES
return = lt_return
businesspartner = lt_guids.
*& Form SUB_IMPORT_FROM_EXCEL
* text
* -->U_FILE text
* -->C_DATA text
FORM sub_import_from_excel USING u_file TYPE localfile
CHANGING c_data TYPE typ_xl_tab.
CONSTANTS : const_max_row TYPE sy-index VALUE '65536'.
DATA : l_dummy TYPE typ_xl_line,
cnt_cols TYPE i.
DATA : h_excel TYPE ole2_object,
h_wrkbk TYPE ole2_object,
h_cell TYPE ole2_object.
DATA : l_row TYPE sy-index,
l_col TYPE sy-index,
l_value TYPE string.
FIELD-SYMBOLS : <fs_dummy> TYPE ANY.
* Count the number of columns in the internal table.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE l_dummy TO <fs_dummy>.
IF sy-subrc EQ 0.
cnt_cols = sy-index.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Create Excel Application.
CREATE OBJECT h_excel 'Excel.Application'.
CHECK sy-subrc EQ 0.
* Get the Workbook object.
CALL METHOD OF h_excel 'Workbooks' = h_wrkbk.
CHECK sy-subrc EQ 0.
* Open the Workbook specified in the filepath.
CALL METHOD OF h_wrkbk 'Open' EXPORTING #1 = u_file.
CHECK sy-subrc EQ 0.
* For all the rows - Max upto 65536.
DO const_max_row TIMES.
CLEAR l_dummy.
l_row = l_row + 1.
* For all columns in the Internal table.
CLEAR l_col.
DO cnt_cols TIMES.
l_col = l_col + 1.
* Get the corresponding Cell Object.
CALL METHOD OF h_excel 'Cells' = h_cell
EXPORTING #1 = l_row
#2 = l_col.
CHECK sy-subrc EQ 0.
* Get the value of the Cell.
CLEAR l_value.
GET PROPERTY OF h_cell 'Value' = l_value.
CHECK sy-subrc EQ 0.
* Value Assigned ? pass to internal table.
CHECK NOT l_value IS INITIAL.
ASSIGN COMPONENT l_col OF STRUCTURE l_dummy TO <fs_dummy>.
<fs_dummy> = l_value.
ENDDO.
* Check if we have the Work Area populated.
IF NOT l_dummy IS INITIAL.
APPEND l_dummy TO c_data.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Now Free all handles.
FREE OBJECT h_cell.
FREE OBJECT h_wrkbk.
FREE OBJECT h_excel.
ENDFORM. " SUB_IMPORT_FROM_EXCEL
Just copy paste the code and run the report select any local xls file with emails and pass the target group guid.
snap shot of excel file:
Let me know if it was useful. -
Target message based on the city name
hi my source message schema is like this.based on the city name the target file will be created at the same time records to that particular city only.
<Record>
<person>ramesh</person>
<City>xx</City>
<Address>xyz</Address>
</Record>
<Record>
<person>suresh</person>
<City>yy</City>
<Address>abc</Address>
</Record>
<Record>
<person>ajay</person>
<City>yy</City>
<Address>def</Address>
</Record>
<Record>
<person>kirshna</person>
<City>xx</City>
<Address>ghi</Address>
</Record>
target message schema will be like this.
<City>
<Record>
<person>ramesh</person>
<Address>xyz</Address>
</Record>
<Record>
<person>kirshna</person>
<Address>ghi</Address>
</Record>
</City>
<City>
<Record>
<person>suresh</person>
<Address>abc</Address>
</Record>
<Record>
<person>ajay</person>
<Address>def</Address>
</Record>
</City>
iam getting correct only when same city records giving together.its creating another city record if i gives differently...how to achieve thishi for my above source schema..when iam doing mapping iam gettin like this
<City>
<Record>
<person>ramesh</person>
<Address>xyz</Address>
</Record>
</City>
<City>
<Record>
<person>suresh</person>
<Address>abc</Address>
</Record>
<Record>
<person>ajay</person>
<Address>def</Address>
</Record>
</City>
<City>
<Record>
<person>kiran</person>
<Address>ghi</Address>
</Record>
</City>
here 3 city header files are creating with city name instead of two header files..here source side Iam using only two city names...so i want two header files target side... -
I want example application in c# based on the duplicate detection alogrithm
duplicate detection alogrithm
Step 1: Consider the Stemmed keywords of the web page.
Step 2: Based on the starting character i.e. A-Z we here by assumed the hash values should start
with1-26.
Step 3: Scan every word from the sample and compare with DB (data base) (initially DB
Contains NO key values. Once the New keyword is found then generate respective hash
value. Store that key value in temporary DB.
Step 4: Repeat the step 3 until all the keywords get completes.
Step 5: Store all Hash values for a given sample in local DB (i.e. here we used array list)
Step 6: Repeat step 1 to step 6 for N no. of samples.
Step 7: Once the selected samples were over then calculate similarity measure on the samples
hash values which we stored in local DB with respective to webpages in repository.
Step 8: From similarity measure, we can generate a report on the samples in the score of %
forms. Pages that are 80% similar are considered to be near duplicates.
this is my duplicate detection alorithm. i want some example windows application in c# based on alogrithm.Yu may want to use a dictionary which has a built in hash table for the key. See code below for starting point
List<string> input = new List<string>() { "abc", "abd", "def", "ghi" };
Dictionary<string, List<string>> dict = input.AsEnumerable()
.GroupBy(x => x.Substring(0,1), y => y)
.ToDictionary(x => x.Key, y => y.ToList());
jdweng -
OTL:Generate Timecard Tasks based on the Period selected on the Period LOV
Hi,
I want to generate the Tasks' LOV Based on what is selected on the Period LOV. It must only list Tasks that are valid/active for the select Period LOV.
I want to integrate the "validation/condition" in the script to generate the PA_ONLINE_TASKS_V view.
Best regards,
ErnestErnest,
OTL renders the LOV through its own rendering mechanism and is a wrapper over OAF LOV component. Hence you won't be able to treat it like a normal LOV as it gets rendered at runtime based on layout ldt file.
But you sure can have the LOV based on a previously selected item inside Timecard matrix. Considering your case, the Period list is not inside the matrix, hence your LOV cann't refer to that. But instead if you are willing to use a package choice list, you can get access to the Start date of the selected time period through bind parameter TIMECARD_BIND_START_DATE. Hence my suggestion would be to use a package choice list and use your VO in the function used for choice list.
Instead if you want to use LOV only, make a hidden package choice list where you default it to the Timecard start date through a custom function attached to it and so you
have a field with start date inside the matrix.
Let me know, how it goes. -
STO - Generating an Output based on the Plant
Hello
I do have a requirement to generate an Output(EDI) based on the Plant to which the material is being delivered to. The condition record that I have in place(Configured via M/59) is Doc. Type/P.Org/P.group/Supplying Plant/Plant. In the list of available fields, i see both Supplying plant as well as Plant. Access sequence and MN04 condition records have been maintained. Likewise an output device has also been maintained. The Q's i have are -
1. Have any of you had such a requirment( to use the Plant)?
2. Plant is at item level and what should happen if the plant in the STO is different at the item level.
3. SAP have also provided Material, which again is at the item level. What is the logic behind such?
Appreciate if you can advice.
Thanks
AjayHi Ajay,
This is related to PP/MM query pls put in the pp/mm form.
Regards,
Anil -
I need to create monitor(s) for an application, but the application services are different on all the servers. Usually I would find a application service that is common among all the servers I want to monitor to create the target,
but this does not exist. There are no common services for this application. However, every server does have a common folder in the Program Files on the C: drive (i.e. "xyz" folder exist on every server for the application).
Is there a way to create a target based on a folder in the Programs Folder?Please refer to the following, which is quite exactly fit your requirement.
http://msdn.microsoft.com/en-us/library/bb437613.aspx
Roger -
Want to generate a report for displaying the top 30 revenue generating regn
Hi Team
I was trying to generate top 30 revenue generating regions using " Edit Formula " option (Ofcouse there are other methods to do it , but i was trying out with this one ).
The scenario is : -
I have selected four columns i.e Year , Region , Product Type and Revenue.And i wanna display the top 30 revenue generating regions.
Steps I follwed : -
1> Selected the 4 columns (Year , Region , Product Type and Revenue )
2> Arranged the Revnue Column in descending order.
3> Went to --- > Revenue Column ---> Edit formula (fx) and used the COUNT(*) function.
i.e select "F1 Revenue"."1-01 Revenue (Sum All)" from "Sample Sales" where COUNT(*) <30
but I am getting error while doing so
Please guide
Thanks RohitHi Paul
Thanks for the quick response.
But I only want to restrict my output to 30 top records. Is there any way out ..?
and moreover Could you please suggest what went wrong in my previous query..?
Thanks
Rohit -
Ccalling the webservice in WSDL based on the incoming value from source
Hi Experts,
i am doing the inteface like SAP -(Client proxy)SAPPI(SOAP)----thirdparty
i got WSDL from the third party it provides the structure like this when i was impoted through external defination
BLE
Fault
Exception code
Exception message
ADDPARTS
Add parts
Parts
Each record
Field1
Field2
Field3
Price
Usd
Field4
ADD PARTSRESPONSE
Add parts response
Status
Success
Message
DELETEPARTS
Deleteparts
Parts
Criteria
DELETEPARTSRESPONSE
Deletepartsresponse
Status
Success
Message
GETPARTS
Getparts
Parts
Criteria
GETPARTSRESPONSE
- -Getpartsresponse
Status
Parts
Eachrecord
Field1
Field2
Field3
Field4
UPDATEPARTS
Updateparts
Parts
Eachrecord
Field1
Field2
Field3
UPDATEPARTSRESPONSE
Updatepartsresponse
Status
my question is how can i call the perticular webservice suppose if the partsmaster values are new values we need to update so in that time we need to call the update parts webservice
in the same manner deleteparts and getparts
please any body suggest to me how can iachinve this one
Thanks in advance
Edited by: katakoti on Mar 23, 2011 9:35 AMTo process adapter attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.
http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm -
How to generate row_number for more than the no of records in the order by column?
Hi All,
I have a query which contains Order quantity, order date and Row_number as Id. The below code produces 15 records as well as row_number for those 15 records. But I need row number for the next 12 months too. That means I need 12 more records with row_number
and Order month and order quantity empty.
use [AdventureWorksDW2012]
go
SELECT
SUM([OrderQuantity]) As OrderQuantity
,CONVERT(DATE,[OrderDate]) As OrderDate
,LEFT(d.[EnglishMonthName],3) + '-' + CONVERT(CHAR(4),YEAR([OrderDate])) As OrderMonth
,ROW_NUMBER() OVER(ORDER BY([OrderDate])) As Id
FROM [dbo].[FactResellerSales] f
JOIN [dbo].[DimProduct] p ON f.ProductKey = p.ProductKey
JOIN [dbo].[DimDate] d ON f.OrderDateKey = d.DateKey
WHERE OrderDate >= '2006-04-01' AND EnglishProductName = 'Road-650 Red, 60'
GROUP BY p.[ProductKey], [OrderDate],[EnglishMonthName]
How can I achieve it?
Regards,
JulieI got a solution for this.
use [AdventureWorksDW2012]
go
declare @min int, @max int
IF OBJECT_ID('Tempdb..#tmp') IS NOT NULL
drop table #tmp
create table #tmp
Id int
,OrderQuantity int
,OrderDate date
,OrderMonth varchar(78)
insert into #tmp
Id
,OrderQuantity
,OrderDate
,OrderMonth
SELECT
ROW_NUMBER() over(order by(orderdate)) As id
,SUM([OrderQuantity]) As OrderQuantity
,CONVERT(DATE,[OrderDate]) As OrderDate
,LEFT(d.[EnglishMonthName],3) + '-' + CONVERT(CHAR(4),YEAR([OrderDate])) As OrderMonth
FROM [dbo].[FactResellerSales] f
JOIN [dbo].[DimProduct] p ON f.ProductKey = p.ProductKey
JOIN [dbo].[DimDate] d ON f.OrderDateKey = d.DateKey
WHERE OrderDate >= '2006-04-01' AND EnglishProductName = 'Road-650 Red, 60'
GROUP BY p.[ProductKey], [OrderDate],[EnglishMonthName]
--select * from #tmp
select @min=count(*)+1, @max=count(*)+12 from #tmp
--select @min, @max
IF OBJECT_ID('Tempdb..#tmp_table') IS NOT NULL
drop table #tmp_table
Create table #tmp_table
Id int
,OrderQuantity int
,OrderDate date
insert into #tmp_table
select Id, OrderQuantity, OrderDate from #tmp
--select * from #tmp_table
declare @test varchar(1000)
set @test='insert #tmp_table(id) select TOP '+ convert(varchar,@total)+' ROW_NUMBER() over(order by(select 1)) from sys.columns'
exec(@test)
while(@max >= @min)
begin
insert #tmp_table(id,OrderDate)
select @min,DATEADD(mm,1,max(orderdate))
from #tmp_table
set @min=@min+1
end
select * from #tmp_table
Regards,
Julie -
Message Mapping : content based target structure generation
Hi Team,
As per my requirement , mapping should generate target structure based on one "field" value in source srtucture.i.e target structure should generate for some of the custid values , not for all cust id's . also I dont want empty files .
Source:
MT_SOURCE
-Custid
-CustName
Target:
MT_TARGET
-Custid
-CustName
But I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
Thanks.
DrumiBut I want to generate Target structure MT_TARGET only for custid values' 001,002,003 ; for remaining values I dont want to generate target structure MT_TARGET . Is it possible using graphical mapping.I think UDF is correct oprtion. can you provide sample code for this requirement.
might be it is helpful for ur requirement:
Custid + constant(001) +equals ->(first) if
Custid->then
Custid + constant(002) +equals-> else
First if ending -> Second if
Custid->then
Custid + constant(003) +equals-> Second else ->target Custid -
Split the Target Structure.
Hi,
I have Header and Detail in my Target Structure, in the output I have to create 2 separate files, one for Header and one for Detail.I dont want to go for BPM, is there any solution for this with out using BPM?
Thanks & Regards,
Pragathi.Hi Pragathi
Assuming you mean you have Header and Detail in the source structure and would like to create 2 messages on the target side, you have 2 options (Since you mentioned you dont want to use BPM)
1. Create 2 sets of messages interface and related objects for the target structure and split the flow into 2, which will map the header to one message and the item to the other.
2. Use multimap and map the header to message1 and item to message2. This will be a better option as the interface will use one map for creating the target message and you can pass the message onto 2 comm channels that will create the file.
Hope this help.
Regards
Prav -
Generating AO based on the value of AI?
Hello all,
I am new to labview and require help in putting together an application.
I have a PCI-6229 card hooked up with a set of 64pin- BNC converters.
The DAQ card has 32 analog inputs and 4 analog outputs. I have an
analog input which is pressure data coming from a analog pressure
transducer. This pressure data ranges between 0 mm Hg to 140 mm Hg.
When the pressure reaches 20mm Hg, I want to generate an analog output
on the 4 analog channels and stop this generation once the pressure
goes beyond 50mm Hg. This generated analog output is used to control
the motion of 4 linear actuators hooked onto each analog output channel.
I would appreciate it, if someone could help me out with this project.
Thanks
Murali.Hi Murali,
You will need to use triggering for your application. In this case, you have a few options of how you want to program it. Your application is going to require 2 triggers: one to start the analog output and one to stop the analog output.
You can use the analog input from the pressure transducer as one of your triggers. You can acquire the pressure as a voltage and trigger the analog output off of the voltage level. You will have to use software for the other trigger.
For example: you can continuously acquire your analog input data and use a start trigger based on that analog signal to start your analog output. Then you can use a software trigger to stop your analog output when your analog input voltage reached a defined level. I created an example program by modifying a couple of LabVIEW shipping examples programs to show you this.
The LabVIEW example finder is another great resource. I recommend looking at 2 examples:
1. Continuous Acquire and Graph Voltage Internal Clock which is located in Help>>Find Examples>> Hardware Input and Output>>DAQmx>> Analog Measurements>> Voltage.
2. Continuous Generate Voltage Waveform Internal Clock Analog Start which is located in Help>>Find Examples>> Hardware Input and Output>>DAQmx>> Analog Generation>> Voltage. This example will generate an analog output after receiving an analog trigger.
I hope this information helps you with your project.
Regards,
Hal L.
Attachments:
analog input analog output triggering.vi 172 KB -
Dynamic structure creating based on the input parameter
Hi all,
How to create a dynamic structure based on the input parameter given in the selection screen. I have a file path given and it contains three fields in common, but after that depending upon the input given the fields get changed. For example, i have 0002 infotype given in the selection screen, my file path structure should contain pernr begda endda and PS0002 structure, if the infotype is changed the PS structure has to be changed dynamcially.
Thank you,
Usha.Ans
Maybe you are looking for
-
A single Firefox window with many tabs will not appear, yet other new windows will?
I've had this problem a few times before. . Whenever I start up the browser, the one window with most of my tabs, about 30+ of them stays stuck in the taskbar. I know that the pages are loaded, yet for some reason, which I think may be that a single
-
Hi All, can anyone plz tell what are the parameters(like stored dimesions,rule file) we need to consider to estimate the size of the Essbase cube?? Is there any formula to calculate the same?? Regards, Lolita
-
Hi everyone. Having trouble with my e71x. It seems like it charges. When it's plugged in here's a flashing indicator in the top right hand corner. But I can't get it turn on. No matter what I press, no matter how long, it just doesn't want to turn on
-
I am not an admin on my computer and I think it is blocking flash functionality. my adobe creative cloud application updater is a black screen with exception of the menu bar. same for amazons mp3 player for desktops. how do I run flash as an admin?
-
The desktop installer will not activate
how do I troulbe shoot and fix the Creative Cloud installation app?