Urgent Needed: how to append $ & % to concatenated data.
Hi Gurus,
I have a report with
D1 F1 F2 CONCATED.
A 1$ 2% (1,2)--->But should be displayed as (1$,2%).
Please help me how to achieve this. Efforts would be marked.
Thanks in Advance.
You can get more info in the on-line help and shipping examples but briefly, auto-indexing is a feature of for and while loops. If you wire an array to a for loop, each element of the array enters the for loop one a time. You do not need to use the index array fucntion to access individual elements. A scalar element exiting a for loop is automatically built into an array. This is the default behavior of for loops and the optional behavior of while loops. A quick way to create an example is to drop a for loop on a block diagram. Wire some constant to the iteration terminal (i.e. 5). Put the random number generator function inside the for loop. Wire the output of that to the edge of the for loop. Right click on the output tunnel and select C
reate Indicator. You'll see that it creates an array. If you then run the VI, the array will be populated. Auto-indexing is very effecient because the array size is allocated according to the number wired to the iteration terminal or to the size of the input array. Using a shift register and build array is less effecient becasue there's no way for LabVIEW to know the final size of the output array so additional array allocation has to be done periodically.
Similar Messages
-
[Urgent] Need help calculating difference between two dates
I'm trying to write a code to display the current day and time, then accept two dates from the user and display the difference between the two dates. To display the current date and time, I've used the SimpleDateFormatter library but I'm having difficulty calculating the difference between two dates. Could someone please help me with this?
Below is my code so far
import java.util.Date;
import java.util.Scanner;
import java.text.SimpleDateFormat;
public class DateFormatter {
public void displayNow()
Date todaysDate = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
String formattedDate = formatter.format(todaysDate);
System.out.println("Today's date and time is: "+formattedDate);
public void calculateDifference(Date startDate, Date endDate)
/* This is whre i need help! */
public static void main(String[] args)
DateFormatter df = new DateFormatter();
Scanner sc = new Scanner(System.in);
df.displayNow();
System.out.println("Please enter a date: ");
String date1 = sc.next();
System.out.println("Please enter another date: ");
String date2 = sc.next();
}The methods displayNow() and calculateDifference(Date startDate, Date endDate) are essential and cannot be skipped out.tarahmarie101 wrote:
Dude. I've tried doing assignments under pressure, and it doesn't work. Here's a piece of free advice. Start earlier next time, don't put "urgent" in the title of your post b/c it just pisses people off around here--and is a sure sign of an overdue homework assignment which no one around here likes helping with, and try to ask intelligent questions--don't just say "Help me!"
Of course, it takes some time to learn what the intelligent questions are. You have my sympathy. Try asking questions about how to do a particular task, instead of asking people to tell you what to do. It starts to get easier after a while.
actually dude i started on this on monday.. but there were so many other stuff to do along with this.. and i did try referring up the Calendar utility but it was a bit confusing actually.. it was only after that did i come to this forum.. nor am i very good at Java.. anyhoo thanks for your sympathies :P -
We are currently supporting an older application which will no longer be patched for future browser releases. We need the end of support date, so we can plan accordingly. Any assistance is truly appreciated.
Hi Tony, and thanks for the reply. I was hoping that might be the case.
Does Mozilla not publish lifecycle dates for Firefox? The reason I am inquiring further, is that our intention is to have upgraded the product we are currently running by late August of next year. I was trying to determine if 3.6 would be supported through August of 2012. I probably should have been more specific with my initial post. -
Urgent-Need help with code for Master data enhancement
hi Experts,
I have appended YMFRGR field(Table MARC) to 0MAT_PLANT_ATTR datasource.
The key fields in the MARC table are MATNR and WERKS.Can anybody help with the user exit to populate this field,as am pretty new to ABAP.
Thanks in advanceHi,
go through this link which has the similar problem:
https://forums.sdn.sap.com/click.jspa?searchID=1331543&messageID=2794783
hope it helps.
Thanks,
Amith -
Urgent need: how to decode usr02
On my laptop sandbox, I can see the password in table usr02 but
in an encrypted form.
Could you tell me how to decode the password?
Thanks and points.This would lock the user.
Did you check the value of login/no_automatic_usr_sapstar?
(should be 0, otherwize the system will not recreate the sap* user)
You may also try (the last option that is avaible):
if you have another system (for example PROD),
you can over-ride the password of your users (field bcode in usr02)
from the system you know the password.
p.s
you can not copy password of diffrent user,
e.g: user A has password "ABCDE",
user B has password "ABCDE",
the values of the BCODE in usr02 would be diffrent from user A to B
although they thave the same passord,
this is because the encryption is per user,
however, user A that have the password "ABCDE"
in diffrent systems/client will have the same BCODE
(the encryption algoritem uses only the user-name to encrypt) -
Urgently needed,( how to..
format the memory card via Nokia 5800,) Not form the PC from the phone it self.
Nokia 3230, Nokia 6255i, Nokia 6500s, Nokia N72, Nokia N95 8GB, Nokia 5800 XM, Apple Iphone 3G
Solved!
Go to Solution.1) go into "Applications" in the menu
2) click into "File mgr."
3) select and enter into "E: memory card", the one in between "backup" and "C: Phone memory",
4) press options, and scroll down, here u can see an option called "Memory card options"
5) press the arrow at the tip of the "Memory card options", now u r supposed to see "Rename" and "Format".
and now u r able to format the memory card without using the pc. rmb to backup all the data that u want...
kudo it, if this help. thxz -
How to append 2 xmltype data into 1 xmltype data
example:
DECLARE
fullXmlDoc XMLType;
_id XMLType;
_se XMLType;
_idse XMLType;
BEGIN
fullXmlDoc := XMLType.CREATEXML('
<Resource>
<identifier qualifier="http://www.oracle.bn/oraCell" value="ChuckTestData11"/>
<title classification="T" ownerProducer="BLACK HOLE USA">Chucks Full Ora full ALG</title>
<security classification="S" ownerProducer="BLACK HOLE USA"/>
</Resource>');
if( fullXmlDoc.existsnode('/Resource/identifier') = 1)
then
DBMS_OUTPUT.PUT_LINE('identifier element');
_id := fullXmlDoc.extract( '/Resource/identifier');
end if;
DBMS_OUTPUT.PUT_LINE('security element');
_se := fullXmlDoc.extract( '/Resource/security');
idse := se.insertXMLbefore(_se, se, id);
END;
ORA-06550:
PLS-00306: wrong number of types of arguments in call to "INSERTXMLBEFORE'
====
I want to insert _id before _se and the result _idse should be :
<identifier qualifier="http://www.oracle.bn/oraCell" value="ChuckTestData11"/>
<security classification="S" ownerProducer="BLACK HOLE USA"/>
as in xmltypeINSERTXMLBEFORE(XMLTYPE_instance,XPath_string, value_expr)
In your case :
XMLTYPE_instance and XPath_string both look to be se which does not seem to be correct in first look .. please check the value of XPathstring
Message was edited by:
Gajanan Palsule -
I need How to retrive data from sap r/3 using weblogic server
Hi every body .
I need how to retrieve r/3 data using BAPI methods
and using weblogic server
very criticalHai.
check the links.
http://www.bea.com/content/news_events/white_papers/BEA_WLP_SAP_Portlets_81.pdf
http://www.info-sun.com/docs/wp_sapinter.pdf
regards.
sowjanya.b -
NEED THE LOGIC TO RETRIVE THE DATA FROM IT2001 SUBTY 0910 AND 0100
HI ALL,
ITS URGENT
NEED THE LOGIC TO RETRIEVE THE DATA FROM IT2001(P2001) SUBTY 0910 AND 0100.
BEST REGARDS
SUNILHi,
Please find the logic to retrieve the data from IT2001.
<b>Infotypes : 2001 mode n."Declare the infotype in the infotypes declaration.
Get pernr.
RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA."Retrieves all the records of absence
LOOP AT P2001 WHERE SUBTY = XYZ.
Write the logic.
ENDLOOP.</b>
Regards,
Pavan Kattamuri. -
How to append data..
I have an requirement where in transaction MIGO. when user clicks on POST button, at that time the data should be e-mailed to the Vendor.
So for that i have created a Z implementation of BADI MB_MIGO_BADI.
Now in that i have written a Function Module name as Z_SENDMAIL.
where i have table paramater which is of type BCSY_TEXT which is again of LINE type of SOLI.
Now the data of MIGO is filled in table IT_MSEG which is paramter of Method POST_DOCUMENT of MB_MIGO_BADI.
So problem comes that how should i fill the data in my line type table of Function Module.
For your information i am sending you the FM.
FUNCTION Z_SENDMAIL.
""Local Interface:
*" IMPORTING
*" VALUE(FROM) TYPE ADR6-SMTP_ADDR OPTIONAL
*" REFERENCE(TO) TYPE ADR6-SMTP_ADDR OPTIONAL
*" REFERENCE(SUBJECT) TYPE SO_OBJ_DES
*" REFERENCE(FLAG) TYPE CHAR1 OPTIONAL
*" EXPORTING
*" REFERENCE(RETURNCODE) TYPE SY-SUBRC
*" TABLES
*" IT_TEXT TYPE BCSY_TEXT
*" IT_EMAILS STRUCTURE SOMLRECI1 OPTIONAL
TYPES : BEGIN OF TS_REC,
RECIPIENT TYPE REF TO IF_RECIPIENT_BCS,
END OF TS_REC.
DATA : IS_T1(255) TYPE C,
IT_REC TYPE TABLE OF TS_REC,
IS_REC TYPE TS_REC,
W_EMAIL TYPE ADR6-SMTP_ADDR,
W_TEXT TYPE BCSY_TEXT,
W_DOCUMENT TYPE REF TO CL_DOCUMENT_BCS,
W_SENDER TYPE REF TO IF_SENDER_BCS,
W_RECIPIENT TYPE REF TO IF_RECIPIENT_BCS,
W_SENT_TO_ALL TYPE OS_BOOLEAN,
W_OREF TYPE REF TO CX_ROOT,
W_TEXT1 TYPE STRING,
W_SEND_REQUEST TYPE REF TO CL_BCS,
W_TABIX TYPE SY-TABIX.
CONSTANTS: C_TYPE TYPE SO_OBJ_TP VALUE 'RAW',
C_LENGTH TYPE SO_OBJ_LEN VALUE '12',
C_X TYPE C VALUE 'X'.
FROM = [email protected]'.
TRY.
create persistent send request
W_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
LOOP AT IT_TEXT INTO IS_T1.
APPEND IS_T1 TO W_TEXT.
CLEAR IS_T1.
ENDLOOP.
W_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
I_TYPE = C_TYPE
I_TEXT = W_TEXT
I_LENGTH = C_LENGTH
I_SUBJECT = SUBJECT ).
add document to send request
CALL METHOD W_SEND_REQUEST->SET_DOCUMENT( W_DOCUMENT ).
set sender
note: this is necessary only if you want to set the sender
different from actual user (SY-UNAME). Otherwise sender is
set automatically with actual user.
sender = cl_sapuser_bcs=>create( sy-uname ).
W_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( FROM
CALL METHOD W_SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = W_SENDER.
add recipient (e-mail address)
create recipient - please replace e-mail address !!!
IF TO IS NOT INITIAL .
W_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
TO ).
CALL METHOD W_SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = W_RECIPIENT
i_copy = c_x
I_EXPRESS = C_X.
W_SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
CALL METHOD W_SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = C_X
RECEIVING
RESULT = W_SENT_TO_ALL ).
COMMIT WORK.
ENDIF.
CATCH CX_SY_ARITHMETIC_ERROR INTO W_OREF.
RETURNCODE = 4.
W_TEXT1 = W_OREF->GET_TEXT( ).
CATCH CX_ROOT INTO W_OREF.
RETURNCODE = 4.
W_TEXT1 = W_OREF->GET_TEXT( ).
ENDTRY.
LOOP AT IT_EMAILS.
TRY.
CLEAR W_EMAIL.
W_EMAIL = IT_EMAILS-RECEIVER.
W_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
W_EMAIL ).
IS_REC-RECIPIENT = W_RECIPIENT.
APPEND IS_REC TO IT_REC.
CATCH CX_ADDRESS_BCS.
RETURNCODE = 4.
ENDTRY.
ENDLOOP.
LOOP AT IT_REC INTO IS_REC.
TRY.
W_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
W_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
I_TYPE = C_TYPE
I_TEXT = W_TEXT
I_LENGTH = C_LENGTH
I_SUBJECT = SUBJECT ).
add document to send request
CALL METHOD W_SEND_REQUEST->SET_DOCUMENT( W_DOCUMENT ).
set sender
note: this is necessary only if you want to set the sender
different from actual user (SY-UNAME). Otherwise sender is
set automatically with actual user.
sender = cl_sapuser_bcs=>create( sy-uname ).
W_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS(
FROM ).
CALL METHOD W_SEND_REQUEST->SET_SENDER
EXPORTING
I_SENDER = W_SENDER.
CALL METHOD W_SEND_REQUEST->ADD_RECIPIENT
EXPORTING
I_RECIPIENT = IS_REC-RECIPIENT
I_EXPRESS = C_X.
W_SEND_REQUEST->SET_SEND_IMMEDIATELY( 'X' ).
CALL METHOD W_SEND_REQUEST->SEND(
EXPORTING
I_WITH_ERROR_SCREEN = C_X
RECEIVING
RESULT = W_SENT_TO_ALL ).
COMMIT WORK.
CATCH CX_SY_ARITHMETIC_ERROR INTO W_OREF.
RETURNCODE = 4.
W_TEXT1 = W_OREF->GET_TEXT( ).
CATCH CX_ROOT INTO W_OREF.
RETURNCODE = 4.
W_TEXT1 = W_OREF->GET_TEXT( ).
ENDTRY.
ENDLOOP.
IF FLAG = 'X'.
IF TO IS NOT INITIAL.
IT_EMAILS-RECEIVER = TO.
APPEND IT_EMAILS TO IT_EMAILS.
ENDIF.
ENDIF.
ENDFUNCTION.
So pls help me out asap its very Urgent.......
Regards,
DSYou can fill the data into the body or attach an attachment with the email.
For filling the data into the body, you can use the CONCATENATE statement.
LOOP AT IT_MSEG.
* concatenate all your fields here
CONCATENATE IT_MSEG-MEBLNR IT_MSEG-MGJAHR INTO L_TEXT SEPARATED BY ' | '.
APPEND L_TEXT TO IT_TEXT.
ENDLOOP.
Pass this IT_TEXT to your table.
For creating an attachment you need to create a SMARTForm and than create a PDF attachment which can go alongwith the Mail.
Regards,
Naimesh Patel -
How to know which master data objects need to activated in R3
SALES OVERVIEW CUBE -0SD_C03
How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.
its very urgent please advise.
R/3 in RSA5
Sales Master Data
0ACCNT_ASGN_TEXT Account assignment group for this customer
0ACCNT_GRP_TEXT Customer account group
0BILBLK_DL_TEXT Locked
0BILBLK_ITM_TEXT Billing block for item
0BILL_BLOCK_TEXT Billing block in SD document
0BILL_CAT_TEXT Billing Category
0BILL_RELEV_TEXT Relevant for Billing
0BILL_RULE_TEXT Billing rule
0BILL_TYPE_TEXT Billing Type
0CONSUMER_ATTR Consumer
0CONSUMER_LKLS_HIER Consumer
0CONSUMER_TEXT Consumer
0CUST_CLASS_TEXT Customer Classification
0CUST_GROUP_TEXT Customer Group
0CUST_GRP1_TEXT Customer Group 1
0CUST_GRP2_TEXT Customer Group 2
0CUST_GRP3_TEXT Customer Group 3
0CUST_GRP4_TEXT Customer Group 4
0CUST_GRP5_TEXT Customer Group 5
0DEALTYPE_TEXT Sales Deal Type
0DEL_BLOCK_TEXT Delivery block (document header)
0DEL_TYPE_TEXT Delivery Type
0DISTR_CHAN_TEXT Distribution Channel
0DIVISION_TEXT Division
0DLV_BLOCK_TEXT Schedule line blocked for delivery
0DOC_CATEG_TEXT SD Document Category
0DOC_TYPE_TEXT Sales Document Type
0INCOTERMS_TEXT Incoterms (Part 1)
0INDUSTRY_TEXT Industry keys
0IND_CODE_3_TEXT Industry code 3
0IND_CODE_4_TEXT Industry code 4
0IND_CODE_5_TEXT Industry code 5
0IND_CODE_TEXT Industry code
0ITEM_CATEG_TEXT Sales document item category
0ITM_TYPE_TEXT FS item type
0KHERK_TEXT Condition Origin
0MATL_GRP_1_TEXT Material Group1
0MATL_GRP_2_TEXT Material Group 2
0MATL_GRP_3_TEXT Material Group 3
0MATL_GRP_4_TEXT Material Group 4
0MATL_GRP_5_TEXT Material Group 5
0MATL_TYPE_TEXT Material Type
0MAT_STGRP_TEXT Material statistics group
0NIELSEN_ID_TEXT Nielsen ID
0ORD_REASON_TEXT Order reason (reason for the business transaction)
0PICK_INDC_TEXT Indicator for picking control
0PRODCAT_TEXT Product Catalog Number
0PROD_HIER_TEXT Product Hierarchy
0PROMOTION_ATTR Promotion
0PROMOTION_TEXT Promotion
0PROMOTYPE_TEXT Promotion Type
0PROV_GROUP_TEXT Commission Group
0REASON_REJ_TEXT Reason for rejection of quotations and sales orders
0REBATE_GRP_TEXT Volume rebate group
0RECIPCNTRY_TEXT Destination country
0ROUTE_TEXT Route
0SALESDEAL_ATTR Sales deal
0SALESDEAL_TEXT Sales deal
0SALESORG_ATTR Sales organization
0SALESORG_TEXT Sales Organization
0SALES_DIST_TEXT Sales district
0SALES_GRP_TEXT Sales Group
0SALES_OFF_TEXT Sales Office
0SCHD_CATEG_TEXT Schedule line category
0SHIP_POINT_TEXT Shipping point/receiving point
In BW
Base Unit of Measure 0BASE_UOM
Bill-to party 0BILLTOPRTY
Calendar Day 0CALDAY
Calendar Year/Month 0CALMONTH
Calendar Year/Week 0CALWEEK
Change Run ID 0CHNGID
Company code 0COMP_CODE
Cost in statistics currency 0COST_VAL_S
Credit/debit posting (C/D) 0DEB_CRED
Distribution Channel 0DISTR_CHAN
Division 0DIVISION
Number of documents 0DOCUMENTS
Sales Document Category 0DOC_CATEG
Document category /Quotation/Order/Delivery/Invoice 0DOC_CLASS
Number of Document Items 0DOC_ITEMS
Fiscal year / period
Fiscal year variant 0FISCVARNT
Gross weight in kilograms 0GR_WT_KG
Number of Employees 0HDCNT_LAST
Material 0MATERIAL
Net value in statistics currency 0NET_VAL_S
Net weight in kilograms 0NT_WT_KG
Open orders quantity in base unit of measure 0OPORDQTYBM
Net value of open orders in statistics currency 0OPORDVALSC
Payer 0PAYER
Plant 0PLANT
Quantity in base units of measure 0QUANT_B
Record type 0RECORDTP
Request ID 0REQUID
Sales Employee 0SALESEMPLY
Sales Organization 0SALESORG
Sales group 0SALES_GRP
Sales Office 0SALES_OFF
Shipping point 0SHIP_POINT
Ship-To Party 0SHIP_TO
Sold-to party 0SOLD_TO
Statistics Currency 0STAT_CURR
In R3 RSA5 we have all the Master data data sources as mentioned above, and BW also. How to find the related Master data Infosource in R/3 Master data Data sources.
Thanks in advance,
Bhima.
Message was edited by: Bhima Chandra Sekhar GuntlaHi,
<i>How to know which master data objects need to activated from delivery version to active version in R/3 for a particular standard cube like 0SD_C03.</i>
I think, you are looking for master data sources(text,attributes,hier).Am i right?
If so, This cube has almost all SD master data characterstics. So you can activate all the all master data datasources of SD in r/3 (SD-IO).
Any way you requirement does not stop only by using this cube . You will activate all other cubes in SD also. So if you want to activate only needed master data datasources when you are activating a cube, the job becomes senseless. There is no problem(wrong) in activating all master data available under that application , even though you want to activate only one cube.
With rgds,
Anil Kumar Sharma .P -
I use three read waveform nodes to read data from three channels of
oscilloscope. The data of each channel are 1D array, and I use build
array node to change them into 2D array. It can work well now.
When I want to continuously reading data, I put the read waveform nodes
and build array node into a while loop structure(a timer controls the
time when to stop). That means every time, the program calls read
waveform nodes and then changes them into 2D array. The problem is:after
each loop, the data stored in the 2D array are overwrited. So, at last,
I can only get the last loop data.
I want to append the data into the 2D array, but I do not know how to
implement? I have tried put the build array outside the while loop,
unfortunatel
y, it does not work.
Any advice would be appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.The shift register is a built in way to carry data forward from one
iteration of a loop to the next iteration.. Anything that you feed into the
right shift register appears a data at the beginning of the next loop. You
already have Build Array to combine three 1D array Elements into a single 2D
array. Use another Build Array function to combine the current 2D array
with the previous 2D array to create a combined array. To do this, you must
change the input mode of the Build Array function to Array (not Element).
This will concatenate the arrays and make the continuous data that you are
after.
The only other hidden step is that you must use Initialize Array to feed a
blank, 2D array into the left shift register to clear any leftover data.
Michael Munroe Mailto:[email protected]
A Better Complete Development Engineering Firm
San Mateo, CA 94403 http://www.abcdefirm.com
[email protected] wrote:
> Because I am very new to Labview and in fact, English is not my native
> language, I can not understand the sentence that "combine the current
> reading with the previous reading from the left shift register and save
> it back to the right shift register" means.
>
> Now, I want to descript my question in a simple way:
> In a while loop, I use a build array node to build three 1D arrays into
> one 2D array. For each time when while loop repeats, the value of these
> 1D arrays change, I want to append the new data to the previous ones.
> But in my program, the data in the build array are overrided after the
> while loop repeating.
> So, How to append the data instead of overriding them in the while loop
> structure?
>
> Thanks a lot!
>
> zhljh
>
> In article <[email protected]>,
> Michael Munroe wrote:
> > You need to combine the build array function with the shift register.
> Pop
> > up on the edge of the loop and Add Shift Register. You can combine the
> > current reading with the previous reading from the left shift register
> and
> > save it back to the right shift register.
> > --
> > Michael Munroe Mailto:[email protected]
> > A Better Complete Development Engineering Firm
> > San Mateo, CA 94403 http://www.abcdefirm.com
> >
> > [email protected] wrote:
> >
> > > I use three read waveform nodes to read data from three channels of
> > > oscilloscope. The data of each channel are 1D array, and I use build
> > > array node to change them into 2D array. It can work well now.
> > > When I want to continuously reading data, I put the read waveform
> nodes
> > > and build array node into a while loop structure(a timer controls
> the
> > > time when to stop). That means every time, the program calls read
> > > waveform nodes and then changes them into 2D array. The problem
> is:after
> > > each loop, the data stored in the 2D array are overwrited. So, at
> last,
> > > I can only get the last loop data.
> > > I want to append the data into the 2D array, but I do not know how
> to
> > > implement? I have tried put the build array outside the while loop,
> > > unfortunately, it does not work.
> > > Any advice would be appreciated.
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Michael Munroe, ABCDEF
Certified LabVIEW Developer, MCP
Find and fix bad VI Properties with Property Inspector -
Urgent Help Needed - Joining On Columns with Concatenated Values
I have a challenging issue where I'm trying to join two tables together with a USER_ID column. The caveat is that in one of the tables, the USER_ID is potentially concatenated.
For example, TABLE1 has 2 columns:
1) USER ID
2) USER NAME
TABLE2 has 3 columns:
1) USER ID
2) USER COUNTRY
3) USER DATE HIRED
The resulting SQL query is:
select * from TABLE1, TABLE2
where TABLE1.USER_ID = TABLE2.USER_ID
The problem is that TABLE1.USER_ID is only limited to 1 ID per record. However, TABLE2 potentially has concatenated USER ID's.
In other words, while TABLE1 has a USER_ID = 'ABC123', that same ID may appear in TABLE2 concatenated as USER_ID = 'ABC123;ABC124'
Obviously, with a natural join, this individual will be dropped from the SQL result-set.
Is there a "join function" that I can use to say - "whenever I'm joining these 2 tables, as long as the TABLE1.USER_ID appears *ANYWHERE* in the TABLE2.USER_ID concatenated string (regardless of position), then please include this record in the join??
As of right now, I have total 80 rows. 55 of them successfully are pulled because they have a one-to-one USER_ID correspondence. The other 25 are dropped out because they have multiple concatenated ID's in TABLE2 and only one ID in TABLE1.
Any advice/help will be greatly appreciated!Hi
Etbin wrote:
Maybe
select *
from TABLE1,TABLE2
where instr(TABLE2.USER_ID,TABLE1.USER_ID) > 0Regards
Etbin
Edited by: Etbin on 20.4.2012 23:27
Forgot to mention; <strike>Urgent</strike>How could you forget the "I found love in Slovenia" problem?
If the keys can be different lengths, then the solution above will match different keys if the one in table1 happens to be a substring of the one in table2. For example, if table1.userid='ABC'1, and table2.userid='ABC123;ABC124', then it will be considered a match.
To avoid that:SELECT *
FROM table1
, table2
WHERE INSTR ( ';' || table2.user_id || ';'
, ';' || table1.user_id || ';'
) > 0And Martijn is right (as usual). Storing several different values in a single column, like you're doing with table2.user_id, will cause lots of problems. Store each one in a separate row of a new table. -
How to append the data list bod (JList)
how to append the data list box (JList)
Message was edited by:
raju_2reddyFor this you will need a nested internal table. such that each column of the internal table should be declared as another internal table.
Try something like this :
" Lets say that the type of table that will be returned by the function BOM is ty_ret_tab, then declare as follows
types begin of ty_tab,
c1 type table of ty_ret_tab,
c2 type table of ty_ret_tab,
end of ty_tab.
data gt_tab type standard table of ty_tab,
gwa_tab like ty_tab.
Now the question is how many columns should you declare ? Because you said that in a loop you intend to call a function which will return a internal table and this internal table you need to store in a column of another internal table. And if this is not fixed, you would need to do some dynamic programming to achieve this.
But if we assume that there are fixed number of columns and fixed number of loops, then within the loop, you wiill have to simply move the data from the returned table to each of the columns. Then append the work area outside the loop.
data field(30) type c.
data c_tabix(10) type c.
field-symbols <fs> type ret_tab. " this should be
Loop at itab.
call function BOM...
exporting...
importing.....
tables ret_itab.
c_tabix = sy-tabix.
concatenate 'C' c_tabix into field.
condense field.
assign component (field) of structure gwa_tab to <fs>.
<fs> = ret_tab. " Pass data to each column
endloop.
append gwa_tab to gt_tab. " Now a single record with all columns containing an internal table is built.
Hope this pseudo code helps.
BR,
Advait -
I lost all my events on iphone prior to 2015 and this is not nice as I often need to look back on past dates they are on my Macbook air but how can I get them back to my phone
They're not lost, they simply don't show because you settings ask it not to.
Go to Settings --> Mail, Contacts, Calendar --> Calendar --> Sync --> All events
Maybe you are looking for
-
Sharing p4014n printer on windows 7 machine with XP machine
I have installed a Laserjet P4014n on a new Windows 7 machine with the USB connection - I allowed it to detect and install the drivers automatically. The printer works great on the Win7 machine. I shared the printer and would now like to have an XP
-
hi, I have a simple program: one frame's content pane adds two JPanels. Source as follows: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class DragTest2 { public static void main(String[] args) { JFrame frame = new JFrame()
-
Trouble installing adobe flash player.
I have tried several times to install Adobe Flash Player. I get a message that it was successful, but then when I open something where it's required to view, I receive ANOTHER message to install. I looked online and took the steps given, one of which
-
I don't use your product why charge me 300 B per month
ca can you explain to me why charge me 300B per month
-
Syncing with Photoshop Elements
I did a sync with an Elements library of over 19,000 photos. It did it, but when I went to the Apple TV there is only one entry, "Photoshop Elements!" There appears to be no way, other than to watch the slide show, to actually jump around the library