Skip to Content

Passing Internal tables in PARAMETERs with header lines

Working on 4.6, and need to pass Tables in parameter options.

PERFORM btcs_del_auth_ul USING tg_btcs01[] CHANGING TG_BTCS_SEL[].

But when I am looping inside this Perform, its throwing error and says no header line is defined for this parameter.

plz suggest how to pass Internal table with header lines in a parameter.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2010 at 01:48 PM

    do not do it!

    My advice would even further be: "Do not make use of tables with headerlines". This scenario is outdated and should not be used anymore, for several reasons.

    delcare yourself a work area in your form and then do:

    loop at table into workarea.
      ....
    endloop.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2010 at 03:14 PM

    >

    > Working on 4.6, and need to pass Tables in parameter options.

    >

    > PERFORM btcs_del_auth_ul USING tg_btcs01[] CHANGING TG_BTCS_SEL[].

    >

    > But when I am looping inside this Perform, its throwing error and says no header line is defined for this parameter.

    >

    > plz suggest how to pass Internal table with header lines in a parameter.

    This is because you have the square brackets. When you specify '[]' for an internal table with header line, you pass the table body & not the header line.

    Read the SAP documentation for details.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2010 at 03:25 PM

    My advice is also not to use headerlines. Anyway check the following:

    if you pass the parameter like this

    PERFORM form_1 changing gt_table.

    the form interface should be declared with a parameter like this

    FORM form_1 changing pt_table type ty_t_table.

    ty_t_table should be a table type with header-line, (the same type as gt_table).

    The other option is to pass using the TABLES parameter like this, and you will automatically get a headerline for the table inside the form. This code is obsolete in newer versions.

    PERFORM form_1 TABLES gt_table.

    FORM form_1 TABLES pt_table structure ty_structure.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2010 at 03:30 PM

    HI

    I beleive Suhas is right

    remove [ ] .

    But also you should not use internal table with header line, instead always use work area.

    thanks

    Lalit Gupta

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2010 at 07:13 AM

    I hv used field symbols.

    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.