Syst fields

What is the diff between SY-TABIX and SY-INDEX?

SY-INDEX
SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass.
SY-TABIX
Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.
·        APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.
·        COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.
·        LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.
·        READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.
·        SEARCH  FOR sets SY-TABIX to the index of the table row, in which the search string was found.

Similar Messages

  • Missing SYST fields in the table GB01

    Hi All,
    We have a subsitution that work fine in the foreground.
    but when we trigger the program in the background, it does not trigger the substituion.
    At the prequisete level, i dont seem to have SYST-CPROG in the abap system fields in the substituion.
    I have checked the Table GB01 and can see only a few entries.
    How do i get this updted to the GB01 table.
    i DId try V_GB01C to check if we can update here, but it does not allow me

    Hi Christian,
    wehn running in the background it is having the syst t-code as SM37
    How do i get to updat the GB01 table with SYST-CPROG

  • Upgrade Stopped - Unable to logon to system

    Windows 2003 Server 64bit , Sql 2005, Upgrade erp2004 -> erp2005.
    Upgrade has stopped in phase startsap_nbas, and although the system will start you are unable to logon due to the error "error when initialising the work area SYST".
    On investigation there seems to be a problem caused by the datatype change of field syst-modno (changed from char to int4 during 640->700). The trace for w0 is
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Sat Jun 30 09:46:01 2007
    B  create_con (con_name=R/3)
    B  Loading DB library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' ...
    B  Library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' loaded
    B  Version of 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' is "700.08", patchlevel (0.109)
    B  New connection 0 created
    M sysno      00
    M sid        DEV
    M systemid   562 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    116
    M intno      20050900
    M make:      multithreaded, ASCII, 64 bit, optimized
    M pid        3124
    M
    M  kernel runs with dp version 232(ext=109) (@(#) DPLIB-INT-VERSION-232)
    M  length of sys_adm_ext is 364 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 3124) [dpxxdisp.c   1301]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          12384     (952)
    M  DpShMCreate: sizeof(tm_adm)          4986416     (24808)
    M  DpShMCreate: sizeof(wp_ca_adm)          18000     (60)
    M  DpShMCreate: sizeof(appc_ca_adm)     6000     (60)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552048/552064
    M  DpShMCreate: sizeof(comm_adm)          552064     (1088)
    M  DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    M  DpShMCreate: sizeof(slock_adm)          0     (104)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1616)
    M  DpShMCreate: sizeof(wall_adm)          (25648/36736/64/104)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 0000000010640050, size: 5644672)
    M  DpShMCreate: allocated sys_adm at 0000000010640050
    M  DpShMCreate: allocated wp_adm at 0000000010641BF0
    M  DpShMCreate: allocated tm_adm_list at 0000000010644C50
    M  DpShMCreate: allocated tm_adm at 0000000010644CB0
    M  DpShMCreate: allocated wp_ca_adm at 0000000010B062E0
    M  DpShMCreate: allocated appc_ca_adm at 0000000010B0A930
    M  DpShMCreate: allocated comm_adm at 0000000010B0C0A0
    M  DpShMCreate: system runs without slock table
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 0000000010B92D20
    M  DpShMCreate: allocated gw_adm at 0000000010B92DA0
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 0000000010B92DD0
    M  DpShMCreate: allocated wall_adm at 0000000010B92DE0
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation view
    X  <EsNT> Using memory model view.
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Sat Jun 30 09:46:02 2007
    M  ThInit: running on host mk2dev
    M  calling db_connect ...
    C  Thread ID:3144
    C  Thank You for using the SLOLEDB-interface
    C  Using dynamic link library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll'
    C  dbmssslib.dll patch info
    C    patchlevel   0
    C    patchno      116
    C    patchcomment MSSQL: Transaction inconsistencies HOTNEWS (1067103)
    C  np:(local) connection used on MK2DEV
    C  CopyLocalParameters: dbuser is 'dev'
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.
    C  Provider Release:9.00.3042.00
    C  Using Provider SQLNCLI
    C  OpenOledbConnection: MARS property was set successfully.
    C  Cache sizes: header 88 bytes, 20000 names (28160000 bytes), 500 dynamic statements (2756000 bytes), total 30916088 bytes
    C  Using shared procedure name cache MK2DEV_DEVDEV_DEV_MEM initialized by another process.
    C  Connected to db server : [MK2DEV] server_used : [np:(local)], dbname: DEV, dbuser: dev
    C  pn_id:MK2DEV_DEVDEV_DEV
    C  Using MARS (on sql 9.0)
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20070630 094602 MK2DEV         
    C  The IRow interface is supported by this OLEDB provider
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif

    I Sat Jun 30 09:46:05 2007
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 0000000017820050, size: 5000000)
    M  SHM_ROLL_AREA          (addr: 000007FFE6B90050, size: 218726400)
    M  SHM_PAGING_AREA          (addr: 0000000017CF0050, size: 95682560)

    M Sat Jun 30 09:46:06 2007
    M  SHM_ROLL_ADM               (addr: 000000001D840050, size: 2183680)
    M  SHM_PAGING_ADM          (addr: 000000001DA60050, size: 525344)
    M  ThCreateNoBuffer          allocated 324144 bytes for 1000 entries at 000000001DAF0050
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 7440 bytes (50 server) at 000000001DB40050
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation view
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B  Table statistics is switched off.
    B  dbtbxbuf: Buffer TABL  (addr: 000000001FFE0160, size: 8000000, end: 0000000020781360)
    B  dbtbxbuf: Buffer TABLP (addr: 0000000020790160, size: 2048000, end: 0000000020984160)
    B  dbexpbuf: Buffer EIBUF (addr: 00000000209A0170, size: 4096000, end: 0000000020D88170)
    B  dbexpbuf: Buffer ESM   (addr: 0000000020D90170, size: 4194304, end: 0000000021190170)
    B  dbexpbuf: Buffer CUA   (addr: 00000000211A0170, size: 2048000, end: 0000000021394170)
    B  dbexpbuf: Buffer OTR   (addr: 00000000213A0170, size: 4194304, end: 00000000217A0170)
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 0000000012E7ACA0
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  0 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 00000000298000C0
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 0000000029800460
    S    using messages for server info
    S  size of spec char cache entry: 165024 bytes (timeout 100 sec)
    S  size of open spool request entry: 1248 bytes
    S  immediate print option for implicitely closed spool requests is disabled

    A  -PXA--
    A  PXA INITIALIZATION
    A  System page size: 4kb, total admin_size: 6968kb, dir_size: 6912kb.
    A  Attached to PXA (address 000007FFF3C50050, size 200000K)
    A  abap/pxa = shared protect gen_local
    A  PXA INITIALIZATION FINISHED
    A  -PXA--

    A  ABAP ShmAdm attached (addr=000007FF4F27E000 leng=20955136 end=000007FF5067A000)
    A  >> Shm MMADM area (addr=000007FF4F64A1A0 leng=261120 end=000007FF4F689DA0)
    A  >> Shm MMDAT area (addr=000007FF4F68A000 leng=16711680 end=000007FF5067A000)
    A  RFC Destination> destination mk2dev_DEV_00 host mk2dev system DEV systnr 0 (mk2dev_DEV_00)
    A  RFC Options> H=mk2dev,S=00,d=1,
    B  table logging switched off for all clients
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 1
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects          allocated 26874 bytes at 0000000029920050
    N  SsfSapSecin: putenv(SECUDIR=E:\usr\sap\DEV\DVEBMGS00\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is e:\usr\sap\DEV\sys\exe\run\sapcrypto.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...pass SECUDIR E:\usr\sap\DEV\DVEBMGS00\sec returned 0 .
    N  ===...sucessfully completed.
    N  =================================================
    M  *** ERROR => SlicLikeyGetAllRecords: RS_OPEN failed rc=32 [sliclikey.c  988]
    M  *** ERROR => likey_init: likeyche_fill_buffer: couldn't get the list of all records from the persistence. [sliclikey.c  1269]
    M  *** ERROR => SlicLikeyInit: likey_init failed: 1 [sliclikey.c  261]
    M  *** ERROR => SAPlicense: LIKEY initialisation failed! [slicshm.c    268]
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    W    ITSP ICMAN is not active: Disable Kernel Web GUI functionality
    W  === ipl_Init() returns 2, ITSPE_DISABLED: Service is disabled (sapparam)
    W  =================================================
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.

    A Sat Jun 30 09:46:26 2007
    A  *** ERROR => Table SYST        Field MODNO : Type should be 172, but is 40. [sapicc.c     1082]
    A  TH VERBOSE LEVEL FULL
    A  ** RABAX: level LEV_RX_PXA_RELEASE_MTX entered.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_MTX completed.
    A  ** RABAX: level LEV_RX_COVERAGE_ANALYSER entered.
    A  ** RABAX: level LEV_RX_COVERAGE_ANALYSER completed.
    A  ** RABAX: level LEV_RX_ROLLBACK entered.
    A  ** RABAX: level LEV_RX_ROLLBACK completed.
    A  ** RABAX: level LEV_RX_DB_ALIVE entered.
    A  ** RABAX: level LEV_RX_DB_ALIVE completed.
    A  ** RABAX: level LEV_RX_HOOKS entered.
    A  ** RABAX: level LEV_RX_HOOKS completed.
    A  ** RABAX: level LEV_RX_STANDARD entered.
    A  ** RABAX: level LEV_RX_STANDARD completed.
    A  ** RABAX: level LEV_RX_STOR_VALUES entered.
    A  ** RABAX: level LEV_RX_STOR_VALUES completed.
    A  ** RABAX: level LEV_RX_C_STACK entered.
    A  ** RABAX: level LEV_RX_C_STACK completed.
    A  ** RABAX: level LEV_RX_MEMO_CHECK entered.
    A  ** RABAX: level LEV_RX_MEMO_CHECK completed.
    A  ** RABAX: level LEV_RX_AFTER_MEMO_CHECK entered.
    A  ** RABAX: level LEV_RX_AFTER_MEMO_CHECK completed.
    A  ** RABAX: level LEV_RX_INTERFACES entered.
    A  ** RABAX: level LEV_RX_INTERFACES completed.
    A  ** RABAX: level LEV_RX_GET_MESS entered.
    A  ** RABAX: level LEV_RX_GET_MESS completed.
    A  ** RABAX: level LEV_RX_INIT_SNAP entered.
    A  ** RABAX: level LEV_RX_INIT_SNAP completed.
    A  ** RABAX: level LEV_RX_WRITE_SYSLOG entered.
    A  ** RABAX: level LEV_RX_WRITE_SYSLOG completed.
    A  ** RABAX: level LEV_RX_WRITE_SNAP entered.
    A  ** RABAX: level LEV_SN_END completed.
    A  ** RABAX: level LEV_RX_SET_ALERT entered.
    A  ** RABAX: level LEV_RX_SET_ALERT completed.
    A  ** RABAX: level LEV_RX_COMMIT entered.
    A  ** RABAX: level LEV_RX_COMMIT completed.
    A  ** RABAX: level LEV_RX_SNAP_SYSLOG entered.
    A  ** RABAX: level LEV_RX_SNAP_SYSLOG completed.
    A  ** RABAX: level LEV_RX_RESET_PROGS entered.
    A  ** RABAX: level LEV_RX_RESET_PROGS completed.
    A  ** RABAX: level LEV_RX_STDERR entered.
    A  Sat Jun 30 09:46:26 2007

    A  ABAP Program ????????????????????????????????????????.
    A  Source                                          Line 0.
    A  Error Code SYSTEM_CANT_CLEAR.
    A  Module  $Id: //bas/700_REL/src/krn/runt/abinit.c#16 $ SAP.
    A  Function ab_isyst Line 1406.
    A  ** RABAX: level LEV_RX_STDERR completed.
    A  ** RABAX: level LEV_RX_RFC_ERROR entered.
    A  ** RABAX: level LEV_RX_RFC_ERROR completed.
    A  ** RABAX: level LEV_RX_RFC_CLOSE entered.
    A  ** RABAX: level LEV_RX_RFC_CLOSE completed.
    A  ** RABAX: level LEV_RX_IMC_ERROR entered.
    A  ** RABAX: level LEV_RX_IMC_ERROR completed.
    A  ** RABAX: level LEV_RX_DATASET_CLOSE entered.
    A  ** RABAX: level LEV_RX_DATASET_CLOSE completed.
    A  ** RABAX: level LEV_RX_RESET_SHMLOCKS entered.
    A  ** RABAX: level LEV_RX_RESET_SHMLOCKS completed.
    A  ** RABAX: level LEV_RX_ERROR_SAVE entered.
    A  ** RABAX: level LEV_RX_ERROR_SAVE completed.
    A  ** RABAX: level LEV_RX_ERROR_TPDA entered.
    A  ** RABAX: level LEV_RX_ERROR_TPDA completed.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_RUDI entered.
    A  ** RABAX: level LEV_RX_PXA_RELEASE_RUDI completed.
    A  ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP entered.
    A  ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP completed.
    A  ** RABAX: level LEV_RX_END entered.
    A  ** RABAX: level LEV_RX_END completed.
    A  ** RABAX: end no http/smtp
    A  ** RABAX: end RX_BTCHLOG|RX_VBLOG
    A  Error when initializing the work area SYST..
    and then this error repeats continuously....
    As this is during the 'Switch' phases I checked the table DD03L and DD03L~(shadow) and altered to live table accordingly to see if this eliminated the error. The trace describes the expectation of type 172 not 40 - but not sure which one the kernel wants - i even tried to revert the shadow table to char1.
    I would appreciate any pointers that you may have.
    Thanks.

    Hello,
    Were you able to proceed. We are also facing a similar problem. The EU_IMPORT phase has shutdown the SAP instance and then upon starting it does not allow you to login.
    The message is "error when initializing the work area SYST"
    Pls let us know how did you get rid of this issue.
    Pls also reply to my email address [email protected]
    Thanks in advance.
    Regards
    -Charu

  • Upgrade Stopped - Unable to logon system

    Windows 2003 Server 64bit , Sql 2005, Upgrade erp2004 -> erp2005.
    Upgrade has stopped in phase startsap_nbas, and although the system will start you are unable to logon due to the error "error when initialising the work area SYST".
    On investigation there seems to be a problem caused by the datatype change of field syst-modno (changed from char to int4 during 640->700). The trace for w0 is
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL 1
    ACTIVE TRACE COMPONENTS all, MJ
    B
    B Sat Jun 30 09:46:01 2007
    B create_con (con_name=R/3)
    B Loading DB library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' ...
    B Library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' loaded
    B Version of 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll' is "700.08", patchlevel (0.109)
    B New connection 0 created
    M sysno 00
    M sid DEV
    M systemid 562 (PC with Windows NT)
    M relno 7000
    M patchlevel 0
    M patchno 116
    M intno 20050900
    M make: multithreaded, ASCII, 64 bit, optimized
    M pid 3124
    M
    M kernel runs with dp version 232(ext=109) (@(#) DPLIB-INT-VERSION-232)
    M length of sys_adm_ext is 364 bytes
    M ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 3124) [dpxxdisp.c 1301]
    I MtxInit: 30000 0 0
    M DpSysAdmExtCreate: ABAP is active
    M DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M DpShMCreate: sizeof(wp_adm) 12384 (952)
    M DpShMCreate: sizeof(tm_adm) 4986416 (24808)
    M DpShMCreate: sizeof(wp_ca_adm) 18000 (60)
    M DpShMCreate: sizeof(appc_ca_adm) 6000 (60)
    M DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552048/552064
    M DpShMCreate: sizeof(comm_adm) 552064 (1088)
    M DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    M DpShMCreate: sizeof(slock_adm) 0 (104)
    M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M DpShMCreate: sizeof(file_adm) 0 (72)
    M DpShMCreate: sizeof(vmc_adm) 0 (1616)
    M DpShMCreate: sizeof(wall_adm) (25648/36736/64/104)
    M DpShMCreate: sizeof(gw_adm) 48
    M DpShMCreate: SHM_DP_ADM_KEY (addr: 0000000010640050, size: 5644672)
    M DpShMCreate: allocated sys_adm at 0000000010640050
    M DpShMCreate: allocated wp_adm at 0000000010641BF0
    M DpShMCreate: allocated tm_adm_list at 0000000010644C50
    M DpShMCreate: allocated tm_adm at 0000000010644CB0
    M DpShMCreate: allocated wp_ca_adm at 0000000010B062E0
    M DpShMCreate: allocated appc_ca_adm at 0000000010B0A930
    M DpShMCreate: allocated comm_adm at 0000000010B0C0A0
    M DpShMCreate: system runs without slock table
    M DpShMCreate: system runs without file table
    M DpShMCreate: allocated vmc_adm_list at 0000000010B92D20
    M DpShMCreate: allocated gw_adm at 0000000010B92DA0
    M DpShMCreate: system runs without vmc_adm
    M DpShMCreate: allocated ca_info at 0000000010B92DD0
    M DpShMCreate: allocated wall_adm at 0000000010B92DE0
    X EmInit: MmSetImplementation( 2 ).
    X MM global diagnostic options set: 0
    X <ES> client 0 initializing ....
    X Using implementation view
    X <EsNT> Using memory model view.
    M <EsNT> Memory Reset disabled as NT default
    X ES initialized.
    M
    M Sat Jun 30 09:46:02 2007
    M ThInit: running on host mk2dev
    M calling db_connect ...
    C Thread ID:3144
    C Thank You for using the SLOLEDB-interface
    C Using dynamic link library 'E:\usr\sap\DEV\SYS\exe\run\dbmssslib.dll'
    C dbmssslib.dll patch info
    C patchlevel 0
    C patchno 116
    C patchcomment MSSQL: Transaction inconsistencies HOTNEWS (1067103)
    C np:(local) connection used on MK2DEV
    C CopyLocalParameters: dbuser is 'dev'
    C Using Provider SQLNCLI
    C OpenOledbConnection: MARS property was set successfully.
    C Provider Release:9.00.3042.00
    C Using Provider SQLNCLI
    C OpenOledbConnection: MARS property was set successfully.
    C Cache sizes: header 88 bytes, 20000 names (28160000 bytes), 500 dynamic statements (2756000 bytes), total 30916088 bytes
    C Using shared procedure name cache MK2DEV_DEVDEV_DEV_MEM initialized by another process.
    C Connected to db server : [MK2DEV] server_used : [np:(local)], dbname: DEV, dbuser: dev
    C pn_id:MK2DEV_DEVDEV_DEV
    C Using MARS (on sql 9.0)
    B Connection 0 opened (DBSL handle 0)
    B Wp Hdl ConName ConId ConState TX PRM RCT TIM MAX OPT Date Time DBHost
    B 000 000 R/3 000000000 ACTIVE NO YES NO 000 255 255 20070630 094602 MK2DEV
    C The IRow interface is supported by this OLEDB provider
    M db_connect o.k.
    M ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif
    I
    I Sat Jun 30 09:46:05 2007
    I MtxInit: 0 0 0
    M SHM_PRES_BUF (addr: 0000000017820050, size: 5000000)
    M SHM_ROLL_AREA (addr: 000007FFE6B90050, size: 218726400)
    M SHM_PAGING_AREA (addr: 0000000017CF0050, size: 95682560)
    M
    M Sat Jun 30 09:46:06 2007
    M SHM_ROLL_ADM (addr: 000000001D840050, size: 2183680)
    M SHM_PAGING_ADM (addr: 000000001DA60050, size: 525344)
    M ThCreateNoBuffer allocated 324144 bytes for 1000 entries at 000000001DAF0050
    M ThCreateNoBuffer index size: 3000 elems
    M ThCreateVBAdm allocated 7440 bytes (50 server) at 000000001DB40050
    X EmInit: MmSetImplementation( 2 ).
    X MM global diagnostic options set: 0
    X <ES> client 0 initializing ....
    X Using implementation view
    X ES initialized.
    B db_con_shm_ini: WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B Table statistics is switched off.
    B dbtbxbuf: Buffer TABL (addr: 000000001FFE0160, size: 8000000, end: 0000000020781360)
    B dbtbxbuf: Buffer TABLP (addr: 0000000020790160, size: 2048000, end: 0000000020984160)
    B dbexpbuf: Buffer EIBUF (addr: 00000000209A0170, size: 4096000, end: 0000000020D88170)
    B dbexpbuf: Buffer ESM (addr: 0000000020D90170, size: 4194304, end: 0000000021190170)
    B dbexpbuf: Buffer CUA (addr: 00000000211A0170, size: 2048000, end: 0000000021394170)
    B dbexpbuf: Buffer OTR (addr: 00000000213A0170, size: 4194304, end: 00000000217A0170)
    M CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    S *** init spool environment
    S initialize debug system
    T Stack direction is downwards.
    T debug control: prepare exclude for printer trace
    T new memory block 0000000012E7ACA0
    S spool kernel/ddic check: Ok
    S using table TSP02FX for frontend printing
    S 0 spool work process(es) found
    S frontend print via spool service enabled
    S printer list size is 150
    S printer type list size is 50
    S queue size (profile) = 300
    S hostspool list size = 3000
    S option list size is 30
    S found processing queue enabled
    S found spool memory service RSPO-RCLOCKS at 00000000298000C0
    S doing lock recovery
    S setting server cache root
    S found spool memory service RSPO-SERVERCACHE at 0000000029800460
    S using messages for server info
    S size of spec char cache entry: 165024 bytes (timeout 100 sec)
    S size of open spool request entry: 1248 bytes
    S immediate print option for implicitely closed spool requests is disabled
    A
    A -PXA--
    A PXA INITIALIZATION
    A System page size: 4kb, total admin_size: 6968kb, dir_size: 6912kb.
    A Attached to PXA (address 000007FFF3C50050, size 200000K)
    A abap/pxa = shared protect gen_local
    A PXA INITIALIZATION FINISHED
    A -PXA--
    A
    A ABAP ShmAdm attached (addr=000007FF4F27E000 leng=20955136 end=000007FF5067A000)
    A >> Shm MMADM area (addr=000007FF4F64A1A0 leng=261120 end=000007FF4F689DA0)
    A >> Shm MMDAT area (addr=000007FF4F68A000 leng=16711680 end=000007FF5067A000)
    A RFC Destination> destination mk2dev_DEV_00 host mk2dev system DEV systnr 0 (mk2dev_DEV_00)
    A RFC Options> H=mk2dev,S=00,d=1,
    B table logging switched off for all clients
    A RFC FRFC> fallback activ but this is not a central instance.
    A
    A RFC rfc/signon_error_log = -1
    A RFC rfc/dump_connection_info = 0
    A RFC rfc/dump_client_info = 0
    A RFC rfc/cp_convert/ignore_error = 1
    A RFC rfc/cp_convert/conversion_char = 23
    A RFC rfc/wan_compress/threshold = 251
    A RFC rfc/recorder_pcs not set, use defaule value: 1
    A RFC rfc/delta_trc_level not set, use default value: 0
    A RFC rfc/no_uuid_check not set, use default value: 0
    A RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A RFC Method> initialize RemObjDriver for ABAP Objects
    M ThrCreateShObjects allocated 26874 bytes at 0000000029920050
    N SsfSapSecin: putenv(SECUDIR=E:\usr\sap\DEV\DVEBMGS00\sec): ok
    N
    N =================================================
    N === SSF INITIALIZATION:
    N ===...SSF Security Toolkit name SAPSECULIB .
    N ===...SSF trace level is 0 .
    N ===...SSF library is e:\usr\sap\DEV\sys\exe\run\sapcrypto.dll .
    N ===...SSF hash algorithm is SHA1 .
    N ===...SSF symmetric encryption algorithm is DES-CBC .
    N ===...pass SECUDIR E:\usr\sap\DEV\DVEBMGS00\sec returned 0 .
    N ===...sucessfully completed.
    N =================================================
    M *** ERROR => SlicLikeyGetAllRecords: RS_OPEN failed rc=32 [sliclikey.c 988]
    M *** ERROR => likey_init: likeyche_fill_buffer: couldn't get the list of all records from the persistence. [sliclikey.c 1269]
    M *** ERROR => SlicLikeyInit: likey_init failed: 1 [sliclikey.c 261]
    M *** ERROR => SAPlicense: LIKEY initialisation failed! [slicshm.c 268]
    N MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M JrfcVmcRegisterNativesDriver o.k.
    W =================================================
    W === ipl_Init() called
    W ITSP ICMAN is not active: Disable Kernel Web GUI functionality
    W === ipl_Init() returns 2, ITSPE_DISABLED: Service is disabled (sapparam)
    W =================================================
    E Replication is disabled
    E EnqCcInitialize: local lock table initialization o.k.
    E EnqId_SuppressIpc: local EnqId initialization o.k.
    E EnqCcInitialize: local enqueue client init o.k.
    A
    A Sat Jun 30 09:46:26 2007
    A *** ERROR => Table SYST Field MODNO : Type should be 172, but is 40. [sapicc.c 1082]
    A TH VERBOSE LEVEL FULL
    A ** RABAX: level LEV_RX_PXA_RELEASE_MTX entered.
    A ** RABAX: level LEV_RX_PXA_RELEASE_MTX completed.
    A ** RABAX: level LEV_RX_COVERAGE_ANALYSER entered.
    A ** RABAX: level LEV_RX_COVERAGE_ANALYSER completed.
    A ** RABAX: level LEV_RX_ROLLBACK entered.
    A ** RABAX: level LEV_RX_ROLLBACK completed.
    A ** RABAX: level LEV_RX_DB_ALIVE entered.
    A ** RABAX: level LEV_RX_DB_ALIVE completed.
    A ** RABAX: level LEV_RX_HOOKS entered.
    A ** RABAX: level LEV_RX_HOOKS completed.
    A ** RABAX: level LEV_RX_STANDARD entered.
    A ** RABAX: level LEV_RX_STANDARD completed.
    A ** RABAX: level LEV_RX_STOR_VALUES entered.
    A ** RABAX: level LEV_RX_STOR_VALUES completed.
    A ** RABAX: level LEV_RX_C_STACK entered.
    A ** RABAX: level LEV_RX_C_STACK completed.
    A ** RABAX: level LEV_RX_MEMO_CHECK entered.
    A ** RABAX: level LEV_RX_MEMO_CHECK completed.
    A ** RABAX: level LEV_RX_AFTER_MEMO_CHECK entered.
    A ** RABAX: level LEV_RX_AFTER_MEMO_CHECK completed.
    A ** RABAX: level LEV_RX_INTERFACES entered.
    A ** RABAX: level LEV_RX_INTERFACES completed.
    A ** RABAX: level LEV_RX_GET_MESS entered.
    A ** RABAX: level LEV_RX_GET_MESS completed.
    A ** RABAX: level LEV_RX_INIT_SNAP entered.
    A ** RABAX: level LEV_RX_INIT_SNAP completed.
    A ** RABAX: level LEV_RX_WRITE_SYSLOG entered.
    A ** RABAX: level LEV_RX_WRITE_SYSLOG completed.
    A ** RABAX: level LEV_RX_WRITE_SNAP entered.
    A ** RABAX: level LEV_SN_END completed.
    A ** RABAX: level LEV_RX_SET_ALERT entered.
    A ** RABAX: level LEV_RX_SET_ALERT completed.
    A ** RABAX: level LEV_RX_COMMIT entered.
    A ** RABAX: level LEV_RX_COMMIT completed.
    A ** RABAX: level LEV_RX_SNAP_SYSLOG entered.
    A ** RABAX: level LEV_RX_SNAP_SYSLOG completed.
    A ** RABAX: level LEV_RX_RESET_PROGS entered.
    A ** RABAX: level LEV_RX_RESET_PROGS completed.
    A ** RABAX: level LEV_RX_STDERR entered.
    A Sat Jun 30 09:46:26 2007
    A
    A ABAP Program ????????????????????????????????????????.
    A Source Line 0.
    A Error Code SYSTEM_CANT_CLEAR.
    A Module $Id: //bas/700_REL/src/krn/runt/abinit.c#16 $ SAP.
    A Function ab_isyst Line 1406.
    A ** RABAX: level LEV_RX_STDERR completed.
    A ** RABAX: level LEV_RX_RFC_ERROR entered.
    A ** RABAX: level LEV_RX_RFC_ERROR completed.
    A ** RABAX: level LEV_RX_RFC_CLOSE entered.
    A ** RABAX: level LEV_RX_RFC_CLOSE completed.
    A ** RABAX: level LEV_RX_IMC_ERROR entered.
    A ** RABAX: level LEV_RX_IMC_ERROR completed.
    A ** RABAX: level LEV_RX_DATASET_CLOSE entered.
    A ** RABAX: level LEV_RX_DATASET_CLOSE completed.
    A ** RABAX: level LEV_RX_RESET_SHMLOCKS entered.
    A ** RABAX: level LEV_RX_RESET_SHMLOCKS completed.
    A ** RABAX: level LEV_RX_ERROR_SAVE entered.
    A ** RABAX: level LEV_RX_ERROR_SAVE completed.
    A ** RABAX: level LEV_RX_ERROR_TPDA entered.
    A ** RABAX: level LEV_RX_ERROR_TPDA completed.
    A ** RABAX: level LEV_RX_PXA_RELEASE_RUDI entered.
    A ** RABAX: level LEV_RX_PXA_RELEASE_RUDI completed.
    A ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP entered.
    A ** RABAX: level LEV_RX_LIVE_CACHE_CLEANUP completed.
    A ** RABAX: level LEV_RX_END entered.
    A ** RABAX: level LEV_RX_END completed.
    A ** RABAX: end no http/smtp
    A ** RABAX: end RX_BTCHLOG|RX_VBLOG
    A Error when initializing the work area SYST..
    and then this error repeats continuously....
    As this is during the 'Switch' phases I checked the table DD03L and DD03L~(shadow) and altered to live table accordingly to see if this eliminated the error. The trace describes the expectation of type 172 not 40 - but not sure which one the kernel wants - i even tried to revert the shadow table to char1.
    I would appreciate any pointers that you may have.
    Thanks.

    Dear,
    how was the execution of EU_IMPORT* phases ?
    We have experienced some similar issues where several errors has been reported in the EU_IMPORT* phases and after several repeats, the system got the experienced inconsistency.
    We strongly guess that during these phases inconsistencies
    occured that have led to the problem with table SYST.
    Usually repeat the whole upgrade is the solution, if further issues occurs in EU_IMPORT*, you may contact SAP for further analysis. Please send me your comments.
    Lucio Rodrigues
    SAP AGS

  • How can we know the return code of BDC Program ?

    Hi All,
    Please tell me : How can we know the return code of BDC Program when being exceuted in Session or in Transaction mode.
    In my program, we are uploading data from Excel sheet to SAP via BDC
    The records that are not updated we want to create a log file.
    Now to know whether a record is updated ot not, wat syst field shloud be used?
    Its urgent....
    <b>Reward Point will be there ....</b>
    Thanks,
    Harish

    Hi harish,
    try the logic in this code ...
    i had attached input file in the end.
    TYPES: begin of errmess,
            msgnr type t100-msgnr,
            text type t100-text,
           end of errmess.
    TABLES : t100.
    DATA: BEGIN OF DD_VA01,
           AUART TYPE VBAK-AUART,
           KUNNR TYPE RV45A-KUNNR,
           BSTKD TYPE VBKD-BSTKD,
           MABNR TYPE RV45A-MABNR,
           KWMENG(2) type C,
           KBETR(2) type C,
          END OF DD_VA01.
    DATA:IT_VA01     Like TABLE OF DD_VA01,
         WA_VA01     Like LINE  OF IT_VA01,
         WA_VA01_F   Like LINE  OF IT_VA01,
         IT_BDCDATA  TYPE TABLE OF BDCDATA,
         WA_BDCDATA  Like Line  OF IT_BDCDATA,
         W_FNAME     TYPE STRING,
         messtab like bdcmsgcoll occurs 0 with header line,
         it_errmess type table of errmess,
         wa_errmess like line of it_errmess,
         err_message type string.
    data: zf1 type i,
          zc1 type c value '2',
          fn(20) type c.
    Main Code ************************************************************
    PERFORM get_input using 'C:\Documents and Settings\ic881592\Desktop\Daran_bdc_VA01-e.txt'.
    SORT IT_VA01 BY AUART KUNNR BSTKD.
    LOOP AT IT_VA01 INTO WA_VA01.
      if WA_VA01_F-AUART <> WA_VA01-AUART OR
         WA_VA01_F-KUNNR <> WA_VA01-KUNNR OR
         WA_VA01_F-BSTKD <> WA_VA01-BSTKD.
           PERFORM set_header_flag.
           PERFORM create_bdc_header_data.
      endif.
      PERFORM create_bdc_item_data.
    ENDLOOP.
    PERFORM call_transaction.
    PERFORM errorlog.
    Procedures ***********************************************************
    form get_input using w_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = W_FNAME
          HAS_FIELD_SEPARATOR = '#'
        TABLES
          DATA_TAB            = IT_VA01.
    endform.
    form call_transaction.
        PERFORM bdc_field       using 'BDC_OKCODE' '/11'.
        CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A' messages into messtab.
        refresh it_bdcdata.
    endform.
    FORM set_header_flag.
           WA_VA01_F-AUART = WA_VA01-AUART.
           WA_VA01_F-KUNNR = WA_VA01-KUNNR.
           WA_VA01_F-BSTKD = WA_VA01-BSTKD.
           if zf1 = 1.
               PERFORM call_transaction.
           endif.
           zf1 = 1.
    endform.   "set_header_flag.
    form create_bdc_header_data.
         perform bdc_dynpro      using 'SAPMV45A' '0101'.
         perform bdc_field       using 'VBAK-AUART' WA_VA01-AUART.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         perform bdc_field       using 'KUAGV-KUNNR' WA_VA01-KUNNR.
         perform bdc_field       using 'VBKD-BSTKD' WA_VA01-BSTKD.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMSSY0' '0120'.
         perform bdc_field       using 'BDC_CURSOR' '04/06'.
         perform bdc_field       using 'BDC_OKCODE' '=CHOO'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    endform. "create_bdcdata
    FORM create_bdc_item_data.
         CONCATENATE 'RV45A-KWMENG(' zc1 ')' INTO FN.
         perform bdc_field       using 'BDC_CURSOR' FN.
         perform bdc_field       using FN WA_VA01-KWMENG.
         CONCATENATE 'KOMV-KBETR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-KBETR.
         CONCATENATE 'RV45A-MABNR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-MABNR.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    ENDFORM.
    form errorlog.
      LOOP AT MESSTAB .
        if MESSTAB-MSGNR = '311' or MESSTAB-MSGTYP = 'E'.
            SELECT SINGLE msgnr text FROM T100
                            into wa_errmess
                            WHERE SPRSL = MESSTAB-MSGSPRA
                              AND ARBGB = MESSTAB-MSGID
                              AND MSGNR = MESSTAB-MSGNR.
            IF SY-SUBRC = 0.
              err_message = wa_errmess-TEXT.
              IF err_message CS '&1'.
                REPLACE '&1' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&2' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&3' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&4' WITH MESSTAB-MSGV4 INTO err_message.
              ELSE.
                REPLACE '&' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV4 INTO err_message.
              ENDIF.
              CONDENSE err_message.
              WRITE: / MESSTAB-MSGTYP, err_message .
            ELSE.
              WRITE: / MESSTAB.
            ENDIF.
        endif.
      ENDLOOP.
    endform. "errorlog
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    input file :
    OR     2148     0001235     R-1162     8     17
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     6     25
    OR     2148     0001235     R-1162     4     12
    OR     2148     0001236     R-1162     3     12
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     1     25
    OR     2148     0001236     R-1162     7     12
    OR     2148     0001236     R-1161     8     30
    OR     2148     0001236     100-400     10     25
    OR     2148     0001235     R-1161     5     30
    OR     2148     0001235     100-400     2     25
    OR     2148     0001235     R-11621     3     12
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     1     25
    OR     2148     0001235     R-1162     7     12
    OR     2148     0001235     R-1161     8     30
    OR     2148     0001235     100-400     10     25
    OR     2148     0001236     R-1162     8     17
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     6     25
    OR     2148     0001236     R-1162     4     12
    OR     2148     0001236     R-1161     5     30
    OR     2148     0001236     100-400     2     25

  • GUI_DOWNLOAD - Excel 2007 compatability mode

    Hi,
    My requirement is to output a excel file whihc should be of compatilibity mode in excel 2007.
    Right now we have WS_DOWNLOAD but i am trying to chage it to GUI_DOWNLOAD but when i do a sample porgam ..it is still getting same results as WS_DOWNLOAD.
    We use these files for uploading in frontend .. so whenever it is not compatabilty program is erroring out saying unknown format.
    Any ideas to get output in excel  2007 compatability mode?
    Sample program
    REPORT zdownload MESSAGE-ID bd.
    DATA: w_tab TYPE USR21.
    DATA: i_tab TYPE STANDARD TABLE OF USR21.
    DATA: v_subrc(2),
    v_recswritten(6).
    PARAMETERS: p_file(80)
    DEFAULT 'C:\Documents and Settings\dfgdgfdf\Desktop\Org.xls'. " i tried .xlsx but i am getting file open error 19
    DATA: filename TYPE string.
    filename = p_file.
    SELECT * FROM USR21 INTO TABLE I_TAB.
    * If text fields appear right justified or columns not lined up in
    *output set
    * TRUNC_TRAILING_BLANKS to X
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    * BIN_FILESIZE =
    filename = filename
    FILETYPE = 'ASC'
    * APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    * HEADER = '00'
    *TRUNC_TRAILING_BLANKS = 'X '
    * WRITE_LF = 'X'
    * COL_SELECT = ' '
    * COL_SELECT_MASK = ' '
    * IMPORTING
    * FILELENGTH =
    tables
    data_tab = I_TAB
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    * SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *
    IF sy-subrc <> 0.
    v_subrc = sy-subrc.
    MESSAGE e899 WITH 'File Open Error' v_subrc.
    ENDIF.
    DESCRIBE TABLE i_tab LINES v_recswritten.
    *MESSAGE i899 WITH v_recswritten "Records Written from USR21'
    Rgds
    praveen

    Hi,
    You just told that you are replacing the WS-DOWNLOAD with GUI_DOWNLOAD.
    The error which you are getting that GUI_DOWNLOAD not able to find out the File .
    Just try with the below mentioned sample code.
    DATA: l_filename    TYPE string,
           l_filen       TYPE string,
           l_path        TYPE string,
           l_fullpath    TYPE string,
           l_usr_act     TYPE I.
    l_filename = p_file.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
      EXPORTING
        DEFAULT_FILE_NAME    = l_filename
      CHANGING
        FILENAME             = l_filen
        PATH                 = l_path
        FULLPATH             = l_fullpath
        USER_ACTION          = l_usr_act
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4.
    IF sy-subrc = 0
          AND l_usr_act <>
          CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = l_fullpath
       FILETYPE                        = 'DAT'
      TABLES
        DATA_TAB                        = T_DOWNL
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22.
    ENDIF.

  • DIFFERENCE BETWEEN OPEN_DATASET AND GUI_UPLOAD

    WHY WE USE OPEN_DATASET TO FETCH DATA FROM APPLICATION SERVER WHERE AS WE USE ONLY GUI_UPLOAD TO FETCH FROM PRESENTATION SERVER?

    Hi,
    Open dataset is used to transfer the contents to Application server file or to read the contents from Application server
    GUI_UPLOAD is used to transfer the contents from Presentation system file to internal table
    GUI_DOWNLOAD is used to transfer the contents from internal table to Presentation system file
    Application server file read/write:
    http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
    presentation system file read/write:
    Sample ABAP Program to download table using new function GUI_DOWNLOAD
    *& Report ZDOWNLOAD *
    *& This program uses the new function GUI_DOWNLOAD *
    *& Output will be TAB delimited and include MANDT *
    *& It can be opened directly by Microsoft Excel *
    *& To use this program for any Database Table replace ZTEST with *
    *& new table name. *
    *& AUTHOR: Sheila Titchener - abap at iconet-ltd.co.uk *
    *& Date: February 2004 *
    REPORT zdownload MESSAGE-ID bd.
    DATA: w_tab TYPE ztest.
    DATA: i_tab TYPE STANDARD TABLE OF ztest.
    DATA: v_subrc(2),
    v_recswritten(6).
    PARAMETERS: p_file(80)
    DEFAULT 'D:
    ICONET
    SAP
    ZTEST.DAT'.
    DATA: filename TYPE string.
    filename = p_file.
    SELECT * FROM ztest INTO TABLE I_TAB.
    If text fields appear right justified or columns not lined up in output set
    TRUNC_TRAILING_BLANKS to X
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = filename
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = 'X '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_TAB
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *
    IF sy-subrc <> 0.
    v_subrc = sy-subrc.
    MESSAGE e899 WITH 'File Open Error' v_subrc.
    ENDIF.
    DESCRIBE TABLE i_tab LINES v_recswritten.
    MESSAGE i899 WITH v_recswritten 'Records Written from ZTEST'.
    Sample ABAP Program to Upload table using new function GUI_UPLOAD
    *& Report ZUPLOAD *
    *& This program uses the new function GUI_UPLOAD *
    *& Input must be TAB delimited with a blank column at the start *
    *& to allow for MANDT. *
    *& To use this program for any Database Table replace ZTEST with *
    *& new table name. *
    *& AUTHOR: Sheila Titchener - abap at iconet-ltd.co.uk *
    *& Date: February 2004 *
    REPORT zupload MESSAGE-ID bd.
    DATA: w_tab TYPE ZTEST.
    DATA: i_tab TYPE STANDARD TABLE OF ZTEST.
    DATA: v_subrc(2),
    v_recswritten(6).
    PARAMETERS: p_file(80)
    DEFAULT 'C:\Temp\ZTEST.TXT'.
    DATA: filename TYPE string,
    w_ans(1) TYPE c.
    filename = p_file.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    titlebar = 'Upload Confirmation'
    DIAGNOSE_OBJECT = ' '
    text_question = p_file
    text_button_1 = 'Yes'(001)
    ICON_BUTTON_1 = ' '
    text_button_2 = 'No'(002)
    ICON_BUTTON_2 = ' '
    default_button = '2'
    DISPLAY_CANCEL_BUTTON = 'X'
    USERDEFINED_F1_HELP = ' '
    START_COLUMN = 25
    START_ROW = 6
    POPUP_TYPE =
    IV_QUICKINFO_BUTTON_1 = ' '
    IV_QUICKINFO_BUTTON_2 = ' '
    IMPORTING
    answer = w_ans
    TABLES
    PARAMETER =
    EXCEPTIONS
    TEXT_NOT_FOUND = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CHECK w_ans = 1.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = filename
    FILETYPE = 'ASC
    has_field_separator = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    IMPORTING
    FILELENGTH =
    HEADER =
    TABLES
    data_tab = i_tab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *
    IF sy-subrc <> 0.
    v_subrc = sy-subrc.
    MESSAGE e899 WITH 'File Open Error' v_subrc.
    ENDIF.
    INSERT ZTEST FROM TABLE i_tab.
    COMMIT WORK AND WAIT.
    MESSAGE i899 WITH sy-dbcnt 'Records Written to ZTEST'.
    Thanks,
    Naveen Kumar.

  • How to use GUI_upload for Uploading a CSV file in Microsoft Excel.

    Hi Guys,
                  can anybody tell me how to Upload the CSV format file in Microsoft excel sheet?
    Thanks,
    Gopi.

    Hi Gopi,
    u can use GUI_UPLOAD, TEXT_CONVERT_XLS_TO_SAP.
    Please check these codes.
    Uploading data from CSV file format into internal table using GUI_UPLOAD
    REPORT zupload MESSAGE-ID bd.
    DATA: w_tab TYPE ZTEST.
    DATA: i_tab TYPE STANDARD TABLE OF ZTEST.
    DATA: v_subrc(2),
    v_recswritten(6).
    PARAMETERS: p_file(80)
    DEFAULT 'C:\Temp\ZTEST.TXT'.
    DATA: filename TYPE string,
    w_ans(1) TYPE c.
    filename = p_file.
    CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
    titlebar = 'Upload Confirmation'
    * DIAGNOSE_OBJECT = ' '
    text_question = p_file
    text_button_1 = 'Yes'(001)
    * ICON_BUTTON_1 = ' '
    text_button_2 = 'No'(002)
    * ICON_BUTTON_2 = ' '
    default_button = '2'
    * DISPLAY_CANCEL_BUTTON = 'X'
    * USERDEFINED_F1_HELP = ' '
    * START_COLUMN = 25
    * START_ROW = 6
    * POPUP_TYPE =
    * IV_QUICKINFO_BUTTON_1 = ' '
    * IV_QUICKINFO_BUTTON_2 = ' '
    IMPORTING
    answer = w_ans
    * TABLES
    * PARAMETER =
    * EXCEPTIONS
    * TEXT_NOT_FOUND = 1
    * OTHERS = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CHECK w_ans = 1.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = filename
    * FILETYPE = 'ASC
    has_field_separator = 'X'
    * HEADER_LENGTH = 0
    * READ_BY_LINE = 'X'
    * IMPORTING
    * FILELENGTH =
    * HEADER =
    TABLES
    data_tab = i_tab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    * SYST FIELDS ARE NOT SET BY THIS FUNCTION SO DISPLAY THE ERROR CODE *
    IF sy-subrc <> 0.
    v_subrc = sy-subrc.
    MESSAGE e899 WITH 'File Open Error' v_subrc.
    ENDIF.
    INSERT ZTEST FROM TABLE i_tab.
    COMMIT WORK AND WAIT.
    MESSAGE i899 WITH sy-dbcnt 'Records Written to ZTEST'.
    Uploading data from Excel file format into internal table using TEXT_CONVERT_XLS_TO_SAP
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    * At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *     I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    reward if helpful
    raam

  • Syntax error in ECC 6

    HI All,
    can any one please suggest me that cant we assign any prg to sy-repid.
    i have ana error for this code SY-REPID = 'PRGNAME'.
    error is:the field SY-REPID cant be changed

    Hi the error is because:
    The system field SY-REPID is not part of SYST or SY. Instead, every program contains the predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.
    All system fields are addressed using SY field name and their types using SYST field name.
    Go through this link....
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm
    Regards
    vasu

  • Weird Function module call

    Hi All,
        I use function module " UBC_USER_GET_BY_EMAIL " to get the SAP user id by supplying the email-id.  This function module works fine if i test it in SE37 but the same is not working from a method in business object for the same data.
       Any valuable answer will be appreciated and rewarded.
    Regards,
    Manikandan R

    Hi Manikandan
    There are a couple of things you could try.  First is check if the SE37 test actually picks up anything from you via the syst fields based on it being run in Dialog by a dialog user (ie you) and whether the fact it is running remote in the business object running via a non-dialog system user (WF-BATCH).  Second thing to check is whether you have given WF-BATCH an email address in the user master (SU01).  I know this sounds odd but when sending using SOST it is a requirement so maybe it is required by this function.
    Next would be to put a do loop in your program (see below), run via workflow and then debug using transaction SM50 to see what is actually going on at runtime.
    data:  L_exit type c.
    do.
      if l_exit = 'X'.
          exit.
      endif.
    enddo.
    When you get into debug from SM50, change the value of L_exit to 'X' and then step out of the loop into your method.
    Regards
    Gareth

  • What are the various system variabels in ABAP

    What are the various system variabels in ABAP?

    u can view all the system variables in SYST TABLE Also   ...............
    ABAP System Fields
    ABAP system fields are always available in ABAP programs. The runtime system fills them according to context. They can then be used in programs to query the system status. System fields are variables but you should always treat them as though they were constants, and only read them. If you change their values, important information for the flow of the program may be lost. In exceptional circumstances, system fields may be overwritten in an ABAP program to control the system – for example, SY-LSIND (for navigating to a detail list).
    With one exception the names and data types of the system fields are stored in the ABAP Dictionary in the SYST structure and realized as components of the predefined structure SY in ABAP programs.
    The system field SY-REPID is not part of SYST or SY. Instead, every program contains the predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.
    All system fields are addressed using SY field name and their types using SYST field name.
                                                                                    Alphabetical Overview
    The following table lists the definitions of the structure SYST in the ABAP Dictionary alphabetically. The character in the first column indicates how you can use the corresponding system field in ABAP programs. Name is the name of the component, Type is the Dictionary data type, and Length is the field length defined in the Dictionary. The Use column shows in which environment the system fields are set. The Description indicates the content.
    Name
    Type
    Length
    Use
    Description
    ABCDE
    CHAR
    26
    Constants
    Alphabet (A,B,C,...)
    APPLI
    RAW
    2
    Obsolete
    BATCH
    CHAR
    1
    Background processing
    Program runs in the background
    BATZD
    CHAR
    1
    Obsolete
    BATZM
    CHAR
    1
    Obsolete
    BATZO
    CHAR
    1
    Obsolete
    BATZS
    CHAR
    1
    Obsolete
    BATZW
    CHAR
    1
    Obsolete
    BINPT
    CHAR
    1
    Batch input
    Program runs under batch input
    BREP4
    CHAR
    4
    Obsolete
    BSPLD
    CHAR
    1
    Obsolete
    CALLD
    CHAR
    1
    ABAP Program
    Call mode of ABAP program
    CALLR
    CHAR
    8
    Printing Lists
    ID for print dialog function
    CCURS
    DEC
    9
    Obsolete
    CCURT
    DEC
    9
    Obsolete
    CDATE
    DATS
    8
    Obsolete
    CFWAE
    CUKY
    5
    Internal
    CHWAE
    CUKY
    5
    Internal
    COLNO
    INT4
    10
    Creating Lists
    Current column in the list
    CPAGE
    INT4
    10
    List processing
    Current page number
    CPROG
    CHAR
    40
    ABAP Program
    External procedure call
    CTABL
    CHAR
    4
    Obsolete
    CTYPE
    CHAR
    1
    Obsolete
    CUCOL
    INT4
    10
    Screens
    Horizontal cursor position at PAI
    CUROW
    INT4
    10
    Screens
    Vertical cursor position at PAI
    DATAR
    CHAR
    1
    Screens
    Displays user input
    DATLO
    DATS
    8
    Date and time
    Local date of user
    DATUM
    DATS
    8
    Date and time
    Current (application server) date
    DAYST
    CHAR
    1
    Date and time
    Daylight saving time flag
    DBCNT
    INT4
    10
    Database accesses
    Number of processed table rows
    DBNAM
    CHAR
    20
    ABAP Program
    Linked logical database
    DBSYS
    CHAR
    10
    R/3 System
    Name of central database system
    DCSYS
    CHAR
    4
    Obsolete
    DEBUG
    CHAR
    1
    Internal
    DSNAM
    CHAR
    8
    Internal
    DYNGR
    CHAR
    4
    ABAP Program
    Screen group of current screen
    DYNNR
    CHAR
    4
    ABAP Program
    Number of current screen
    ENTRY
    CHAR
    72
    Internal
    FDAYW
    INT1
    3
    Date and time
    Factory calendar weekday
    FDPOS
    INT4
    10
    Character strings
    Offset in character strings
    FFILE
    CHAR
    8
    Internal
    FLENG
    INT4
    10
    Internal
    FMKEY
    CHAR
    3
    Obsolete
    FODEC
    INT4
    10
    Internal
    FOLEN
    INT4
    10
    Internal
    FTYPE
    CHAR
    1
    Internal
    GROUP
    CHAR
    1
    Internal
    HOST
    CHAR
    8
    R/3 System
    Name of application server
    INDEX
    INT4
    10
    Loops
    Current loop pass
    INPUT
    CHAR
    1
    Internal
    LANGU
    LANG
    1
    R/3 System
    Current language
    LDBPG
    CHAR
    40
    ABAP Program
    Program of logical database
    LILLI
    INT4
    10
    List processing
    Selected list row
    LINCT
    INT4
    10
    Creating Lists
    Page length of list
    LINNO
    INT4
    10
    Creating Lists
    Current row
    LINSZ
    INT4
    10
    Creating Lists
    Column width of list
    LISEL
    CHAR
    255
    List processing
    Content of selected row
    LISTI
    INT4
    10
    List processing
    Index of selected list
    LOCDB
    CHAR
    1
    Obsolete
    LOCOP
    CHAR
    1
    Obsolete
    LOOPC
    INT4
    10
    Screens
    Number of rows visible in table
    LPASS
    CHAR
    4
    Internal
    LSIND
    INT4
    10
    List processing
    Index of detail list
    LSTAT
    CHAR
    16
    List processing
    ID for list levels
    MACDB
    CHAR
    4
    Obsolete
    MACOL
    INT4
    10
    Printing Lists
    Columns from SET MARGIN statement
    MANDT
    CLNT
    3
    R/3 System
    Client number from logon
    MARKY
    CHAR
    1
    Obsolete
    MAROW
    INT4
    10
    Printing Lists
    Rows from SET MARGIN statement
    MODNO
    CHAR
    1
    R/3 System
    Index of external modes
    MSGID
    CHAR
    20
    Messages
    Message class
    MSGLI
    CHAR
    60
    Messages
    Message line
    MSGNO
    NUMC
    3
    Messages
    Message number
    MSGTY
    CHAR
    1
    Messages
    Message type
    MSGV1
    CHAR
    50
    Messages
    Message variable
    MSGV2
    CHAR
    50
    Messages
    Message variable
    MSGV3
    CHAR
    50
    Messages
    Message variable
    MSGV4
    CHAR
    50
    Messages
    Message variable
    NEWPA
    CHAR
    1
    Internal
    NRPAG
    CHAR
    1
    Internal
    ONCOM
    CHAR
    1
    Internal
    OPSYS
    CHAR
    10
    R/3 System
    Operating system of application server
    PAART
    CHAR
    16
    Print parameters
    Print formatting
    PAGCT
    INT4
    10
    Obsolete
    PAGNO
    INT4
    10
    Creating Lists
    Current page:
    PAUTH
    NUMC
    2
    Internal
    PDEST
    CHAR
    4
    Print parameters
    Output device
    PEXPI
    NUMC
    1
    Print parameters
    Retention period
    PFKEY
    CHAR
    20
    Screens
    Current GUI status
    PLAYO
    CHAR
    5
    Internal
    PLAYP
    CHAR
    1
    Internal
    PLIST
    CHAR
    12
    Print parameters
    Name of spool request
    PNWPA
    CHAR
    1
    Internal
    PRABT
    CHAR
    12
    Print parameters
    Part of cover sheet
    PRBIG
    CHAR
    1
    Print parameters
    Selection cover page
    PRCOP
    NUMC
    3
    Print parameters
    Number of copies
    PRDSN
    CHAR
    6
    Print parameters
    Name of spool dataset
    PREFX
    CHAR
    3
    Obsolete
    PRI40
    CHAR
    1
    Internal
    PRIMM
    CHAR
    1
    Print parameters
    Print immediately
    PRINI
    NUMC
    1
    Internal
    PRLOG
    CHAR
    1
    Internal
    PRNEW
    CHAR
    1
    Print parameters
    New spool request
    PRREC
    CHAR
    12
    Print parameters
    Recipient
    PRREL
    CHAR
    1
    Print parameters
    Delete after print
    PRTXT
    CHAR
    68
    Print parameters
    Text for cover sheet
    REPI2
    CHAR
    40
    Internal
    REPID
    CHAR
    40
    ABAP Program
    Current main program
    RSTRT
    CHAR
    1
    Internal
    RTITL
    CHAR
    70
    Print parameters
    Title of printing program
    SAPRL
    CHAR
    4
    R/3 System
    Release status R/3 System
    SCOLS
    INT4
    10
    Screens
    Number of columns
    SFNAM
    CHAR
    30
    Obsolete
    SFOFF
    INT4
    10
    Internal
    SLSET
    CHAR
    14
    Selection screens
    Name of variant
    SPONO
    NUMC
    10
    Printing Lists
    Spool number
    SPONR
    NUMC
    10
    Obsolete
    SROWS
    INT4
    10
    Screens
    Number of rows
    STACO
    INT4
    10
    List processing
    First displayed column
    STARO
    INT4
    10
    List processing
    Uppermost displayed row
    STEPL
    INT4
    10
    Screens
    Index of current table row
    SUBCS
    CHAR
    1
    Internal
    SUBRC
    INT4
    10
    Return value
    Return value after ABAP statement
    SUBTY
    RAW
    1
    Internal
    SYSID
    CHAR
    8
    R/3 System
    Name of R/3 System
    TABID
    CHAR
    8
    Internal
    TABIX
    INT4
    10
    Internal Tables
    Current row index
    TCODE
    CHAR
    20
    ABAP Program
    Current transaction code
    TFDSN
    CHAR
    8
    Obsolete
    TFILL
    INT4
    10
    Internal Tables
    Current number of rows
    TIMLO
    TIMS
    6
    Date and time
    Local time of user
    TITLE
    CHAR
    70
    Screens
    Text in header line
    TLENG
    INT4
    10
    Internal Tables
    Row size
    TLOPC
    INT4
    10
    Internal
    TMAXL
    INT4
    10
    Obsolete
    TNAME
    CHAR
    30
    Obsolete
    TOCCU
    INT4
    10
    Obsolete
    TPAGI
    INT4
    10
    Obsolete
    TSTIS
    INT4
    10
    Internal
    TTABC
    INT4
    10
    Obsolete
    TTABI
    INT4
    10
    Obsolete
    TVAR0
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR1
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR2
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR3
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR4
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR5
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR6
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR7
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR8
    CHAR
    20
    Creating Lists
    Text variable for headers
    TVAR9
    CHAR
    20
    Creating Lists
    Text variable for headers
    TZONE
    INT4
    10
    Date and time
    Time difference to Greenwich Mean Time
    UCOMM
    CHAR
    70
    Screens
    Function code that triggered PAI
    ULINE
    CHAR
    255
    Constants
    Horizontal line with length 255
    UNAME
    CHAR
    12
    R/3 System
    Logon name of user
    UZEIT
    TIMS
    6
    Date and time
    Current (application server) time
    VLINE
    CHAR
    1
    Constants
    Vertical line
    WAERS
    CUKY
    5
    Obsolete
    WILLI
    INT4
    10
    Obsolete
    WINCO
    INT4
    10
    Obsolete
    WINDI
    INT4
    10
    Obsolete
    WINRO
    INT4
    10
    Obsolete
    WINSL
    CHAR
    79
    Obsolete
    WINX1
    INT4
    10
    Obsolete
    WINX2
    INT4
    10
    Obsolete
    WINY1
    INT4
    10
    Obsolete
    WINY2
    INT4
    10
    Obsolete
    WTITL
    CHAR
    1
    Creating Lists
    Flag for standard page header
    XCODE
    CHAR
    70
    Internal
    XFORM
    CHAR
    30
    Internal
    XPROG
    CHAR
    40
    Internal
    ZONLO
    CHAR
    6
    Date and time
    Time zone of user
    Key:
    The system field is set by the runtime environment. Its content can be evaluated in the ABAP program but not changed.
    The system field is set by the runtime environment. Its content can be changed in the ABAP program to influence the runtime environment.
    The system field must be set in the ABAP program. It can then be evaluated by the runtime environment or the program.
    The system field is only for internal use and must not be used in ABAP programs.
    The system field is obsolete and its content is not set. It cannot be used in ABAP programs.
                                                                                    Thematic Overview
    The following is a thematic summary of the system fields with notes on their use:
    System information
    ·        Information on the current R/3 System
    ·        Information on the user session
    ·        Date and time information
    ·        Information on the current ABAP program
    ·        Background processing
    ·        Batch input
    ABAP programming
    ·        Constants
    ·        Character strings
    ·        Loops
    ·        Internal Tables
    ·        Database accesses
    ·        Return value
    Screens
    ·        Screens
    ·        Selection screens
    ·        Lists
    ·        Messages
    Internal system fields
    Obsolete system fields
                                                                                    System Information
    Information on the Current R/3 System
    SY-DBSYS
    Central database system, for example INFORMIX, ORACLE
    SY-HOST
    Application server, for example HS0333, PAWDF087
    SY-OPSYS
    Operating system of application server, for example HP-UX, SINIX
    SY-SAPRL
    Release status of R/3 System, for example 30D, 46A
    SY-SYSID
    Name of R/3 System, for example B20, I47
    Information on the User Session
    SY-LANGU
    One-digit language key, for example D, E, F. Either logon language of user or set using the SET LOCALE LANGUAGE statement.
    SY-MANDT
    Client number the user logged on with, for example 000, 400.
    For database accesses with Open SQL, SY-MANDT is used as the first key field of the WHERE clause.
    SY-MODNO
    Indexes external modes. Zero in first mode. In new modes, opened using the Create Mode function or by calling a transaction using /o, it is raised by 1. If previous modes were deleted, the free numbers are used first. Modes opened using  CALL TRANSACTION … STARTING NEW TASK start back at 0.
    SY-UNAME
    Logon name of user, for example KELLERH, BC400-01.
    Date and Time Information
    The following system fields are always set automatically. If necessary, the GET TIME statement synchronizes the application server time with that of the database server and writes it to the system field SY-UZEIT. SY-DATUM and the system fields for the local time zone, that is SY-TIMLO, SY-DATLO, and SY-ZONLO are also reset.
    SY-DATLO
    Local date of user, for example 19981129, 19990628.
    SY-DATUM
    Current (application server) date, for example 19981130, 19990627.
    SY-DAYST
    During daylight saving time X, otherwise empty.
    SY-FDAYW
    Factory calendar weekday, Sunday 0 … Saturday 6.
    SY-TIMLO
    Local time of user, for example 154353, 225312.
    SY-TZONE
    Time difference to Greenwich Mean Time (UTC) in seconds, for example 3600, 10800.
    SY-UZEIT
    Current (application server) time, for example 164353, 215312.
    SY-ZONLO
    Time zone of user, for example CET, UTC.
    Information on the Current ABAP Program
    SY-CALLD
    SY-CALLD contains SPACE if the program is the first and only program in a call chain. SY_CALLD contains 'X' if the program is a called program in a call chain (see ABAP Calls Overview).
    ·        SY-CALLD is set to ‘X‘ in a program called using CALL TRANSACTION, CALL DIALOG, or SUBMIT … AND RETURN.
    ·        SY-CALLD is set to SPACE in a program called using LEAVE TO TRANSACTION, entering a transaction code on a screen, and processing batch input folders. 
    ·        With SUBMIT (without RETURN) SY-CALLD retains the previous value.
    SY-CPROG
    In externally called procedures, the name of the calling program, otherwise the name of the current program. If an externally called procedure calls another external procedure, SY-CPROG keeps the name of the first main program and is not given the name of the main program of the further caller.
    SY-DBNAM
    With executable programs this is the linked logical database.
    SY-DYNGR
    Screen group of current screen. You can assign several screens to a common screen group. You can use this, for example, to modify all of the screens in the group in a uniform way.
    SY-DYNNR
    Number of current screen During the selection screen processing, SY-DYNNR contains the screen number of the current selection screen. During list processing, SY-DYNNR contains the number of the container screen. While a subscreen is being processed, SY-DYNNR contains its screen number. This also applies to tabstrips.
    SY-LDBPG
    With executable programs, the database program of the linked logical database.
    SY-REPID
    Name of current ABAP program. With externally called procedures this is the name of the procedure’s main program.
    If SY-REPID was transferred to an external procedure as an actual parameter before Release 6.10, the formal parameter was not given the name of the caller, but the name of the procedure’s main program. SY-REID had to be transferred to an auxiliary variable before the call or you had to use SY-PROG.
    As of Release 6.10, SY-REPID is a separate constant that is no longer part of the structure SYST or SY. It can be transferred to external procedures directly.
    SY-TCODE
    Name of current transaction code.
    Background Processing
    SY-BATCH
    SY-BATCH is set to X in an ABAP program running in the background. Otherwise it is empty.
    Batch Input
    SY-BINPT
    SY-BINPT is set to X during processing of batch input folders and in ABAP programs called with CALL TRANSACTION USING. Otherwise it is empty.
    ·         OPTIONS FROM in the CALL TRANSACTION USING statement can set SY-BINPT to empty for the whole program execution, as well as at the end of the BDC data.
    ·         In CATT procedures, SY-BINPT is always empty.
                                                                                    ABAP Programming
    Constants
    SY-ABCDE
    Contains the Alphabet. Can be used to access individual letters independently of the codepage by specifying offset.
    SY-ULINE
    Contains a horizontal line with length 255. Can be used when creating the list.
    SY-VLINE
    Contains a vertical line (|). Can be used when creating the list
    Loops
    SY-INDEX
    SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass.
    Character Strings
    SY-FDPOS
    Found location for operations with character-type fields.
    ·        If the operators CO, CN, CA, NA, CS, NS, CP, NP are used in comparisons, SY-FDPOS is assigned offset values depending on the comparison result.
    ·        SEARCH … FOR … sets SY-FDPOS to the offset of the found search string.
    Internal Tables
    SY-TABIX
    Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.
    ·        APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.
    ·        COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.
    ·        LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.
    ·        READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.
    ·        SEARCH  0). Each time an interactive list event occurs, the system automatically increases SY-LSIND by 1. SY-LSIND can be changed in the ABAP program to navigate between detail lists. Changes to SY-LSIND are not taken into account until the end of the list event. Therefore, any manipulation of SY-LISND should be done using the last command of the processing block.
    SY-LSTAT
    ID for list levels within the program. SY-LSTAT can be filled with values during list creation in the ABAP program. The value valid when the list is completed is saved with the list. In the case of an interactive list event, SY-LSTAT is set to the value it was assigned during the creation of the list from which the event takes place. SY-LSTAT is no longer maintained and should therefore no longer be used.
    SY-STACO
    Number of the first displayed column of the list from which the event was triggered. Counting starts at 1.
    SY-STARO
    Number of the upper-most displayed row of the upper-most page of the list, from which the event was triggered. Counting begins at 1. This does not include the page header.
    Printing Lists
    When printing lists, the spool and runtime systems require certain internal information, which is available in the following system fields and is set during print activation.
    SY-CALLR
    Contains a value that displays where printing was started, for example NEW-PAGE for program-controlled printing or RSDBRUNT for printing from the selection screen.
    SY-PRDSN
    Contains the name of the spool file during printing.
    SY-SPONO
    Contains the name of the spool number during printing.
    SY-MAROW, SY-MACOL
    The SET MARGIN statement fills the system fields SY-MAROW and SY-MACOL, which determine the number of lines on the upper margin and the number of columns on the left margin when printing.
    Print Parameters
    The print parameters are transferred to the spool system by the runtime system in a structure of dictionary type PRI_PARAMS. Before this structure was used, its purpose was served by system fields. Today a subset of the PRI_PARAMS structure is still written to system fields with the same names when printing is activated. This information is redundant and should not be used.
    Messages
    If you execute the MESSAGE statement, the following system fields are set. If you execute the MESSAGE … RAISING statement in function modules and methods, these fields are also set in the calling program, if it handles the exception.
    SY-MSGID
    SY-MSGID contains the message ID.
    SY-MSGNO
    SY-MSGNO contains the message number.
    SY-MSGTY
    SY-MSGTY contains the message type.
    SY-MSGV1,…,SY-MSGV4
    SY-MSGV1 to SY-MSGV4 contain the field contents that are used for the message’s placeholders. 
    Special Actions that Fill Message Fields
    ·        If you request database locks using the ENQUEUE function module, the field SY-MSGV1 contains the name of the user who holds the lock, in the case of the FOREIGN_LOCK exception.
    ·        IN the case of CALL TRANSACTION or CALL DIALOG with the USING addition, a message displayed during the called screen sequence is returned in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ... , SY-MSGV4.
    ·        During Remote Function Call (RFC), error messages are transferred from the remote system to the calling system and SY-MSGID, SY-MSGTY, SY-MSGNO,SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4 are set. If short dumps or type X messages occur, the system also sets the fields.
                                                                                    Internal System Fields
    Internal system fields are only for internal use in the ABAP runtime environment and are defined in the kernel. Under no circumstances must they be overwritten in ABAP programs and they should also not be read (processed).
    SY-CFWAE
    Undocumented
    SY-CHWAE
    Undocumented
    SY-DEBUG
    Undocumented
    SY-DSNAM
    Name of spool output file.

  • Language parameter in search help

    Friends,
    have created one search help with condition type and condition type text, and associated to the field condition type. NOw on the help popup the data is diplayed for two languages eg, EN an TH though the logon language is EN. can we restrict it?
    Many Thanks,
    Albert.

    if you have problems referring to SYST fields you can get round it by hard-coding the language in a selection condition of your database view,eg
    TRDIRT     SPRSL     EQ     'E'
    or you can create a search help exit function module and link it to your search help, something like:
    FUNCTION z_wxyz_shlp_exit.
    ""Local interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     VALUE(SHLP) TYPE  SHLP_DESCR_T
    *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      DATA:
          L_spras                  TYPE spras.
      FIELD-SYMBOLS:
       <field>                  TYPE dfies.
    Language filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
      CHECK callcontrol-step = 'DISP'.
    find the language entry in the field description table
      READ TABLE shlp-fielddescr ASSIGNING <field>
       WITH KEY fieldname = 'SPRAS'.
    *.. exit if one is not present
      CHECK <field> IS ASSIGNED.
    pass through the proposed hit list...
      LOOP AT record_tab.
    populate the language of the current record
        l_spras = record_tab+<field>-offset(<field>-intlen).
    check if it is different from the system language…
        IF l_spras <> sy-langu.
    *... and if so remove current record from the hit list
          DELETE record_tab.
        ENDIF.
      ENDLOOP.
    ENDFUNCTION.

  • Systems variables

    what are systems variables ?
    Regards,
    Jagan

    ABAP system fields are always available in ABAP programs. The runtime system fills them according to context. They can then be used in programs to query the system status. System fields are variables but you should always treat them as though they were constants, and only read them. If you change their values, important information for the flow of the program may be lost. In exceptional circumstances, system fields may be overwritten in an ABAP program to control the system – for example, SY-LSIND (for navigating to a detail list).
    With one exception the names and data types of the system fields are stored in the ABAP Dictionary in the SYST structure and realized as components of the predefined structure SY in ABAP programs.
    The system field SY-REPID is not part of SYST or SY. Instead, every program contains the predefined constants SY-REPID and SYST-REPID, which both contain the name of the corresponding program. Furthermore, there are two predefined types of the same name, SY-REPID and SYST-REPID.
    All system fields are addressed using SY field name and their types using SYST field name.
    here is a list of some important system variables
    INDEX
    SYINDEX
    INT4
    10
    0
    Loops, number of current pass
    PAGNO
    SYPAGNO
    INT4
    10
    0
    List creation, current page
    TABIX
    SYTABIX
    INT4
    10
    0
    Internal table, current line index
    TFILL
    SYTFILL
    INT4
    10
    0
    Internal tables, current number of lines
    DBCNT
    SYDBCNT
    INT4
    10
    0
    DB operations, number of table lines processed
    FDPOS
    SYFDPOS
    INT4
    10
    0
    Character strings, offset in character string
    COLNO
    SYCOLNO
    INT4
    10
    0
    List creation, current column of list
    LINCT
    SYLINCT
    INT4
    10
    0
    List processing, page length of list
    LINNO
    SYLINNO
    INT4
    10
    0
    List creation, current line
    LINSZ
    SYLINSZ
    INT4
    10
    0
    List creation, width of list
    SUBRC
    SYSUBRC
    INT4
    10
    0
    Return value, return value after ABAP statements
    LILLI
    SYLILLI
    INT4
    10
    0
    List processing, current list line
    LSIND
    SYLSIND
    INT4
    10
    0
    List processing, details list index
    STEPL
    SYSTEPL
    INT4
    10
    0
    Screens, current table line index
    LOOPC
    SYLOOPC
    INT4
    10
    0
    Screens, number of lines visible in table
    LANGU
    SYLANGU
    LANG
    1
    0
    R/3 System, current language
    MANDT
    SYMANDT
    CLNT
    3
    0
    R/3 System, client number from logon
    DBSYS
    SYDBSYS
    CHAR
    10
    0
    R/3 System, name of central database system
    SYSID
    SYSYSID
    CHAR
    8
    0
    R/3 System, name of R/3 System
    SAPRL
    SYSAPRL
    CHAR
    4
    0
    R/3 System, system release
    TCODE
    SYTCODE
    CHAR
    20
    0
    ABAP program, current transaction code
    DATUM
    SYDATUM
    DATS
    8
    0
    Date and time, current (application server) date
    UCOMM
    SYUCOMM
    CHAR
    70
    0
    Screens, function code triggered by PAI
    UZEIT
    SYUZEIT
    TIMS
    6
    0
    Dat and time, current application server time
    UNAME
    SYUNAME
    CHAR
    12
    0
    R/3 System, user logon name
    MSGLI
    SYMSGLI
    CHAR
    60
    0
    Messages, message line
    TITLE
    SYTITLE
    CHAR
    70
    0
    Screens, title text
    LISEL
    SYLISEL
    CHAR
    255
    0
    List processing, contents of selected line
    ULINE
    SYULINE
    CHAR
    255
    0
    Constants, horizontal line with length 255
    MSGID
    SYMSGID
    CHAR
    20
    0
    Messages, message class
    MSGID
    SYMSGID
    CHAR
    20
    0
    Messages, message class
    MSGTY
    SYMSGTY
    CHAR
    1
    0
    Messages, message type
    MSGNO
    SYMSGNO
    NUMC
    3
    0
    Messages, message number
    MSGV1
    SYMSGV
    CHAR
    50
    0
    Messages, message variables
    MSGV2
    SYMSGV
    CHAR
    50
    0
    Messages, message variables
    MSGV3
    SYMSGV
    CHAR
    50
    0
    Messages, message variables
    MSGV4
    SYMSGV
    CHAR
    50
    0
    Messages, message variables
    VLINE
    SYVLINE
    CHAR
    1
    0
    Constants, vertical bar
    HOST
    SYHOST
    CHAR
    32
    0
    R/3 System, Name of application server
    the link is
    http://abaplovers.blogspot.com/2008/02/list-of-important-system-variables.html
    do reward if helpful

  • Beginner Question - transferring username from login page to next page

    Hi,
    Beginner level Question ; would appreciate kind reply,TA
    How can I implement the following scenario in abap?
    I've a login screen wherein user enters requisite credentials.Once authenticated the transfer goes to next screen called erp_training.On this I need to implement the welcome ******* functionality where ******* represents the entered username from the first screen.(Like what happens in most emails when we login in)
    Edited by: ItsmeAnkit on May 18, 2011 12:52 PM

    Hi Ankit,
    Ur query:
    Implement the welcome ******* functionality where ******* represents the entered username .
    The User who entered in the previous screen has his credentials like username stored in SAP SYST field sy-uname.
    Please refer to the following link.
    Display information message in SAP Initial Screen
    try to code the message or use WRITE TEXT in the Userexit.
    based on the following.
    data: g_msg type string.
    Change the sy-uname to character.
    concatenate "Welcome to the Screen of ERP Training" sy-uname to g_msg
    write g_msg.
    Please do revert if the above is not correct solution for your problem
    Thanks
    Sri

  • Attribut LANGU konnte nicht gefunden werden

    Hi
    I get an Error 'Attribut LANGU konnte nicht gefunden werden' which means 'Attribute LANGU could not be found' when I press F4 or use the search help that comes by default for an imput field binded to model Pa0023-TAETE (Industry Key). I have similar fields binded to other fields of the same table. They are all working perfect. But I am still not able to figure out why this field alone is dumping. I have not written any code on my own. I just binded it and tried testing the search help values.
    Any Help.
    Murali.

    Hi Murali,
    after registering the message on SMP.
    Try only as an interim solution,  adding the attribute LANGU to your context node,
    while waiting for the SMP answer.
    You should set the LANGU value  As well. 
    The foreign key on PA0023-TAETE uses SYST-LANGU.
    Perhaps there is a bug in the WDA help processor that doesnt cater for SYST fields.??
    good luck,
    Phil.

Maybe you are looking for

  • Suddenly cannot connect to Internet

    I am suddenly not able to connect to the Internet. I had not changed any settings. However, I did have some monitor freezing and garbled images on the monitor, for which I had to shut down and restart the computer a couple of times. I have ATT Uverse

  • Preview & Adobe Clearscan save file problem

    Preview appears to have some compatibility issues with Adobe Clearscan OCR'd PDFs. While Preview can view and read the PDF initially and can copy text from the PDF into other applications; if you attempt to save the PDF in Preview (with or without ma

  • Oracle Support: SNMP, OEM Console & Intelligent Agent

    I have the Intelligent Agent running fine (thanks to the "Does anyone at Oracle Support read these messages" thread). I can tnsping the agent and listener from the Win98 OEM Console machine, I can access the listener when manually discovered. When I

  • Reports PortalIntegration gives intermitent error WWV_RW_USR.IS_SESSION_AUTHENTICATED

    Has anyone seen this as a sporadic error? I could understand it if we always got the error, but I can run the same report 10 or more times fine, and then the next time it might fail with the error below. Usually after it fails once, it fails for all

  • Library modules are being deployed in the console

    Hi, I am very new to this Weblogic Portal. I am using portal version 10.2 I developed a new application and tried to publish after adding the portal EAR project to the server. Whenever I publish along with the intended EAR project all the libraries a