Can't figure out BAdi HRBAS00_STRUAUTH \ FITV_PERSNO_AUTH_CHK

We check personnel data when a user enters a business trip(tcode PR05) and have been using the BAdi FITV_PERSNO_AUTH_CHK to do this. Recently we had to implement context authorizations and I dont see a way for that BAdi to use the correct path (structural profile). I have been exploring HRBAS00_STRUAUTH and the GET_PROFILE method to try and get this to work but am having a tough time. If anyone is smart enough to suggest a way to accomplish this I'd really appreciate it.

We are using 2 different structural profiles, one is granting access to subordinate people in an org. and the other grants access to anyone that enters time (CATS). The last profile mentioned is assigned to CATS approvers so they can approve anyone. FITV_PERSNO_AUTH_CHK doesn't look at data from p_orgincon, it just resolves the pernr so when you go into PR05 you can see people outside your org. I need to figure out a way for it to resolve pernr for the structural profile I assign to p_orgincon where infotype 0017 exists.
We found that in HRBAS00_STRUAUTH the method GET_PROFILES is called so I'm trying to figure out a way to direct which structural profile should be used there. this is what I have in my GET_PROFILES method for my implementation of the BAdi HRBAS00_STRUAUTH:
method IF_EX_AUTHORITY_BADI~GET_PROFILES.
data: l_uname like sy-uname,
      h_profl_tab type HRPROFL,
      result_tab TYPE STANDARD TABLE OF swhactor,
     result_tab type objec OCCURS 0 WITH HEADER LINE,
      wa_swhactor TYPE swhactor.
data: ls_HRPROFL type HRPROFL.
  if sy-tcode = 'CAT2' or sy-tcode = 'CAT4'.
     select single uname into l_uname from zhr_wf_off
         where uname = sy-uname.
     if sy-subrc = 0.
        CALL FUNCTION 'RH_STRUC_GET'
           EXPORTING
              act_otype       = 'US'
              act_objid       = sy-uname
              act_wegid       = 'SAP_US_S'
              act_plvar       = plvar
              act_begda       = sy-datum
              act_endda       = sy-datum
              act_tflag       = space
              act_vflag       = space
              authority_check = space
           TABLES
              result_tab      = result_tab
           EXCEPTIONS
              no_plvar_found = 1
              no_entry_found = 2
              OTHERS         = 3.
           loop at result_tab into wa_swhactor.
               if wa_swhactor-otype = 'P'.
                   check_object_out-plvar = plvar.
                   check_object_out-otype = 'P'.
                   check_object_out-objid = wa_swhactor-objid.
               endif.
           endloop.
          check_object_out = '01P 00000000'.
          exit_flag = 'X'.
     else.
           ls_HRPROFL-profl = 'ZHR_CATSAPPR'.
           ls_HRPROFL-begda = '19000101'.
           ls_HRPROFL-endda = '99991231'.
           append ls_HRPROFL to profl_tab.
           exit_flag = 'X'.
     endif.
  else.
     if sy-tcode = 'PR05' or sy-tcode = 'TRIP'.
           ls_HRPROFL-profl = 'ZTEST'.
           ls_HRPROFL-begda = '19000101'.
           ls_HRPROFL-endda = '99991231'.
           append ls_HRPROFL to profl_tab.
           exit_flag = 'X'.
        check_object_out = '01P 00004651'.
        exit_flag = 'X'.
     endif.
  endif.

