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

String in non-RFC table types

Hello all,

I have a structure that also have two members of ABAP type String (yes, that string, not char255 or so 😊). When I declare a table type inheriting from that type, everything is quite fine, so it seems table having dyn. Strings is okay as far as I do not want to do RFC with it.

Now, when I create a function module and want to use that table type, the compiler gives me that error message upon syntax check:

>>

when using "WITH HEADER LINE", the line type cannot be a table type

<<

Now, that is no ABAP that I have written but the auto-generator for the include. That line it complains, there is just no definition with a header line. So, is using the String type possible at all? I think this is an error having indirectly to do with it, since I know the difference on table with and without header line/work area and so...

Btw.: this is a 4.7 Release I am talking about.

😔 Thanks and regards,

Timo

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2005 at 04:14 PM

    Hi,

    it is possible:

    1. define your structure ZZ_DDIC_STRING with strings in DDIC

    2. define a table type ZZ_DDIC_STRING_TAB using this structure ZZ_DDIC_STRING

    3. define a RFC FM with Imp/Exp-parameters (not a Table-Param) using this table type ZZ_DDIC_STRING_TAB

    4. call the FM:

    DATA: lt_string_tab type ZZ_DDIC_STRING_TAB,
          ls_string_tab type line of lt_string_tab.
    
    ls_string_tab-string1 = 'some text'.
    ls_string_tab-string2 = 'some more text'.
    append ls_string_tab to lt_string_tab.
    
    CALL FUNCTION XYZ
        DESTINATION 'MY_DESTINATION'
        EXPORTING
          I_STRING_TAB = lt_string_tab[]
        IMPORTING
          E_STRING_TAB = lt_string_tab[]
        .
    

    This will work with almost any deep structure too.

    Regards,

    Juergen

    P.S.: pls. post Reward Points if this was usefull! Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Done 😊

      Now the radiobuttons were back again. In my login from this afternoon they were gone cos being saved in the session so, the rewarding process just worked half-way: not stored in DB but session flag saved :-).

      Regards, Timo

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.