Skip to Content
author's profile photo Former Member
Former Member

ITAB in BSP application

Hi,

Does BSP support ITAB (with header line)? If NO, then how can the data be appended to ITAB with LOOP AT in the event handler?

Is there any equivalent component for ITAB in BSP?

Thank you

arun

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 03:54 AM

    As far as possible avoid Internal table with Header lines. Since a lot of object oriented technology is used in BSP.

    I suggest you use the following methodology:

    TYPES: begin of ty_mytype
             myfirstfield type myfirstdatatype,
             mysecndfield type mysecnddatatype,
           end of ty_mytpe.
    

    For workarea,

    DATA: wa_myworkarea type ty_mytype.
    

    For internal table,

    DATA: lt_myinternaltable type table of ty_mytype.
    

    Field-Symbols,

    FIELD-SYMBOLS: <FS> TYPE ty_mytype.
    

    In order to loop at internal table.

    LOOP AT lt_myinternaltable to wa_myworkarea.
    *** process with wa_myworkarea
    ENDLOOP.
    

    or

    LOOP AT lt_myinternaltable ASSIGNING <FS>
    *** process with <FS>
    ENDLOOP.
    

    Regards,

    Subramanian V.

    P.S. - Habits die hard. Bad Habits die harder.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 10:49 PM

    Hi,

    Now let me put my question in different way. I have 10 <htmlb:inputfield> in my page and in my Event handler i want to call a BAPI which will return values for those 10 Input fields. In this case it is an ITAB.

    I need to assign First field of ITAB to First inputfield and 10 field of ITAB to 10 inputfield. How do i do that? I cannot assign directly <%= ITAB-field1%>

    I tried to use 10 seperate page attribute fields and assign inputfields value as "<% = field1 %>" etc. But in my event handler when i assign ITABS first field to page attributes first field it says "ITAB has no header line"

    What is the best way to handle this situation? Is there any better way to do this process.

    Thank you

    arun

    Message was edited by: Arun Prasad

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2004 at 02:03 PM

    If you want to get really fancy you could use MVC and databind directly into the individual cells in your internal table. If you can get past the bad humor, the following weblog has an example of this:

    /people/thomas.jung3/blog/2004/09/24/important-lessons-involving-bsp-model-view-binding-and-a-frozen-burrito

    This can be a short cut when you are dealing with a large number of input fields or if the input fields are created dynamically.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.