.zshrc terminfo bad substitution

Hi guys,
I just started playing around with zsh and have run into a bit of a problem when setting key bindings. I am following the tutorial on wiki page (https://wiki.archlinux.org/index.php/Zsh#Key_bindings), but am getting a bad substitution error on the first assignment of terminfo variable
key[Home]=${terminfo[khome]}
This is my whole .zshrc:
autoload -U compinit promptinit
compinit
promptinit
prompt walters
zstyle ':completion:*' menu select
setopt completealiases
## Key bindings
bindkey -e
typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}
# setup key accordingly
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
source /usr/share/doc/pkgfile/command-not-found.zsh
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
zle -N zle-line-init
zle -N zle-line-finish
fi
When I create the assignment on the command line it seems to work fine. I was thinking this might have been due to bash still being my default shell, but I changed it with chsh, relogged and the problem still occurs

Well when I run it it seems to have been executed without problems, but the bindings don't work - do they work in your case?
As for the error it can be seen with -n switch:
> zsh -n .zshrc ~
.zshrc:14: bad substitution

Similar Messages

  • /sbin/mkinitcpio: 54: Syntax error: Bad substitution

    When I try upgrading my kernel I get the following output, ending with a Bad Substitution error:
    checking package integrity... done.
    loading package data... done.
    checking for file conflicts... done.
    upgrading kernel26... done.
    >>>
    >>> If you use the LILO bootloader, you should run 'lilo' before rebooting.
    >>>
    >>> Updating module dependencies. Please wait ...
    >>> MKINITCPIO SETUP
    >>> ----------------
    >>> If you use LVM2, Encrypted root or software RAID,
    >>> Ensure you enable support in /etc/mkinitcpio.conf .
    >>> More information about mkinitcpio setup can be found here:
    >>> http://wiki.archlinux.org/index.php/Mkinitcpio
    >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    /sbin/mkinitcpio: 54: Syntax error: Bad substitution
    I tried reinstalling mkinitcpio, but that does not seem to have any effect. What could be the problem here?

    changing the shebang to #!/bin/bash instead of #!/bin/sh in mkinitcpio seems to get it working again.
    but now I get the following:
    >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    ==> Building image "default"
    ==> Running command: /sbin/mkinitcpio -k 2.6.18-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
    :: Begin build
    :: Parsing hook [base]
    :: Parsing hook [udev]
    :: Parsing hook [autodetect]
    :: Parsing hook [ide]
    :: Parsing hook [scsi]
    :: Parsing hook [sata]
    :: Parsing hook [filesystems]
    :: Generating module dependencies
    :: Generating image '/boot/kernel26.img'...usage: gzip [-cdfhlLnNtvV19] [-S suffix] [file ...]
    FAILED
    ==> FAIL
    ==> Building image "fallback"
    ==> Running command: /sbin/mkinitcpio -k 2.6.18-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img
    :: Begin build
    :: Parsing hook [base]
    :: Parsing hook [udev]
    :: Parsing hook [ide]
    :: Parsing hook [scsi]
    :: Parsing hook [sata]
    :: Parsing hook [usbinput]
    :: Parsing hook [raid]
    :: Parsing hook [filesystems]
    :: Generating module dependencies
    :: Generating image '/boot/kernel26-fallback.img'...usage: gzip [-cdfhlLnNtvV19] [-S suffix] [file ...]
    FAILED
    ==> FAIL
    something is screwy here.

  • BADI : Substitution to determine segments based on MCH  [VERY VERY IMP]

    Hi Guys,
    I have to activate a BADI or a Substitution to determine segments based on MCH. Below mentioned are some technical details for BADI. Please try and use BADI; if BADI doesn't work we can use Substitution.
    Definition Name: AC_DOCUMENT
    Method : CHANGE_INITIAL
    Determine segment based on MCH? We will have to determine this using a custom table.
    Can any one kindly please help me on this. It's very urgent.
    my mail id is [email protected]
    I will REWARD points for helpful answers.
    Thanks and Regards,
    Sundeep.

    check the reply of ur Same Post .
    regards
    prabhu

  • InfoSpoke BAdI Substitution

    I would be grateful for any help with the following.
    I have created an InfoSpoke based on a GL line item cube
    I want to (simply) transform the output data and have set this up OK on the Transformation tab
    so I have a Target Structure (that I've amended as necessary)
    and I have a Addin implementation
    but when I double click on the Addin implementation to go to the Business Add-in Builder
    on the Interface tab I can select Formula
    but when I double-click on the Method TRANSFORM to go to the Formula Builder
    the only option I have is Create Condition whereas what I want is to Create Substitution.
    Any ideas on  how to get to the Create Substitution ?
    Many thanks

    Check if this is helpful:
    BADI in InfoSpoke

  • F110  BADI/exit/BTE

    Hi All,
    My requirement is to is to trigger work flow after payment run F110 is success full.
    I know that thers is no standard workflow for the same so, i have to define my own and call from there..
    My question: Is there any exit/BADI/ Substitution to stop the Payment run program
    After payment button executed so that i can able to get that data and send it to work flow. Is yes please let me know some details..
    Thx

    these are teh badi's
    FI_F110_SCHEDULE_JOB
    Exits
    FDTAX001  Enhancement to Transaction FDTA (event after the downlo
    FEDI0002  Function exits for EDI DOCS in FI - Incoming pyt adv.no
    FEDI0003  Function exits for EDI docs in FI - Save PEXR segments
    FEDI0004  Function exits for EDI docs in FI - particular events
    FEDI0006  Function Exits for EDI-docs in FI: Save IDCR Segments
    RFFOX003  Frame for user exit RFFOX003 (in program RFFOM100)
    RFFOX041  Framework for user exit RFFOX041 (in program RFFOBE_I)
    RFFOX042  Framework for user exit RFFOX042 (in program RFFOBE_E)
    RFFOX043  Framework for user exit RFFOX043 (in program RFFOBE_D)
    RFFOX061  Frame for user exit RFFOX061 (in program RFFOCH_P)
    RFFOX062  Frame for user exit RFFOX062 (in program RFFOCH_P)
    RFFOX063  Frame for user exit RFFOX063 (in program RFFOCH_P)
    RFFOX064  Frame for user exit RFFOX064 (in program RFFOCH_P)
    RFFOX065  Frame for user exit RFFOX065 (in program RFFOCH_P)
    RFFOX066  Frame for user exit RFFOX066 (in program RFFOCH_P)
    RFFOX071  Frame for user exit RFFOX071 (in program RFFOCH_U)
    RFFOX072  Frame for user exit RFFOX072 (in program RFFOCH_U)
    RFFOX073  Frame for user exit RFFOX073 (in program RFFOCH_U)
    RFFOX074  Frame for user exit RFFOX074 (in program RFFOCH_U)
    RFFOX075  Frame for user exit RFFOX075 (in program RFFOCH_U)
    RFFOX081  Frame for user exit RFFOX081 (in program RFFOF__T)
    RFFOX082  Frame for user exit RFFOX082 (in program RFFOF__T)
    RFFOX100  Frame for user exit RFFOX100 (in program RFFOUS_T)
    RFFOX101  Frame for user exit RFFOX101 (in program RFFOUS_T)
    RFFOX102  Frame for user exit RFFOX102 (in program RFFOUS_T)
    RFFOX103  Frame for user exit RFFOX103 (in program RFFOUS_T)
    RFFOX104  user exit
    RFFOX105  Frame for user exit RFFOX105 (in program RFFOUS_T)
    RFFOX200  Frame for user exit RFFOX200 (in program RFFONZ_T)
    RFFOX210  Frame for user exit RFFOX210 (in program RFFOAU_T)
    RFFOX211  Frame for user exit RFFOX211 (in program RFFONZ_T)
    RFFOX230  General program for user exit RFFOX230 (in program RFFO
    RFFOX240  Enhancement for User Exit 240 (RFFOAT_P)
    RFFOX250  Enhancement for User Exit 250 (RFFODK_E)
    RFFOX901  Framework for user exit RFFOX901 (in program RFFOM100)
    RFFOX902  Framework for user exit RFFOX902 (in program RFFOM100)

  • FMS on FreeBSD!

    Hey, i have tried to install FMS on FreeBSD 6.1 by emulating
    fc4... the install went well, but i cant start the server.
    I just get the message:
    getconf: no such configuration parameter
    `GNU_LIBPTHREAD_VERSION'
    ./server: 49: Syntax error: Bad substitution
    Can someone see a solution to this?
    Regards Little-Devil

    Hi,
    This Activation Key is only for identification purposes. In most cases, you will not have to use it. Once you subscribe to FMS on AWS, you are ready to go and use FMS AMI's.
    Also, FMS on AWS does NOT require any License or Key. It works on a separate Licensing model.
    Thanks!

  • Oracle Data Integrator does not start

    Hi,
    I just installed ODI 11g (11.1.1.7.0), and successfully created repositories with rcu.
    But I have problems startgin the application itself. The environment may be the issue :
    OS - Debian Wheezy 64bits
    java - version "1.6.0_27"
    OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1)
    OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
    JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64 -> points to jdk folder adding '/bin' to the path, which contains the java executable
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 -> oracle database home
    ODI installed in /opt/ODI, and altered with CHMOD -R 775 /opt/ODI ('oracle' user, used for installation, is the owner)
    (May not be secure, but is for evaluation only.)
    I try to run ODI :
    fre@demo$cd /opt/ODI/oracledi/client
    fre@demo$./odi.sh
    Result :
    Oracle Data Integrator 11g
    Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
    ./odi: 281: ../../ide/bin/ide.conf: APP_VM_OPTS[0]=-Xmx640M: not found
    ./odi: 281: ../../ide/bin/ide.conf: APP_VM_OPTS[0]=-Xms128M: not found
    ./odi: 281: ../../ide/bin/ide.conf: APP_VM_OPTS[0]=-Xverify:none: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-XX:MaxPermSize=256M: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Doracle.core.ojdl.logging.config.file=ODI-logging-config.xml: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Dnative.canonicalization=false: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Doracle.security.jps.config=./jps-config.xml: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Doracle.odi.studio.ess=false: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Dide.AssertCheckingDisabled=true: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Dide.AssertTracingDisabled=true: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-DLOG_FILE=studio.log: not found
    ./odi: 281: /opt/ODI/oracledi/client/odi/bin/odi.conf: APP_VM_OPTS[0]=-Dsun.java2d.noddraw=true: not found
    ./odi: 281: ./odi: APP_VM_OPTS[0]=-Dide.conf="/opt/ODI/oracledi/client/odi/bin/odi.conf": not found
    ./odi: 281: ./odi: APP_VM_OPTS[0]=-Dide.startingcwd="/opt/ODI/oracledi/client/odi/bin": not found
    ./odi: 810: ./odi: Bad substitution
    I will appreciate any idea to help me solving this out !
    Thanks a lot,
    Fred
    Edited by: Fred1018 on 26-May-2013 09:17

    Hi,
    My odi.conf looks the same as yours :
    IncludeConfFile ../../ide/bin/ide.conf
    AddVMOption -XX:MaxPermSize=256M
    AddVMOption -Doracle.core.ojdl.logging.config.file=ODI-logging-config.xml
    AddVMOption -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
    AddVMOption -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration
    AddJavaLibFile ../../../../oracledi.sdk/lib/ojdl.jar
    AddJavaLibFile ../../../../oracledi.sdk/lib/dms.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/log4j-1.2.8.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/odi_hfm.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/odihapp_common.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/ess_es_server.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/ess_japi.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/odihapp_essbase.jar
    AddJavaLibFile ../../jdev/extensions/oracle.odi.navigator/lib/odihapp_planning.jar
    AddVMOption -Dnative.canonicalization=false
    AddVMOption -Doracle.security.jps.config=./jps-config.xml
    AddVMOption -Doracle.odi.studio.ess=false
    AddVMOption -Dide.AssertCheckingDisabled=true
    AddVMOption -Dide.AssertTracingDisabled=true
    AddVMOption -DLOG_FILE=studio.log
    AddVMOption -Dsun.java2d.noddraw=true
    SetJavaHome /usr/lib/jvm/java-6-openjdk-amd64
    About access rights : if I use "oracle" user, which is the owner of the ODI folder and its content, the result is the same. I can't figure out why it is not finding a thing ?
    Do you have more suggestions I could try ?
    Thanks a lot !
    Best regards,
    Fred

  • Can I copy files – but with certain restrictions?

    I have just finished a large project, the archives of which involves about 5000 "base" files, stored on about 80 CDs and 50 DVDs, involving about 50,000 files in total. Each of the "base" files may have had up to 30 incremental versions. i.e. a certain text file may have undergone revision 23 times, and each revision was saved and archived to (probably) a different disk, with a different suffix – a, b, c and so on. But sometimes the suffix didn't change even though the file was edited. I might have done a bit more dust removal on an image and just overwrote the old file (already archived), and so the new one was archived on a different disk.
    I now have 130 disks from which I would like to extract all the files and collapse them to one large archive that will probably span about 20 disks by the time I delete some files not needed. That way I can easily search for all versions of, say, GB097, by going to the particular DVD that has the "G" files on it. Up would come:
    GB097
    GB097a
    GB097b
    GB097b-1
    GB097b-2
    GB097c
    ... and so on.
    This is what I would like to do:
    1. Grab the first archive disk, open every folder, and copy all the files to the one folder on a hard drive.
    2. Open the second disk and repeat step (1), but with these two provisos.
    (a) If a file is identical to a previously copied file (maybe I archived it twice), the file isn't copied. However...
    (b) If a file has the same name as a previously copied file, but the data within that file is different (i.e. I removed some dust from an image file, but left the name unchanged), I'd like that file to be copied with a numbered suffix, the same way that Trash treats identically named files.
    Any suggestions how I could do this?

    Back again. This is the Terminal output when run on my +Duplicates Copy+ folder:
    Last login: Thu May 20 13:28:30 on ttyp1
    Welcome to Darwin!
    jenny-pearces-imac-g5:~ Jenny$ chmod +x /Users/Jenny/Desktop/Bash\ Test\ Documents/BashTest.txt
    jenny-pearces-imac-g5:~ Jenny$ /Users/Jenny/Desktop/Bash\ Test\ Documents/BashTest.txt /Users/Jenny/Desktop/Duplicates\ copy/
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 1: ${filePaths${count}}: bad substitution
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 17: fileSum0=d41d8cd98f00b204e9800998ecf8427e: command not found
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 1: ${filePaths${count}}: bad substitution
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 17: fileSum1=d41d8cd98f00b204e9800998ecf8427e: command not found
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 1: ${filePaths${count}}: bad substitution
    /Users/Jenny/Desktop/Bash Test Documents/BashTest.txt: line 17: fileSum2=d41d8cd98f00b204e9800998ecf8427e: command not found
    jenny-pearces-imac-g5:~ Jenny$
    I'm not sure it's worth spending much more time on this. However, if you're prepared to keep posting, JJJ, I'll keep testing.
    *SCRIPT AFTER THE EDIT*
    #!/bin/bash
    declare -i count=0
    declare -a fileSum filePaths
    # Main folder can be declared on the command line or if not then use /testpix
    MainFolder="${1:-/testpix}"
    # Set the internal field separator to newline to preserve spaces in file paths
    IFS=$'\n'
    # Use 'find' to create a list of files within the folders.
    filePaths=( $( find "${MainFolder}" -type f \! -name ".*" ) )
    # Get an MD5 checksum for each file's combined content of both data and resource forks
    for file in ${filePaths[*]} ; do
    fileSum${count}=$( cat "${filePaths${count}}" "${filePaths${count}}/rsrc" | md5 | cut -d'=' -f 2)
    let count+=1
    done
    # For each file, check for a duplicate checksum and if found, move the matching file to the user's trash folder
    # Rename files with duplicate names by appending #XX
    for ((i=0;i<${count};i++)) ; do
    [ -z "${filePaths[${i}]}" ] && continue
    dupecount=1
    for ((j=0;j<${count};j++)) ; do
    [ -z "${filePaths[${j}]}" ] && continue
    if [ "${fileSum[${i}]}" = "${fileSum[${j}]}" -a ${i} -ne ${j} ] ; then
    mv "${filePaths[${j}]}" ~/.Trash && filePaths[${j}]='' && fileSum[${j}]=''
    elif [ $(basename "${filePaths[${i}]}") = $(basename "${filePaths[${j}]}") -a ${i} -ne ${j} ] ; then
    let dupecount+=1
    dirname=$(dirname "${filePaths[${j}]}")
    fullfilename=$(basename "${filePaths[${i}]}")
    extension="${fullfilename##*.}"
    filename="${fullfilename%.*}"
    until [ ! -e "${dirname}/${filename} #${dupecount}.${extension}" ] ; do
    let dupecount+=1
    done
    mv "${filePaths[${j}]}" "${dirname}/${filename} #${dupecount}.${extension}"
    filePaths[${j}]="${dirname}/${filename} #${dupecount}.${extension}"
    fi
    done
    done
    exit 0

  • Linux Host Concurrent Program

    Hi All,
    I am calling PL/SQL procedure from my SHELL Script, it was working fine for UNIX O/S but giving me following error now in LINUX:
    "Conncurrent program ends with an Error and error is as Follow"
    line 21: bad substitution: no closing "`" in `
    Here is my Shell Script:
    #!/bin/sh
    # Script runs the data load #
    filename="XX_CHAMP_VENDOR_DATA.csv"
    sqlldr $FCP_LOGIN control=$XBOL_TOP/bin/XX_CHAMP_VENDOR_CTL.ctl data=$XBOL_TOP/bin/$filename
    # Script move the file to archive folder #
    backup_file=$filename.bck.`date +"%Y%m%d%H%M"`
    mv $XBOL_TOP/bin/$filename $INTERFACE_HOME/incoming/processed/$backup_file
    # Script insert data into MTL_TRX_INTERFACE from Staging Table #
    sqlplus $FCP_LOGIN <<EOF
    execute APPS.xx_champ_po_vendors;
    exit 0
    EOF`
    # End of script
    Please let me know what to do?
    Thanks

    I changed the code with the following:
    sqlplus -s << EOF1
    $LOGIN
    #dbms_output.put_line('Control Totals do not match, data has been deleted from the staging tables...');
    BEGIN
    APPS.XX_CHAMP_PO_VENDORS;
    dbms_output.put_line('Execution Ended...');
    END;
    EOF1
    #export PP
    Now concurrent program is showing successful but in the LOG file it displays the following message:
    Invalid option.
    Usage: CONNECT <username> [AS SYSDBA|SYSOPER]
    Invalid option.
    Usage: CONNECT <username> [AS SYSDBA|SYSOPER]
    Enter password:
    ERROR:
    ORA-01005: null password given; logon denied
    unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

  • Initscripts 2011.06.3-1 - error

    Hi all,
    Hi getting an error on /etc/rc.d/functions, line #74
    Something like
    $(MC_MAIN): bad substitution
    Aditionally, setting the timezone fails during boot
    Has it been already reported?
    Regards,
    - aurocha
    Last edited by aurocha (2011-06-07 09:30:15)

    Reported.   Changed ${$MC_MAIN} to ${MC_MAIN} on that line.

  • FB60 Enhancement - BADI / User Exit / Substitution

    I have the following requirement:
    <b>When an invoice is posted using transaction FB60, based on GL Account entered, the line item text should be populated with the vendor name/number.</b>
    I searched the forum and found that some of you have recommended to use 'substitutions'. But I am not familar with those and I am not sure if that will provide me a solution. An user exit or BADI would be great. Please help me out!
    Thanks,
    Sam

    Hi
    Just I said you have to define an exit like this:
    - Define LIFNR as global data
    DATA: LIFNR TYPE LIFNR.
    FROM Z001.
    DATA NAME LIKE LFA1-NAME1
    IF BSEG-KOART = 'K'.
      LIFNR = BSEG-LIFNR
    ELSE.
    IF NOT LIFNR IS INITIAL.
    SELECT SINGLE NAME1 FROM LFA1 INTO NAME
    WHERE LIFNR = LIFNR.
    CONCATENATE LIFNR '/' NAME INTO bseg-sgtx 
    ENDIF.
    ENDFORM.
    In this case use SYST-TCODE = FB60 as prerequisite, so when the item is Vendor item you'll store the Vendor Code and if it's G/L item you'll create the text.
    You can also create an substitution at the complete document, in this case:
    FROM Z001 bool_data TYPE gb002_015.
    DATA: LIFNR LIKE LFA1-LIFNR,
          NAME  LIKE LFA1-NAME1.
    LOOP AT bool_data-bseg INTO bseg where KOART = 'K'.
    LIFNR = BSEG-LIFNR.
    EXIT.
    ENDLOOP.
    IF NOT LIFNR IS INITIAL.
    SELECT SINGLE NAME1 FROM LFA1 INTO NAME
    WHERE LIFNR = LIFNR.
    LOOP AT bool_data-bseg INTO bseg where KOART = 'S'.
    CONCATENATE LIFNR '/' NAME INTO bseg-sgtx 
    MODIFY bool_data-bseg FROM BSEG.
    ENDLOOP.
    ENDIF.
    ENDFORM.
    Max

  • BADI Workflow substitution - restrictions customization

    Hello Friends,
    I am currently working on a workflow approval migration Project  on SAP ECC 6.0
    I am trying to customize substitution process.
    > I need to enforce end validity date while users are assigning substitutes.
    > Based on activity groups/roles , I need to restrict substitution assignment.
    End users would use : SBWP
    and IT team would use RH_SUBSTITUTES_LIST program to maintain substitutes.
    please suggest how this can be acheived .
    Does a BADI  implementation related to : WF_SUBSTITUTE  would work ?
    Or is there a BADI more appropriate for RH_SUBSTITUTES_LIST ?
    thanks for your inputs.
    Raghu V

  • PGI: Profit Center Substitution  / BAdI

    Hello Experts!
    I am facing a problem in applying an Enhancement. The requirement is to substitute profit center of the receivng plant (for freight line item - accounting docuement) with the profit center of the supplying plant while doing the PGI.
    As per my knowledge, there are two ways to acheive this:
    One is to write a FI Substitution exit. I have done this using GGB1 / OBBH both at Line Item and Complete Document level. The Substitution exit has BSEG structure in scope, but it doesn't gets triggered at all. I guess FI Substitutions work only for diret FI postings and not for postings which involve integration with other modules (please correct if I am wrong). So during PGI, it is not getting triggered, for Statistical Posting t.code it works.
    Second way is to implement the BAdI AC_DOCUMENT I tried implementing the BAdI and putting a breakpoint. It comes into play while doing a PGI but the data available in scope doesn't contains required fields (PRCTR); so we are not able to substitute the profit center using this. According to an SAP note too, the BAdI can be used to acheive this.
    Please help on this.
    Thanks and Regards,
    Aabhas K Vishnoi

    Hi,
    Go through the link
    https://forums.sdn.sap.com/click.jspa?searchID=12702563&messageID=4861653
    U can use the User-Exit: EXIT_SAPLV60B_008
    And write required code in Include ZXVVFU08
    Regards,
    Raj.

  • BADI / EXIT or SUBSTITUTION for F-28

    Hello Gurus,
    Please help me with my problem.
    I need to change the data of items in F-28 posting.
    I already tried the following exits below:
    RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00 Line item display: Checking of selection conditions
    RFKORIEX Automatic correspondence
    SAPLF051 Workflow for FI (pre-capture, release for payment)
    F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002 FIDCC1: Change IDoc/do not send
    F050S003 FIDCC2: Change IDoc/do not send
    F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001 Balance Sheet Adjustment
    FARC0002 Additional Checks for Archiving MM Vendor Master Data
    I also tried the following BADis:
    FI_RES_ITEM_CURRENCY
    AC_QUANTITY_GET
    FMRE_BUS_PROCESS
    FAGL_SET_SEGMENT
    GLT0_REPLACE_ASGMT
    GLT0_CLR_ASGMT
    FAGL_DERIVE_SEGMENT
    GLT0_CLEARING_ITEMS
    EXIT_XFMPR1_001
    UKM_R3_ACTIVATE
    UKM_FILL
    UKM_R3_ACTIVATE
    CO_DOCUMENT_INFO
    Unfortunately, I cannot changed the data of the items.
    Please help.
    Thanks!
    Pat

    Hello Wolfgang,
    It works! Thank you very much... I think almost all FI transaction can use this BTE. I'll just filter it by transaction code.
    Thanks Again.
    Regards,
    Patrick

  • BADI / EXIT or SUBSTITUTION for F-28 or F-32

    Hello All,
    Can someone help me, please?
    I have to save the doc number when the transaction F-28 or F-32 is saving the document.
    I found some BADI's and Exit's, but anyone can't solve my problem... I've put a break-point in wich one, and only one BADI and only one EXIT stop, and this BADI and EXIT is before the doc number to be generated.
    Has someone any ideia, please???
    Thanks in advance.
    Fernando.

    Hi,
    Check this as an alternative.
    I dont know whether this will suit your requirement or not.
    Go to CDHDR table and give the tcode F-28 or F-32 and fetch the document numbers and give the change indicator as I - Insert. You have to write the program and schedule it in back ground and update where ever you want.
    Regards,
    Venkatesh.

Maybe you are looking for

  • Unable to deploy example 'banking' application on weblogic, please help...

    Hi, I have downloaded the example 'banking.zip' and have installed it. I have followed all given steps in the tutorial, but I am unable to see the login page. I am also not able to see the ejb and web application descriptor file from the admin consol

  • Unable to install Java 2 Platform Standard Edition Development Kit 1.4.2_11

    I am unable to install Java 2 Platform Standard Edition Development Kit 1.4.2_11 and NetBeans IDE 5.0 on Windows 98. I get the following message: Java 2 Platform Standard Edition Development Kit 1.4.2_11 cannot be installed on your computer because c

  • Call function zxyz with destination g_dest.

    Hi Group, What happens is when I double  click on this FM zxyz it says that it doesnt exist and do you want to create an object, any ideas why its saying like that? This is the same code running of live systems, but on the test environment it says th

  • Final Cut Pro Studio 2 Install

    Hello I purchased my G4 Dual 1.25 Ghz with 1GB of memory about a year ago. It had installed Final Cut Pro Studio 1 (FCP 5) at the time with all the other programs. Recently after I upgraded my Quicktime to 7.6 My DVD Studio Pro stopped working. After

  • Advantage of ON PREBUILT in Materialized views

    Can someone please provide me the advantages of using the ON PREBUILT option over regular method in REFRESH COMPLETE materialized views I am new to this Mviews and my requirement is to reduce the load on DB in the environment where both the productio