Error which validating selection screen data in subroutine

Hi,this is my code
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for  rbkp-belnr,                                         "Invoice number
                s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  for  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
                s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type,              "Document type
                s_lifnr for rbkp-lifnr.                                          "Vendor
selection-screen end of block b_selection.
at selection-screen.
select belnr gjahr from rbkp into table i_inv_data
                       where belnr  IN s_belnr
                       and   gjahr  IN s_gjahr
                       and   blart  IN s_blart
                       and   rbstat IN s_stat.
                       and   lifnr  IN s_lifnr.
  if i_inv_data[] is initial.
  message e000 with 'No record matching the search criteria'(001).
  endif.
This is working fine...now when I try to modularise it, it is nt working
selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for  rbkp-belnr,                                         "Invoice number
                s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  for  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
                s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type,              "Document type
                s_lifnr for rbkp-lifnr.                                          "Vendor
selection-screen end of block b_selection.
at selection-screen.
perform sub_validate_data.
FORM SUB_VALIDATE_DATA.
select belnr gjahr from rbkp into table i_inv_data
                       where belnr  IN s_belnr
                       and   gjahr  IN s_gjahr
                       and   blart  IN s_blart
                       and   rbstat IN s_stat.
                       and   lifnr  IN s_lifnr.
  if i_inv_data[] is initial.
  message e000 with 'No record matching the search criteria'(001).
  endif.
ENDFORM.                    " SUB_VALIDATE_DATA
the error which I m getting is ' IN s_belnr should be followd by an internal table'Please tell how can I modularize this code and put the checking part in subroutine

If I remove the period after s_stat your code is compiling without problems:
SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR  rbkp-belnr,
                s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,
                s_stat  FOR  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT 'X',
                s_blart FOR rbkp-blart OBLIGATORY DEFAULT 'X',
                s_lifnr FOR rbkp-lifnr.
SELECTION-SCREEN END OF BLOCK b_selection.
AT SELECTION-SCREEN.
  PERFORM sub_validate_data.
*&      Form  SUB_VALIDATE_DATA
*       text
FORM sub_validate_data.
  SELECT belnr gjahr FROM rbkp INTO TABLE i_inv_data
                     WHERE belnr  IN s_belnr
                     AND   gjahr  IN s_gjahr
                     AND   blart  IN s_blart
                     AND   rbstat IN s_stat
                     AND   lifnr  IN s_lifnr.
  IF i_inv_data[] IS INITIAL.
    MESSAGE e000(oo) WITH 'No record matching the search criteria'(001).
  ENDIF.
ENDFORM.                    " SUB_VALIDATE_DATA
Check, if you have an additional period somewhere else, or any other subtle differenec.
Michael