Similar Messages

  • Can't figure out how to send photos to outside lab

    Hello, I am new to Apple products and have had my iMac desktop for one week.   I am not very computer savy to start with and it is so different from my old pc.   I also have a new camera - Nikon D7100 - so I am attempting to learn TWO new things.  At least my camera came with a user's manual.  With my iMac I am stumbling through trial and error and taking up way too much time.   I tried using iPhoto but ended up losing my photo library I started (somehow it just disappeared after a series of error messages saying it was attempting to repair the library).  I ended up buying the Aperture app beause I want to be able to do more with photos for my art business. Now I am thinking iPhoto wasn't so bad, all except loosing my library, of course.  It was very simple to use.  But once I learn more I think I will appreciate  Aperture and at least through Aperture I was able to have my photo library restored.   I do not have a good printer yet, however, so I am attempting to have an outside print lab download my pictures to have the prints mailed to me.  (Note: I used to use Snapfish but didn't like my last batch of pics.  Someone suggested Walgreen's Photo Lab.   Maybe someone has a better suggestion.)
    However, I cannot download my pictures to any outside site because they said they must be in jpeg format.  My camera is set to take ONLY jpeg photos right now - I need to master this before even attempting raw - so the problem must be on the software use end.  When I transfer pics from my camera to my computer, Aperature (or is it thru iPhoto to Aperature I don't know) it gives them a name without a suffix attached.  I see that they identify the photo as JPEG at the top of the Info screen and I can go in and change the name and make it SAY .jpeg but even then I cannot download it to an outside photo lab for the same reason - "must be in jpeg format."    Plus to change the name to include the suffix .jpeg I am having to do that one picture at a time - there must be an easier way.  How do I make them all be .jpeg photos that can be recognized by outside photo labs?
    I would be open to sending my pics to the Apple photo print lab but I can only figure out how to send ONE at a time and that seems very impractical so I am obviously doing something wrong there.  How does the Apple photo lab compare to others?   How do I send a batch of photos at one time?  
    One other question not related to photos - With my p.c. I had a mouse that would let me right-click and move, copy or delete highlighted areas.  I cannot find that function at all with my iMac.  Is there a "right click" type of function on this computer?   I have this cool touch-pad.  No more mouse.   Sorry to be do dense.  I need users manuals I guess.  More hours.   I would appreciate any help so I can spend more time outside in my garden instead of hunched over my computer in frustration.   Thank you! 
    Oh, one more thing.  I cannot figure out my operating system.   My iMac box says "Preinstalled OS X and iLife4"    How can I find what version I have? That would be helpful.

    Try this to learn about using keys:
    http://www.apple.com/support/macbasics/
    You can also use your PC mouse.
    As for iPhoto, it sounds like you were trying to move files around in the library. That is a bib no-no in Aperture or iPhoto.

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • Can't figure out why it's throwing this exception

    Can anyone see a problem with this method? I have checked over everything and can't figure out why it's giving me an exception. All of the get methods are retrieving data and the db table and all the fields are correct.
        // add a Reservation to the database
        public static void addReservation(Reservation aReservation)throws Exception
         try
             String query = "INSERT INTO Reservations (Number, ContactAlias, SPOC, SRNumber, StartDate, EndDate) " +
                           "VALUES ('" + aReservation.getNumber() + "', " +
                           "'" + aReservation.getContact() + "', " +
                           "'" + aReservation.getSPOC() + "', " +
                           "'" + aReservation.getSRNumber() + "', " +
                           "'" + aReservation.getStartDate() + "', " +
                           "'" + aReservation.getEndDate() + "')";
            reservationList.removeAll();
              reservationUIList.removeAll();
              Statement statement = connection.createStatement();
            statement.executeUpdate(query);
              open();
              if( reservationRS !=null)
            while( reservationRS.next() )
                   aNumber = reservationRS.getString(1);
                   reservationList.add(aNumber);
                   reservationUIList.add(aNumber);
              statement.close();
            close();
         catch (Exception e)
                System.out.println("Caught exception in addReservation of DM.");   
                throw e;
         }And the exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
         at ReservationDM.addReservation(ReservationDM.java:149)
         at Reservation.addReservation(Reservation.java:268)
         at ReservationUI.invokeAdd(ReservationUI.java:552)
         at ReservationUI.actionPerformed(ReservationUI.java:285)
         at java.awt.Button.processActionEvent(Button.java:324)
         at java.awt.Button.processEvent(Button.java:297)
         at java.awt.Component.dispatchEventImpl(Component.java:2588)
         at java.awt.Component.dispatchEvent(Component.java:2492)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)Thanks,
    Shawn

    Well, one extreme that I eventually had to go to was inserting a new row with only the primary keys, which were numerical columns, while just setting the strings to empty values.
    INSERT INTO Courses VALUES(?,?,?,1,0,?,'','','','','','','','','')
    Access finally seemed to handle this without barfing.
    Then, I updated each string column ...if you can believe it ...one at a time in a for loop from a custom 'RowUpdateSet' object. This actually worked well because eventually I also used it to update the row when necessary, and to only update columns whose values had changed. One teeny weeny snippet from a great deal of code looked like this...
      for ( int i=1; i<length; i++ ) {
        if ( updateSet.getUpdateColumn( i ) ) {
          synchronized ( updateSet ) {
            scrollResults.updateObject(i,(String)updateSet.getUpdateValue(i));
            scrollResults.updateRow();
      }I guess I will likely get flamed for participating in this whole discussion, because it all does become quite irrational. I can see why peoples initial response is likely ..."what, couldn't you even debug your own sql string bozo?" All I know is, there seems to be insert statements that Access just mysteriously refuses to perform ...and it has nothing to do with terminated strings or syntax errors. How you choose to perservere and 'get the job done' is probably as unique to each individual as is the whole mysterious error in the first place. I just got tired of staring at what appeared to be a totally disfunctional environment and decided to go around the problem and get done with the project ...which eventually worked like a charm.
    This is exactly what I meant when I said don't look too closely or you might wind up distrusting this technology you are working with on a day to day basis. Frankly, the more I work with technology the more I realize that I, for example, will never use my credit card over the web (particularly with .NET in the picture). I am sure you can find another way to get to the results you want if you think about it creatively. I got my project done. I just didn't get there in the way I had expected I would. Maybe that's not even a bad thing, even though it can be extremely frustrating at times. When we look at all the disclaimers that come with software these days, or look at faster and faster computers that just run slower and slower, maybe we shouldn't expect so much from technology. At least Java allows you to write your own logic and often work around these impediments ...which is still alot better than being stuck with .COM libraries that force you to abandon a project half way through when you find out the library fails to live up to its claims in the reference manual.
    Sorry your project is on hold at the moment. If no one else answers, start a new thread that asks your question again, and I will butt out. Maybe there is someone who has found out what causes this issue. After all, I can only speak from my own experiences ...and I am far from being an authority on any issue surrounding technology. Good luck, and don't give up. I am sure there is a way to get where you want to go.
    After saying all that, I realize kev wrote a response while I was composing this one. As he implores, yes ...do be certain you have eliminated all the obvious possibilities before you adventure into any painfull work-arounds. Really, I wish you all the best of luck.

  • I can't figure out why this page splits in live preview... but not in the browser?

    I've finally got my site up and it all runs great... except I can't figure out why this one page behaves like it's too wide.
    http://www.johnnez.com/mainbooks.html
    It comes apart in the Live Preview.... but not in the browser preview.
    Thanks for any tips...
    jn

    john nez wrote:
    HTML is a total incrutable mystery to me... a mystery inside a mystery inside a mystery!
    Sounds to me like you've almost cracked it!
    You have one error that could cause problems and that's the stray </blockquote> tag.  Just delete it.
    The alt="" text will show as an error on the validator but that's easy to fix and worth doing.
    Here's an easy article on that: http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/
    In one of your CSS files (JonzheaderindexCSS.css) you have this:
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    html { overflow-y: scroll; }
    It should be like this:
    html {
    overflow-y: scroll;
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    It looks like you have that rule repeated further down the page like this:
    html { overflow-y: scroll; }
    There's an extra curly brace there (}) anyway, so it is badly formed but the whole rule and extra curly brace can go.
    You can fix those errors but I have a sneaky suspicion that it isn't gong to solve the issue you describe.
    Fix those issues anyway and post back.  Maybe if you can show a screen shot of what you are seeing in DW it might help?
    Martin
    PS: It's never a good idea to have file names on the web that have spaces in.  Your background rule has this:
    background-image: url(../images/orange%20plaid.jpg);
    That .jpg should be orangeplaid.jpg or orangePlaid.jpg or orange_plaid.jpg and the change should be reflected in the reference to the image so, orangePlaid.jpg should be:
    background-image: url(../images/orangePlaid.jpg);

  • Can't figure out how to use home sharing

    Since the latest couple iTunes updates, my family and I can not figure out how to use home sharing. Everyone in our household has their own iTunes, and for a long time we would just share our music through home sharing. But with the updates, so much has changed that we can no longer figure out how to use it.
    I have a lot of purchased albums on another laptop in the house, that im trying to move it all over to my own iTunes, and I have spent a long time searching the internet, and everything. And I just can't figure out how to do it. So.... how does it work now? I would really like to get these albums from my moms iTunes, onto mine. I would hate to have to buy them all over again.
    If anyone is able to help me out here, that would be great! Thanks!

    The problem im having is that after I am in another library through home sharing, I can't figure out how to select an album and import it to my library. They used to have it set up so that you just highlight all of the songs you want, and then all you had to do was click import. Now I don't even see an import button, or anything else like it. So im lost... I don't know if it's something im doing wrong, or if our home sharing system just isn't working properly.
    Thanks for the help.

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Can't figure out what is the code

    Hi
    I got following macro that will help me to run certain transaction.
    I just can't figure out where comments ends and where code starts so I was unable to run it for like 3 hours now.
    In other words
    I am trying to use Excel Macro that will get to active transaction in SAP and do waht I have recorded.
    'SAPGUI Macro for updating SAP from Excel data 'Prerequisites: '1. Script Recording and Playback from the SAPGui must be enabled by admin '2. The Excel list must be set up from top left corner of a worksheet '3. The worksheet with data must be the active sheet '4. There is no error handling. Build it yourself! '5. The script will update the active (current) SAP transaction'Instructions for use 'Record a macro of your update actions. 'Paste the session.findById stuff between the <== and ==> markers'Edit the literal values and replace with Trim(CStr(objSheet.Cells(x, y).Value)) 'where x and y are the row and column counters'Open up your Excel sheet with data (row 1 is ignored here) 'Fire the macro! '===========BEGIN BOILERPLATE=================== REMSet up connection to the SAP screen: If Not IsObject(application) Then Set SapGuiAuto = GetObject("SAPGUI") Set application = SapGuiAuto.GetScriptingEngine End If If Not IsObject(connection) Then Set connection = application.Children(0) End If If Not IsObject(session) Then Setsession = connection.Children(0) End If If IsObject(WScript) Then WScript.ConnectObject session, "on" WScript.ConnectObject application, "on" End If REMSet up connection to the Excel data to be keyed into SAP: Dim objExcel Dim objSheet, intRow, i Set objExcel = GetObject(,"Excel.Application") Set objSheet = objExcel.ActiveWorkbook.ActiveSheet session.findById("wnd[0]").maximize
    '===========END BOILERPLATE=====================
    'REM Example: Mark material for deletion in Plant using MM06 For i = 2 to objSheet.UsedRange.Rows.Count     'Assuming there is a header rowREM Find a cell and put its value in: REM Note: The section of the Script shown below can be recorded ' and edited to pick data from the Excel sheetstrCN = Trim(CStr(objSheet.Cells(i, 1).Value)) strWerks = Trim(CStr(objSheet.Cells(i, 2).Value)) '<== session.findById("wnd[0]/usr/ctxtRM03G-MATNR").text = strCN session.findById("wnd[0]/usr/ctxtRM03G-WERKS").text = strWerks session.findById("wnd[0]/tbar[0]/btn[0]").press session.findById("wnd[0]/usr/chkRM03G-LVOMA").selected = false session.findById("wnd[0]/usr/chkRM03G-LVOWK").selected = truesession.findById("wnd[0]/tbar[0]/btn[11]").press 'session.findById("wnd[0]/tbar[0]/btn[0]").press '==> Next

    Ok macro works and triggers actions from recorder. I was doing it with hope I will select data in SAP and paste in Excel AND/OR export file from SAP with data.
    If I record select column and then copy it. Script is recorded until selection . It ignores copy (i tried use mouse right click and copy AND manual alt+F12 and then copy from context menu)
    When I export recorder does open export window but does not writes the line relevant to clicking save.
    I found such bits
      'Choose the export format
      session.findById("wnd[1]/usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[1,0]").select
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    'Choose the export filename
      session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "test.txt"
      session.findById("wnd[1]/usr/ctxtDY_PATH").text = "C:\Temp\"
    'Export the file
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    But they dont seem to be relevant to my previous macro.
    Any quick fix to get data out of Excel

  • If I open a photo in "preview", multiple photos open. I just want to open one, but can't figure out how to do it.

    I keep multiple photos in a desktop folder to be quickly accessed by using Preview. But when I try to open ONE photo, it opens multiple photos. Can't figure out how to display just the single one that I select.  OS 10.7.2

    This is the resume feature of Lion. The last state of the application is saved when quitting (i.e last pictures viewed in Preview, last videos viewed in Quicktime etc).
    You can switch it off for Preview by copy and pasting the following in to the terminal application
    defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false

  • How do I use my iPhone to connect to the Internet. I down loaded safari v5.1.7 for my PC. I have added my iPhone to my computer but I can't figure out how to setup a hotspot or configure a network so my PC can access my phones data plan. Please help.

    And how am I supposed to answer my own question?

    I can't figure out how to respond so ill go this route. I can't seem to find the button/place to which I can choose, to turn on a hot spot. I have been through every option and searched to no avail. Could it be that my iPhone 4 is not hotspot capable as I was led to believe by the apple sales associate? Is there an app I can find to make my phone a wifi hotspot? So I can get on the Internet to view the pages I want that require adobe which this piece of **** software monger won't even support?

  • How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    If you want to listen to the sounds of your drum set, you should use an audio cable and connect it to the computer's line-in, then create a real instrument track.
    If you use a Midi/USB interface, you'll have to create a software instrument track and select one of GB's drumsets as the instrument. Hopefully your drumset's midi notes are mapped to the right sounds in GB.

  • I gifted a ringtone to my sister that I purchased from the iTunes store, and it is on her phone, but we can't figure out how to get it moved to her ringtones.  Can anyone help?

    I gifted a ringtone to my sister that I purchased from the iTunes store, and it is on her phone, but we can't figure out how to get it moved to her ringtones.  Can anyone help?

    Edit > Preferences.  Select the check box for Ringtones, this will add them to the listing in iTunes. 
    Not sure that really answers your question though.

  • I am having trouble setting up icloud it keeps sending me back to install instructions and I'm just getting frustrated. So far I'm not liking the new itunes I can't figure out how to  look at my duplicate music like I used to.

    I can't sign on to icloud. It says I need an icloud account. I click the help option it send me back to the same page. I reinstall it nothing.
    Download the iCloud Control Panel.
    To enable iCloud on your Windows PC, first set up iCloud on your other devices, then install the iCloud Control Panel for Windows (Windows Vista with Service Pack 2 or Windows 7 required).
    ok I can't seem to set up iCloud on any device I don't understand... Ive already installed it three times.
    Turn on iCloud.
    From the Windows Start menu, choose iCloud Control Panel.
    Enter the Apple ID you used to create your iCloud account and select the iCloud services you’d like to enable.
    For mail, contacts, and calendars, you can use iCloud.com or Outlook 2007 or later.
    there is no iCloud control panel but I click on i cloud. Then entere the Apple ID you used to create your iCloud account - WHAT!!!!? where is this I keep trying to find out how to create and iCloud account but I keep getting these stupid directions!!!
    Enable automatic downloads.
    To enable automatic downloads for your music, apps, and books, open iTunes > Edit > Preferences > Store and select Music, Apps, and Books.* (Requires iTunes 10.5 or later.)
    - This is the only step that makes sense and already did it...
    Turn on iCloud for the rest of your devices.
    To get the most out of iCloud, set it up everywhere.
    This is soooo frustrating!!!!
    Also I want to be able to look at duplicate songs on my itunes but after I downloaded the new version I can not figure out how to get that back. If the duplicate setting isn't in the new itunes I want the old version back.

    Did you ever resolve the iCloud problem.I am in the same position and its driving me mad!!! If you have a link to an solution I would appreciate it.

  • I can't figure out how to import my native instruments into the library

    I'm trying to use Komplete 8 as a plug-in and I can't figure out how to put it in to library.

    Load the plugin into the insert, select your patch and then select "save as" from the channel strip menu.

  • I can't figure out how to sync my songs I downloaded to my itunes?

    I downloaded songs to itunes on my computer.  I can't figure out how to sync them to my ipod.  It says to click devices and pull up my ipod, but there is no "devices" listed, though I have registered, etc.?

    Connect your iPod to the computer with the provided cable.
    Open up iTunes.
    You should see your iPod in the Device list.
    Click on it.
    Choose what you want to sync to your iPod and then click Sync.

Maybe you are looking for