Help on System fields.

Hi all,
I have always confusion when to use which system fields(tabix, index, tfill).
í created one program first i used sy-tabix instead of sy-index.Then it doesnt work.
Please clarify me with examples.
that code is.
FORM delimiting.
  DO.
* assigns the next field in the current header to <f>.
    ASSIGN COMPONENT sy-index OF STRUCTURE i_itab TO <f>.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    IF sy-index = 1.
      excel_string = <f>.
    ELSE.
      CONCATENATE excel_string <delim> <f> INTO excel_string.
    ENDIF.
  ENDDO.
ENDFORM.                    " delimiting
Thanks and regards
Chandu.

Hi,
Sy-index specifies about the current loop pass which is same as ur example.
Sy-tabix stores the current line index of the table.
loop at it_mara.
  < ur logic >
  modify table it_mara index sy_tabix.
endloop.
Sy-tfill tells abt the current number of lines in the internal table.
describe table it_mara lines sy-tfill.
if sy-tfill = 0.
  <ur code if table is initial>
endif.
Regards,
Neelima.

Similar Messages

  • List of system fields like sy-index, sy-srow......

    can any one give me list of system fields with there use. i would b very thankful.

    hi Amjad,
    Please find below the request fields, from table SYST.
    INDEX     Loops, number of current pass
    PAGNO     List creation, current page
    TABIX     Internal table, current line index
    TFILL     Internal tables, current number of lines
    TOCCU     Internal tables, initial main memory requirements
    DBCNT     DB operations, number of table lines processed
    FDPOS     Character strings, offset in character string
    COLNO     List creation, current column of list
    LINCT     List processing, page length of list
    LINNO     List creation, current line
    LINSZ     List creation, width of list
    MACOL     Print list, columns from SET MARGIN statement
    MAROW     List printing, lines from SET MARGIN statement
    TLENG     Internal tables, line width
    LILLI     List processing, current list line
    SUBRC     Return value, return value after ABAP statements
    CUCOL     Screens, horizontal cursor position at PAI
    CUROW     Screens, vertical cursor position at PAI
    LSIND     List processing, details list index
    LISTI     List processing, index of current list
    STEPL     Screens, current table line index
    SROWS     Screens, numbers of lines
    SCOLS     Screens, number of columns
    LOOPC     Screens, number of lines visible in table
    TZONE     Date and time, time difference from Greenwich Mean Time
    DAYST     Date and time, Daylight savings time flag
    FDAYW     Date and time, factory calendar weekday
    LANGU     R/3 System, current language
    MODNO     R/3 System, external modes index
    BATCH     Program running in background
    BINPT     Batch input, program running under batch input
    CALLD     ABAP program, ABAP program call mode
    DYNNR     ABAP program, number of current screen
    DYNGR     ABAP program, screen group of current screen
    WTITL     List creation, flag for standard page header
    CPAGE     List processing, current page number
    DBNAM     ABAP program, related logical database
    MANDT     R/3 System, client number from logon
    PEXPI     Print parameters, spool retention period
    PRIMM     Print parameters, print immediately
    PRREL     Print parameters, delete after printing
    PRBIG     Print parameters, selection cover page
    PRNEW     Print parameters, new spool request
    PDEST     Print parameters, output device
    PLIST     Print parameters, name of spool request
    PRDSN     Print parameters, name of spool dataset
    CALLR     Print list, ID for print dialog function
    RTITL     Print parameters, title of print program
    PRREC     Print parameters, recipient
    PRTXT     Print parameters, text for cover page
    PRABT     Print parameters, department on cover page
    PAART     Print parameters, print formatting
    PRCOP     Print parameters, number of copies
    DBSYS     R/3 System, name of central database system
    SYSID     R/3 System, name of R/3 System
    OPSYS     R/3 System, operating system of application server
    PFKEY     Screens, current GUI status
    SAPRL     R/3 System, system release
    TCODE     ABAP program, current transaction code
    UCOMM     Screens, function code triggered by PAI
    SPONO     Print list, spool number
    DATUM     Date and time, current (application server) date
    SLSET     Selection screens, name of variant
    UZEIT     Dat and time, current application server time
    REPID     ABAP program, current main program
    UNAME     R/3 System, user logon name
    LSTAT     List processing, list level IDs
    ABCDE     Constant: Alphabet (A,B,C,...)
    MSGLI     Messages, message line
    TITLE     Screens, title text
    LISEL     List processing, contents of selected line
    ULINE     Constants, horizontal line with length 255
    CPROG     ABAP program, caller in external procedures
    LDBPG     ABAP program, logical database program
    TVAR0     List creation, text variable for headers
    TVAR1     List creation, text variable for headers
    TVAR2     List creation, text variable for headers
    TVAR3     List creation, text variable for headers
    TVAR4     List creation, text variable for headers
    TVAR5     List creation, text variable for headers
    TVAR6     List creation, text variable for headers
    TVAR7     List creation, text variable for headers
    TVAR8     List creation, text variable for headers
    TVAR9     List creation, text variable for headers
    MSGID     Messages, message class
    MSGTY     Messages, message type
    MSGNO     Messages, message number
    MSGV1     Messages, message variables
    MSGV2     Messages, message variables
    MSGV3     Messages, message variables
    MSGV4     Messages, message variables
    VLINE     Constants, vertical bar
    STACO     List processing, initial column displayed
    STARO     List processing, first line displayed at top
    DATAR     Screens, display user entry
    HOST     R/3 System, Name of application server
    DATLO     Date and time, local date of user
    TIMLO     Date and time, local time for user
    ZONLO     Date and time, time zone of user
    Hope this helps,
    Sajan Joseph.

  • View with selection conditions with system fields.

    Hi Experts,
    I have a view. Now i want to control the data that is selected using 'Selection Conditions'.
    here i want to use system field SY-DATUM.
    My requirement is  i want to control the output like
    Valid_From_Date GE SY-DATUM and
    Valid_To_Date     LE  SY-DATUM
    which means that i would be showing only active users in this view.
    How can i go about this? System is not allowing system fields in comparision value.
    Any help on this is highly appreciated. Thanks.
    regards,
    Simha

    Hi,
    I am getting a warning first 'enter constant as comparision value'
    when i trying to activate the view i am getting the below error.
    A join condition on a field of the system table SY (or SYST) was defined.
    This is not permitted for database views because the system table is not known to the database
    Have tried to activate the view you created?
    How to go about this?
    Regards,
    Simha

  • Date / Time System fields - inconsistent

    This is a weird one...please bear with me
    Before I begin...note that this is not a problem that is difficult to fix, I'm just interested in better understanding why the system fields are behaving the way they are.
    We have 20 or so programs that use a function module to create a file header that includes a date/time stamp.  The programs also place a trailer with a date/time stamp that should match the one in the header.  However, the programmer used different system fields (after a GET TIME statement) to create the date/time stamp in the trailer.  On occasion, the date/time stamp comes out different. 
    Here's the code (sry about all caps):
      GET TIME.
      CONCATENATE SY-DATUM SY-UZEIT INTO BATCHID.
      CALL FUNCTION 'Z_YADAYADA'
           EXPORTING
                FILE_ID              = P_FILEID
                REFRESH_TYPE         = P_REFTYP
                START_PERIOD         = START_PER
                END_PERIOD           = END_PER
           IMPORTING
                STRING255            = OUTPUTSTRING
           EXCEPTIONS
                INVALID_REFRESH_TYPE = 1
                INVALID_BATCH_ID     = 2.
      ...sy-subrc check...
      TRANSFER OUTPUTSTRING TO P_FILE1.  <--header output
      CONCATENATE L_TRL BATCHID COUNT T_TOTAL SPACE
                  INTO OUTPUTSTRING SEPARATED BY L_DEL.
      CONDENSE OUTPUTSTRING NO-GAPS.
      TRANSFER OUTPUTSTRING TO P_FILE1.  <--trailer output
    inside function module *****
      CONCATENATE: SY-DATLO SY-TIMLO INTO DATESTAMP,
                   SY-SYSID SY-MANDT INTO MACHINE_NAME.
      CONDENSE: DATESTAMP, MACHINE_NAME NO-GAPS.
      CONCATENATE C_HDR DATESTAMP FILE_ID MACHINE_NAME
                  SY-CPROG ' ' REFRESH_TYPE START_PERIOD
                  END_PERIOD DATESTAMP
                  INTO STRING255 SEPARATED BY '~'.
      CONDENSE: STRING255 NO-GAPS.
    You can see that the function uses SY-DATLO and SY-TIMLO for creation of the header, while SY-DATUM and SY-UZEIT are used for the trailer.  What's wierd is that sometimes the trailer has a date/time stamp that is 1 second <b>greater</b> than the header, despite the fact that it is stored in the BATCHID variable <b>before</b> the header is created.
    Any help, references, explanations greatly appreciated (and rewarded with points)
    BMV

    Hi Brian
    Here is the related part from the weblog of ABAP expert Horst Keller. Hope it may help. For the full document, you can visit <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.wcm.compound.docs/library/uuid/f1391fc3-0301-0010-d384-fccd036f1c67">here</a>.
    The values of all system fields in this table are implicitly set when the program is started, every time a screen layout of a screen is sent, and when the internal mode is set. The GET TIME command explicitly updates the system fields, except for sy-dayst, sy-fdayw and sy-tzone.
    With the exception of sy-datlo and sy-timlo, all system fields refer to the local date and time of the current SAP system. The ABAP runtime environment clock is synchronized with the database server clock at regular intervals in order to calculate the local time of the SAP system. During the synchronization process, the ABAP runtime environment clock is set to the database server clock. Because this happens on all application servers in an SAP system, the ABAP runtime environment clock is synchronous with the clocks on all other application servers and with the database system clock, and thus shows the local time of the entire SAP system. The time zone on which the local time of an SAP system is based is the only entry in the database table TTZCU.
    The content of sy-zonlo is taken from the user master record of the current user. The values of sy-datlo and sy-timlo are calculated from sy-datum and sy-uzeit and from the time zone of the SAP system for the time zone in sy-zonlo. If the user master record does not contain a time zone, or if it contains an invalid or an inactive time zone, sy-datlo and sy-timlo are set to the values of sy-datum and sy-uzeit. All valid time zones are defined in table TTZZ.
    Is't the naming of sy-datum and sy-uzeit really geeky?
    Time Stamps
    The above system fields for date and time are not sufficient for many requirements of determining unique points in time: They represent local times and the values are measured in seconds. For more exact date and time determination, you use time stamps.
    A time stamp represents date and time in the form YYYYMMDDHHMMSS. YYYY is the year, MM the month, DD the day, HH the hour, MM the minutes and SS the seconds. There is a short form and a long form. In the long form, the format specified above additionally contains 7 decimal places for fractions of seconds, which allows for an accuracy of up to 100 ns. The maximum time resolution depends on the operating system of the application server and may be less.
    A valid time stamp must contain values whose date and time specifications before the decimal separator correspond to valid values for the data types d and t. Time stamps in this form are always considered as UTC (Universal Time Coordinated, basis for calculating worldwide time specifications; the UTC reference time is based on Greenwich Mean Time, GMT, but is not a time zone; it has no daylight saving time or summer time) time stamps when processed with the corresponding statements. You use the statement GET TIME STAMP to create a time stamp that represents the current UTC reference time.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • SY - System fields and return codes in ABAP

    Hi
    I'm new to ABAP, where do I find what the meaning of the system field return codes are ?
    example SY-SUBRC returns a number of codes 0, 2, 4, 8 etc what do they mean.
    Is there a resource somewhere that provides this information for all the system fields.
    I have searched high and low and have found little, they must be defined somwhere ?
    cheers Hugh

    Here is a listing of all of the system fields.
    http://help.sap.com/saphelp_scm50/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm
    As for what the return codes( 0, 4, 8) for SY-SUBRC mean,  that is a little tricky.  The meanings of the values are dependent on what statement was used previously. They would mean different things when used with different statements.  For example, if you check SY-SUBRC after a FIND statement, the return code value 4, would mean something different than if you had check the SY-SUBRC value after doing an OPEN DATASET.  So you need to look at the specific statements in help.sap.com and see what it says about the SY-SUBRC values for each statement.
    http://help.sap.com/saphelp_scm50/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Regards,
    Rich Heilman

  • LIST OF SYSTEM FIELDS?

    CAN SOME ONE GIVE ME THE LIST OF SYSTEM FIELDS THAT WE CAN USE IN TEH PROGEAM.
    LIKE SY-DATUM...
    vj

    hi VJ,
    Please find below the request fields, from table SYST.
    INDEX     Loops, number of current pass
    PAGNO     List creation, current page
    TABIX     Internal table, current line index
    TFILL     Internal tables, current number of lines
    TOCCU     Internal tables, initial main memory requirements
    DBCNT     DB operations, number of table lines processed
    FDPOS     Character strings, offset in character string
    COLNO     List creation, current column of list
    LINCT     List processing, page length of list
    LINNO     List creation, current line
    LINSZ     List creation, width of list
    MACOL     Print list, columns from SET MARGIN statement
    MAROW     List printing, lines from SET MARGIN statement
    TLENG     Internal tables, line width
    LILLI     List processing, current list line
    SUBRC     Return value, return value after ABAP statements
    CUCOL     Screens, horizontal cursor position at PAI
    CUROW     Screens, vertical cursor position at PAI
    LSIND     List processing, details list index
    LISTI     List processing, index of current list
    STEPL     Screens, current table line index
    SROWS     Screens, numbers of lines
    SCOLS     Screens, number of columns
    LOOPC     Screens, number of lines visible in table
    TZONE     Date and time, time difference from Greenwich Mean Time
    DAYST     Date and time, Daylight savings time flag
    FDAYW     Date and time, factory calendar weekday
    LANGU     R/3 System, current language
    MODNO     R/3 System, external modes index
    BATCH     Program running in background
    BINPT     Batch input, program running under batch input
    CALLD     ABAP program, ABAP program call mode
    DYNNR     ABAP program, number of current screen
    DYNGR     ABAP program, screen group of current screen
    WTITL     List creation, flag for standard page header
    CPAGE     List processing, current page number
    DBNAM     ABAP program, related logical database
    MANDT     R/3 System, client number from logon
    PEXPI     Print parameters, spool retention period
    PRIMM     Print parameters, print immediately
    PRREL     Print parameters, delete after printing
    PRBIG     Print parameters, selection cover page
    PRNEW     Print parameters, new spool request
    PDEST     Print parameters, output device
    PLIST     Print parameters, name of spool request
    PRDSN     Print parameters, name of spool dataset
    CALLR     Print list, ID for print dialog function
    RTITL     Print parameters, title of print program
    PRREC     Print parameters, recipient
    PRTXT     Print parameters, text for cover page
    PRABT     Print parameters, department on cover page
    PAART     Print parameters, print formatting
    PRCOP     Print parameters, number of copies
    DBSYS     R/3 System, name of central database system
    SYSID     R/3 System, name of R/3 System
    OPSYS     R/3 System, operating system of application server
    PFKEY     Screens, current GUI status
    SAPRL     R/3 System, system release
    TCODE     ABAP program, current transaction code
    UCOMM     Screens, function code triggered by PAI
    SPONO     Print list, spool number
    DATUM     Date and time, current (application server) date
    SLSET     Selection screens, name of variant
    UZEIT     Dat and time, current application server time
    REPID     ABAP program, current main program
    UNAME     R/3 System, user logon name
    LSTAT     List processing, list level IDs
    ABCDE     Constant: Alphabet (A,B,C,...)
    MSGLI     Messages, message line
    TITLE     Screens, title text
    LISEL     List processing, contents of selected line
    ULINE     Constants, horizontal line with length 255
    CPROG     ABAP program, caller in external procedures
    LDBPG     ABAP program, logical database program
    TVAR0     List creation, text variable for headers
    TVAR1     List creation, text variable for headers
    TVAR2     List creation, text variable for headers
    TVAR3     List creation, text variable for headers
    TVAR4     List creation, text variable for headers
    TVAR5     List creation, text variable for headers
    TVAR6     List creation, text variable for headers
    TVAR7     List creation, text variable for headers
    TVAR8     List creation, text variable for headers
    TVAR9     List creation, text variable for headers
    MSGID     Messages, message class
    MSGTY     Messages, message type
    MSGNO     Messages, message number
    MSGV1     Messages, message variables
    MSGV2     Messages, message variables
    MSGV3     Messages, message variables
    MSGV4     Messages, message variables
    VLINE     Constants, vertical bar
    STACO     List processing, initial column displayed
    STARO     List processing, first line displayed at top
    DATAR     Screens, display user entry
    HOST     R/3 System, Name of application server
    DATLO     Date and time, local date of user
    TIMLO     Date and time, local time for user
    ZONLO     Date and time, time zone of user
    Hope this helps,
    Sajan Joseph.

  • Empty System Fields after error creates a short dump

    Hello!
    Could someone please help me?
    After calling a function, I catch errors with sy-subrc NE 0.
    Handling this error the "normal" way throws a short dump (I marked the row bold), because all the system fields are empty!
    Could someone please give me a hint, how to handle this situation?
    Many thanx in advance!
    Perhaps some code:
    CALL FUNCTION 'Z_CONFIRM'
      EXPORTING
        is_bdnum      = is_bed-bdnum
      TABLES
        et_return     = lt_return
      EXCEPTIONS
        error_occured = 1
        lock_error    = 2
      OTHERS        = 3.
    IF sy-subrc NE 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    I get a short dump with this:
    Content of the system fields
    Name
    Wert
    SY-SUBRC
    1
    SY-INDEX
    1
    SY-TABIX
    1
    SY-DBCNT
    0
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    HTTP-Steuerung
    SY-MSGTY
    SY-MSGID
    SY-MSGNO
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO
    0
    SY-DATUM
    20080117
    SY-UZEIT
    080907
    SY-XPROG
    SY-XFORM

    Hi,
    You need to capture the message like this way
    IF sy-subrc eq 1.
       message e999(your mesage class) with 'Error Occured'.
    endif.
    IF sy-subrc eq 2.
       message e999(your mesage class) with 'Lock error'.
    endif.
    IF sy-subrc eq 3.
       message e999(your mesage class) with 'Other Errors'.
    endif.

  • ADDING SOURCE SYSTEM FIELD IN MY QUERY

    HI ALL,
    i WANT TO DEVELOP A CUSTOM REPORT WITH SOURCE SYSTEM FIELD IN MY QUERY WHICH THE FIELD IS NOT COMING FROM THE CUBE . PLEASE COULD SOMEONE HELP ME IN THIS REGARD.
    MAX PTS GIVEN
    REGARDS,
    AXEL

    Hi Axel...
    if yo want ot jump from a query to some R/3 report, pgm, transaction...you can use the report-report interface (RRI)...but if you want to add a field on the same screen of your query, you can go for a virtual char/KF: it's enough to add it in your cube, let it empty and fill it runtime with some ABAP lines with an RFC link to the table field you need...
    pay attention to performance issues and to the consideration that this field will be empty if your RFC fails (foe unavailability of R/3 system, for example...)
    Otherwise try to use a virtual cube !
    Hope it helps!
    Bye,
    Roberto

  • How to provide F4 help for a field in table control

    Hi Friends,
    I have requirement like below.
    1.Create one custom transaction code with header and item information.
    2.In item level, we will be designed table control to enter/display the data.
    3.Table control’s first field will be material number and next DOT number (Material may have many DOT numbers) and so on.
    4.First user will enter material number in the table control’s first row’s first field and go to DOT number field.
    5.DOT number has drop down option. If user selects drop down box of DOT number, he gets all the DOT numbers available in database. User selects one DOT number and double clicks on it then it will be populated in DOT number field box.
    But for point number 5,  business wants like when ever user enters material number in table control first field then select DOT number’s drop down then they want to see the particular material’s DOT numbers only in the drop down list for selection. Not all DOT numbers available in data base. Same thing should happen for all item lines in table control.
    Please see below example. 
    Assume data base table has 10 DOT numbers. But material number has only 2 DOT numbers. When ever user enters material number in item level table control and selects DOT number’s drop down then it should show only 2 DOT numbers which are related to particular material number. Not all 10 DOT numbers.
    Could you please suggest me, how can we achieve this?

    Hello,
    Check this :-
    For POV
    Input Help in Dialog Modules
    You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
    PROCESS ON VALUE-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. The module <mod> is defined in the ABAP program like a normal PAI module. However, the contents of the screen field <f> are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
    Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These all have the prefix F4IF_. The most important are:
    F4IF_FIELD_VALUE_REQUEST
    Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    F4IF_INT_TABLE_VALUE_REQUEST
    This function module displays a value list that you created in an ABAP program. The value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
    There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
    Input help in dialog modules
    REPORT DEMO_DYNPRO_F4_HELP_MODULE.
    TYPES: BEGIN OF VALUES,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    END OF VALUES.
    DATA: CARRIER(3) TYPE C,
    CONNECTION(4) TYPE C.
    DATA: PROGNAME LIKE SY-REPID,
    DYNNUM LIKE SY-DYNNR,
    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
    VALUES_TAB TYPE TABLE OF VALUES.
    CALL SCREEN 100.
    MODULE INIT OUTPUT.
    PROGNAME = SY-REPID.
    DYNNUM = SY-DYNNR.
    CLEAR: FIELD_VALUE, DYNPRO_VALUES.
    FIELD_VALUE-FIELDNAME = 'CARRIER'.
    APPEND FIELD_VALUE TO DYNPRO_VALUES.
    ENDMODULE.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE VALUE_CARRIER INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = 'DEMOF4HELP'
    FIELDNAME = 'CARRIER1'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CARRIER'.
    ENDMODULE.
    MODULE VALUE_CONNECTION INPUT.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = PROGNAME
    DYNUMB = DYNNUM
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = DYNPRO_VALUES.
    READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
    SELECT CARRID CONNID
    FROM SPFLI
    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
    WHERE CARRID = FIELD_VALUE-FIELDVALUE.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'CONNID'
    DYNPPROG = PROGNAME
    DYNPNR = DYNNUM
    DYNPROFIELD = 'CONNECTION'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = VALUES_TAB.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The input fields have been adopted from the program fields CARRIER and CONNECTION. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    MODULE INIT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON VALUE-REQUEST.
    FIELD CARRIER MODULE VALUE_CARRIER.
    FIELD CONNECTION MODULE VALUE_CONNECTION.
    When the user chooses input help for the individual fields, the following is displayed:
    For the Airline field, the POV module VALUE_CARRIER is called. The function module F4IF_FIELD_VALUE_REQUEST displays the input help for the component CARRIER1 of the structure DEMOF4HELP from the ABAP Dictionary, namely the search help DEMOF4DE. The user’s selection is returned to the screen field CARRIER.
    For the Flight number field, the POV module VALUE_CONNECTION is called. The function module DYNP_VALUE_READ transports the value of the screen field CARRIER into the program. The program then reads the corresponding values from the database table SPFLI into the internal table VALUES_TAB using a SELECT statement, and passes the internal table to F4IF_INT_TABLE_VALUE_REQUEST. This displays the internal table as input help, and places the user’s selection into the screen field CONNECTION.
    For POH------------
    Field Help
    There are three ways of displaying field help for screen elements:
    Data Element Documentation
    If you place a field on the screen in the Screen Painter by copying a ABAP Dictionary field, the corresponding data element documentation from the ABAP Dictionary is automatically displayed when the user chooses field help (as long as the help has not been overridden in the screen flow logic).
    For further information about creating data element documentation, refer to data elements.
    Data Element Supplement Documentation
    If the data element documentation is insufficient, you can expand it by writing a data element supplement
    Data element supplement documentation contains the heading Definition, as well as the following others:
    Use
    Procedure
    Examples
    Dependencies
    To create data element supplement documentation for a screen, choose Goto ® Documentation ® DE supplement doc. from the element list of the screen. A dialog box appears in which the system proposes a number as the identified for the data element supplement. You can then enter help texts for the above headings using the SAPscript editor.
    Data element supplement documentation created in this way is program- and screen-specific. Any data element supplement documentation created in the ABAP Dictionary with the same number is overridden by the screen-specific documentation. You can link existing data element supplement documentation created in the ABAP Dictionary with a screen field by using the table THLPF. To do this, crate a new row in THLPF containing the following data: Program name, screen name, field name, and number of the data element supplement documentation.
    To display data element supplement documentation, you must code the following screen flow logic in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> [MODULE <mod>] WITH <num>.
    After PROCESS ON HELP-REQUEST, you can only use FIELD statements. If there is no PROCESS ON HELP-REQUEST keyword in the flow logic of the screen, the data element documentation for the current field, or no help at all is displayed when the user chooses F1. Otherwise, the next FIELD statement containing the current field <f> is executed.
    If there is screen-specific data element supplement documentation for the field <f>, you can display it by specifying its number <num>. The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
    You can fill the variables, for example, by calling the module <mod> before the help is displayed. However, the FIELD statement does not transport the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event.
    For further information about data element supplement documentation, refer to Data Element Supplements.
    Calling Help Texts from Dialog Modules
    If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be dependent on the user input.
    The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
    HELP_OBJECT_SHOW_FOR_FIELD
    This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
    HELP_OBJECT_SHOW
    Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
    For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
    Field help on screens.
    REPORT DEMO_DYNPRO_F1_HELP.
    DATA: TEXT(30),
    VAR(4),
    INT TYPE I,
    LINKS TYPE TABLE OF TLINE,
    FIELD3, FIELD4.
    TABLES DEMOF1HELP.
    TEXT = TEXT-001.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE F1_HELP_FIELD2 INPUT.
    INT = INT + 1.
    CASE INT.
    WHEN 1.
    VAR = '0100'.
    WHEN 2.
    VAR = '0200'.
    INT = 0.
    ENDCASE.
    ENDMODULE.
    MODULE F1_HELP_FIELD3 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = TEXT-002
    CALLED_FOR_TAB = 'DEMOF1HELP'
    CALLED_FOR_FIELD = 'FIELD1'.
    ENDMODULE.
    MODULE F1_HELP_FIELD4 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW'
    EXPORTING
    DOKCLASS = 'TX'
    DOKLANGU = SY-LANGU
    DOKNAME = 'DEMO_FOR_F1_HELP'
    DOKTITLE = TEXT-003
    TABLES
    LINKS = LINKS.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. It has the following layout:
    The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    PROCESS ON HELP-REQUEST.
    FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
    FIELD FIELD3 MODULE F1_HELP_FIELD3.
    FIELD FIELD4 MODULE F1_HELP_FIELD4.
    The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
    The following field help is displayed:
    When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event.
    If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2.
    When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD.
    When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
    Regards,
    Deepu.K

  • Logical System field in BD10/BD14 need as a Mandatory Field

    Hi All,
    Good Day,
    We have Logical System field in BD10 or BD14 etc.. TCodes and I would like to make this field as a Mandatory field. The reason for this is, while sending the Materials using BD10, and If I haven't enter any value for this field, IDOCs are getting generated and sending to all the logical systems say Dev, Quality and Production too. I want to avoid this.
    So Is there anyway where we can make the filed "Logical System" as a mandatory field.
    Thanks in Advance.
    Param.

    HI Param,
    try  BAPI_IDOC_INPUT1and check it in WE57 tcode.
    hope this helps
    regards
    Aakash Banga

  • System field which stores the no.of lines in a main (table) window

    Hi,
       I would like to know which system field stores the value of height of the main window. based on that I would like to trigger an explicit page-break. Can anyone tell me that field name (table name). I have been looking into one solution which I couldnot find. this is the last option I have.
       I have posted couple of posts but still struggliing with the issue.
    based on the no.of lines remaining in the page I have to draw one line there and move to next page. (page break.) can anyone help me please
    thanks
    reddy

    Hi,
    In the main window if u create the table there r 3 options.
    header
    main
    footer.
    In footer option in outputoptions there r 2 option at print time.
    at page break.
    at end of table.
    U select both the options. Then u  r problem will be solved.
    Rewardpoints if useful.
    Regards
    (YUGANDHAR.P)

  • CLM How to add search-help for extension field(New Company Field) in MA.

    Hi all,
         Based on demand,I need to extend a new field(Company) in Master Agreement.
    But I do not know how to add search-help for this field,just like User Accont page.
    Anyone can help me ?thank you very muck.
    Regards,
    JackyCheng

    Hello Jacky,
    To combine all the answers above and have a topic-based reply please go through the below steps:
    #1. Inactivate the current extension field Company (I see it is actually a String value and this is not what you want to have)
    #2. Go to Setup -> System Setup -> Extension Reference Types
    Check if you already have a Company reference type
    If not, create a new Extension Reference Type for Class Company. Fill in all required information.
    #3. Create a new Extension Attribute
    Select Data Type: Object Reference
    Now you can add the Company type as reference
    Regards,
    Bogdan Toma

  • Display system fields on web templates

    Is there any way to display system fields like SY-DATUM, SY-TZONE, etc. on a web template?
    I am talking about the fields NOT provided as general text elements (ROLLUPTIME, REPTXTLG, etc) in the text element web item.

    Sorry Nikhil, my java skills are not upto mark..
    but you can try the following
    <h4>It is now <script type="text/javascript">
    <!--
    var currentTime = new Date()
    var month = currentTime.getMonth() + 1
    var day = currentTime.getDate()
    var year = currentTime.getFullYear()
    document.write(month + "/" + day + "/" + year)
    //-->
    </script>
    </h4> ... I am sure some one over here will answer better..
    2) coming to accesing r3 tables.. i am afraid you may have to go for customer exits..
    regards,
    hari

  • Top of page system fields

    How to use Top of page system fields like sy-tvar0 to sy-tvar1
    thanks in advance
    Rishi

    Hello ,
    in the standard title you can have &0 ... &n. The program must put the values to fields SY-TVAR0 to SY-TVARN.
    see this sample:
    Pass the variables for the list heading
    MOVE SY-Title TO SY-TVAR0.
    MOVE SY-Datum TO SY-TVAR1.
    MOVE SY-Pagno TO SY-TVAR2.
    From output screen: System>List>List Header
    Click on first white line and enter the following title to the yellow box: Title: &0…………… Date: &1………. Page No: &2......
    Hope its what you mean.
    Vasanth

  • Which system field returns the number of records returned after a select?

    Which system field returns the number of records returned after a select?
    a) sy-index
    b) sy-recno
    c) sy-lncnt
    d) sy-dbcnt
    e) sy-tabix

    Hi,
       SY-DBCNT
    Regards,
    Prashant

Maybe you are looking for