Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

system field

Former Member
0 Likes
1,232

plz tell me what is the function of this system field> SY-REPID

6 REPLIES 6
Read only

Former Member
0 Likes
840

gives the current main program name.

refer to this thread :

Read only

Former Member
0 Likes
840

Hi,

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.

Plzz reward points if it helps

Read only

former_member386202
Active Contributor
0 Likes
840

Hi,

It gives the current program name.

Regards,

PRashant

Read only

Former Member
0 Likes
840

it contains program name.

say Zprogram u created.

u r executing thta program, in debugging type sy-repid

u will c that contains Zprogram.

ok

Read only

Former Member
0 Likes
840

hai srinath,

System Information

Information on the Current SAP 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 the SAP System, for example 30D, 46A

SY-SYSID

Name of the SAP 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.

· 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 USINGstatement 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.

· APPENDsets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.

· COLLECTsets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.

· LOOP ATsets 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 itab FOR sets SY-TABIX to the index of the table row, in which the search string was found.

SY-TFILL

With the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL is filled with the row number of the addressed internal table.

SY-TLENG

With the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, the system fills SY-TLENG with the row size of the addressed internal table.

Read only

Former Member
0 Likes
840

Hi,

It contains the report name that you are executing.

in the debug mode just type SY-REPID you will get the report name that you have executed.

Thanks,

Nageswar