Bash command not working

After an update from leopard to lion my bash command clear does not work.
If I open terminal and type clear this happens...
Last login: Wed Jul  4 19:07:27 on ttys000
You have new mail.
pancake:~ machinename$ clear
Launch of "clear" failed: the PowerPC architecture is no longer supported.
pancake:~ machinename$
I have tried to copy a copy of the terminal app from another functioning machine running lion, but when it runns on the upgraded machine the result is the same.
How can I fix this?

Sorry I better correct some of the info.
My bash command clear does not work.
If I open terminal and type clear this happens...
The machine was bought with Lion preinstalled and the Migration Assistant was use to transfer everything for a user from a Leopard machine.
Last login: Wed Jul  4 19:07:27 on ttys000
You have new mail.
pancake:~ username$ clear
Launch of "clear" failed: the PowerPC architecture is no longer supported.
pancake:~ username$
When attempting to delete the terminal program on the system it is prevented with the message:
“Terminal” can’t be modified or deleted because it’s required by Mac OS X.
I then copied a terminal program from another Lion machine but it shows the same message for the command Clear on this machine, but not the machine it was copied from.
Any ideas is greatly appreciated...

Similar Messages

  • Bash commands not working after upgrade to Lion

    After upgrade, many BASH commands not working. For example, such a fundamental thing as "ls". 
    iMac20:bin a$ ls
    Launch of "ls" failed: the PowerPC architecture is no longer supported.
    What does it have to do with PowerPC? My computer is 2.66 GHz Inter Core Duo

    Linc,
    iMac20:~ a$ which ls
    /sw/bin/ls
    Also, I managed to look (using tcsh's ls-F command) into the contents of /usr/. Here's what I see there:
    [iMac20:/bin] a% ls-F
    [*          csh*        echo*       ksh*        mkdir*      rcp*        stty*       wait4path*
    bash*       date*       ed*         launchctl*  mv*         rm*         sync*       zsh*
    cat*        dd*         expr*       link*       pax*        rmdir*      tcsh*      
    chmod*      df*         hostname*   ln*         ps*         sh*         test*      
    cp*         domainname* kill*       ls*         pwd*        sleep*      unlink*    

  • Mac Terminal Commands not working

    A few months ago, I discovered the awesome Terminal App on my Mac and came to know of its great uses. But since yesterday, when I enter any command into Terminal, I get this response:
    -bash: $: command not found
    while all the commands I enter worked before! How to solve this problem?

    You're entering a command that starts with '$' by itself. That's a syntax error. It's hardly possible to overstate the danger of using the shell if you don't have a basic understanding of it.

  • Alt ctrl c shortcut command not working in photoshop cc, it is opening Internet explorer (IE)

    In Photoshop CC 2014  Alt + Ctrl + C ( to open for canvas size dialog box ) command not working, it is opening Internet Explorer (IE)

    What version of windows are you using?
    See if the Internet Explorer shortcut has that keyboard shortcut assigned to it.

  • Why is my BDC_CURSOR command not working to position the cursor?

    Why is my BDC_CURSOR command not working to position the cursor?  Here are the details regarding my issue.
    I am writing a BDC to mass delete routing material assignments using transaction CA02.  I am OK to navigate through the initial screen to go to the Header screen and from here I am OK to navigate to the Material Assignments screen.  But once here, I cannot get the BDC_CURSOR command to take me into the list.  Here are the commands I am using.  Please let me know what I may try differently.
    CA02 Material Assignment - Set position  <-- this resets list of materials to correct position
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'MAPL-MATNR(01)'.    <-- this is not working to set the cursor into the list
      PERFORM bdc_field       USING 'BDC_OKCODE'  '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI'   '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'  'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'   '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'  c_position.

    Thank you for your reply.
    I had used SM35 to record.  However, I was not aware of the "create program" feature.  I had commented out a section from my previous post which I have now added back (latest code below).  But it still did not resolve the issue.
    When I execute with dismode = 'N', I get back error message "No batch input data for screen SAPLCZDI 1010".
    When I execute with dismode = 'E' (only show dynpros when error), it stops at the material selection screen without placing my cursor in the list.  I can then MANUALLY click to set the cursor position in the list, MANUALLY click the trashcan, it then uses my BDC command to respond to the popup asking "Do you want to delete", still leaving me at the material selection screen.  I can then MANUALLY click the green check (or enter), then it continues with the BDC to go back to the previous screen, and saves.  But it still will not place my cursor in the material selection list (SAPLCZDI screen 1010).
    Here is code used.  It is the second section of code labeled "CA02 Material Assignment - Delete" that is not working.
    CA02 Material Assignment - Set position
    this code functions to position the desired material to first in screen list
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=ENT1'.
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    CA02 Material Assignment - Delete
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR' 
                                    'MAPL-MATNR(01)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=LOE'.             " trash can
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.
    Acknowledge Pop-Up Screen
      PERFORM bdc_dynpro      USING 'SAPLSPO1' '0100'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=YES'.
    CA02 Material Assignment - Green Check OK
      PERFORM bdc_dynpro      USING 'SAPLCZDI' '1010'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'RC27X-ENTRY_ACT'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=BACK'.            " check mark
      PERFORM bdc_field       USING 'RC27X-ENTRY_ACT'
                                     c_position.

  • Odi os command not working with agentservice agent.

    dear all,
    odi os command not working with agentservice agent but with local agent it work fine.. and user is administrator.
    kindly solve it
    Regards
    Naseer

    Hi,
    you referred to oscommand, so are you executing a .bat fille? if yes, where exactly does the .bat file reside, local machine or on network share?
    Also, follow these couple of documents, they may be helpful to you.
    859215.1 and 424703.1
    Regards
    Srikanth

  • Crontab reboot command not working

    Crontab reboot command not working
    Greetings
    I am new at this so excuse any ignorant mistakes I might be making.
    I have a server (MM X.4.9) that I would like to restart every day in order to make sure no programmes are hanging etc. If a program is hanging is should force quit it. Using terminal I have entered the following command:
    sudo nano /etc/crontab
    Entered password
    Than I entered using tab between each sequence:
    15 13 1 1 * root reboot
    This was a test run and it did not reboot.
    Entering
    cat /etc/crontab
    I got:
    # The periodic and atrun jobs have moved to launchd jobs
    # See /System/Library/LaunchDaemons
    # minute hour mday month wday who command
    15 13 1 1 * root reboot
    What have I done wrong?
    Thanks

    Hehe, there you are experimenting with a "reboot" cron command and you are surprised it quit so fast. You are not going to find a "graceful" solution to shutdown dialogs.
    MSWord is a Java app, so it is especially important for the command to work that it doesn't get hung up on outer layers of the system. Especially stupid apps that use Java which is not well integrated. I believe Word has a 5 minute autosave, so you should be able to recover most of your document.
    This reboot command should be running around 2AM, when the average webserver has minimum traffic. If you feel the need to reboot during busier times of the day, I'd suggest you look at what's causing your applications to crash.

  • Illustrator Short Commands Not Working

    Hi Team,
    My illustrator CS6 short commands have stopped working.
    Any time I try to use any CMD + Key, illustrator will not react.
    This has been on going for a few months, I have tried resetting preferences but nothing has changed.
    If someone could please help.
    Thanks,
    Brandon

    Hi Jacob,
    I have tried resetting preferences and few other options.
    Anytime I press the CMD key the option at the bottom just changes from selection to direct selection, if that helps.
    Should I uninstall and reinstall illustrator?
    I no longer have my access key.
    Thanks,
    Brandon
    Date: Wed, 8 Jan 2014 15:39:58 -0800
    From: [email protected]
    To: [email protected]
    Subject: Illustrator Short Commands Not Working
        Re: Illustrator Short Commands Not Working
        created by Jacob Bugge in Illustrator - View the full discussion
    THS,
    You may try the following (you have tried/done some of them already) and see whether it helps (the following is a general list of things you may try when the issue is not in a specific file; 3) and 4) are specifically aimed at possibly corrupt preferences):
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press CtrlAltShift/CmdOptionShift during startup (easy but irreversible);
    4) Move the folder Other options (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
      http://www.adobe.com/support/contact/cscleanertool.html
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5994475#5994475
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5994475#5994475
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5994475#5994475. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Illustrator at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Why does default keyboard shortcut for show/hide baseline grid (opt+command+') not work?

    Why does default keyboard shortcut for show/hide baseline grid (opt+command+') not work?

    Here's where you need to change the settings: System Preferences > Keyboard > Keyboard Shortcuts:

  • Java command not working - path problem ?

    Im not really new to Java, but rather new to Linux :=)
    Ive got NetBeans setup and working great on Redhat 7.2 and I can run Java apps from within the IDE...but not from a command line. I get "bash: java: command not found"
    This tells me something is amuk with my path, because obviously the bin folder is not on the path ???
    Help :=)

    also, ive got this in my .bashrc file
    #JDK Home varible
    JDK_HOME=/usr/java/j2sdk1.4.0_01

  • SQLJ command not working

    Hi
    when I enter sqlj in cmd prompt, i am getting the following error.
    Exception in thread "main" java.lang.NoClassDefFoundError: sqlj/tools/Sqlj
    I search in google for the same. I got answer like the "translator.jar" should be included in the class path. Though i have it in the classpath still i am getting the same error. I unzipped the translator.jar file. The required class is present in that, even then it is not working. I am pasting my class path for your reference
    %ORACLE_HOME%\oc4j\sqlj\lib;
    %ORACLE_HOME%\oc4j\bin;
    %ORACLE_HOME%\oc4j\jdbc\lib;
    %ORACLE_HOME%\jdbc\lib\classes12.jar;
    %ORACLE_HOME%\jdbc\lib\ojdbc14.jar;
    %ORACLE_HOME%\oc4j\sqlj\lib\translator.jar;
    %ORACLE_HOME%\oc4j\sqlj\lib\runtime12ee.jar;
    %ORACLE_HOME%\sqlj\runtime12.jar;
    I am getting the same error for jpub also
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jpub/Main
    this class is also there in the translator.jar file.
    Do anyone know solution for this.
    Thanks in advance.

    I am having a similar problem:
    bash-2.03$ ~/11.2.0.2/bin/sqlj -compile=false -classpath '~/11.2.0.2/sqlj/lib/translator.jar:~/11.2.0.2/sqlj/lib/runtime12.jar'
    Exception in thread "main" java.lang.NoClassDefFoundError: sqlj/runtime/profile/DefaultLoader
    at sqlj.tools.Sqlj.resetStaticVariables(Sqlj.java:2905)
    at sqlj.tools.Sqlj.statusMain(Sqlj.java:189)
    at sqlj.tools.Sqlj.main(Sqlj.java:150)
    The same command works fine with Oracle 10g:
    bash-2.03$ ~/10.2.0.3/bin/sqlj -compile=false -classpath '~/10.2.0.3/sqlj/lib/translator.jar::~/10.2.0.3/sqlj/lib/runtime12.jar'
    Error: This SQLJ runtime must be run under an Oracle JDBC driver.
    Can somebody tell me if the options for sqlj changed in Oracle 11g?
    Thanks,
    Raj

  • Bash: command not found

    Since two days, I have a problem running some system commands, for example:
    mkinitcpio
    reboot
    lspci
    etc.
    The result being: bash: mkinitcpio: command not found
    The files are there, but work only if I give full path to them. I know it has something to do with the PATH variable not being loaded at the start of system, but I do not know how to fix it.
    Help, please.
    Last edited by Lockheed (2011-05-13 21:31:31)

    $ echo $PATH
    /usr/lib/libfm:/bin:/usr/bin:/usr/local/bin:/home/juha/bin
    $ cat /etc/profile
    # /etc/profile
    #Set our umask
    umask 022
    # Set our default path
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
    export PATH
    # Load profiles from /etc/profile.d
    if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
    test -r "$profile" && . "$profile"
    done
    unset profile
    fi
    # Source global bash config
    if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
    . /etc/bash.bashrc
    fi
    # Termcap is outdated, old, and crusty, kill it.
    unset TERMCAP
    # Man is much better than us at figuring this out
    unset MANPATH

  • Terminal commands not working {clear, pico, etc..}

    After Upgrading to Snow Leopard I am trying to work out of the terminal (using git) and some of the basic commands are not working. Things like trying to use clear and pico to edit files return this error.
    -bash: clear: command not found
    my paths looks like this
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    /usr/local/bin
    Can any one help me out with that? (I am new to the Terminal so putting things in laments terms would be appreciated)
    Thanks for any help!

    when i type the $ls -l `whereis clear pico nano` it gives me the same error,
    -bash: whereis: command not found
    and then it just lists the directory. but is i just do ls -l clear or ls -l pico it gives me responses that look like the ones you have posted...
    ls -l clear
    -rwxr-xr-x 1 root wheel 50768 May 18 2009 clear
    ls -l nano
    -rwxr-xr-x 1 root wheel 324320 May 18 2009 nano
    ls -l pico
    lrwxr-xr-x 1 root wheel 4 Oct 1 15:48 pico -> nano
    is this something where I can just copy the /usr/bin over from a friends computer? (one of my friends bought their computer[same one as mine] about a month after i got mine) or is that a no go? would that actually solve any thing or just cause more problems?

  • Suddenly won't boot, start up commands not working... am I out of luck?

    Funny, this is my first mac being a hardcore and longtime PC user as my "test" mac... everything works perfectly... of course until 12 days after my warranty is up...
    This morning on waking up my mac to turn on some music in iTunes, i click on the iTunes window to bring it into focus. It suddenly closes and dissapears, on returning to the shortcut bar (the tray at the bottom for programs, i don't know what mac users call it) and click on iTunes ot relaunch it after its crash/dissapearance, the task tray then decides to suddenly dissapear/crash (don't know which, it's like a crash but best described as a vanishing act as it doesn't lag or churn before dying, just vanishes).
    Possibly related to this issue, not long ago my iChat stopped working, whenever i launched it, it would stay open for a couple seconds and automatically closed. I could sit there all day clicking it, it would open, 2 seconds later, close. I gave up on that. I gave up on that a week ago.
    Shortly after my iTunes dissapeared/crash and then after the program tray also dissapearing. my mac mini reboots. Except it's stuck on the screen with the mac apple in the middle of the screen with the moving (yes it's moving) pinwheel on the bottom center of the screen. I let it sit there for a long while... 15 minutes pass nothing happens.
    I try rebooting... same thing happens.
    I'm go on my PC (Which i'm now typing from) and start searching for solutions. apple support pages suggest I try safe mode with shift.
    SAFE MODE: Won't work. I tried pushing both shift buttons on my keyboard at different times (before the start up tone, immediately after the beggining of the start up tone, and after the start up tone finishes) all that happens is, I get the same pinwheel/apple screen that is "loading" (according to the pinwheel) forever.
    I went to forums, read up on other different commands like holding down "X" or option command P+R.... X does the same as the not-working safe mode... option command P+R continually reboots the computer.
    And in the end I'm still at square one. thouroughly frustrated. wishing my mac mini was a PC (as i've never had a PC problem I can't fix) Ironic experience... PCs, break often, easily fixed, no support needed.... Macs: rarely break, when they do, support needed, but support from apple expires 12 days ago, not easily fixed... and now I think i'm screwed out of the 700$+ i payed for this POS and I've lost my whole iTunes library, all the CDs i've loaded onto it, and all the music and TV shows i've purchased from the apple music store. Good game, apple takes a bunch of money, refuses to support my product which is now dead (had a similar situation with an iPod I had bought for my girlfriend).
    My only hope is... I know mac users have a happy helpful community and always band together to help fellow mac users, something the PC world doesn't as-cohsively have. So...
    Help me Obi-Wan Kenobi... you guys are my last and only hope.
    Thanks in advance.
    -John

    Hi, John. Welcome to the Discussions.
    1. You wrote: "I get the same pinwheel/apple screen that is "loading" (according to the pinwheel) forever"The "pinwheel" is known as a "spinning gear progress indicator."
    This, combined with the other issues you've reported, sounds like problems with the hard drive. I suggest you begin troubleshooting using the Procedure specified in my "Resolving Disk, Permission, and Cache Corruption" FAQ. Perform the steps therein in the order specified.
    2. You wrote: "...the shortcut bar (the tray at the bottom for programs, i don't know what mac users call it)"It's called the Dock. See "Mac OS X: About the Dock."
    3. You wrote: "...this is my first mac..."My "Learning About Mac OS X" FAQ has a number of resources that you will find helpful including books, online training, and more.
    4. You wrote: "...Macs: rarely break, when they do, support needed, but support from apple expires 12 days ago, not easily fixed..."You should have bought the AppleCare Protection Plan (ACPP) before your warranty expired. The ACPP provides a two-year extension on the warranty and three years of telephone support.
    PS: Word to the Wise: watch the language. I appreciate your frustration, but don't let it into your posts. These forums are "family friendly" and a good way to get banned from them is to rant, use profanity (including profane abbreviations), etc. What passes for "acceptable behavior" on most PC/Windows forums is not tolerated here.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • At new command not working

    Hi all,
       I pasted my sample code below. In this i have used "At new event" this command is not working in my code, the values are redundant, How to rectify this problem. Pls help me.
    Thanks in advance.
    Tables : RBKP,
             RSEG.
    Data : Begin of itab,
           BELNR like RBKP-BELNR, " Invoice Document Number
           BUZEI like RSEG-BUZEI, " Invoice Item Number
           GJAHR like RBKP-GJAHR, " Fiscal Year
           EBELN like RSEG-EBELN, " Purchase Order Number
           MENGE like RSEG-MENGE, " Invoice Quantity
           RMWWR like RBKP-RMWWR, " Invoice Amount
           WAERS like RBKP-WAERS, " Currency
           MATNR like RSEG-MATNR, " Material Number
           LIFNR like RBKP-LIFNR, " Vendor Code
           ZTERM like RBKP-ZTERM, " Terms of payment key
           End of itab.
    Data itab2 like itab occurs 0 WITH HEADER LINE.
    data a like rbkp-lifnr.
    Selection-screen  : Begin of block a with frame title text-001.
    Select-options    : LIF For RBKP-LIFNR.
    Select-options    : gjahr For RBKP-gjahr.
    Selection-screen  : End of block a.
    Start-of-selection.
    select * from rbkp where LIFNR in LIF and GJAHR in gjahr.
      if sy-subrc = 0.
        select * from rseg where BELNR = rbkp-BELNR and gjahr = rbkp-gjahr.
          if sy-subrc = 0.
            itab-BELNR = RBKP-BELNR.
            itab-BUZEI = RSEG-BUZEI.
            itab-GJAHR = RBKP-GJAHR.
            itab-EBELN = RSEG-EBELN.
            itab-MENGE = RSEG-MENGE.
            itab-RMWWR = RBKP-RMWWR.
            itab-WAERS = RBKP-WAERS.
            itab-MATNR = RSEG-MATNR.
            itab-LIFNR = RBKP-LIFNR.
            append itab to itab2.
          endif.
        endselect.
      endif.
    endselect.
    Sort itab2 by LIFNR.
    loop at itab2.
    Move itab2 to itab.
    at new LIFNR.
    write : / itab-lifnr.
    endat.
      endloop.
    Regards,
    Kesav.

    Hi
    i am sending a sample code where that events worked
    you can understand very easily
    REPORT  ZDAN108.
    Using AT FIRST , AT NEW, AT THE END OF , AT LAST.
    DATA: BEGIN OF ITAB OCCURS 0,
          F1 TYPE I,
          F2(6) TYPE C,
          F3(10) TYPE N,
          F4(16) TYPE P DECIMALS  2,
          END OF ITAB.
    DATA: SUB_TOT(10) TYPE P DECIMALS 3.
    **--1
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 30.
    ITAB-F4 = '3000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *--2
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *-- 3
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    SORT ITAB BY F1.
    LOOP AT ITAB.
    AT FIRST.
    WRITE: /35 ' MATERIAL DETAILS:'.
    ULINE.
    ENDAT.
    AT NEW F1.
    WRITE: / 'DETAILS OF MATERIAL:' COLOR 7  , ITAB-F1.
    ULINE.
    ENDAT.
    WRITE: / ITAB-F1, ITAB-F2, ITAB-F3, ITAB-F4.
    SUB_TOT = SUB_TOT + ITAB-F4.
    AT END OF F1.
    ULINE.
    WRITE: / 'SUB TOTAL :'  COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.
    CLEAR SUB_TOT.
    ENDAT.
    AT LAST.
    SUM.
    ULINE.
    WRITE: 'SUM:', ITAB-F4.
    ULINE.
    ENDAT.
    ENDLOOP.
    <b>Reward if usefull</b>

Maybe you are looking for