Data retrivel from table ausp table
Helllo Experts,
I want to retrive data from table ausp based on the data retrived from the VBAK table.
I have selected data from VBAK and VBAP tabble using code :
SELECT VKORG VTWEG VBAKSPART VKGRP VKBUR KUNNR KNUMV VBAKVBELN VBAPMATNR VBAPARKTX INTO CORRESPONDING FIELDS OF TABLE GT_DATA
FROM VBAK INNER JOIN VBAP ON VBAKVBELN = VBAPVBELN
WHERE VKORG IN SVKORG
AND VTWEG IN SVTWEG
AND VBAK~SPART IN SSPART
AND VKGRP IN SVKGRP
AND VKBUR IN SVKBUR
AND KUNNR IN SKUNNR
AND MATNR IN SMATNR.
SELECT MATNR BREIT ZEINR BRGEW INTO CORRESPONDING FIELDS OF TABLE GT_EANCODE FROM MARA
FOR ALL ENTRIES IN LT_DATA WHERE MATNR = GT_DATA-MATNR.
SORT GT_EANCODE BY MATNR.
ENDIF.
SELECT MATNR MVGR1 MVGR2 MVGR3 INTO CORRESPONDING FIELDS OF TABLE GT_MVGR FROM MVKE
FOR ALL ENTRIES IN LT_DATA WHERE MATNR = LT_DATA-MATNR.
SORT GT_MVGR BY MATNR.
ENDIF.
SELECT KNUMV KPOSN KSCHL KWERT INTO CORRESPONDING FIELDS OF TABLE GT_KONV FROM KONV
FOR ALL ENTRIES IN LT_DATA WHERE KNUMV = LT_DATA-KNUMV AND KSCHL IN ('ZG02').
SORT GT_KONV BY KNUMV.
So based on the material field in the table GT_DATA i have to select data from table ausp. The ausp table also having the field
material ( but the name of the material field in the ausp table is OBJEK) . Material field in t the VBAP table have data type character and field length 18 and OBJEC field in the ausp table have data type character and lenght 50.
So if i give select statement for ausp table
SELECT OBJEK ATINN ATWRT INTO CORRESPONDING FIELDS OF TABLE GT_AUSP FROM AUSP
FOR ALL ENTRIES IN GT_DATA WHERE OBJEK = LT_DATA-MATNR AND
. MFID = '01' AND
KLART = '001' AND
ATINN = V_ATINN.
it is giving error : when you use addition for all entries in internal table the object and GT_DATA-MATNR must have same data type and same length.
So if i change the length of the matnr field it will effect for other select statement.
please let me know hw to over come errors.
Thakns in advace.
Best Regards,
Zubera
Hi shridarudupi ,
when you are declaring structure for GT_DATA,define matnr field of type ausp-objek , so when you will select data from AUSP using for all entries of GT_DATA , there will not be any type mismatch.
For Ex.
TYPES : BEGIN OF t_mara ,
matnr TYPE ausp-objek,
ersda TYPE mara-ersda,
END OF t_mara,
BEGIN OF t_ausp ,
objek TYPE ausp-objek,
atinn TYPE ausp-atinn,
END OF t_ausp.
DATA : i_mara TYPE STANDARD TABLE OF t_mara,
i_ausp TYPE STANDARD TABLE OF t_ausp,
wa_mara LIKE LINE OF i_mara,
wa_ausp LIKE LINE OF i_ausp.
SELECT matnr
ersda
FROM mara INTO TABLE i_mara
WHERE matnr = '4510'.
IF sy-subrc = 0 .
SELECT objek
atinn
FROM ausp
INTO TABLE i_ausp
FOR ALL ENTRIES IN i_mara
WHERE objek = i_mara-matnr.
IF sy-subrc = 0 .
WRITE : 'successful'.
ENDIF.
ENDIF.
Hope this helps.
Edited By Tejaswini Khante
Similar Messages
-
Data Extraction from AR Aging Tables to Acess
Hi
I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP.Hi
I used to work on developing the reports.But I am a new to the Data Extraction from AR Aging Tables into Acess and the data is upload from Acess to SAP.
Can anybody help me to relove this issue.I really appreciate to you.After mapping then the data is loaded to SAP. -
Creating MS- Access data base from the Internal tables data of an ABAP Prog
Hi,
I have a requirement where I have to create Access tables from the Internal tables of ABAP program.
The tables are like Project systems Header data, WBS elements data, Netwrok data, Activity data, Milestone data and Project revunes. I will have the internal tables for these. I want to transfer these tables data into MS-Access tables onto Users desktop.
Please adivce me how to do this.
Thanks,
PrabhakarHI,
I am trying to create a DB table in the access but I am not successful. The following is the format of the table needs to be created from the ABAP program.
I have created a table with the following format in MS-Access with the name tblHeader. Is it neccessary to create a DB table ( MS-Access) in advance or by using the FM STRUCTURE_EXPORT_ TO_MSACCESS we need to create a structure in MS-Access?
False tblHeader
Field Name Type Length
ProjectDef Text 255
ProjectDes Text 255
Created Text 50
Change Text 50
RespPerson Text 255
Profile Text 255
Plant Text 255
ObjNo Text 255
OverheadKey Text 255
I have created a Z table ZTAB1 with the same format from the SAP fields.
MS-Access Table name : tblHeader
ABAP program Internal table : t_tblheader
Z table Name : ZTAB1.
First I am trying to create a structure in MS-Access with the following FM.
CALL FUNCTION 'STRUCTURE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
LANGU = SY-LANGU
dest = 'PS_ACCESS_1'
TABLES
tabname = ttblheader
EXCEPTIONS
system_failure = 1
comm_failure = 2
OTHERS = 3
Table ttblheader type is DFIES and I am filling the table with only one record and one field i.e TABNAME and the value is ZTAB1.
The source code of the FM is using another FM
CALL FUNCTION 'MSACCESS_STRUCT_ EXPORT_RFC' DESTINATION DEST
Here I am getting the Error message Object required. I can't able to create a table structure in MS-Access.
Next I am going to Use the FM
'TABLE_EXPORT_ TO_MSACCESS'
and it will create the records in the MS-access table.
CALL FUNCTION 'TABLE_EXPORT_ TO_MSACCESS'
EXPORTING
dbname = 'D:\test\db2'
langu = sy-langu
dest = 'PS_ACCESS_2'
tabname = 'ZTAB1'
reftable = 'tblheader'
FLG_NO_DOWNLOAD = ' '
FLG_APPEND = ' '
FLG_POPUP = ' '
TABLES
dtab = t_tblheader
here t_tblheader is the internal table.
Reftable = tblheader is the table which i have created in advance. ( not by using the First FM)
In this FM i am getting a error message : Unable to connect to Database D:\test\db2.
Please help me how to create the MS-Access database. -
Logical table with data restrictions from the physical table
Hello, I have a question about the relationships between the Logical Tables in Business Model and Mapping and The Physical table in the physical layer. The problem is the next one:
I have a Physical Table named T1 that contains the attributes: Id, DateChangeState, State,…
T1
DateChangeState| ID |State | Other columns….
01/01/2011 | 1 | 03 | …
02/01/2011 | 1 | 11 | …
03/01/2011 | 1 | 02 | …
02/02/2011 | 2 | 01 | …
03/02/2011 | 2 | 02 | …
I need filter this table and extract only one row per ID. The row that I need is the row who contains the Max(DateChangeState) per ID. I don’t know how extract only the rows selected from the physical table to the Logical Table.
I need that the logical table contains the next rows:
T1_Logical
DateChangeState |ID | State Other columns….
03/01/2011 | 1 | 02 | …
03/02/2011 | 2 | 02 | …
How can I extract only the rows with the Max(DateChangeState) grouped by ID in the BMM?
I thought put this condition in the column mapping (CASE WHEN DateChangeState=Max(DateChangeState)) but the Max(DateChangeState) was not grouped by ID.
Any idea about how solve this problem?
I can not use the group by in the answer and I can not change the physical layer.
Thank you,
Best Regards.Hi Rajeevagrl your solution is very good but I dont´t know why obiee is applying twice the max condition, The select is the next one:
select distinct D1.c1 as c1,
D1.c2 as c2,
D1.c1 as c3
from
(select D1.c1 as c1,
D1.c2 as c2
from
(select D1.c1 as c1,
D1.c2 as c2,
max(D1.c3) over () as c3
from
(select T379.ID as c1,
T379.DATE as c2,
max(T379.DATE) as c3
from
T1 T379
group by T379.ID, T379.DATE
) D1
) D1
where ( D1.c2 = D1.c3 )
) D1
order by c2
Edited by: 848497 on 14-abr-2011 3:58 -
Cost center data fetch from COSS/COSP tables.
Hi Experts,
I need to fetch data from COSS/COSP tables for particular Cost centers fetched in CSKS select.
As there is no Costcenter field I cannot access the database tables directly.
Fetching entire dat and then deleting is causing performance issue with the report.
I need to reduse the time taken by COSS/COSP table select , as I have Cost center field on the selection screen.
Is there any other method or FM that I can use?
Thanks in advance!!!Hi
This is my code to get the data from a certain cost element group:
}call function 'G_SET_GET_ID_FROM_NAME'
exporting
shortname = p_kagru
tabname = 'CCSS'
fieldname = 'KSTAR'
kokrs = p_kokrs
ktopl = 'ENPC'
setclass = '0102'
check_set_empty = 'X'
importing
new_setid = setid
* SET_INFO =
exceptions
no_set_found = 1
no_set_picked_from_popup = 2
wrong_class = 3
wrong_subclass = 4
table_field_not_found = 5
fields_dont_match = 6
set_is_empty = 7
formula_in_set = 8
set_is_dynamic = 9
others = 10
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'G_SET_GET_ALL_VALUES'
exporting
* CLIENT = ' '
* FORMULA_RETRIEVAL = ' '
* LEVEL = 0
setnr = setid
* VARIABLES_REPLACEMENT = ' '
* TABLE = ' '
* CLASS = ' '
* NO_DESCRIPTIONS = 'X'
* NO_RW_INFO = 'X'
* DATE_FROM =
* DATE_TO =
* FIELDNAME = ' '
tables
set_values = t_set_values
exceptions
set_not_found = 1
others = 2
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
loop at t_set_values.
count = count + 1.
r_kstar(3) = 'IEQ'.
r_kstar-low = t_set_values-from.
append r_kstar.
if count = 500.
perform read_coep.
else.
at last.
perform read_coep.
endat.
endif.
endloop
U can use somthing like that to get data from cost center
Max -
Datas deletion from Global Temporary table when clear command is given
Dear All,
How to Delete datas from global temporary Table when clear command is given in forms
Suggest me syntax..
Pls help..
Regards,
Gokul.Bhttp://psoug.org/reference/gtt.html
Francois -
How data retrieves from an Oracle table
Hi,
I have inserted record by record with record_number in a Oracle table. I have executed below query in PL/SQL developer. It displayed the result in same sequence order how I have inserted. But when in Toad it given in different order which does not have any sequence.
select * from bbs_user
Anyone please explain this why it is? Please treat this as very urgent.
Thanks in advance.Welcome to the forums.
In a forum of volunteers, not being a support forum, there is no such thing as 'very urgent'. Your use of this two words in your very first post must be considered insulting and rude.
Also it appears you are completely clueless with respect to relational databases. Relational databases are about sets.
By definition -in mathematics- a set has no order.
If you want your data ordered you must use the ORDER BY clause in your SELECT statement.
Also I notice both Pl/SQL developer and Toad are non-Oracle products, so questions about these products do not belong in this forum.
Sybrand Bakker
Senior Oracle DBA -
How to fill LRAW data type from an internal table?
Hi experts,
I have a data type LRAW.
ZCLUSTR type INT2.
ZLOG type LRAW.
It is said that: LRAW: Uninterpreted byte string of any length, but has to be declared with a minimum length of 256. Fields of this type must be located at the end of transparent tables (in each table there can be only one such field) and must be preceded by a length field of type INT2. If there is an INSERT or UPDATE in ABAP programs, this length field must be filled with the length actually required. If the length field is not filled correctly, this may lead to a data loss in the LRAW field! A fields of this type cannot be used in the WHERE condition of a SELECT statement.
So my question is how can I store data in ZLOG? I want to store the content of an internal table into ZLOG, but I don't know how to use INSERT statement correctly. What should I do with ZCLUSTR?Hi Chaitanya,
Refer IMPORT EXPORT statement with addition TO DATABASE in abap help.
Refer below link from SAP help where it is described in detail.
http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3bf8358411d1829f0000e829fbfe/content.htm
Regards,
Vishal -
Data retrieval from 8 db tables
Hi Folks,
We haev a requirement where we need to query 7 tables to retrieve some data and display it in the form of a list.
This report is to be executed in background.
Right now we have 3 select statements, each of which has inner joins on 2-3 tables and uses "for all entries".
Performance wise which would be a better option - to keep it this way, or have separate select statement for each table and then read statements on internal tabels for output?
Thanks in advance,
MunishHi,
I think it depends on the balance between ABAP time and Database time.
If you select all the data from tables independently and then do looping etc,
it will increase the hits as well as the ABAP time.
So the next best option is a mix of both. I believe the current approach holds good.
As, has been mentioned before also in this thread, you can improve the performance if the joins are being made on key fields since this reduced overhead.
If I were using tables which had all been joined with key fields I would have gone as high as with 5 Joins but I guess this is an ideal scenario so a join of 2-3 tables is a decent approach.
And the subsequent handling in ABAP is the only next step.
So this approach is fine and you should incorporate correct performance guidelines which you can find in this forum if you search for them.
Regards
Nishant -
Master data coming from which particular table of source system
Hi,
my requirement is i have a master data (ABC) coming from a source sytem XYZ
there is an attribute (L) in my master data. Now i want to know from which table in my source sytem the data pretaining to attribute L is coming up.
I m using BW 3-5 system
Is there a way through which i can directly find out abt the same.
thanksHi,
Is this standard Master data or Generic one, if it is customised one then you can find the same in customer exit of ECC system,
go to tcode CMOD in ECC system, there willbe an project defined for the BW system, in that get an exact component, and check for the custom code for your masterdat, there you will be in a position to find out from where the data is being extracted.
if you are good at abap you can debug it via RSA3 , else get an help of an abaper to find it out.
if it is standard , then you can search in SDN, but for for better reuslts, you can go to RSO2 and give the datasource name of that master data and clik on display you, will get an display in the bottom saying that this data source using FM 'XXXXXXX', copy that FM name and try to give it in SE37 and debug it via RSA3 for better results.
Regards,
Nanda.S -
Most recent date (UDATE) from CDHDR table based on CDPOS
Hi,
I am working on one object where i stuck with one issue. The requirement is I have to retrieve the most recent date from CDHDR table based on CHANGENR in CDPOS table. Where i am doing FOR ALL ENTRIES on CDPOS table to get the MAX( date )and i got the error, that aggregate functions are not allowed except COUNT( * ) with for all entries.
Any thread which can solve this issue would help aswel.
Please guide me how to achieve this. <removed>
Edited by: Thomas Zloch on Mar 13, 2010 9:10 PMHi Li,
Thats was really helpful information , infact my requirement is same as what you said. I even checked in the table entries there is only one changenumber.
You said we can take the first record, i even did the same. But for TABNAME I have to pass 3 table name 'LFA1', 'LFB1' and 'LFM1'. For FNAME 'LOEVM', 'SPERR'. I have written the code as below.
SELECT objectclas
objectid
changenr
FROM cdpos
INTO TABLE i_cdpos_a1
FOR ALL ENTRIES IN i_lfabm1
WHERE objectclas = c_kred "KRED
AND objectid EQ i_lfabm1-objectid "Lifnr
AND ( tabname EQ c_lfa1 OR tabname EQ c_lfb1 OR tabname EQ c_lfm1 ) "LFA1, LFB1 and LFM1
AND ( fname EQ c_loevm OR fname OR fname EQ c_sperr ) "LOEVM, SPERR
AND value_new EQ c_x.
IF sy-subrc EQ c_0.
IF i_cdpos_a1[] IS NOT INITIAL.
Select UDATE from CDHDR based on CHANGENR in CDPOS.
SELECT objectclas
objectid
changenr
udate
FROM cdhdr
INTO TABLE i_cdhdr_a1
FOR ALL ENTRIES IN i_cdpos_a1
WHERE objectclas = c_kred "KRED
AND objectid EQ i_lfabm1-objectid "Lifnr
AND changenr EQ i_cdpos_a1-changenr. "(this is coming from CDPOS above selection)
Here i got UDATE which have all the dates from 3 tables. I have to display in the output the field value (X) of LOEVM and UDATE for LFA1, SPERR value and UDATE for LFA1.Same way for other two tables, I have to display the UDATE and its field value (X). Where UDATE should be most recent date respectively.
How can I populate the Recent date (UDATE) from one interal table for indvidual field values and table names. -
Master data Load from Oracle table
Hi,
My master data comes from an Oracle table. The table has both attributes and texts combined. How do I load the Master data into the text and attribute info objects thru Direct Upload of Master Data?
Is it necessary to go in for Flexible Upload in this case?
RegardsHi,
you can create two views on the table. One for the text and the other one for the attributes. Create your datasources on these views and assign them to your infoobject.
regards
Siggi -
How to select set of unique data records from internal table
Hi
I am looking for a command in order to select all unique data-records from an internal table without using a loop. Does anybody know a command that could do this?
<b><u>An illustrating example:</u></b>
<i>Example:
Table content
a 1
a 2
a 3
b 1
b 2
c 1
c 2
c 3
d 1</i>
So I am looking for a command that should provide a, b, c & d for the first column or 1, 2 & 3 for the second column<b></b>Hi,
SELECT DISTINCT MATNR
FROM MARA
into table i_mara.
Best regards,
Prashant -
Need to load large data set from Oracle table onto desktop using ODBC
I don't have TOAD nor any other tool for querying the database. I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible. I need results to be in a .csv file or something similar. Speed is what is important here. I'm looking to load more than 1 million but less than 10 million records at once. Thanks.
hillelhalevi wrote:
I don't have TOAD nor any other tool for querying the database. I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible. I need results to be in a .csv file or something similar. Speed is what is important here. I'm looking to load more than 1 million but less than 10 million records at once. Thanks.
Use Oracle's free Sql Developer
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
You can just issue a query like this
SELECT /*csv*/ * FROM SCOTT.EMP
Then just save the results to a file
See this article by Jeff Smith for other options
http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/ -
How to download the data which is in the table?
how to download the data which is in the table?
every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
can any one help me in this.
Phani.
Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AMOne way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
There u can downlaad the data .
The ither way is to use the code
The Following Code will be helpfull to You
Data :ITAB TYPE TRUXS_T_TEXT_DATA,
FILE TYPE STRING.
C_ASC TYPE CHAR10 VALUE 'ASC',
DATA: L_STATUS TYPE C,
L_MESSAGE TYPE PMST_RAW_MESSAGE,
L_SUBJECT TYPE SO_OBJ_DES.
DATA: L_FILELENGTH TYPE I.
PERFORM download_to_pc
TABLES
itab
USING
filename
c_asc
c_x
CHANGING
l_status
l_message
l_filelength.
FORM DOWNLOAD_TO_PC TABLES DOWNLOADTAB
USING FILENAME
FILETYPE TYPE CHAR10
DELIMITED
CHANGING STATUS
MESSAGE TYPE PMST_RAW_MESSAGE
FILELENGTH TYPE I.
DATA: L_FILE TYPE STRING,
L_SEP.
L_FILE = FILENAME.
IF NOT DELIMITED IS INITIAL.
L_SEP = 'X'.
ENDIF.
STATUS = 'S'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = L_FILE
FILETYPE = FILETYPE
WRITE_FIELD_SEPARATOR = L_SEP
IMPORTING
FILELENGTH = FILELENGTH
TABLES
DATA_TAB = DOWNLOADTAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
STATUS = 'E'.
CASE SY-SUBRC.
WHEN 1.
MESSAGE = 'gui_download::file write error'.
WHEN 2.
MESSAGE = 'gui_download::no batch'.
WHEN 3.
MESSAGE = 'gui_download::gui refuse file transfer'.
WHEN 4.
MESSAGE = 'gui_download::invalid type'.
WHEN 5.
MESSAGE = 'gui_download::no authority'.
WHEN 6.
MESSAGE = 'gui_download::unknown error'.
WHEN 7.
MESSAGE = 'gui_download::header not allowed'.
WHEN 8.
MESSAGE = 'gui_download::separator not allowed'.
WHEN 9.
MESSAGE = 'gui_download::filesize not allowed'.
WHEN 10.
MESSAGE = 'gui_download::header too long'.
WHEN 11.
MESSAGE = 'gui_download::dp error create'.
WHEN 12.
MESSAGE = 'gui_download::dp error send'.
WHEN 13.
MESSAGE = 'gui_download::dp error send'.
WHEN 14.
MESSAGE = 'gui_download::ubknown dp error'.
WHEN 15.
MESSAGE = 'gui_download::access denied'.
WHEN 16.
MESSAGE = 'gui_download::dp out of memory'.
WHEN 17.
MESSAGE = 'gui_download::disk full'.
WHEN 18.
MESSAGE = 'gui_download::dp timeout'.
WHEN 19.
MESSAGE = 'gui_download::file not found'.
WHEN 20.
MESSAGE = 'gui_download::dataprovider exception'.
WHEN 21.
MESSAGE = 'gui_download::control flush error'.
WHEN 22.
MESSAGE = 'gui_download::Error'.
ENDCASE.
ENDIF.
ENDFORM. "download_to_pc
At The End Reward points.
Please it's Required.
Thanks ,
Rahul
Maybe you are looking for
-
Optical drive, camera and bluetooth problems with Acer Aspire 7520
Hello everyone First, my DVD drive just stopped working, it's not being recognized by Arch it seems. This has happened before a few times, but it suddenly started to work. I can open the tray manually, and when I insert a DVD, you can see the led bli
-
How do I add multiple photos to my emails from my ipad
I can only seem to add one attachment at a time is this the case?
-
iTunes quit unexpectedly during the download of a movie. When I click on that movie now I get the following message: "You have already purchased this item but it has not been downloaded. To download it, select Check For Available Downloads from the
-
Is there any reason why my apple id and password allow log in to App Store but say password invalid when trying to activate Facetime - I thought that Id and password were the same for all functions ?
-
IPhone 5c charging from PC USB port, but PC won't recognize device.
Just got an iPhone 5c today, working pretty well except for when I plug it into my PC, the phone will charge, but my PC will not detect that it has been plugged in; not allowing me to sync it with iTunes, or put pictures straight to my computer. Anyb