[solved] run dmenu with custom aliases and functions

Is it possible to run my custom bash aliases and functions with dmenu?
My aliases are placed in ~/.bash_aliases and my functions are in ~/.bash_functions.
I source them in my ~/.bashrc through:
Functions
if [ -f ~/.bash_functions ]; then
. ~/.bash_functions
fi
# Aliases
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Last edited by orschiro (2013-12-27 08:41:40)

No problem!... sorry, I was about to post an "improved" version, but it breaks support for functions, doh!
EDIT: finally got it to work as I wanted Sorry, zsh stuff is gone from mine, I don't use it -- feel free to borrow the improvements for your version though!
v1.4 Changes:
- removed unnecessary if statements
- removed unnecessary 'source' command
- added some logic to see if the command is a real program, or an alias/function - this saves spawning bash shells that aren't needed
v1.5 TODO list:
- add some "history" feature so that commonly used commands appear first in the list
#!/bin/bash
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
else
cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
fi
cmd=`(
IFS=:
if [ -f ~/.bash_aliases ]; then
aliases=( ~/.bash_aliases )
fi
if [ ~/.bash_functions ]; then
functions=( ~/.bash_functions )
fi
if stest -dqr -n "$cache" $PATH || stest -fqr -n "$cache" "$aliases" || stest -fqr -n "$cache" "$functions"; then
stest -flx $PATH
source $aliases
alias | awk -F '[ =]' '{print $2}'
compgen -A function
) | sort -u | tee "$cache" | dmenu "$@"
else
dmenu "$@" < "$cache"
fi
)`
if [ -f ~/.bash_aliases ]; then
if [ ! -z $(which $cmd) ]; then
exec $cmd &
else
echo -e "source ~/.bash_aliases \n $cmd" | bash -O expand_aliases &
fi
fi
Last edited by dennis123123 (2014-04-21 10:09:39)

