Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem in concatenate

Hello Experts,

i am facing one problem that is i have 2 internal tables one is with field lables, 2nd one is with data. i have to get these table data to one single table.

after getting the data i should send it to

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD to display data with filed lables.

for example:

client salesdocument

140 5545

140 5546

code i wrote here

types: BEGIN OF t_it,

mandt type mandt,

vbeln type vbeln_va,

END OF t_it.

data: it type TABLE OF t_it.

types: begin of itt ,

header type string,

end of itt.

data: w_itt type itt,

it1 type table of itt.

types: begin of st_pro,

line type string,

end of st_pro.

data: wa_pro type st_pro,

it_pro type table of st_pro.

type-POOLs: slis.

data: gt_fieldcat type SLIS_T_FIELDCAT_ALV.

data: r_alvtab type ref to cl_salv_table,

r_col TYPE REF TO CL_SALV_COLUMNS_TABLE,

r_cols TYPE SALV_T_COLUMN_REF,

wa_col type SALV_S_COLUMN_REF,

ref_col type ref to CL_SALV_COLUMN,

lv_text type string.

START-OF-SELECTION.

SELECT mandt vbeln INTO TABLE it UP TO 10 rows from vbak.

*select kunnr name1 land1 from kna1 into table itab up to 10 rows.

perform get_header1 using it[] changing it1[].

loop at it1 into w_itt.

loop at it_pro into wa_pro.

concatenate w_it1 into wa_pro saparated by space.

append wa_pro to it_pro.

loop at it into t_it.

concatenate t_it into wa_pro saparated by space

append wa_pro to it_pro.

endloop.

endloop.

endloop.

FORM get_header1 USING p_TAB type any table

changing P_HEADER type any table.

data: begin of lv_tab occurs 0,

line type string,

end of lv_tab.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = r_alvtab

CHANGING

t_table = p_TAB.

CALL METHOD r_alvtab->get_columns

receiving

value = r_col.

CALL METHOD r_col->get

receiving

value = r_cols.

loop at r_cols into wa_col.

ref_col = wa_col-r_column.

CALL METHOD ref_col->get_medium_text

receiving

value = lv_text.

lv_tab-line = lv_text.

append lv_tab.

endloop.

p_HEADER[] = lv_tab[].

ENDFORM. " get_header1

in the above code i am not able to send the data from it1 to it_pro.

so plz any one tell me how to send the data from one table to another table using CONCATENATE statement.

Thankx in advance

Regards

Mahesh.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question