Use of Macro

Hiii,
I want to use dynamic if condition in a RFC..
My requirement is like this-->
If  l_direc = 'F' then, I want following if condition-->
IF g_wa_Tn-object_id gt current_tr_id.
And if l_direc = 'B' then, i want following if condition.
IF g_wa_Tn-object_id lt current_tr_id.
This IF condition is to be used inside a loop statement.
Can anybody suggest me how to use macro here? so that i dont have to re-type my code for both IFs..
Im using following code, its showing
IF l_direc eq 'F'
     DEFINE check_condition.
     gt.
     END-OF-DEFINITION.
ELSE.
    DEFINE check_condition.
    lt.   
    END-OF-DEFINITION.
ENDIF.
And im using this macro in following IF condition-->
IF g_wa_Tn-object_id check_condition current_tr_id.
This statement gives syntax error of check_condition being unknown..
Why this is happening??
Pls help.
regards,
Amey

Hi,
Try this way:
DATA: v_condition(2).
DEFINE check_condition.
IF g_wa_Tn-object_id &1 current_tr_id.
END-OF-DEFINITION.
IF l_direc eq 'F' .
MOVE 'GT' TO v_condition.
ELSE.
MOVE 'LT' TO v_condition.
ENDIF.
check_condition v_condition.
..... your processing here
ENDIF.
Cheers,
Aditya
Edited by: Aditya Laud on Feb 14, 2008 2:33 AM

