Application Development and Automation 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: 
Read only

Problem in declaration

Former Member
0 Likes
648

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
Read only

Former Member
0 Likes
622

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?

Read only

Former Member
0 Likes
622

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.

Read only

Former Member
0 Likes
622

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


DATA generictable TYPE TABLE OF string.

Read only

0 Likes
622

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

Read only

0 Likes
622

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

Read only

Former Member
0 Likes
622

THANKS FOR ALL

Mohan