Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in declaration

Former Member
0 Kudos

Hi Experts,

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

listasci = t_xlstab

listobject = list_tab1

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

IF sy-subrc NE 0.

when iam using this it asks as t_xlstab so how i want to declare this one

MOhan

6 REPLIES 6

Former Member
0 Kudos

You mean you don't know how to declare that internal table?

How about you double click on the function and see how the table parameter is defined?

Former Member
0 Kudos

I dont understand it clearly.

I think you can declare it like this.

DATA: BEGIN OF t_xlstab OCCURS 100,

line LIKE bapitrform-line,

END OF t_xlstab.

pls check 'Where used list' on it. you can see the code.

Former Member
0 Kudos

That table has no structure so you could use a table of strings:


DATA generictable TYPE TABLE OF string.

0 Kudos

Hi i want to prepare the report as i want to submit the another report using varint in alv report so pls provide the solutuion

and at the same time i want to download the dat from the alv output

Thanks & Regards

Mohan

0 Kudos

On my ECC6 system.

function list_to_asci.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(LIST_INDEX) LIKE  SY-LSIND DEFAULT -1
*"     REFERENCE(WITH_LINE_BREAK) TYPE  C DEFAULT SPACE
*"  EXPORTING
*"     REFERENCE(LIST_STRING_ASCII) TYPE  LIST_STRING_TABLE
*"     REFERENCE(LIST_DYN_ASCII) TYPE REF TO  DATA
*"  TABLES
*"      LISTASCI OPTIONAL
*"      LISTOBJECT STRUCTURE  ABAPLIST OPTIONAL
*"  EXCEPTIONS
*"      EMPTY_LIST
*"      LIST_INDEX_INVALID
*"----------------------------------------------------------------------

So why not use that declaration:

*"     REFERENCE(LIST_STRING_ASCII) TYPE  LIST_STRING_TABLE

Former Member
0 Kudos

THANKS FOR ALL

Mohan