Concatenating sy-tabix with field name

While doing BDC I need to concatenate the sy-tabix with the field as the BDC is on item level.
LOOP AT request INTO wa_request.
    PERFORM dynpro USING:
        'X'     'SAPMV50A'              '1000',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR('& sy-tabix &')',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR(01)',
ENDLOOP.
As you can see I am trying to concatenate the sy-tabix so it will appear as LIPS-POSNR(01) and then LIPS-POSNR(02) .. How to accomplish this. Thank you

Hi,
You need to use a specific field for that :
data : text_field(14) type c,
       idx(2) type n.
idx = sy-tabix.
concatenate 'LIPS-POSNR(' idx ')' into text_field.
and then you can use it in your BDC coding :
    PERFORM dynpro USING:
        'X'     'SAPMV50A'              '1000',
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            text_field,
        ' '     'BDC_OKCODE'            '=CHSP_T',
        ' '     'BDC_CURSOR'            'LIPS-POSNR(01)',
Regards,
Nicolas.

Similar Messages

  • Creating a view on KONA & KONH -  Failed with 'Field name DATAB not unique'

    Hi all,
        I am creating a view on KONA (Rebate Agreement) & KONH (Conditions Header) tables. The link is KONA-KNUMA = KONH-KNUMA_AG.
       The field 'DATAB' exists in both tables and I have included those two fields under 'View Fields' . When I tried to activate the View, it fails with 'Field name DATAB not unique'.
       The following is the complete error message:
    Message no. MC060
    Diagnosis
    When you define aggregates (views, lock objects or matchcode objects), you can assign the aggregate fields your own names (the system assigns names to the basic fields automatically). These names must be unique.
    System response
    The system has established that the names assigned to the aggregate fields in an aggregate definition are not unique and issues an error message.
    Procedure
    Assign unique names to the aggregate fields in question.
       Why I am not able to create the view after including a field that EXISTS in two tables, PLEASE ?
    Thanks,
    Venkat.

    Hi,
    you can include both fields (but what for??); most likely KNUMH will also complain after fixing DATAB (just a guess...).
    You can include both fields if you name them differently (different aliases):
    In the view fields tab, enter two different names in the column "view field".
    this will work.
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • Save the PDF Form with Field Name

    HI Guys,
    I have the Requirment in PDF Form.The PDF Form is generated with the Adobe Live Cycle Designer.After generating the PDF Form the user filled the details in the form and save the filled form.while clicking the Save button the default PDF name is displayed in the File name box.The Requirement is iam having one field in the form.The Field name value should needs to displayed in the File name box during saving.Is it possible.Once its possible please let me know.This is needs to be delivered very shortly.
    Thanks & Regards,
    SatheshKumar R

    You can save the form with name generated from a field's value, but therefore you will have to install a folder level script first and design a custom save button in your form.
    You cannot do this with the applications save or save as... buttons, and you also cannot rename a file on submit.
    Here's an example form and a folder level script. (Maybe to complicated fdr newbies)
    http://thelivecycle.blogspot.com/search/label/Save

  • CFUPDATE problem with field name beginning with a number

    I have a form (actually several) that is gathering data for a survey. I tried to use cfupdate to update the data elements and got a string index out of range error. I tested again without the form fields that began with numbers and it worked just fine. I then tried to enclose the offending field names in () and []. Both times I got same error. Does anyone have a work around for this? The code and error are below.
    Changing the field names is not really an option. This survey has almost 400 data points and most of the fields begin with the question number.
    Thanks
    DW
    <cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', '2_a_fy12', '2_b_fy09', '2_b_fy10', '2_b_fy11', '2_b_fy12', '2_c_fy09', '2_c_fy10', '2_c_fy11', '2_c_fy12', '2_d_fy09', '2_d_fy10', '2_d_fy11', '2_d_fy12', '2_e_fy09', '2_e_fy10', '2_e_fy11', '2_e_fy12', '2_f_fy09', '2_f_fy10', '2_f_fy11', '2_f_fy12', '2_g_fy09', '2_g_fy10', '2_g_fy11', '2_g_fy12', '2_h_fy09', '2_h_fy10', '2_h_fy11', '2_h_fy12', '2_i_fy09', '2_i_fy10', '2_i_fy11', '2_i_fy12', '2_j_fy09', '2_j_fy10', '2_j_fy11', '2_j_fy12', '2_k_fy09', '2_k_fy10', '2_k_fy11', '2_k_fy12', '2_l_fy09', '2_l_fy10', '2_l_fy11', '2_l_fy12', central_office, dept_office, incl_other, 3_a_fy09, 3_a_fy10, 3_a_fy11, 3_a_fy12, 3_b_fy09, 3_b_fy10, 3_b_fy11, 3_b_fy12, 3_c_fy09, 3_c_fy10, 3_c_fy11, 3_c_fy12, 3_d_fy09, 3_d_fy10 3_d_fy11, 3_d_fy12, 3_e_fy09, 3_e_fy10, 3_e_fy11, 3_e_fy12, 3_f_fy09, 3_f_fy10, 3_f_fy11, 3_f_fy12, 3_g_fy09, 3_g_fy10, 3_g_fy11, 3_g_fy12, 3_h_fy09, 3_h_fy10, 3_h_fy11, 3_h_fy12, 3_i_fy09, 3_i_fy10, 3_i_fy11, 3_i_fy12, 3_j_fy09, 3_j_fy10, 3_j_fy11, 3_j_fy12, 3_k_fy09, 3_k_fy10, 3_k_fy11, 3_k_fy12, 3_l_fy09, 3_l_fy10, 3_l_fy11, 3_l_fy12">
    String index out of range: -2
    The error occurred in C:\Inetpub\wwwroot\directory\process_arra_suvey_2.cfm: line 12
    12 : <cfupdate datasource="#application.fdp_datasource#" tablename="arra_survey1" dbtype="ODBC" formfields = "entry_no, 2_a_fy09, '2_a_fy10', '2_a_fy11', ...

    I think you have run one of CFUPDATE's limitations.  I am not 100% certain, but I do not think cfupdate provides a way to escape invalid column names like yours.  In which case you may need to do a regular UPDATE within a  cfquery instead... or rename your columns.
    fields that began with numbers
    Most databases discourage creating column names that start with a number (or other restricted characters).  While many databases will allow you to escape invalid names, it is simpler all around to avoid them altogether.  Otherwise, you may have to escape the names in every single query. The recommendations vary, but usually object names that begin with a  letter, and contain only letters, numbers and underscores are considered  safe.
    This survey has almost 400 data points and most of the fields begin with the question number.
    Four-hundred (400) is a lot of columns for a single table.  The fact that they all them seem to contain the same type of information (ie response to a question) is an indication that data should probably be stored in a separate table, as rows, not columns.  For example questions could be stored in one table, possible answers in another, and the results of an individual test/survey stored in a third table.  A structure like that is much easier to query, can easily accommodate changes (add/remove questions, responses, etcetera) without having modify the table every time.

  • Cfpdfform issue with field name

    We have a pdf that is filled out by ColdFusion using <cfpdfform>.  A field in the pdf was named incorrectly so there are 2 fields named the same thing (let's say "field1").  As the system has populated (many) copies of the pdf the same value has gone into both fields named "field1" when really two different values should have gone into a "field1" and "field2".
    I need to get the information correctly entered into "field2" so I had two ideas...
    I researched was renaming the field in all the pdfs using ColdFusion (so I could repopulate the new field) but that does not appear to be possible.  But to confirm... Can you rename a field in a pdf using ColdFusion?
    If I couldn't rename it I just wanted to change what was in the second occurrence of "field1".  I tried using the index attribute of <cfpdfformparam> but that only applies to forms created in LiveCycle.  Does anyone know how to populate only one occurrence of a field name in a pdf using <cfpdfform>?
    As an aside I have corrected the field name in the pdf for future use.

    No, it is why advance users do not use the wizard.
    Have a look at OpenOffice.org and its form creation. Once you add your fields in OpenOffice.org, just export to PDF and the form fields will be named just like you named in them in OpenOffice.org and the drop down values carry over.

  • Need infotype along with field name

    Dear Experts,
    Can anyone please tell me the Infotype & Field name from where the following fields can be fetched.
    Location
    Designation
    Department
    Division
    company
    Date of joining
    date of confirmation
    gross salary(if yes which salary type i have to select).
    Please tell me soon as i need to finish the development.
    Kind Regards
    Sajid

    Hi Sajid,
    Requested information is found in IT0001 and IT0041.
    Location  :    PA0001-WERSK or PA0001-BTRTL
    Designation  : PA0001-PLANS
    Department  : PA0001-ORGEH
    Division       :  May be PA0001-WERKS
    company    : PA0001-BUKRS
    Date of joining     : PA00041
    date of confirmation : PA0041
    gross salary(if yes which salary type i have to select).
    Get the confirmation from your Functional consultant.. He is the best person to give you the accurate information.
    Regards,
    Narendra.

  • Alias with field name in MS SQL Server

    Is it possible that we can define alias for field name in MS SQL Server?
    For example:
    mytable : Id, Name, Value
    Could we define "AnotherName" for "Name" field that we can call it from sql
    SELECT anothername from mytable

    I don't know if you can "permanently" create an alias
    without a view or something like that but if you just
    want another name when you execute a select do this:
    Select name as another name from tableAt least in some databases the syntax for that can vary slightly. So the following might be needed....
    Select name as 'another name' from table

  • InDesign Data Merge problem with field names

    Hi to all.
    I am trying to create a sales catalog with data merge. I have product name, description, old price, new price and image. However, when I select my .csv file as data source, InDesign recognizes different fields as one and puts them all together. I tried copying and pasting to new spreadsheet,  retyping the info myself, saving as tab delimited and as comma delimited file. To better illustrate, here are exemplary screenshoots:
    Please help, I don't understand what I am doing wrong. I'm a regular InDesign user for almost a decade, but I haven't used DataMerge until now, never needed it. I have basic knowledge in Excel, so if I did something wrong there please inform me (do I have to tell it somehow to "split" them into fields?).
    Thank you in advance!

    I would recommend to test with different export types in Excel like:
    Tab-Divided txt files instead of csv or with different decoding.
    When you have learned which is working fine, you can select this always in the future.
    (There is also a possibility inside InDesign to change the type between tab separated text and CSV. In my experience it depends very much on the Excel version which would work. Microtrash has a bad history in localizing their programs, e.g. here in German, in numbers we write coma instead of a point, a point of a coma, so decided MS to exchange it every where on the Mac version with the outcome, that CSV files are not coma separated but dot separated and are not working on any data base import. So I can only use tab separated files.)

  • Table updation with field name

    Hi All,
    There is a question running in my mind. If i am filling multiple data in a same text area then whether it will update the database table for that column or not. Lets take an example.
    I have a workspace MTN, USERNAME: [email protected] and PASSWORD is tiyotim. In that i have an application made 41727. Under page 1 of ths application i have created few items in one region and a submit button.
    If you see my database i have a table called CLUB which is having columns ID, NAME, CLASS, CLASS_ATTRIBUTE_NAME_1, CLASS_ATTRIBUTE_VALUE_1 etc. The table dont have any data as of now
    In my application page when i am putting
    ID as 1,
    NAME as MARKETING,
    CLASS as MARKET,
    CLASS_ATTRIBUTE as NAME - COSMETIC
    NAME - PEN
    NAME - PAPER
    When i press the GO button my CLUB table columns should update in this form
    ID as 1,
    NAME as MARKETING,
    CLASS as MARKET,
    CLASS_ATTRIBUTE_NAME_1 = NAME
    NAME
    NAME
    CLASS_ATTRIBUTE_VALUE_1 = COSMETIC
    PEN
    PAPER
    Would like to hear from you on all.
    Thanks in advance.
    Regards

    Hi Munky,
    I understand what you are tried conveying me...but my question is not that. If you see my fields in the application you will find it is taking the database column and on basis of that it is updating the database columns. But for the field CLASS_ATTRIBUTE_NAME_1 which is the text area. If i write in the text area NAME- COSMETIC, it should update NAME data in the CLASS_ATTRIBUTE_NAME_1 column of database and COSMETIC data in the CLASS_ATTRIBUTE_VALUE_1.
    Hope i made you able to understand what i am trying to ask.
    Regards

  • Can field names not start with a single letter camel case?

    I am using Hibernate 3.6, JPA 2.0, and Spring 3.0.6. I have fields in my objects like the following:
    class PersonContact {
    Long eAddressCpId;
    ElectronicAddress eAddress;
    I use field access (in my orm files) and queries/inserts/etc work without an issue. The fields are both in the class as well as in the orm files. But on startup of the application, the JPA configuration load spits out warnings:
    2011-02-22 15:38:10,785 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.contactpoint.ElectronicAddress.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,801 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PersonContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddressCpId not found in class but described in <mapping-file/> (possible typo error)
    2011-02-22 15:38:10,817 [[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader - Property com.foo.model.person.PartyContact.eAddress not found in class but described in <mapping-file/> (possible typo error)
    If I change my field names to be from eAddress to electronicAddress and eAddressCpId to electronicAddressCpId , then I don't get these warnings.
    Is there requirements around the field names?
    Thanks..jay

    Hi,
    If you have this PersonContact.eAddress in your mapping file, Hibernate will look in PersonContact for
    1 a public field called eAddress
    2 a public member method called getEAddress (Or geteAddress).
    3 a public member method called isEAddress(Or isAddress)
    Your fields aren't public, so my guess is that getEAddress is found. From this "get" is stripped away and the rest is "decapitalized".
    This decapitalize method has these lines:
    if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
          Character.isUpperCase(name.charAt(0))){
                 return name;
    }So yes, I think there is a requirement with fields names. (Or rather getter names, since fields aren't decapitalized)
    You could try and change your mapping file into PersonContact.EAddress to see if I'm right.
    Btw, I am not a Java programmer, so this is what I could manage from a poor mans view at this (Open) source of Hibernate's.
    Regards
    Peter

  • Dynamic creation of table with variable field-names

    HI
    I am looking for a way in order to create a table during runtime. The problem is that the field names of the table are provided in another table.
    TO illustrate the case at hand, an example:
    The initial table contains the fields
    UserID - attribut_name - attribute_value
    Example Data
    d00587 - first_name    - Jon
    d00587 - last_name     - Smith
    d00587 - age           - 48
    d00127 - first_name    - Jack
    d00127 - last_name     - Daniels
    d00127 - position      - Manager
    Now I need to create a table per User that looks as follows:
    for user d00587
    first_name  -  last_name  -  age
    **Values
    Jon         -  Smith      -  48
    for user d00127
    first_name  -  last_name  -  positioin
    Jack        -  Daniels    -  Manager
    I split the initial table by sorting it according to userID and then looping into an itab with an AT END OF userid, thus I receive the table per user:
    Example iTab
    UserID - attribut_name - attribute_value
    Example Data
    d00587 - first_name    - Jon
    d00587 - last_name     - Smith
    d00587 - age           - 48
    However I have no clue on how to create a new internal table with field-names = attribute_name.
    Does anybody have an idea or example code for this?
    Thanks a lot for your help,
    Kind regards,
    Mingolo

    Hello Minima
    Here is some sample coding:
    DATA:
      gt_fcat  type lvc_t_fcat,
      gdo_data TYPE REF TO data.
    FIELD-SYMBOLS:
      <gt_itab> TYPE table.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
    *     I_BUFFER_ACTIVE              =
        i_structure_name             = 'MARA'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
      CHANGING
        ct_fieldcat                  = gt_fcat
      EXCEPTIONS
        inconsistent_interface       = 1
        program_error                = 2
        OTHERS                       = 3
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
    *      I_STYLE_TABLE             =
        it_fieldcatalog           = gt_fcat
      IMPORTING
        ep_table                  = gdo_data
    *      E_STYLE_FNAME             =
      EXCEPTIONS
        generate_subpool_dir_full = 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.
    ASSIGN gdo_data->* TO <gt_itab>.
    In your case, you would call the function module with your tables (D00587, D00127). Remove all fields from the fieldcatalog that you do not need before calling the static method.
    Regards
      Uwe

  • Problem getting field names with OCI

    Hi,
    I am trying to retrieve the names of select fields through the
    OCI using OCIParamGet() followed by OCIAttrGet(). This seems to
    work OK, in most cases, except occasionally I get one field name
    concatenated to the following field name.
    Has anyone else seen this before, and if so, how do you get
    around it? Let me know if you need more details.
    Thanks in advance.
    Tim
    null

    That worked. Thanks!
    Peter Kls (guest) wrote:
    : Timothy Sim (guest) wrote:
    : : Hi,
    : : I am trying to retrieve the names of select fields through
    the
    : : OCI using OCIParamGet() followed by OCIAttrGet(). This seems
    to
    : : work OK, in most cases, except occasionally I get one field
    : name
    : : concatenated to the following field name.
    : Try evaluating the string length returned by the OCIAttrGet
    call.
    : The name string is not (always) \nul terminated.
    : : Thanks in advance.
    : : Tim
    : good luck
    : Peter
    null

  • Structure field names at run time.

    Hi Experts ,
    i am not sure whether this is right question or not. i have on structure say X with fields name and age. is there any way to represent this field with the help of another variable at runtime.
    ex : Can i represent X-name as X-i where 'I' is s a string and will hold 'NAME' as a value.
    can this be achievable. kindly give reply.
    Thanks in advance.

    types:begin of ty_x,
          name type c,
          end of ty_x.
    data:wa type ty_x.
    data:v type string.
    field-symbols:<fs> type any.
    data:field(4) type c.
    start-of-selection.
    field = 'NAME'.
    concatenate 'WA-' field into v.
    assign (v) to <fs>.
    <fs> = 'A'.
    write wa-name.

  • Field names and Tables

    Can You please help me out with field names and tables where i can find .
    u2022     Buyers Name : From PO. Person ( Customer, Not Joerns) who places the PO.
    u2022     Order Number : Stryker Order number [Leave a place holder]
    u2022     Order Type : Stryker order type [Leave a place holder]
    u2022     REV: Joerns SAP Material revision. Can be found in Material Master.
    u2022     FROM: Based on the shipping point. Should be the shipping point address.
    u2022     Ship-To: Ship-To address in the sales order
    u2022     Shipped Quantity: Handling Unit quantity
    u2022     Shipping date : Item Delivery date
    u2022     Packing Slip : [Leave a place holder]
    u2022     KANBAN ID : [Leave a place holder]
    u2022     Team Number : [Leave a place holder]
    u2022     Part Number : SAP MATNR
    u2022     Part Description : Material Description
    u2022     Boxes: handling Unit count number. Say for example, there are 10 HU Labels are printed in this , then the first label should show 1 / 10, second should show 2 / 10, third should show 3 / 10 and goes on till tenth, which should show 10/10.
    u2022      PO Number : Purchase order Number

    Hi..
       All these field name you can trace from SE15 transaction.
    goto se15-> expand abap dictionary-> expand fields-> double click on table fields-> enter your fields description in the field description tab of beside screen-> click on xcute.
    ex: Part description
      enter MaterialDescription* and click on xcute , you will get MAKTX from MAKT table.
    All the best.
    Thanks,
    Naveen.I

  • I want to create an ALV  with two row fields name

    Hi
    I want to create an ALV  with two row fields name. please suggest how to do it or send some sample code
    thanks

    Hi,
    see this link
    http://****************/Tutorials/ALV/ALVMainPage.htm
    http://www.alvrobot.com.ar/tutorial.php
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b09ac4d5-e3ad-2910-6a81-96d1b861928c
    http://abapprogramming.blogspot.com/2007/11/alv-check-boxes-sample-code.html
    REPORT zalv5 NO STANDARD PAGE HEADING.
    Description----
    TOPICS INTRODUCED:
    1. Learn about the u2018Standardu2019 PF-Status that comes as default.
    2. Exclude function codes from u2018Standardu2019 PF-Status and customize it.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_data OCCURS 0,
    qmnum LIKE qmel-qmnum,
    qmart LIKE qmel-qmart,
    qmtxt LIKE qmel-qmtxt,
    ws_row TYPE i,
    ws_char(5) TYPE c,
    chk,
    END OF i_data.
    DATA: report_id LIKE sy-repid.
    DATA: ws_title TYPE lvc_title VALUE 'An ALV Report'.
    DATA: i_layout TYPE slis_layout_alv.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: i_events TYPE slis_t_event.
    DATA: i_header TYPE slis_t_listheader.
    DATA: i_extab TYPE slis_t_extab.
    SELECT qmnum
    qmart
    qmtxt
    INTO TABLE i_data
    FROM qmel
    WHERE qmnum <= '00030000010'. LOOP AT i_data. i_data-ws_row = sy-tabix. i_data-ws_char = 'AAAAA'. MODIFY i_data. ENDLOOP. report_id = sy-repid. PERFORM f1000_layout_init CHANGING i_layout. PERFORM f2000_fieldcat_init CHANGING i_fieldcat. PERFORM f3000_build_header CHANGING i_header. PERFORM f4000_events_init CHANGING i_events. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING * I_INTERFACE_CHECK = ' ' * I_BYPASSING_BUFFER = * I_BUFFER_ACTIVE = ' ' i_callback_program = report_id * I_CALLBACK_PF_STATUS_SET = ' ' * I_CALLBACK_USER_COMMAND = ' ' * I_CALLBACK_TOP_OF_PAGE = ' ' * I_CALLBACK_HTML_TOP_OF_PAGE = ' ' * I_CALLBACK_HTML_END_OF_LIST = ' ' * i_structure_name = ' ' * I_BACKGROUND_ID = ' ' i_grid_title = ws_title * I_GRID_SETTINGS = is_layout = i_layout it_fieldcat = i_fieldcat * IT_EXCLUDING = * IT_SPECIAL_GROUPS = * IT_SORT = * IT_FILTER = * IS_SEL_HIDE = * I_DEFAULT = 'X' i_save = 'A' * IS_VARIANT = it_events = i_events * IT_EVENT_EXIT = * IS_PRINT = * IS_REPREP_ID = * I_SCREEN_START_COLUMN = 0 * I_SCREEN_START_LINE = 0 * I_SCREEN_END_COLUMN = 0 * I_SCREEN_END_LINE = 0 * IT_ALV_GRAPHICS = * IT_ADD_FIELDCAT = * IT_HYPERLINK = * IMPORTING * E_EXIT_CAUSED_BY_CALLER = * ES_EXIT_CAUSED_BY_USER = TABLES t_outtab = i_data EXCEPTIONS program_error = 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.
    *& Form F1000_Layout_Init
    FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.
    CLEAR i_layout.
    i_layout-colwidth_optimize = 'X'.
    i_layout-edit = 'X'.
    ENDFORM. " F1000_Layout_Init
    *& Form f2000_fieldcat_init
    FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: line_fieldcat TYPE slis_fieldcat_alv.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMNUM'. " The field name and the table
    line_fieldcat-tabname = 'I_DATA'. " name are the two minimum req.
    line_fieldcat-key = 'X'. " Specifies the column as a key (Blue)
    line_fieldcat-seltext_m = 'Notification No.'. " Column Header
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMART'.
    line_fieldcat-ref_tabname = 'I_DATA'.
    line_fieldcat-hotspot = 'X'. " Shows the field as a hotspot.
    line_fieldcat-seltext_m = 'Notif Type'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'QMTXT'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_m = 'Description'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'WS_ROW'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_m = 'Row Number'.
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'WS_CHAR'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_l = 'Test Character Field'.
    line_fieldcat-datatype = 'CHAR'.
    line_fieldcat-outputlen = '15'. " You can specify the width of a
    APPEND line_fieldcat TO i_fieldcat. " column.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'CHK'.
    line_fieldcat-tabname = 'I_DATA'.
    line_fieldcat-seltext_l = 'Checkbox'.
    line_fieldcat-checkbox = 'X'. " Display this field as a checkbox
    line_fieldcat-edit = 'X'. " This option ensures that you can
    " edit the checkbox. Else it will
    " be protected.
    APPEND line_fieldcat TO i_fieldcat.
    ENDFORM. " f2000_fieldcat_init
    *& Form f3000_build_header
    FORM f3000_build_header USING i_header TYPE slis_t_listheader.
    DATA: gs_line TYPE slis_listheader.
    CLEAR gs_line.
    gs_line-typ = 'H'.
    gs_line-info = 'This is line of type HEADER'.
    APPEND gs_line TO i_header.
    CLEAR gs_line.
    gs_line-typ = 'S'.
    gs_line-key = 'STATUS 1'.
    gs_line-info = 'This is line of type STATUS'.
    APPEND gs_line TO i_header.
    gs_line-key = 'STATUS 2'.
    gs_line-info = 'This is also line of type STATUS'.
    APPEND gs_line TO i_header.
    CLEAR gs_line.
    gs_line-typ = 'A'.
    gs_line-info = 'This is line of type ACTION'.
    APPEND gs_line TO i_header.
    ENDFORM. " f3000_build_header
    *& Form f4000_events_init
    FORM f4000_events_init CHANGING i_events TYPE slis_t_event.
    DATA: line_event TYPE slis_alv_event.
    CLEAR line_event.
    line_event-name = 'TOP_OF_PAGE'.
    line_event-form = 'F4100_TOP_OF_PAGE'.
    APPEND line_event TO i_events.
    CLEAR line_event.
    line_event-name = 'PF_STATUS_SET'.
    line_event-form = 'F4200_PF_STATUS_SET'.
    APPEND line_event TO i_events.
    ENDFORM. " f3000_events_init
    FORM F4100_TOP_OF_PAGE *
    FORM f4100_top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = i_header.
    ENDFORM.
    FORM F4200_PF_STATUS_SET *
    FORM f4200_pf_status_set USING i_extab TYPE slis_t_extab.
    REFRESH i_extab.
    PERFORM f4210_exclude_fcodes CHANGING i_extab.
    SET PF-STATUS 'STANDARD' OF PROGRAM 'SAPLSALV' EXCLUDING i_extab.
    ENDFORM.
    *& Form f4210_exclude_fcodes
    FORM f4210_exclude_fcodes USING i_extab TYPE slis_t_extab.
    DATA: ws_fcode TYPE slis_extab.
    CLEAR ws_fcode.
    ws_fcode = '&EB9'. " Call up Report.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&ABC'. " ABC Analysis.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&NFO'. " Info Select.
    APPEND ws_fcode TO i_extab.
    ws_fcode = '&LFO'. " Information.
    APPEND ws_fcode TO i_extab.
    ENDFORM. " f4210_exclude_fcodes
    thanks
    karthik
    reward me if usefull

Maybe you are looking for

  • Error while creating Repository Service in informatica

    Hi Guys, When i try to create repository service informatica8.1.1.I'm getting the below error driverconnect.exe has encountered a problem and needs to close.We are sorry for the inconvenience.

  • Unknown Error (-1450)

    I've been trying to get a video file that came with an album I've purchased but everytime the file is done downloading I get a message saying "A problem occured during the download. An unknown error occured (-1450).". I've tried to find the code in t

  • WRT54G - Nat 3 on PS3

    I've been working on this on and off for months, but I finally sat down and gave it a good 2 hours tonight with no results - Here is what I have done - this is with both UPNP on and off on both the router and the ps3. . . . I first forwarded the pers

  • ITunes Home Sharing freezes when playing on a Mac

    So I have a Mac Mini with all of my movies and TV shows (purchased through iTunes, digital download, etc.). I use Home Sharing to share that content with my Macbook Pro and Apple TV. Everything worked great before Mavericks. I upgraded both the Macbo

  • I have had a problem downloading and installing Adobe Acrobat Pro XI

    this is in Creative cloud app Lightroom photoshop premiew etc all working fine the message is "installation failed Errors encountered during installation.(7)" here is the code from the more information section Exit Code: 7 Please see specific errors