Similar Messages

  • Use of macros in abap- HR

    Hi Gurus,
           What is the exact use of macros in abap-hr.Because in normal abap also these macros are existing , but we will not use these in normal abap programming.So is there any specific reason for using macros in ABAP-HR.
    Thanks in advance..
    Regards,
    Rakesh.

    This is similar to Logical Database usage. We use LDBs in HR more than in other module. SAP has created many macros that can be used in HR. Ex: you have some macros to make use of when using PNP LDB in your program. Similarly SAP provided macros to read text from PCL1 cluster table. Same thing with reading payroll results. In addition you also can define your own macros in the program and use them in the code.

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • How to use a macro with AAA Authorization set?

    So!
    We have ACS version 4.1, and one goal is to start working on authorization sets for groups. I am able to get basic commands to work, but was curious about making a macro work without having to allow all of the commands that are actually contained wihtin the macro itself.
    I'm looking into this to promote standardization and minimize confiugration issues/inconsistencies on ports accross swtiches in our environment.
    The macro I created is used for configuring a port on a swtich to change its VLAN.  Basically as follows:
    macro name T2
    Description $DESC
    switchport mode access
    no cdp enable
    switchport access vlan $STATIC
    switchport port-security
    switchport port-security aging time 2
    switchport port-security violation restrict
    switchport port-security aging type inactivity
    storm-control broadcast level 25.00
    storm-control action trap
    switchport nonegotiate
    no lldp transmit
    no lldp receive
    #macro keywords $DESC $STATIC
    In ACS I've created a shell command authorization set, and allowed 'macro' with 'permit apply T2' and 'permit trace T2'.  This works fine and allows me to use those macro commands.  The problem I'm having is that every command in the macro is not allowed in the authorization set, so when I run the macro it fails for each command.
    I don't want to allow each individual command in the authorization set as it would then allow jr. admins the ability to make config changes on ports that would be outside of our standard.  For example they could get into a port and forget to disable CDP and LLDP, casuing inconsistencies accross the envrionment.  Is there a way to run these macros without putting all of the commands in the authorization set?

    Hello Eric,
    Please see the below link for configuring Macro and how you can use them with AAA
    http://www.cisco.com/en/US/docs/switches/lan/auto_smartports/12.2_55_se/configuration/guide/configure.html

  • Using Excel macros & change properties

    Hi,
    1) my program use Excel macro via a runtime.exec(cmd). I want to use JWS to deliver new versions of application but if I have to put my macros in a jar file how can I reach them (no problem with a file propertie or with gif ressources).
    2) how can I change default properties ("Dossier des applications" in French maybe Applications dir in advanced) wich is enabled in the window.
    thanks a lot
    Sophie

    1) my program use Excel macro via a runtime.exec(cmd).
    I want to use JWS to deliver new versions of
    application but if I have to put my macros in a jar
    file how can I reach them (no problem with a file
    propertie or with gif ressources).You have a lot of options how to do this.
    I would try to use the I/O APIs that reads the macro file
    from a web server (InputStream is = url.openStream()) and put it
    in a local file (FileOutputStream = new FileOutputStream(file)).
    Of course you would need a local location where to store it, could
    be hardwired, or asked from the user.
    2) how can I change default properties ("Dossier des
    applications" in French maybe Applications dir in
    advanced) wich is enabled in the window.I do not understand what you want to do. Explain again.
    Regards,
    Marc

  • Transpose formatted table into raw data style using a Macro

    Hi there, 
    Need a wizz to advise how to use a macro to transpose Sport A data presently displayed like this...
    Oct-12
    Nov-12
    Dec-12
    Jan-13
    Feb-13
    Mar-13
    Apr-13
    May-13
    Jun-13
    Jul-13
    Aug-13
    Sep-13
    Oct-13
    Nov-13
    Dec-13
    Jan-14
    a
    £56,515.99
    £51,766.62
    £61,609.73
    £44,293.19
    £46,076.85
    £43,590.94
    £43,963.03
    £39,659.15
    £49,787.18
    £53,569.27
    £48,589.30
    £62,287.33
    £49,197.83
    61379.25
    76478.38
    80613.88
    into this...
    Discipline
    Month
    Revenue
    Sport A
    Oct-12
    56515.99
    Sport A
    Nov-12
    51766.62
    Sport A
    Dec-12
    61609.73
    Sport A
    Jan-13
    44293.19
    Sport A
    Feb-13
    46076.85
    Sport A
    Mar-13
    43590.94
    Sport A
    Apr-13
    43963.03
    Sport A
    May-13
    39659.15
    Sport A
    Jun-13
    49787.18
    Sport A
    Jul-13
    53569.27
    Sport A
    Aug-13
    48589.3
    Sport A
    Sep-13
    62287.33
    Sport A
    Oct-13
    49197.83
    Sport A
    Nov-13
    61379.25
    Sport A
    Dec-13
    76478.38
    Sport A
    Jan-14
    80613.88
    Would prefer to not manually transpose this data. I have 22 Sports to do this for so you can appreciate the question. 
    Is there a macro template in excel that creates a loop through the rows that then stops when it has no more data to process? At times there are gaps. I.e. some months there is no data. 
    Can anybody help?

    Here you go:
    Sub TransposeData()
    Dim wshS As Worksheet
    Dim wshT As Worksheet
    Dim lngSRow As Long
    Dim lngSCol As Long
    Dim lngLastSRow As Long
    Dim lngLastSCol As Long
    Dim lngTRow As Long
    Dim strDiscipline As String
    Application.ScreenUpdating = False
    Set wshS = ActiveSheet
    lngLastSRow = wshS.Cells(wshS.Rows.Count, 1).End(xlUp).Row
    lngLastSCol = wshS.Cells(1, wshS.Columns.Count).End(xlToLeft).Column
    Set wshT = Worksheets.Add(After:=wshS)
    wshT.Cells(1, 1).Value = "Discipline"
    wshT.Cells(1, 2).Value = "Month"
    wshT.Cells(1, 3).Value = "Revenue"
    lngTRow = 1
    For lngSRow = 2 To lngLastSRow
    strDiscipline = "Sport " & UCase(wshS.Cells(lngSRow, 1).Value)
    For lngSCol = 2 To lngLastSCol
    lngTRow = lngTRow + 1
    wshT.Cells(lngTRow, 1).Value = strDiscipline
    wshT.Cells(lngTRow, 2).Value = wshS.Cells(1, lngSCol).Value
    wshT.Cells(lngTRow, 3).Value = wshS.Cells(lngSRow, lngSCol).Value
    Next lngSCol
    Next lngSRow
    wshT.Range("B2:B" & lngTRow).NumberFormat = wshS.Cells(1, 2).NumberFormat
    wshT.Range("C2:C" & lngTRow).NumberFormat = wshS.Cells(2, 2).NumberFormat
    Application.ScreenUpdating = True
    End Sub
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)

    Hi everyone,
    I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
    After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
    Here the subroutine or pseudocode that i will write :
    Private Sub ClickButton()
    Begin
    1. ThisButton.Activated = False   --> Disabled Button
    2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
    4. ThisButton.Activated = True   --> Enabled Button
    End
    The problem is i need some statement like this between statement no 2 and statement no 4
    Statement That I Want :
    3. Wait Until BAPI Execute Completely
    So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
    Thank you.
    Regards,
    Satria B

    Enter that req number in RSRQ and monitor the load
    or  right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
    Edited by: Srinivas on Jul 6, 2010 7:51 AM

  • Using a macro to hide an account line when refreshing a report

    let say i have the account "Expense" in cell A1 with values of 10 and 15 in cells B1 and C1. have any of you guys used a macro to do this? is the code fairly simple?
    basically i dont want to see the "Expense" line if cells B1 and C1 have no value or are blank.
    Thanks

    Dear sapbpc70,
    I have a simple idea for your case, I have three options for your case, let you choose which one:
    1. You can use the suppress option in Expand Range 
    2. You can add the new column behind column A and B. After that, you put your excel formula (IF Statement). The column A you should to hide so the user never see it.
    3. If you wanna use the VBA macro. Please you put your clean data code in the trigger "Function AFTER_EXPAND(Argument As String)"
    Thanks,
    Wandi Sutandi

  • Running abap programs using the macros

    In our DP implementation we have faced several issues in the extraction of the data from the demand planning to one of the legacy system. We have written the ABAP program and would be using the read planning book bapi. I wanted to run the ABAP program using the macro could some one please let me know what is the structure of the macro builder that is used to fire the ABAP program. this is being fired from the macros as some comparison is to be done to run the macro.

    Hi,
    Some more information on macro function
    REPORT_SUBMIT()
    REPORT_SUBMIT( 'program_name' ;  <'job_name'> ; <'job_number'>; <'newmode'>) causes the specified program to be executed. Use the optional arguments, job name and job number, if you wish the program to run in the background. If you set the argument 'newmode', the results are displayed in a new window.
    Hope this will helps you.
    Regards,
    Sunitha.

  • Has anyone used this macro to correct Help File problem?

    Peter, thanks for answering so quickly. I hope this gives you the information you need?
    Dryheat1
    Jarno Ahokas
    3 posts since
    Dec 15, 2009
    Currently Being Moderated
    5. Dec 15, 2009 6:42 AM in response to: Petteri_Paananen
    Re: CS4 missing features and functions
    The problem is caused by a bug in the handling of US and GB language files either in InDesign CS4 or its installation program.
    You can "force repair" this by using a macro I made: www.e-fastems.com/cs4_indesign_repair_missing_help_and_shortcuts.zip
    In the last step, you need to choose the default shortcut set of your area. E.g. For me it was [Default Finnish]
    I'm not sure if there are more similar problems in CS4. But in my company, we were able to fix the problem in InDesign CS4 using this macro.
    --end--

    OK, that's a zip archive that contains a simple DOS script that does the file operations that are described at How I fixed the missing shortcuts in InDesign CS4 which is where you found the post.
    To run it you need to first unzip the file, then double click the .cmd file. It's designed to work with a program being installed in C:\Program files, so if you have a different path, you'll need to do some editing. You should be able to open the .cmd file in Notepad to do that.
    I strongly recommend you create a resore point, at the very least, before running the file, and a real backup would be prudent.

  • How to performing calculations at workbook level using using VB / macros et

    HI All,
    I want to know about how to perform calculations at the work book level using VB/Macros..
    Request provide me links related to this .
    Manyt hanks in advance.

    Hi,
    Open the Excel workbook and press ALT + F11. VB editor opens and you can write your piece of code and name it as Auto_open if you need that macro to automatically run when you open excel.
    Second option is record macro, which will record the calculation and then call this macro everytime you need.
    Thanks,
    Tintu

  • Generate CSV automatically using excel macro

    Hi,
    We actually make dimension hierarchy in excel and then make a CSV file and then load it into planning application. The CSV file containing parent child relationship of dimension members and other properties are made manually.
    Can anyone help me regarding how can we generate CSV file automatically using excel macro and vba editor for dimension loading purpose???
    Thanks
    Agniva Chatterjee

    You would need to write the VBA code yourself to populate the spreadsheet, I am not sure what you are expecting the forum to provide.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • In another words, why use Parameter Macros here ?

    Why do not pass actual values directly for the parameters <high-units> and <expiry-delay> ?
    In another words, why use Parameter Macros here ?
    <local-scheme>
    <scheme-name>example-backing-map</scheme-name>
    <eviction-policy>HYBRID</eviction-policy>
    *<high-units>{back-size-limit 0}</high-units>*
    *<expiry-delay>{back-expiry 1h}</expiry-delay>*
    <flush-delay>1m</flush-delay>
    <cachestore-scheme></cachestore-scheme>
    </local-scheme>
    This fraction come from the following file:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
        <caching-scheme-mapping>
            <cache-mapping>
                <cache-name>test</cache-name>
                <scheme-name>example-near</scheme-name>
            </cache-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
            <distributed-scheme>
                <scheme-name>example-distributed</scheme-name>
                <service-name>DistributedCache</service-name>
                <backing-map-scheme>
                    <local-scheme>
                        <scheme-ref>example-backing-map</scheme-ref>
                    </local-scheme>
                </backing-map-scheme>
                <autostart>true</autostart>
            </distributed-scheme>
            <near-scheme>
                <scheme-name>example-near</scheme-name>
                <front-scheme>
                    <local-scheme>
                        <eviction-policy>
                            <class-scheme>
                                <class-name>MyEvictionPolicy</class-name>
                            </class-scheme>
                        </eviction-policy>
                        <high-units>10</high-units>
                    </local-scheme>
                </front-scheme>
                <back-scheme>
                    <distributed-scheme>
                        <scheme-ref>example-distributed</scheme-ref>
                    </distributed-scheme>
                </back-scheme>
                <invalidation-strategy>all</invalidation-strategy>
                <autostart>true</autostart>
            </near-scheme>
            <local-scheme>
                <scheme-name>example-backing-map</scheme-name>
                <eviction-policy>HYBRID</eviction-policy>
                <high-units>{back-size-limit 0}</high-units>
                <expiry-delay>{back-expiry 1h}</expiry-delay>
                <flush-delay>1m</flush-delay>
                <cachestore-scheme></cachestore-scheme>
            </local-scheme>
        </caching-schemes>
    </cache-config>Edited by: qkc on 30-Nov-2009 08:32

    qkc wrote:
    Where do back-size-limit and back-expiry come from?You can specify them as init parameters within the cache-mapping.
    <cache-config>
      <caching-scheme-mapping>
        <cache-mapping>
          <cache-name>test</cache-name>
          <scheme-name>example-near</scheme-name>
          <init-params>
            <init-param>
              <param-name>back-size-limit</param-name>
              <param-value>...</param-value>
            </init-param>
            <init-param>
              <param-name>back-expiry</param-name>
              <param-value>...</param-value>
            </init-param>
          </init-params>
        </cache-mapping>
        ...Best regards,
    Robert

  • Using a Macro to add a Carriage Return after each data entry within all cells of an imported range of cells

    I have a macro that copies data from a Target workbook then pastes the data into a destination workbook.  I then wish to use lookups in the destination workbook to view specific data from the pasted range of data on a separate sheet. 
    The problem is, the cells that contain numbers from the pasted data have the green dogeared error flags associated with the cell. The only way I can make a lookup function work, is to go to each cell and manually enter a carriage return after each entry. 
    The code for the macro is given below.  What can be done so that the pasted data contains no errors associated with the number cells?  Or can a second macro be written to clean the data.  If so can you help me out?  Thanks in advance.
    Kindest Regards
    Sub ImportData()
     ' ImportData Macro allows user to select an Excel workbook (i.e. Orchestrate Excel Output),
     ' then copy & paste it into the MediaSpreadsheet.
        Dim wbk As Workbook
        Set wbk = Application.Run("MediaSpreadsheet_1.0.xlsm!OpenFile")
        If wbk Is Nothing Then
            Beep
            Exit Sub
        End If
        Set wbk = ActiveWorkbook
        Range("A9:S116").Copy
        Workbooks("MediaSpreadsheet_1.0.xlsm").Activate
        Sheets("OrchestrateData").Select
        Range("A1").Select
        ActiveSheet.Paste
        With Selection.Font
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
        End With
        With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        Selection.Borders(xlDiagonalDown).LineStyle = xlNone
        Selection.Borders(xlDiagonalUp).LineStyle = xlNone
        Selection.Borders(xlEdgeLeft).LineStyle = xlNone
        Selection.Borders(xlEdgeTop).LineStyle = xlNone
        Selection.Borders(xlEdgeBottom).LineStyle = xlNone
        Selection.Borders(xlEdgeRight).LineStyle = xlNone
        Selection.Borders(xlInsideVertical).LineStyle = xlNone
        Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
        wbk.Close
        Sheets("MediaSchedule").Select
    End Sub
    DAPulliam64

    Hi DAPAugust64,
    The green "dogeared error flags" of the cells means that you paste numbers in these cells, but they're formated as Text.
    So you need to change the cells back to the correct format so that the lookup function works fine. You can simply call this method after pasting:
    ActiveSheet.Cells(1, 1).NumberFormat = "General"
    ActiveSheet.Cells(1, 1) = ActiveSheet.Cells(1, 1).Text
    Or use PasteSpecial method to paste the numbers as well as it's format:
    https://msdn.microsoft.com/en-us/library/office/ff837425.aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using a macro for a pivot table

    Hi guys,
    I have read the question above and the answers provided in this thread. However, I am still struggling to record a Macro template with a Pivot Table. I am using a Mac and Excel 2011. 
    My steps involve the following:
    1) I import a CSV file
    2) I format the cells (time of day into 12:00 am format)
    3) I create a simple pivot table (time of day and the total site visits)
    4)I group the time of day and colour code the total site visits
    Now, this is where I get confused. Usually, I delete all the information so my cells remain empty, but remain with working macros. With the pivot table, I have deleted the pivot table and left it in its original state but nothing has worked yet.
    I have tried importing new data into my Macro template (with a pivot table) but I keep receiving the 1004 error, so I need to debug the code. Now I have no knowledge of VBA but I when I hit "debug", it says I need to delete/change some code (as
    you have done in the thread above). However, i never deleted any sheets (as the user did above) so, I don't know where I am going wrong.
    Any help would be most welcome. Below is the code that is appearing on my erroneous macro:
    Sub Macro5()
    ' Macro5 Macro
        Range("A8").Select
        Selection.NumberFormat = "[$-F400]h:mm:ss AM/PM"
        Selection.AutoFill Destination:=Range("A8:A175")
        Range("A8:A175").Select
        Range("A7:B175").Select
        Sheets.Add
        ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
            "Test 1.csv!R7C1:R175C2", Version:=xlPivotTableVersion14).CreatePivotTable _
            TableDestination:="Sheet1!R3C1", TableName:="PivotTable4", DefaultVersion _
            :=xlPivotTableVersion14
        Sheets("Sheet1").Select
        Cells(3, 1).Select
        ActiveSheet.PivotTables("PivotTable4").AddDataField ActiveSheet.PivotTables( _
            "PivotTable4").PivotFields("Sessions"), "Sum of Sessions", xlSum
        Range("A5").Select
        Selection.Group Start:=True, End:=True, Periods:=Array(False, False, True, _
            False, False, False, False)
        Range("B5:B28").Select
        Selection.FormatConditions.AddColorScale ColorScaleType:=3
        Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
        Selection.FormatConditions(1).ColorScaleCriteria(1).Type = _
            xlConditionValueLowestValue
        With Selection.FormatConditions(1).ColorScaleCriteria(1).FormatColor
            .Color = 7039480
            .TintAndShade = 0
        End With
        Selection.FormatConditions(1).ColorScaleCriteria(2).Type = _
            xlConditionValuePercentile
        Selection.FormatConditions(1).ColorScaleCriteria(2).Value = 50
        With Selection.FormatConditions(1).ColorScaleCriteria(2).FormatColor
            .Color = 8711167
            .TintAndShade = 0
        End With
        Selection.FormatConditions(1).ColorScaleCriteria(3).Type = _
            xlConditionValueHighestValue
        With Selection.FormatConditions(1).ColorScaleCriteria(3).FormatColor
            .Color = 8109667
            .TintAndShade = 0
        End With
        Selection.FormatConditions(1).ScopeType = xlSelectionScope
        Range("H14").Select
        Sheets("Test 1.csv").Select
        Sheets("Test 1.csv").Move Before:=Sheets(1)
        ActiveWindow.SmallScroll Down:=-598
        Range("A6").Select
    End Sub

    Hi,
    Base on my test in excel 2013, it works fine.
    You said your excel version is excel 2011, there isn’t that version of office.
    >> I keep receiving the 1004 error
    Does it has detail error message?
    >> it says I need to delete/change some code
    Could you provide the screenshot here?
    On the other hand, you may share a sample file on the OneDrive.
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • I need to merge my apple accounts to get proper function of iCloud and iWork apps

    I like so many people now have two apple ids.  Becase I was a mobile me subsriber and I had a itunes account.  The migration from me.com to icloud.com created another apple id.  So if I want my apps and music i have purchased over years i have to use

  • Keynote won't open in all accounts on same machine

    I started having problems with keynote ver2 on g4 17 inch powerbook after going from 10.3.9 to 10.4.4 so to solve the problem i purchased i works06 and installed it as an update however the problem persists namely when i attempt to launch or open exi

  • Send an email with attacment via PL/SQL

    Hi Guru's, First of all thank you some much to help me all the time. I need to send an email via pl/sql with attachment. Email is simple but i need to attache the file from the directory on the server. File already created from different process only

  • Where to find old thread/post and closed the thread

    where to find old thread/post and closed the thread i try to search by email id, by userid but no results display at all only new post are shown

  • Can't upgrade ios on iphone 3GS from 3.1.3 to 4.2

    hope somebody can help here as i have been trying quite hard here. i have an iphone 3gs and use as a host my powermac g4 running on mac os 10.4.11. itunes has been upgraded to 9.2.1 i do what has been asked and connect the iphone to the mac and the i