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

How to use FIELDSYMBOS in BSP layout page

I have one requirement to use dynamic table in BSP page. It's ok in event handler to do it, but I don't know how to put it in the layout. Anyboyd knows it? Give me a hand please.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2004 at 06:20 AM

    My answer would look a little ridiculous, but I don't see why it is going to be any different in a BSP Layout. So if you can expand or let us know more about the problem, perhaps a better solution can be put forth(or someone here can teach me something new).

    Just use the <% %> for your ABAP code and you can write the same ABAP code which you wrote in the event handler.

    And at the same time do not forget to put the page attribute at the top mentioning abap.

    If you have any issues with the dynamic table, perhaps you might look into this weblog:

    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table

    Regards,

    Subramanian V.

    Message was edited by: Subramanian Venkateswaran(Just had to add that last line 😉

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Shooting in the dark - our favorite game here.

      Are you asking how to put the new table you just created in your page layout?

      If so--->

      Make sure the table is defined in the Page Attributes and the Type definitions (if custom) are defined in the TYPEs.

      Then in the on OnCreate or where ever you need it put your code to create the table.

      Then in your Page Layout

      <htmbl:tableView id="myTab"
                       table="<%= itab %>" />
      

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

    I explain it more clearly.

    I want to migrate some report in ABAP to BSP. The ABAP report will output many kinds of internal table into cluster table. I try to export the fieldcategory and internal table from cluster table and put it on BSP page by using field-symbols. But any variable used in layout must be declared in page attribute. But it's impossible to delcare field-symbols in page attribute.

    -


    Sample Code----


    TYPE-POOLS slis.

    FIELD-SYMBOLS: <in_table> TYPE TABLE.

    DATA: called_from TYPE SY-REPID,

    called_screen TYPE SY-DYNNR,

    called_uuid(22) TYPE C,

    called_data(1) TYPE C,

    timestamp TYPE BALTIMSTMP,

    gt_fieldcat TYPE slis_t_fieldcat_alv,

    wa_fieldcat LIKE LINE OF gt_fieldcat.

    DATA: field_category TYPE lvc_t_fcat,

    wa_field_category LIKE LINE OF field_Category.

    DATA: POINTER TYPE REF TO DATA.

    GET TIME STAMP FIELD timestamp.

    WRITE timestamp TO called_uuid.

    called_from = SY-REPID.

    called_data = 'X'.

    called_screen = 500.

    EXPORT called_from FROM called_from

    called_screen FROM called_screen

    called_uuid FROM called_uuid

    called_data FROM called_data

    TO MEMORY ID 'YQMDMSCLAIM01'.

    SUBMIT YQMDMSCLAIM USING SELECTION-SET '100TEST'

    AND RETURN.

    IMPORT field_category TO field_category

    FROM DATABASE INDX(QM) ID called_uuid.

    *Create a table dynamically

    CALL FUNCTION 'Y_CREATE_TABLE'

    EXPORTING rt_fieldcat = field_category

    IMPORTING pointer = pointer.

    *Import from cluster table

    CALL FUNCTION 'Y_IMPORT_TABLE_FROM_CLUSTER'

    EXPORTING

    rt_fieldcat = field_category

    area = 'QM'

    called_uuid = called_uuid

    IMPORTING

    pointer = pointer.

    ASSIGN pointer->* TO <in_table>.

    Message was edited by: Paul Lee

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Subramanian V. is correct there shouldn't be any problems at all.

      You might also want to check out this weblog and save yourself a lot of time if you are only outputting a static report (one does has no interaction unless the page is loaded or re-loaded)

      /people/sap.user72/blog/2004/11/10/bsphowto-generate-pdf-output-from-a-bsp

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.