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 header and item data

former_member189410
Participant
0 Likes
446

Hi,

i m using this *****************************************

SUBMIT RFTBCF00 EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = list_tab

EXCEPTIONS

not_found = 1

OTHERS = 2.

  • IF sy-subrc = 0.

  • CALL FUNCTION 'WRITE_LIST'

  • TABLES

  • listobject = list_tab.

  • ENDIF.

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

listasci = i_ascii

listobject = list_tab

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

in the current scenario i m getting data like

header

line item data(detail)

header

line item data(detail)

so on.... what i want is tha data shud come altogether like

header data item data

header data item data

is there any way ....

so dat i can get data dis way only

thnx points will be assigned

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
421

Hai Nishu Gupta,

You want Header data and Item data in a single line.

Check the program where you are writing the content to list,

There make sure that there are <b>no '\n' in write or SKIP statements.</b>

Hope you can get it by just <b>removing those( '\n' ,SKIP).</b> in your report

<b>Reward points if it helps you.</b>

Regds,

Rama.Pammi

2 REPLIES 2
Read only

Former Member
0 Likes
421

Hi,

You can use two internal tables, one for the header and one for the item data.

Eg.

Types: begin of it_header_struct,

matnr like mara-matnr,

.....

end of it_header _struct.

Types: begin of it_line_item_struct,

.....

end of it_line_item _struct.

data:it_header type table of it_header_struct.

data:it_line_item type table of it_line_item.

data:wa_it_header like line of it_header struct.

data: wa_it_line_iitem like line of it_line_item_struct.

then ,you can fetch the data in these corresponding tables, and then display it using ALV.

Fot this, the fieldcatalog will be the same, only the fieldnames and the reference table names will change.

Thanks and regards,

Prerna

Read only

Former Member
0 Likes
422

Hai Nishu Gupta,

You want Header data and Item data in a single line.

Check the program where you are writing the content to list,

There make sure that there are <b>no '\n' in write or SKIP statements.</b>

Hope you can get it by just <b>removing those( '\n' ,SKIP).</b> in your report

<b>Reward points if it helps you.</b>

Regds,

Rama.Pammi