04-28-2008 12:21 PM
One think is a big riddle for me.
How do you pair all these datas together from
return tables of the Function Modul in order
to distunguish them. Which line from itab
belongs to which line form the next itab etc.
l_api_invpersons_tab
l_api_affpersdat_tab
l_api_injuries_tab
l_api_iava_tab
l_api_iaprop_data_tab
l_api_ipva_tab
l_api_ipprop_data_tab
This is a common problem for me generally.
How can make for example a big result table
with all these datas.
Is there a solution or way existing. Or how do
you solve problems ?
Regards
ilhan
call function 'CBIH_IA30_IAL_READ'
exporting
i_scenario = espap_base_scenario-all_display
i_addinf = l_addinf
i_flg_header = esp1_true
i_flg_invpers = esp1_true
i_flg_affpers = esp1_true
i_flg_injuries = esp1_true
i_flg_ia_val = esp1_true
i_flg_ip_val = esp1_true
i_flg_read_all_charact = esp1_true
tables
x_api_header_tab = l_api_header_tab
x_api_invpersons_tab = l_api_invpersons_tab
e_api_affpersdat_tab = l_api_affpersdat_tab
e_api_injuries_tab = l_api_injuries_tab
e_api_iava_tab = l_api_iava_tab
e_api_iaprop_data_tab = l_api_iaprop_data_tab
e_api_ipva_tab = l_api_ipva_tab
e_api_ipprop_data_tab = l_api_ipprop_data_tab
exceptions
no_object_specified = 1
parameter_error = 2
internal_error = 3
convmode_set_failed = 4
interval_access_error = 5
others = 6.
04-28-2008 12:23 PM
well have a look at the fields of the return tables, normally there´s always a link through common fields.
04-28-2008 12:40 PM
How can I concatenate this tables in a one common table ?
Regards
ertas
04-28-2008 12:45 PM
Hi,
Create a common table.
Loop at the header table.
Populate header fields in the common table.
Loop at the item table.
Populate the item specific fields in the common table.
Append the entry to common table.
Clear item specific fields.
Endloop.
Clear the header specific fields.
Endloop.
Thanks and Regards,
Lakshmi.
04-28-2008 12:49 PM
Santhanalakshmi can you please show me that with abap code example ?
I think you have almost solved my problem.
Regards
ertas
04-28-2008 1:06 PM
Here is the code sample:
DATA: Begin of it_header occurs 0,
VBELN type VBAK-VBELN,
AUDAT type VBAK-AUDAT,
VBTYP type VBAK-VBTYP,
AUART type VBAK-AUART,
SPART type VBAK-SPART,
end of it_header.
Data: begin of it_item occurs 0,
VBELN type VBAK-VBELN,
POSNR type VBAP-POSNR,
MATNR type VBAP-MATNR ,
CHARG type VBAP-CHARG,
MATKL type VBAP-MATKL,
end of it_item.
types: begin of tt_output ,
VBELN type VBAK-VBELN,
AUDAT type VBAK-AUDAT,
VBTYP type VBAK-VBTYP,
AUART type VBAK-AUART,
SPART type VBAK-SPART,
POSNR type VBAP-POSNR,
MATNR type VBAP-MATNR ,
CHARG type VBAP-CHARG,
MATKL type VBAP-MATKL,
end of tt_output.
DATA: it_output type standard table of tt_output,
wa_output type tt_output.
logic to populate the header table
logic to populate the item table
Loop at it_header.
wa_output-vbeln = it_header-vbeln.
wa_output-AUDAT = it_header-audat.
wa_output-VBTYP = it_header-VBTYP.
wa_outputAUART = it_header-AUART.
wa_output-SPART = it_header-SPART.
loop at it_item where vbeln = it_header-vbeln.
wa_output-POSNR = it_header-POSNR,
wa_output MATNR = it_header-MATNR ,
wa_output-CHARG = it_header-CHARG,
wa_output-MATKL= it_header-MATKL,
append wa_output to it_output.
CLEAR: wa_output-posnr, wa_output-matnr, wa_output-charge, wa_output-matkl.
endloop.
clear wa_output.
endloop.
Thanks and Regards,
Lakshmi.
04-28-2008 1:21 PM
Santhanalakshmi V
can you pls use the real fields from FM as a courtesy to me.
Regards
ertas