Similar Messages

  • Itunes won't play any cd i put in the drive (macbook pro). I am running paralells with windows 7 and have disables media player so that didn't help

    itunes won't recognize/play/import any cd i put in the drive. I am also running paralells with windows 7 and have disabled media player. any suggestions?

    I have the same problem.
    On launch itunes works fine.
    If I let it play through a full album of songs unatended, when I return it respondes, but will not play music. I can browse my collection, but when i click the play button, press the space bar with a track selected or double cclick a track it will not play. A restart of iTunes solves the problem temporarily.

  • Advanced Button creator with custom gradient and corners

    Advanced Button creator with custom gradient and corners, check it here -
    http://talkxe.com/?p=56

    Advanced Button creator with custom gradient and corners, check it here -
    http://talkxe.com/?p=56

  • How to print jTable with custom header and footer....

    Hello all,
    I'm trying to print a jTable with custom header and footer.But
    jTable1.print(PrintMode,headerFormat,footerFormat,showPrintDialog,attr,interactive)
    does not allow multi line header and footer. I read in a chat that we can make custom header and footer and wrap the printable with that of the jTable. How can we do that..
    Here's the instruction on the chat...
    Shannon Hickey: While the default Header and Footer support in the JTable printing won't do exactly what you're looking for, there is a straight-forward approach. You can turn off the default header/footer and then wrap JTable's printable inside another Printable. This wrapper printable would then render your custom data, and then adjust the size given to the wrapped printable
    But how can i wrap the jTable's Printable with the custom header and footer.
    Thanks in advance,

    I also once hoped for an easy way to modify a table's header and footer, but found no way.
    Yet it is possible.

  • TS3212 im running XP with all firewalls and pop up blockers off. Ive tried using chrome, firefox, and IE. no download starts and im redirected to the thank you screen, please help!!!!!!!!!!!!!!!

    im running XP with all firewalls and pop up blockers off. Ive tried using chrome, firefox, and IE. no download starts and im redirected to the thank you screen, please help!!!!!!!!!!!!!!! Ive read all related articles, aswers and solutions but cant seem to get tunes to download?

    Ive tried from my PC, and ive tried from another which runs Vista. Both pc's were tried using firefox, IE and chrome,and both had firewalls off and pop-ups allowed completely (I basically turned off all security). I checked for 3rd party software which could also cause "blocks" but all 3rd party software were eliminated. I even tried stopping and restarting windows installer in "computer management; services, services". Still no luck..... This is the first time that ive struggled downloading Itunes. The reason im trying to download itunes is because im attempting to restore my iphone 4.....

  • Hi there i have ipod touch 2nd gen and i am tryna restore it but i get error 21 with orginal fireware and 1601 with custom fireware and when it connected to itunes and i try to boot it up by restoring it white screen with lines thorugh it

    hi there i ahve ipod touch 2nd gen and i am tryna restore it but get error 21 with orginal fireware and 1601 with custom firewarw and when connected it to itunes and i try to boot it by resotring it white screen with lines through it

    Those errors are covered here:
    http://support.apple.com/kb/TS3694

  • CS 4 custom shortcuts and function keys with apple extended keyboard

    Hi all,
    the F-Keys from F1 to F12 work fine, but F13 to F16 get entered as F3 (F17 to F19 do not get recognized at all).
    Has to be an Illustrator CS4 problem since they are recognized in InDesign or Photoshop CS4 (except the F17 and up).
    Anyone can help?
    And yes, I tried using all as standard function keys ;-)
    MacPro 2x 2.8 Quad Core Intel Xeon, 10.5.5

    I just got the new keyboard today I have the same issue... have you had any luck in finding a work around?  I just got off the phone with tech support and they told me that it is a known issue and to wait for an update be either Adobe or Apple.  It is not an Apple problem, it is an Adobe problem.
    For the time being, I have just made it so that I have to hit the "fn" (function) key in order to control the media options on the F-Keys.  This seems to work for now since I use shortcuts on those keys more than the media options.

  • Extensions with custom EO and VO

    The requirement I have is to add columns of a custom table into oracle seeded page(LeadCrtePG) and have those columns of the custom table get updated to the db when the apply is clicked on the seeded oracle page.
    I created a custom EO and a VO using the EO. Created a CO extending the base page LeadCrtePG's LeadCrteCO. Since the VO is not part of the AM, I have the following code in the CO:
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    OAViewObject vo= (OAViewObject)am.findViewObject("PelNewAsSalesLeadExtVO");
    HashMap hashmap = (HashMap)am.invokeMethod("getLeadInfo");
    String salesLeadId = null;
    if(hashmap != null)
    salesLeadId = (String)hashmap.get("SalesLeadId");
    if ( vo != null )
    System.out.println("Found VO PelNewAsSalesLeadExtVO for AM. Re-entered the page" );
    else
    System.out.println("cannot find VO PelNewAsSalesLeadExtVO" );
    vo = (OAViewObject)am.createViewObject("PelNewAsSalesLeadExtVO", "pella.oracle.apps.asn.lead.server.PelNewAsSalesLeadExtVO") ;
    try{
    vo.executeQuery();
    Row row = vo.createRow();
    row.setAttribute("LeadId",salesLeadId); //LeadId is the primary key
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    }catch( Exception e)
    throw new OAException(e.getMessage(), OAException.INFORMATION);
    A row is getting created in the VO. I checked by printing out the values in the VO in processFormRequest. But when the apply button in the page is clicked, the values are not getting saved to the table. But the values related to the seeded page are getting saved to the oracle table. So which means there is a commit in the oracle code somewhere which should also commit the custom VO changes, but that is not happening. If I do an explicit commit in processFormRequest, it errors out with some seeded page related error messages. I have even checked my mappings in the VO. I'm not sure how to solve this.
    Does anyone have any suggestion on this or is there a better way to approach this requirement ?.
    Thanks,
    Lavanya

    Thanks Ajay and Reetesh for the reply. I was able to figure out the mistake I was doing. I found this when I was trying out Ajay's approach. The reason for the issue was that I started off creating a text input field using a VO using personalization, later I had changed the VO name in my code. So actually the input value was not binding to the correct VO's attribute and eventually the EO. Once I corrected that, everything started working fine.
    I tried both mine and Ajay's approach and both works well.
    Thanks for all your help.
    Lavanya

  • [Solved] Running Thunar with sudo/su Causes GVFS Errors?

    Hi, I switched from Xubuntu to Arch a few days ago, and am loving it so far, but I'm running into an issue when running Thunar with sudo or su. As a result, trash as root doesn't work. I'm not sure if this is related to GVFS, but drives also do not appear when running Thunar as root. Not too major, since it's just a slight inconvenience, and I only need root privileges with Thunar occasionally. Though it'd be awesome if someone knows how to fix this, since my searching has come up with nothing for a problem like this. When logging in as root itself, the problem doesn't occur,  it only happens when running it as my regular account through the sudo or su command.
    Here's the terminal output with the errors:
    [dark@YiffingInHell ~]$ su
    Password:
    [root@YiffingInHell dark]# thunar
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    Last edited by DarkSniper (2011-04-06 02:43:46)

    @janek: It's not good practice to necrobump threads that were posted nearly a year ago.
    I have long since devised a better solution than my initial quick fix. I have created a small script that wraps sudo and fetches root's dbus variables, then sticks them before the command I want to run, so that they're run on root's session instead of mine. It's not the most elegant way, but it remains secure and has pretty much no overhead. I also prefer sudo over pkexec, having an agent popup when I enter the command is undesirable, since it's simpler and easier to just enter the password on the command line.
    For searcher's sake, this is my little wrapper if anyone's interested in using it.
    A small wrapper to go in your path, to be aliased to sudo in your bashrc
    !#/bin/bash
    #Fetch Root's Dbus Variables and Run The Command
    /usr/bin/sudo $(/usr/bin/sudo sed '6q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) \
    $(/usr/bin/sudo sed '7q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) \
    $(/usr/bin/sudo sed '8q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) "$@"
    Then add this to a script that is run as root on boot. [This starts a session for root that allows the wrapper to connect]
    Examples include /etc/rc.local; /etc/lxdm/LoginReady; or a systemd unit
    dbus-launch --autolaunch af16543424391ebcfb5f0c1000000ce2
    NOTE: The "af16543424391ebcfb5f0c1000000ce2" part is different for every system, you can find out what it is for your system by checking the name of the file in /root/.dbus/session-bus.

  • Free Goods Import Process with Customs, Freight, and Other Taxes.

    hi,
    I have to import free goods but have to pay for Customs, Freight, and other Taxes.
    1. If I tick Free Goods Indicator in PO Line Item, Condition Tab at line item disappears. It will not to calculate other conditions at Header level also. - So I cant execute this option.
    2. If i take price of material and insert Condition Type: R001:Discount/Quantity with material price/qty, then it gives Error Message - "Price Must be greater than 0".
    So, Is there any way through which I can procure Free Goods and can maintain conditions for Customs, Freight, and other Taxes in Purchase Order.
    Please help me in this regard.
    - Jignesh

    Hi,
    1) Create an import PO in ME21N with material price and all custom duty conditions (as you normally create). no need to put free tick indicator.
    2) Process MIRO for goods and delivery costs simultaneously.
    3) Maintain zero amount for goods item and actual values for the duties (Ensure selection of goods item including delivery cost items)
    4) Save the LIV document
    5) Check PO item history got updated with IR-L and DCIn. (IR-L will updated with zero amount)
    6) Do  MIGO w.r.t. IR document number.
    7) GR FI document will get updated with the non-set off duty values only.
    Regards
    Rajesh

  • Problems with Customer Service AND unexplained charges!

    I've been with Verizon for I-don't-know-how-many years, and through the years you are bound to have a few problems here and there but some of the problems are just ridiculous! It's also the same reocurring problem!!!!!!!!!!!!!!!! I was with Alltel first, before it was bought out by Verizon. The years I was with Alltel, I didn't have near as many problems. It seems EVERY time I do the smallest change or something to my phone or bill, I get a ridiculous amount of charges that I was NOT aware of, nor told about... EVEN IF I ask "So this isn't going to change my bill, or there will not be any unexpected/unexplained charges that I don't know about?"... BUT not matter how many times I ask... and NO matter how many times I am told "no"... there always is. For example.... last year, I updated and signed a new 2 year contract and purchased the first Driod. Before, my 30 day warranty was up, I was having problems with my Driod, and decided to send it in and get a new one. Before I did this.. I called customer service to make sure there would be no interuption in my bill, and there wouldn't be any unexpect charges, and there would be no difference in anything. I was told there was not, and once I recieved my new phone, just send it in and nothing would be changed. Of course, when I get my bill.. I see I was charged $500 for the new phone. It was explained to me that my credit card was reimbursed (which I never check that card, because I never used it expect to purchase the phone) and that I was recharged for the new phone, since it was a new phone. So I had to fork out the $500 (on top of my bill) and then wait months to get the $100 rebate card. Months after that, I "assumed liablity of my line" because I was on a plan with my family. I decided to have my own line, so I "assumed liability." I was not told that when I did that, I "renewed" my contract date. So I just added 6 more months to my 2 year contract. Was NOT told about that! Then again...... I was recently having problems with my Driod (the screen went black and would not come back on.) I had to turn on an OLD motorola razor, so I would not be without a phone for two days while I was waiting on my phone to come in. As soon as my phone came in, I had my Droid turned back on. I recieved my bill recently, and my bill was $200 over what it normally should be.... so I called in... apparently, when I had my phone replaced, they dropped off my data package and when I recieved my replacement driod, they never put it back on. So I was being charged for alllll my data usage... again I was NOT told about this. I wasn't even aware that they had dropped off my data package, and when/where did they get the authority to do that??? These are just a FEW of the problems that I have had.................................
    Does anyone have these reoccuring problems!?

    I understand that my bill can be viewed online, and I do view it fairly regularly, so if there are any unexplained charges, I can call Verizon asap. The problem does not come from me not understanding my bill, but from customer service. I have been with Verizon for a very long time, and it is a continuing problem. Where did Verizon get the 'OK' to drop my data package off my plan? Who authorized that?
    After calling Verizon and trying to find out the problem, the gentleman told me that when I activated on old phone while I was waiting on my new Droid to arrive, my data package was dropped off and I "should" have been told about that. When I reactiviated my new Droid, I "should" have called and had them restart my data package. I was not aware that when you activate an old phone that data plan is taken off your plan. In all my years of having cell phones, I never make two years with one phone. I have always, at one point, had to turn on an old phone, and my data package has NEVER changed. Why would I have my data package dropped and why would I have to call Verizon to have it restarted. I would never know to do that unless I was TOLD that my data packaged HAD to be re-added when I recieved my new phone, but I was never told of that.
    All of that is beside the point, the point is, Verizon was never given the authorization to change my plan. Never. My bill was taken care of and readjusted, and I am thankful for that. It does not change the fact it is always a hassle with Verizon Customer Service and I am always the one having to PROVE that I am not at fault, or that I was NEVER told of certian things. EVERY TIME I HAVE CALLED CUSTOMER SERVICE, I AM TOLD "I'M SORRY, THEY SHOULD HAVE TOLD YOU THAT."
    "they should" does not help my bill with the extra armount of charges.

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Error while running JSP with custom tag

    I am trying to run a jsp with a tag and I am getting the following error when I run the jsp:
    "Unable to open taglibrary /WEB-INF/jsp/mytaglib.tld : Parse Error in the tag library descriptor: External parameter entity "%(DOCTYPE);" has characters after markup."
    I have no idea what this is, can anyone help me here?
    tx
    -AB

    Its difficult to tell without looking at your TLD file i.e. mytaglib.tld
    However, a guess is that you may be refering to an invalid or otherwise corrupted DTD from your TLD.
    Check that out.
    The official DTD for TLDs in JSP 1.1 is http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd
    and the official DTD for TLDs in JSP 1.2 is http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

  • Problem with custom control and focus

    I've a problem with the focus in a custom control that contains a TextField and some custom nodes.
    If i create a form with some of these custom controls i'm not able to navigate through these fields by using the TAB key.
    I've implemented a KeyEvent listener on the custom control and was able to grab the focus and forward it to the embedded TextField by calling requestFocus() on the TextField but the problem is that the TextField won't get rid of the focus anymore. Means if i press TAB the first embedded TextField will get the focus, after pressing TAB again the embedded TextField in the next custom control will get the focus AND the former focused TextField still got the focus!?
    So i'm not able to remove the focus from an embeded TextField.
    Any idea how to do this ?

    Here you go, it contains the control, skin and behavior of the custom control, the css file and a test file that shows the problem...
    control:
    import javafx.scene.control.Control;
    import javafx.scene.control.TextField;
    public class TestInput extends Control {
        private static final String DEFAULT_STYLE_CLASS = "test-input";
        private TextField           textField;
        private int                 id;
        public TestInput(final int ID) {
            super();
            id = ID;
            textField = new TextField();
            init();
        private void init() {
            getStyleClass().add(DEFAULT_STYLE_CLASS);
        public TextField getTextField() {
            return textField;
        @Override protected String getUserAgentStylesheet() {
                return getClass().getResource("testinput.css").toExternalForm();
        @Override public String toString() {
            return "TestInput" + id + ": " + super.toString();
    }skin:
    import com.sun.javafx.scene.control.skin.SkinBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.TextField;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputSkin extends SkinBase<TestInput, TestInputBehavior> {
        private TestInput control;
        private TextField textField;
        private boolean   initialized;
        public TestInputSkin(final TestInput CONTROL) {
            super(CONTROL, new TestInputBehavior(CONTROL));
            control     = CONTROL;
            textField   = control.getTextField();
            initialized = false;
            init();
        private void init() {
            initialized = true;
            paint();
        public final void paint() {
            if (!initialized) {
                init();
            getChildren().clear();
            getChildren().addAll(textField);
        @Override public final TestInput getSkinnable() {
            return control;
        @Override public final void dispose() {
            control = null;
    }behavior:
    import com.sun.javafx.scene.control.behavior.BehaviorBase;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    public class TestInputBehavior extends BehaviorBase<TestInput> {
        private TestInput control;
        public TestInputBehavior(final TestInput CONTROL) {
            super(CONTROL);
            control = CONTROL;
            control.getTextField().addEventFilter(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
                @Override public void handle(final KeyEvent EVENT) {
                    if (KeyEvent.KEY_PRESSED.equals(EVENT.getEventType())) {
                        keyPressed(EVENT);
            control.focusedProperty().addListener(new ChangeListener<Boolean>() {
                @Override public void changed(ObservableValue<? extends Boolean> ov, Boolean wasFocused, Boolean isFocused) {
                    if (isFocused) { isFocused(); } else { lostFocus(); }
        public void isFocused() {
            System.out.println(control.toString() + " got focus");
            control.getTextField().requestFocus();
        public void lostFocus() {
            System.out.println(control.toString() + " lost focus");
        public void keyPressed(KeyEvent EVENT) {
            if (KeyCode.TAB.equals(EVENT.getCode())) {
                control.getScene().getFocusOwner().requestFocus();
    }the css file:
    .test-input {
        -fx-skin: "TestInputSkin";
    }and finally the test app:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class Test extends Application {
        TestInput input1;
        TestInput input2;
        TestInput input3;
        TextField input4;
        TextField input5;
        TextField input6;
        Scene     scene;
        @Override public void start(final Stage STAGE) {
            setupStage(STAGE, setupScene());
        private Scene setupScene() {
            input1 = new TestInput(1);
            input2 = new TestInput(2);
            input3 = new TestInput(3);
            input4 = new TextField();
            input5 = new TextField();
            input6 = new TextField();
            GridPane pane = new GridPane();
            pane.add(input1, 1, 1);
            pane.add(input2, 1, 2);
            pane.add(input3, 1, 3);
            pane.add(input4, 2, 1);
            pane.add(input5, 2, 2);
            pane.add(input6, 2, 3);
            scene = new Scene(pane);
            return scene;
        private void setupStage(final Stage STAGE, final Scene SCENE) {
            STAGE.setTitle("Test");
            STAGE.setScene(SCENE);
            STAGE.show();
        public static void main(String[] args) {
            launch(args);
    The test app shows three custom controls on the left column and three standard textfields on the right column. If you press TAB you will see what i mean...

  • Free goods secquence with customer hierarchie and product hierarchie

    Hi  guru's,
    I'm currently working with a secquency for free goods with customer hierarchie ans product hierarchie, but is giving me a lot of problems of dums ,  I think that SAP standard doesn't allow it because the customicing is diferent than the secquence for pricing that has 2 more fields open: V_T682Z-FSTST and V_T682Z-MBWRT that could allow me to set the levels of the hierarchie. Despite it works with the same table T682Z.
    Has anybody had the same problem as me? Can you help me please.
    Marta Gallego

    Maintain your entries in " Determine Item Category For Free Goods Item"
    For the combination of Order Type-ItemCatgrp(ERLA)-Usage(Free)-Item Category(Tan)
    Lets see if it works for you.

Maybe you are looking for

  • Device button no longer appears in iTunes after connecting with USB cable

    Since updating software to OUS 7.0.4 my device buttton no longer appears in the iTunes window after connecting with USB cable

  • Flash player not working in Opera browser

    I can't use the player in Opera Browser in Mac OS 10.9 but it works fine in Chrome, Firefox and Safari. Please help! I really want to use it i Opera. This is the error:

  • HT5654 iPad 4 won't turn on

    All of a sudden my iPad 4 turned off and won't turn back on. I tried charging it and connecting it to iTunes. When I connect it to iTunes it says that my device is in restore more. So I restore it and then it says that it's preparing the ipad for res

  • Oracle purchasing attachments gives error

    I am trying to load an attachment to a PO and gets an error Required database login or file information is missing. The Attachment File Directory profile option is set to a directory in the web server. I understand that the web server should have per

  • Select data into deep internal table

    Dear Experts. I created a dynamiv deep internal table. while selecting data , into the internal table it is giving a dump. saying that deep structure. SELECT OBJTY OBJID ARBPL WERKS from crhd INTO CORRESPONDING FIELDS OF TABLE <f_tab> where WERKS = p