Similar Messages

  • Error Message in selection screen Status bar is getting truncated

    Hi Guys,
    Error Message in selection screen Staus bar is getting truncated (full message is not getting displayed).... can anybody tell me how to reslove this

    Hi
    Maimum we can give the error message length is 50 char. If you give more than that it will get truncated.
    What you can do this split 50 and 50 like that you can give 200 chnars.
    Data : Text1 type char50
              Text2 type char50
    If sy-surc ne 0.
    Message Text1 Text2  TYPE "E'' or 'S'
    endif.

  • Throwing error msg in selection screen

    Hi all,
    I want to throw one error message in selection screen .
    This message is of more than 1000 chars.   and i want to show these 1000 chars in  a pop up window and when i press 'TICK' mark, it should stay only in the selection screen . It should not go to the output screen and it should not leave the transaction either..
    Can anyone help me in this by providing the coding for this..
    Regards,
    Shanthi

    Hi Shanthi,
    Your requirement is fulfilled by standard SAP message processing. Through message maintenance (TCode SE91), you define a message with a long text.
    Let us say the message class is ZSHANTHI and the message number is 025. Besides the message short text you defined say 'Something wrong with &. Refer Long Text', un-check the checkk-box 'Self Explanatory', choose this message number and click on 'Long Text' button on the application toolbar. You will get long text editor and you can compose your 1000 lines or even 1000 pages story there.
    Now let us see what you need to do in the report program. Your requirement is 'Issue the error message. When user hits Tick, display long text in a modal window and later stay in the same selection screen'.
    You just issue this message in AT SELECTION-SCREEN event as:
    MESSAGE e025(ZSHANTHI) WITH 'requirement'.
    The error message will display on the status bar and when user hits the message X button, the long text with your story will appear in a modal box and still selection screen stays.
    If your client is adamant in having only 'Tick' mark (this sucks me), you can add DISPLAY LIKE 'S' addition to the above message statement. But this addition works only 4.7 upwards.
    If you want to  issue this error message in list processing events like START-OF-SELECTION, then, you need to issue the following statements:
    MESSAGE s025(ZSHANTHI) WITH 'still weird requirement'.
    Note the message type 'S' above.
    LEAVE LIST-PROCESSING.
    Hope this helps.
    Regards
    Suresh Radhakrishnan

  • Error message in Selection Screen

    Hi
    reference no (p_ref) is in my selection screen.
    If this field contains special characters (\ / : * ? " |, ) system must prompt  error message in selection screen. How to do this. Pls help me
    Regards
    Anbu

    after input form the user
    use if condtion
    and validate the field and through message.........
    Reward IF........
    Regards
    Anbu
    Edited by: Anbu B on Jun 17, 2008 8:04 AM
    Edited by: Anbu B on Jun 17, 2008 8:06 AM

  • Selection screen data validation problem

    Hello all,
    Transaction FBL3N has an authority check on company.  If the user enters a company for which they have no authority, a message displays and they can then exclude that company.  The following steps can be repeated as many times as are required to ensure that all selection-screen values can be used.  The program, RFITEMGL, is doing all of the authorization using the code of the logical database that is part of the program.
    I added the following logic in my program, which works fine, except when the entered values fail the authority check, I can't get off of screen 1000 and get to the sub-screen to exclude the unauthorized values unless I first change the range on screen 1000.
    For an example:
    If I enter range '100 ' through '900 ', and there is an unauthorized company, '200' in that range,  I can't add '200' as an excluded value without first changing the range to '100 ' to ' 199 ' on screen 1000.
    Any thoughts on a solution?  I tried looking at the logical database code without much success.
    at selection-screen on s_bukrs.
    check if person entering company has authority
    data: i_t001 type table of t001.
    data: w_t001 type          t001.
      select * from t001
               into table i_t001
               where bukrs in s_bukrs.
      loop at i_t001 into w_t001.
        authority-check object 'F_BKPF_BUK'
                    id 'BUKRS' field w_t001-bukrs
                    id 'ACTVT' field '03'.
        if sy-subrc ne 0.
          message e000(zf) with 'Company'
                              w_t001-bukrs
                              'not authorized'.
        endif.
      endloop.
    Thanks
    Bruce

    Hi,
    Yes this is normal way as you entered wrong value in s_bukrs unless and until you change that you cannot proceed further.
    instead of at selection-screen on s_bukrs.
    use at selection-screen.
    if s_bukrs is not initial.
    do processing .,
    and display info message'
    endif.
    or ., instead of error message  use dispaly like 'E'
    like.,
    at selection-screen on s_bukrs.
    check authority.,
    MESSAGE 'You are not Authorized to use the Company Code' type 'S' display like 'E'.
    hope this helps you,
    Thanks & Regards.

  • Set cursor on error field in selection screen

    Hi ALL,
    How to place the cursor on a particular selection screen field?I am doing validation if validation fails for a particular field the program should give error mesg and the cursor should place on the error field only but it's going to the Ist field on the selection can somebody tell me how do this? I tried with set cursor field <fieldname) but not working I am doing validations on at-selection screen.
    Thanks&Regard
    mahesh

    Hi chandrasekhar find my code below
    this code i am writing under  at selection-screen.
    *&      Form  Z_VALIDATE_TVKOV
    FORM z_validate_tvkov .
      DATA: i_vtweg LIKE vbak-vtweg.
      IF NOT s_vtweg-low IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                     WHERE vtweg = s_vtweg-low.
        IF sy-subrc <> 0.
        set cursor FIELD 'S_VTWEG-LOW'.
        MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
       ENDIF.
      IF NOT s_vtweg-high IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                            WHERE vtweg = s_vtweg-high.
        IF sy-subrc <> 0.
          MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
      ENDIF.
    ENDFORM.                    " Z_VALIDATE_TVKOV

  • Custom error messages in selection-screen

    Hello All,
    I have one query. I have developed a vendor aging report. In the SELECT-OPTIONS, there are 5 fields namely company code, business area, vendor group, vendor code and cash management group. What the user wants is if he enters any invalid value in any of the 5 fields, custom error message should be displayed like 'invalid company code' etc. I think we have to write these messages in 'at-selection-screen' event. Can u help me out with a sample code snippet w.r.t the above program? I have written the code as:
    AT SELECTION-SCREEN.
      IF S_BUKRS ne BSIK-BUKRS.
      MESSAGE e000. 'invalid company code' TYPE 'E'.
      ENDIF.
    But not giving the correct output.i.e. even if I enter a valid company code, the error message is displayed. Can u help me in solving this problem?
    Thanks and Regards,
    Satvik
    Edited by: Satvikpanchal on Jul 22, 2011 9:42 AM

    Hi,
      use AT SELECTION-SCREEN on S_BUKRS-low.
    Use select query for checking the Company code in T001 table check the
    Company code already exist or not? If it is not there show the message.
    Code like
    AT SELECTION-SCREEN on S_BUKRS-low.
    select single bukrs into lv_bukrs
          from T001 where bukrs = s_bukrs-low.
    if sy-subrc NE 0.
    MESSAGE e000. 'invalid company code' TYPE 'E'.
    ENDIF.
    i think you company code is select option so you have to check S_BUKRS-high also.
    using the event AT SELECTION-SCREEN on S_BUKRS-high.
    Regards,
    DHina..

  • To display  selection screen date parameter  in smart form

    Hi to all
    My requirement is to display date parameters which are given at selection screen (module pool program ) on the smart forms.
    I just want to dispaly this on selection.
    SO_BLDAT-LOW
    SO_BLDAT-HIGH
    Please guide.
    Regards
    Anubhav

    Hi,
      If you are calling the smartform from the module program then export the parameters from the calling FM  
      and import the same in the smartform.
    Regards,
    Sandeep

  • How to display error documents in selection screen level

    Hi,
      Currently Iam doing Smartforms for journal voucher. Iam taking multiple documents as input and displaying relavent item data for each.
    Now, my requirement is i want to display invalid document numbers at selection screen level. For example there are 30 invalid document number i want to display them before start-of-selection.
    Thanks in advance,
    Regards,
    Chinna..

    i have a query......say i am using a selet-options s_ebeln for ekko-ebeln.
    i want to display error messages for
    1>lower limit cant be greater than upper limit?
    2>for special cahracters given in the select-options fields.....etc...
    now when i am writing the code......
    if s_ebeln-low gt s_ebeln-high.
    message e001.
    it is showing SAP's message not mine.
    but ....if my s_ebeln-high field is 0.
    then my message is showing.
    pls give me the codes for these?

  • Selection screen :data retrieval

    how to pass the contents of each individual input fieldfrom the selection screen to the ABAP program.My selection screen is
    SELECTION-SCREEN BEGIN OF BLOCK ID WITH FRAME TITLE TEXT-001.
       SELECT-OPTIONS:
                        EBELN  FOR EKKO-EBELN NO INTERVALS,
                        AEDAT  FOR EKKO-AEDAT.
    SELECTION-SCREEN END OF BLOCK ID.
    i need value of ebeln(purchase order) which i select on selection screen as i have to use it in query in same program.

    Hi,
    You can get the details in an internal table<b> i_ekko</b> as shown below.Use this table for further procesing in your program.
    SELECTION-SCREEN BEGIN OF BLOCK ID WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN NO INTERVALS,
    S_AEDAT FOR EKKO-AEDAT.
    SELECTION-SCREEN END OF BLOCK ID.
    DATA: i_ekko type standard table of ekko with header line.
      SELECT  *  FROM EKKO INTO TABLE i_lfa1 WHERE ebeln IN s_ebeln AND aedat IN s_aedat.
    *Always reward points for helpful answers.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • Urgent :Show all records till selection screen date

    Hi Techis
    i want to show all records till selected date , selection screen consist of date also and my select statement is given below so any body pls tell me what changes i hav to make so that all records till particular date should b shwn
    Select statement is
    SELECT BUKRS KUNNR
    BLDAT
    GSBER
    DMBTR
    BUDAT
    GJAHR
    SGTXT
    SAKNR
    SHKZG
    PRCTR FROM BSID INTO corresponding fields of TABLE IT_FINAL WHERE BUKRS IN S_BUKRS AND
    SAKNR IN S_SAKNR AND
    GSBER IN S_GSBER AND
    PRCTR IN S_PRCTR AND
    BUDAT IN S_BUDAT AND
    KOSTL IN S_KOSTL.
    and selection screen is ...
    SELECTION-SCREEN BEGIN OF BLOCK AGE WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_BUKRS FOR BSID-BUKRS," OBLIGATORY DEFAULT 'TCIL'
    S_KUNNR FOR KNA1-KUNNR,
    S_SORTL FOR KNA1-SORTL,
    S_SAKNR FOR BSID-SAKNR DEFAULT '15110013',
    S_KTOKD FOR KNA1-KTOKD ,"OBLIGATORY DEFAULT 'LTOB'
    S_GSBER FOR BSID-GSBER,
    S_PRCTR FOR BSID-PRCTR,
    S_KOSTL FOR BSID-KOSTL,
    S_GJAHR FOR BKPF-GJAHR," OBLIGATORY.
    S_BUDAT FOR BSID-BUDAT DEFAULT SY-DATUM."OPEN ITEM DATE
    *PARAMETERS : P_BUDAT LIKE BSID-BUDAT DEFAULT SY-DATUM." OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK AGE.
    rewars for help ful ans

    Hi Santosh,
    If your requirement is up to the selection date you'd better use a parameter (which can only hold one value).
    Then define a range in your program:
    DATA:
    zlt_budat_range TYPE RANGE OF budat,
    zls_budat_range LIKE LINE OF zlt_budat_range.
    zls_budat_range-sign = 'I'.
    zls_budat_range-option = 'LE'.
    zls_budat_range-low = pa_budat.
    APPEND zls_budat_range TO zlt_budat_range.
    .....AND budat IN zlt_budat_range.
    Regards,
    John.

  • Selection Screen - Date and Time

    Hi,
    I have given a selection screen where the user needs to key in the input in the following format
    dd.mm.yyyy hh:mm:ss.
    Reason is that the database fetching these elements accepts only in this criteria.
    Now as they look into automating this program, they would want to automatically take the current system date and time - 24 hours .
    How do I achieve this in the above format? If this is not possible, let me know if i can make the selection screen with normal sap date format and convert it to the above format on passing to the select statement.
    Regards
    Sam

    Hi Sam,
    See this. Is this your requirement.
    With this we are able to get Current time-stamp to selection parameter.
    REPORT ZTEST.
    DATA: L_TS TYPE TZNTSTMPS,
           L_TS_C TYPE CHAR14.
    PARAMETERS:
    P_TMSTMP TYPE TMSTMP OBLIGATORY MEMORY ID TEST.
    INITIALIZATION.
       GET TIME STAMP FIELD L_TS.
       MOVE L_TS TO L_TS_C.
       SET PARAMETER ID  'TEST' FIELD L_TS_C.
    The output is
    Jogeswara Rao K

  • Error in adding selection screen fields

    Hi All,,
    I am getting error when i add a selection screen parameters in module pool.
    I copied stadard program to custom one, when I add an input field to screen it gives information message saying
    "Selection screen: Report generation makes screen changes ineffective". 
    If though if i add the selection screen, when i relogin newly added screeen disappears.
    Can any one y this is happening?

    Hi,
    You can find a lot of posts on the SDN. Please search for them.
    [What create docking container on a subscreen?]
    [Query Regarding 'cl_gui_docking_container'] are a few

  • Filtering of the data based upon the selection screen data using ldb

    Hi Experts ,
    I am using ldb pnpce, for my report ,and i created my own report category with selection paramaters
    action type and payroll area
    now the problem is when i am giving the action type as Z0 ,the data to be extracted is not getting filtered
    based upon the action type ,the data consists the records having different action types other than Z0
    Please give me some solution for this

    Thanks Durga ,but the link wat ever u was for hiding the selection screen fields
    but my question is when am using get pernr event my data is not getting filtered with the selection screen paramater value
    i,e m giving action type as only hiring ,but m getting the data for all the action types ,its not filtering based upon my selection

  • Displaying selection screen data on alv header in multiple rows and columns

    Hi
    Presently in my requirement , whatever  the data entered in  selection screen  should display  on alv header  and item details on alv grid display.
    for eg...
    on alv header
      customer no :  1000 to 2000         sales order no: 111
      name :    gff to ff                                 sales org:
      city:                                         country:
      item details below this   
      plz guide me how to solve this issue.
    Thanks & Regards,
    Pradeep

    Hi,
    Check this code this may help you.
    <code>
    TYPE-POOLS : SLIS.
    TABLES VBRK.
    TYPES : BEGIN OF TY_VBRK,
            VBELN TYPE VBRK-VBELN,
            VKORG TYPE VBRK-VKORG,
            VTWEG TYPE VBRK-VTWEG,
            SPART TYPE VBRK-SPART,
            FKDAT TYPE VBRK-FKDAT,
            END OF TY_VBRK,
            BEGIN OF TY_VBRP,
            VBELN TYPE VBRP-VBELN,
            POSNR TYPE VBRP-POSNR,
            MATNR TYPE VBRP-MATNR,
            ARKTX TYPE VBRP-ARKTX,
            FKIMG TYPE VBRP-FKIMG,
            NETWR TYPE VBRP-NETWR,
            END OF TY_VBRP,
            BEGIN OF TY_TARGET,
            VBELN TYPE VBRK-VBELN,
            VKORG TYPE VBRK-VKORG,
            VTWEG TYPE VBRK-VTWEG,
            SPART TYPE VBRK-SPART,
            FKDAT TYPE VBRK-FKDAT,
            POSNR TYPE VBRP-POSNR,
            MATNR TYPE VBRP-MATNR,
            ARKTX TYPE VBRP-ARKTX,
            FKIMG TYPE VBRP-FKIMG,
            NETWR TYPE VBRP-NETWR,
            END OF TY_TARGET.
    DATA : T_VBRK TYPE TABLE OF TY_VBRK,
           W_VBRK TYPE TY_VBRK,
            T_VBRP TYPE TABLE OF TY_VBRP,
            W_VBRP TYPE TY_VBRP,
            T_TARGET TYPE TABLE OF TY_TARGET,
            W_TARGET TYPE TY_TARGET,
    FIELD CATALOG ******************
            T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
            W_FCAT TYPE SLIS_FIELDCAT_ALV,
    *************************************SUB TOTALS AND SORTING***********
            T_SORT TYPE SLIS_T_SORTINFO_ALV,
            W_SORT TYPE SLIS_SORTINFO_ALV,
    *************************************FOR LIST HEADER******************
            T_LIST_HEAD TYPE SLIS_T_LISTHEADER,
            W_LIST_HEAD TYPE SLIS_LISTHEADER,
            T_LIST_HEAD1 TYPE SLIS_T_LISTHEADER,
            W_LIST_HEAD1 TYPE SLIS_LISTHEADER,
    *************************************FOR LIST HEADER******************
            W_LAYOUT TYPE SLIS_LAYOUT_ALV,
    ************************************FOR EVENTS************************
            T_EVENT TYPE SLIS_T_EVENT,
            W_EVENT TYPE SLIS_ALV_EVENT.
    *********************************SELECT OPTIONS***********************
    SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN DEFAULT 90005316 TO 90005330.
    **RETRIVING DATA************************
    PERFORM DATA_RETRIVE.
    **BUILDING THE FIELD CATALOG************
    PERFORM BUILD_FCAT.
    **BUILDING THE TABLE FOR LIST HEADER****
    PERFORM BUILD_LIST_HEAD.
    *******************************CALLING THE FUNCTION MODULE************
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM     = SY-REPID
        I_CALLBACK_TOP_OF_PAGE = 'LIST_TOP_OF_PAGE'
        IT_FIELDCAT            = T_FCAT
        IT_SORT                = T_SORT
      TABLES
        T_OUTTAB               = T_TARGET.
    *&      Form  DATA_RETRIVE
    FORM DATA_RETRIVE .
    SELECT VBELN VKORG VTWEG SPART FKDAT FROM VBRK INTO CORRESPONDING FIELDS
    OF TABLE T_VBRK WHERE VBELN IN S_VBELN.
      IF SY-SUBRC EQ 0.
        SORT T_VBRK BY VBELN.
        SELECT VBELN POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE
         T_VBRP FOR ALL ENTRIES IN T_VBRK WHERE VBELN = T_VBRK-VBELN.
      ENDIF.
      LOOP AT T_VBRP INTO W_VBRP.
        LOOP AT T_VBRK INTO W_VBRK WHERE VBELN = W_VBRP-VBELN.
          W_TARGET-VBELN = W_VBRK-VBELN.
          W_TARGET-VKORG = W_VBRK-VKORG.
          W_TARGET-VTWEG = W_VBRK-VTWEG.
          W_TARGET-SPART = W_VBRK-SPART.
          W_TARGET-FKDAT = W_VBRK-FKDAT.
          W_TARGET-POSNR = W_VBRP-POSNR.
          W_TARGET-MATNR = W_VBRP-MATNR.
          W_TARGET-ARKTX = W_VBRP-ARKTX.
          W_TARGET-FKIMG = W_VBRP-FKIMG.
          W_TARGET-NETWR = W_VBRP-NETWR.
          APPEND W_TARGET TO T_TARGET.
        ENDLOOP.
      ENDLOOP.
      SORT T_TARGET BY VBELN.
    ENDFORM.                    " DATA_RETRIVE
    *&      Form  BUILD_FCAT
    FORM BUILD_FCAT .
      W_FCAT-COL_POS = 1.
      W_FCAT-FIELDNAME = 'VBELN'.
      W_FCAT-SELTEXT_M = 'BILLING NO'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 2.
      W_FCAT-FIELDNAME = 'VKORG'.
      W_FCAT-SELTEXT_M = 'SALES ORGANIZATION'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 3.
      W_FCAT-FIELDNAME = 'VTWEG'.
      W_FCAT-SELTEXT_M = 'DISTRIBUTION CHANNEL'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 4.
      W_FCAT-FIELDNAME = 'SPART'.
      W_FCAT-SELTEXT_M = 'DIVISION'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 5.
      W_FCAT-FIELDNAME = 'FKDAT'.
      W_FCAT-SELTEXT_M = 'CREATION DATE'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 6.
      W_FCAT-FIELDNAME = 'POSNR'.
      W_FCAT-SELTEXT_M = 'BILLING ITEM'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 7.
      W_FCAT-FIELDNAME = 'MATNR'.
      W_FCAT-SELTEXT_M = 'MATERIAL NUM'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 8.
      W_FCAT-FIELDNAME = 'ARKTX'.
      W_FCAT-SELTEXT_M = 'DESCRIPTION'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 9.
      W_FCAT-FIELDNAME = 'FKIMG'.
      W_FCAT-SELTEXT_M = 'QUANTITY'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 10.
      W_FCAT-FIELDNAME = 'NETWR'.
      W_FCAT-SELTEXT_M = 'NET VALUE'.
      W_FCAT-DO_SUM = 'X'.
      APPEND W_FCAT TO T_FCAT.
    ENDFORM.                    " BUILD_FCAT
    *&      Form  BUILD_LIST_HEAD
    FORM BUILD_LIST_HEAD .
      DATA : L_DATE(10),
             L_TIME(8).
      W_LIST_HEAD-TYP = 'S'.
      W_LIST_HEAD-KEY = 'Sales org :'.
      W_LIST_HEAD-INFO = S_VBELN-LOW .
      APPEND W_LIST_HEAD TO T_LIST_HEAD.
      CLEAR W_LIST_HEAD.
      W_LIST_HEAD-TYP = 'S'.
      W_LIST_HEAD-KEY = 'TO '.
      W_LIST_HEAD-INFO =  S_VBELN-HIGH.
      APPEND W_LIST_HEAD TO T_LIST_HEAD.
      CLEAR W_LIST_HEAD.
    ENDFORM.                    " BUILD_LIST_HEAD
    *&      Form  LIST_TOP_OF_PAGE
    FORM LIST_TOP_OF_PAGE .
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = T_LIST_HEAD.
    ENDFORM.                    " LIST_TOP_OF_PAGE
    <code>
    Regards

Maybe you are looking for

  • Populate pdf form after user enters specific customer id

    I am brand new to this and need to know the best way to populate certain fields on a pdf form. I have made the database connection and it works correctly. I want the user to enter a specific customer id. ( I already have the sql code for the select).

  • Is there a way to control the computer name that an application sees in 2012 Server (i.e. Terminal Server Compatibility flags)

    I'm looking for the proper location to set the TS Program Compatibility Flags (for controlling application execution in execute mode) under 2012 server. On Server 2003, we can use: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Termi

  • USB In-Op

    My wifes S10 3t just returned from the repair depot (it had a grub failure and the replaced the main board, and updated the BOIS) and now the UBS ports no longer function.  they display in device manager but nothing happens if I plug something in. am

  • Questionable programming on Channel 35

    Several Saturday nights ago about 11:20 pm , I was flipping through the local channels and was shocked to see a filmed session of a man paddling a woman on Channel 35!  At first I thought I had stumbled upon a CineMax channel but soon realized that t

  • Error creating a GRN

    Good afternoon, When I try to save a Goods Return note i get the following error. "Invalid object name 'ORDP'.(CINF)" I've tried with different BPs and different items and still the same error. Thanks.......Naomi