Passing SELECT-OPTIONS value to Function Module
Hi,
I need to pass select-options value to a function module.
Code is like the following:
SELECT-OPTIONS seltab FOR object-type.
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
However, that could not help me much in solving my problem.
So far I have tried to created a structure in DDIC with the following components for the select-options:
SIGN - BAPISIGN
OPTION - BAPIOPTION
LOW - ZBWOBJECTTYPE (my type)
HIGH - ZBWOBJECTTYPE (my type)
and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
Could anyone please help me on this issue?
Thanks in advance.
Regards,
Joon Meng
Hello Joon,
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
You have defined SELTAB as a SELECT-OPTION.
So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
It is similar to the concept of an internal table with header line.
Hope i am clear.
Anyways how have you defined result_tab and sel_tab ?
BR,
Suhas
Similar Messages
-
How to pass select option value to function module while using service call
Hi,
I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
rgds
sudhanshuHi,
Thank s for your reply. In fact im doing similar with following variation:
i) collected range values using get_range* method.
ii) separate low and high values as:
read table <field2> index 1 into wa_range.
vert2_low = wa_range-low.
vert2_high = wa_range-high.
(Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
iii) Now setting these RFC attribute as:
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_LO`
value = vert2_low ).
and
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_HI`
value = vert2_high ).
iv) In RFC im having my query as :
select <fld list> from BUT000 into table itab where vertical in r_vert.
Here, r_vert is a range defined as:
ranges r_vert for <fld refrence>
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
append r_vert.
Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
Please suggest.
Rgds
Sudhanshu -
How to pass select-option filed to Function Module Exporting Parameter
Hi,
How to pass select-option filed to Function Module Exporting Parameter.
ThanksHi,
DATA: BEGIN OF ITAB5_WRK OCCURS 0,
KUNNR TYPE KNKK-KUNNR, "CUSTOMER #
SBGRP TYPE KNKK-SBGRP, "CREDIT REP
KLIMK TYPE KNKK-KLIMK, "CREDIT LIMIT
NAME1 TYPE KNA1-NAME1, "CUSTOMER NAME
SKFOR TYPE KNKK-SKFOR, "TOTAL A/R
AMT1 TYPE KNKK-SKFOR, "CURRENT
AMT2 TYPE KNKK-SKFOR, "01-30
AMT3 TYPE KNKK-SKFOR, "31-60
AMT4 TYPE KNKK-SKFOR, "61-90
AMT5 TYPE KNKK-SKFOR, "91-120
AMT6 TYPE KNKK-SKFOR, "OVR 120
BZIRK TYPE KNVV-BZIRK,
END OF ITAB5_WRK.
SELECT-OPTIONS P_COMP FOR T001-BUKRS
SELECT KUNNR SBGRP FROM KNKK
INTO TABLE ITAB5_WRK
WHERE SBGRP IN P_REP
AND KUNNR GE '0001000000'
AND SKFOR NE 0.
LOOP AT ITAB5_WRK.
DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
ENDLOOP.
PERFORM GET_CREDIT_LIMITS.
*=======================================================================
IF P_DIST NE SPACE.
LOOP AT ITAB5_WRK.
SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
AND VKORG EQ P_COMP
AND VTWEG EQ '20'
AND SPART EQ '10'
AND BZIRK IN P_DIST.
IF SY-SUBRC EQ 0.
MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
MODIFY ITAB5_WRK.
ELSE.
DELETE ITAB5_WRK.
ENDIF.
ENDLOOP.
ENDIF.
*==============================================================
LOOP AT ITAB5_WRK.
MOVE: 'F/S' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
PERFORM AGING.
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MOVE: 'SPEC' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
*PERFORM AGING.*
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MODIFY ITAB5_WRK.
ENDLOOP.
FORM AGING.
*CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'*
EXPORTING
BUKRS = P_COMP
KKBER = WRK-KKBER
KUNNR = WRK-KUNNR
RASID = 'FEND'
KLIMP = 'X'
IMPORTING
SFAE1 = W_SFAE1
SFAE2 = W_SFAE2
SFAE3 = W_SFAE3
SFAE4 = W_SFAE4
SFAE5 = W_SFAE5
SFAE6 = W_SFAE6
SFAEL = W_SFAEL
SNFA1 = W_SNFA1
SNFA2 = W_SNFA2
SNFA3 = W_SNFA3
SNFA4 = W_SNFA4
SNFA5 = W_SNFA5
SNFA6 = W_SNFA6
SNFAE = W_SNFAE
EXCEPTIONS
NO-AGING_SCHEDULE = 1
NO_TABLE_INPUT = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
WHEN 2.
MESSAGE E999 WITH 'DO NOTHING ??'.
ENDCASE.
ENDFORM. "AGING
Thanks -
How to pass select-option variable in function
hi ,
select-option : s_akont for KNB1-akont OBLIGATORY.
i have to pass s_akont in function without using
s_akont-low & s_akont-high.
rightnow i am passing like s_akont but it is giving me a error :
s_akont is followed by niether by an internal table nor by a value list.
what should i write.
regards
rajHello Raj
I assume that you want to import your select-options into your function module(s). Since select-options are, by default, itabs with header lines you have to pass your select-options as following:
CALL FUNCTION 'Z_...'
TABLES
it_selopt = s_akont[].
The TABLES parameter it_selopt could be of type ANY or better of type <b>TABLE</b>.
If you want to use generic select-option structure you can use <b>RSDSSELOPT</b> and the table type <b>TT_RSDSSELOPT</b>. In this case you would need to copy your select-options from s_akont to a generic type s_generic (of type RSDSSELOPT).
Regards
Uwe -
Passing select-options value in method
How to pass select-options value in method ?
Example:
Select-options: carrid for spfli-carrid.
class cl_myclass implementation.
select carrid connid from
spfli where carrid in carrid.
endclass.
ThanksHello Anee
The coding of this functionality is quite simple:
REPORT zmy_report.
DATA: go_myclass TYPE REF TO zcl_myclass,
gd_repid TYPE syst-repid.
PARAMETERS:
p_bukrs ...
SELECT-OPTIONS:
o_kunnr ...
START-OF-SELECTION.
gd_repid = syst-repid.
CREATE OBJECT go_myclass
EXPORTING
id_calling_program = gd_repid.
And that's how your CONSTRUCTOR method should look like:
METHOD constructor. " IMPORTING parameter id_calling_program
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = id_calling_report
TABLES
SELECTION_TABLE = me->mt_selopts.
" NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
ENDMETHOD.
Finally you have to extract the parameter and select-options from MT_SELOPTS.
Regards
Uwe -
How to use select-options in the function module of import parameter ?
Hi ...
I have created a BAPI and tested in SWO1 tcode , by giving the single value for an company code ( BUKRS ) , it executed properly .
Same thing is working after implementing in a program .
so now it is working for fetching a single company code details .
My requirement is : I want to use select-options in program as well as in function module IN IMPORT PARAMETER.
Program :
REPORT ZTEST.
TABLES : T001 , ZBAPI_STR .
TYPES : BEGIN OF TY_ITEM .
INCLUDE STRUCTURE ZBAPI_STR .
TYPES : END OF TY_ITEM .
DATA :WA_ITEM TYPE TY_ITEM ,
ITEM LIKE STANDARD TABLE OF WA_ITEM INITIAL SIZE 0 .
PARAMETER : BUKRS TYPE ZBAPI_STR-BUKRS.
call function 'ZBAPI_FMT001'
exporting
bukrs = BUKRS
IMPORTING
RETURN =
tables
itemtab = ITEM
IF ITEM IS NOT INITIAL .
LOOP AT ITEM INTO WA_ITEM .
WRITE : / WA_ITEM-BUKRS , WA_ITEM-BUTXT , WA_ITEM-ORT01 , WA_ITEM-LAND1 .
ENDLOOP.
ENDIF.
FUNCTION MODULE :
FUNCTION ZBAPI_FMT001.
""Local Interface:
*" IMPORTING
*" VALUE(BUKRS) TYPE EFG_TAB_RANGES
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRET2
*" TABLES
*" ITEMTAB STRUCTURE ZBAPI_STR
SELECT BUKRS BUTXT ORT01 LAND1 FROM T001 INTO TABLE ITEMTAB WHERE BUKRS = BUKRS .
ENDFUNCTION.
Regards
Deepa.I have given a similiar example which i did
Declare a
Table type:Z_TT_PONUM
Short text : Select options PO Number
in SE11 tcode with row type eg: Z_ST_PONUM
create a structure (this will be the row type)
Structure Z_ST_PONUM
Short text Select Options Field PO number
Compenent Compent type
SIGN BAPISIGN Inclusion/exclusion criterion SIGN for range tables
OPTION BAPIOPTION Selection operator OPTION for range tables
LOW EBELN Purchasing Document Number
HIGH EBELN Purchasing Document Number
In the function module import
give as
I_PO_NUM TYPE Z_TT_PONUM opt pass value Select options PO Number
Hope this is exactly what you want to know.
So you create a structure simliar to mine but the low an high whould be your component
then a table type and then include that in the BAPI.
Then pass your select-option value to this BAPI when you call this BAPI in the program -
Passing select-options values using call transaction method
Hi Experts,
I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
TYPES: BEGIN OF t_tab,
bukrs TYPE bukrs,
werks TYPE werks_d,
matkl TYPE matkl,
END OF t_tab.
DATA: w_tab TYPE t_tab,
i_tab TYPE STANDARD TABLE OF t_tab.
SELECT-OPTIONS: s_matnr FOR marc-matnr.
Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
Thanks a lot.
Regards,
KrishanHi Krishan,
For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
... OPTIONS FROM opt
*Effect*
This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
DISMODE
Processing mode (comparable with the MODE addition)
UPDMODE
Update mode (comparable with the UPDATE addition)
CATTMODE
CATT mode (controlling a CATT procedure)
The CATT mode can have the following values:
' ' No CATT procedure active
'N' CATT procedure without single screen control
'A' CATT procedure with single screen control
DEFSIZE
Use standard window size
RACOMMIT
COMMIT WORK does not end CATT procedure
NOBINPT
No batch input mode, that s SY-BINPT = SPACE.
NOBIEND
No batch input mode after BDC data has been read
The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
'X' Yes
' ' No
If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
DISMODE from the MODE addition
UPDMODE
from the UPDATE addition
CATTMODE
No CATT procedure active
DEFSIZE
Do not use standard window size
RACOMMIT
COMMIT WORK ends procedure successfully
NOBINPT
Batch input mode, that is SY-BINPT =X.
NOBIEND
Batch input mode also active after BDC data has been read
Regards,
Swapna. -
How to pass a SELECT-OPTION to a FUNCTION-MODULE
Hi forum:
How can i pass a selection-option like an input parameter of a function-module?. Put one example in the answer, please.
After pass this value i want to put this into an IN select condition.
But for i only need know how to pass this value
thnks
Josué
Thnks
Josue CruzHi Rich.
this is a little example of my code.
DATA: wa_bukrs TYPE bkpf-bukrs,
wa_budat TYPE bkpf-budat,
wa_gjahr TYPE bkpf-gjahr.
SELECT-OPTIONS: se_bukrs FOR wa_bukrs OBLIGATORY,
se_gjahr FOR wa_gjahr OBLIGATORY,
se_budat FOR wa_budat OBLIGATORY.
HERE i can to put the call to the function.
Thnks -
Select Options to RFC function modules
Hi all
When we use a PERFORM in main program, we can simply use the select-options
as for ex.,
in so_matnr
in so_bsart
like that
without passing any parameters.
This way it will take all values given in 'Single values' in the multiple selection option of selection screen.
We need not bother about so_matnr-low and so_matnr-high.
When we use a function module to be executed in another R/3 server ,
we have to pass values. In these values we can pass so_matnr-low and so_matnr-high only. If the user selects Single Vals instead of these,
how to pass them?
Regards
Vijaya ChamundiHi,
so_matnr is stored as a table, with fields sign, option, low and high.
Each time you add a single value, a line is added to the table.
If you add 'single value' 1 in the selection screen, then a line is added to table so_matnr[] with fields sign='I', option='EQ' and low='00000..1' and high is empty.
So, if you want to pass it as a parameter, you can pass it as a table:
so_matnr[]
In this way you are sure you have all the information you need.
regards,
Rolf -
Select options values pass to function module
Hi all,
I want to pass the values entered in the select options to the function module. How should my function module interface be declared for passing the select options
I tried declaring like
t_range type data in the tables tab. But this throws error.
Please let me know how to pass select option values back to function modules.
Thanks,Hi,
Check this code.
data: node_flights type ref to if_wd_context_node.
data: rt_carrid type ref to data.
data: rt_connid type ref to data.
data: isflight type table of sflight.
data: wsflight type sflight.
field-symbols: <fs_carrid> type table,
<fs_connid> type table.
Retrieve the data from the select option
rt_carrid = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'S_CARR_ID' ).
if rs_carrid is not initial. Here you can check that if rs_carrid is no initial then assign value of field symbol
Assign it to a field symbol
assign rt_carrid->* to <fs_carrid>.
endif.
Retrieve the data from the select option
rt_connid = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'S_CONN_ID' ).
if rt_connid is not initial. Here you can check that if rt_connid is no initial then assign value of field symbol
Assign it to a field symbol
assign rt_connid->* to <fs_connid>.
endif.
if <fs_connid> is not initial and <fs_carrid> is not initial.
Retrieve that data from the database. Normally it is suggested to
encapsulate the data retrieval in a separate class.
For simplicity, the SELECT statement has been implemented here.
clear isflight. refresh isflight.
select * into corresponding fields of table isflight from sflight
where carrid in <fs_carrid>
and connid in <fs_connid>.
endif.
Bind the data to the context
node_flights = wd_context->get_child_node( name = `FLIGHTS` ).
node_flights->bind_elements( isflight ).
Hopes this will helps you.
Regard
Manoj Kumar
Edited by: Manoj Kumar on Mar 16, 2009 10:41 AM -
Passing Select-options as parameter to function module
I need to pass a select-option as a parameter to a function module. Is this possible?
There is an option of passing all the values of the select-option to an internal table, passing that internal table as parameter to the function module, and then adding it manually again to a select-option in the function module.
But is there any direct way to do this?Hi,
I have a similar problem: I have RFC function module to which I want to pass select options. Therefore I defined table parameters as follows:
IT_RUNID TYPE EFG_TAB_RANGES
IT_PERNR TYPE EFG_TAB_RANGES
IT_REINR TYPE EFG_TAB_RANGES
I can successfully pass my values to the module, but if I try to check these parameters
using
CHECK IT_TRIPS-RUNID IN IT_RUNID.
CHECK IT_TRIPS-PERNR IN IT_PERNR.
CHECK IT_TRIPS-REINR IN IT_REINR.
the check always fails, I guess because there are leading zeros in the ranges. Is there a way to solve this problem?
Thanks and regards,
Martin -
How to Pass Select-options Single values as Parameter value to Method ?
Hi Friends,
I need to pass select-options values(single values) for s_arbpl to the method "process_percent_planned". Now all single values are in internal table s_arbpl-low field. I need to pass this internal table(s_arbpl-low) values to the method where i will run query based on these single values.In my below code i am passing value through variable w_arbpl. I have defined this parameter in the method.But here only one value is passed to method. I want multiple single values (in s_arbpl-low) should be passed. Please let me know how to correct code.
Tables: crhd.
Data: ktext type auftext,
w_arbpl type arbpl.
select-options: s_arbpl for crhd-arbpl.
ktext = 'Test'
create object obj_plan.
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low.
Thankshi ,
when you want to pass S_ARBPL AS PARAMETER IN SELEC OPTION
ARBPL SUCH AS
WIN002
WIN003
WIN004
WIN005
WIN006
WIN007
IN MULTIPLE SELECTION S_ARBPL
THEN
USE
Tables: crhd.
Data: ktext type auftext,
w_arbpl type arbpl.
select-options: s_arbpl for crhd-arbpl.
ktext = 'Test'
LOOP AT S_ARBPL .
create object obj_plan.
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low.
ENDLOOP.
REGARDS
dEEPAK .
THEN SELECT THAT
call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low. -
Hello,
I need to use a select options in a Function module and then i have to send the values to a Report program.
How can I do it?
Thanks.This is how I have done in past...
In a type-group define types like this
TYPES : zmb52_tr_matnr TYPE RANGE OF mara-matnr ,
zmb52_tr_werks TYPE RANGE OF marc-werks ,
zmb52_tr_lgort TYPE RANGE OF mard-lgort ,
zmb52_tr_charg TYPE RANGE OF mchb-charg ,
zmb52_tr_mtart TYPE RANGE OF mara-mtart ,
zmb52_tr_matkl TYPE RANGE OF mara-matkl ,
zmb52_tr_ekgrp TYPE RANGE OF marc-ekgrp ,
zmb52_tr_sobkz TYPE RANGE OF mkol-sobkz ,
and use it in FM like this
FUNCTION zgetstock.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_SPMON) TYPE SPMON
*" VALUE(I_MATNR) TYPE ZMB52_TR_MATNR OPTIONAL
*" VALUE(I_WERKS) TYPE ZMB52_TR_WERKS OPTIONAL
*" VALUE(I_LGORT) TYPE ZMB52_TR_LGORT OPTIONAL
*" VALUE(I_CHARG) TYPE ZMB52_TR_CHARG OPTIONAL
*" VALUE(I_MTART) TYPE ZMB52_TR_MTART OPTIONAL
*" VALUE(I_MATKL) TYPE ZMB52_TR_MATKL OPTIONAL
*" VALUE(I_EKGRP) TYPE ZMB52_TR_CHARG OPTIONAL -
HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS
Hi experts,how to pass select options value as a export parameters to a zclass.
can give me some idea.
Thanks
saiAs Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
So - assuming you have the following in your program:
DATA: wa TYPE sflight.
SELECT-OPTIONS so_car FOR sflight-carrid.
you can create a publically-visible type in your class using direct type entry and the code
TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
and use this to define the importing parameter of the method.
The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
Hope this helps.
Regards
Jon. -
Passing Select option to the sub routine
Hi All ,
how can we pass select option values to a subroutine ,
Thanks in Advance
VinayHi Vinay Kolla,
Check out this.
TYPES: TYP_DATUM TYPE RANGE OF SY-DATUM.
DATA: WA_DATUM TYPE LINE OF TYP_DATUM.
SELECT-OPTIONS : S_DATUM FOR SY-DATUM.
START-OF-SELECTION.
PERFORM WRITE_DATUM TABLES S_DATUM[].
*& Form write_datum
* text
* -->P_S_DATUM text
FORM WRITE_DATUM TABLES P_S_DATUM TYPE TYP_DATUM.
LOOP AT P_S_DATUM INTO WA_DATUM.
WRITE : /10 WA_DATUM-SIGN,
WA_DATUM-OPTION,
WA_DATUM-LOW,
WA_DATUM-HIGH.
ENDLOOP.
ENDFORM.
Regards,
R.Nagarajan.
We can -
Maybe you are looking for
-
Lsmw for purchase requisition and purchase order
hi all can anyone brief me for lsmw for PR & PO.
-
Scroll Positions do not work if Scroll Policy is 'off'
I am using flex SDK 3.3.0.4852 I have a canvas with canvas.horizontalScrollPolicy = "off"; canvas.verticalScrollPolicy = "off"; This canvas has an image in it, and I set the horizontal and vertical scroll positions programitically. canvas.horizontalS
-
Multi-level nested tables for repeatable XML Elements
Hi there, Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity): <xs:schema xmlns:xs=" .... " /> <xs:element name=“A“> <xs:complexType> <xs:sequence> <xs:element name=“B“
-
Within Contacts, when adding in an address, is the first "Street" field for the house number, and the second "Street" field for the actual street name? I am syncing contacts with gMail and Thunderbird, so would like to keep each field as aligned as p
-
Playing an album in ATV- must authorize...
trying to play an album from my iTunes library. ATV says need to authorize before can play- gives instructions to authorize this computer- get message "this computer is already authorized" still not able to play album through ATV???