04-25-2008 8:47 AM
Hi All!
I' m having a big problem which I couldn't solve yet.
I would be very deeply grateful if somebody could help me
in this matter.
-> FM has been called as follows:
select * from cciht_ial into
corresponding fields of table l_api_header_tab.
"l_api_header_tab" (see below) is the table which has been passed
to this FM in order to get other tables filled (l_api_invpersons_tab,
l_api_affpersdat_tab etc.)
All what I need is now getting the correctly datas from
these tables ( see FM tables paramater )
depending on which the user selects at the select-options fields.
In order to evaluate the appropriate data with considering
users restrictions through select-options fields
I must care all tables at once (simultaneously),
because the information are shared in mentioned tables
(see FM tables paramater).
How can I achieve this intention in that case.
Regards
Ertas I.
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.
Additional information about select-options fields:
SELECTION-SCREEN BEGIN OF BLOCK xy WITH FRAME TITLE text-s02.
SELECT-OPTIONS: s_utyp FOR ccihs_ipevaiot-ialpcat,
s_dead FOR ccihs_ialhiot-ialdeadflg,
s_babwes FOR ccihs_ipevaiot-ipabsbegdat,
s_eabwes FOR ccihs_ipevaiot-ipabsenddat,
s_atabw FOR ccihs_ipevaiot-ipabsdays,
s_apalt FOR ccihs_ipevaiot-ialpexp,
s_ursach FOR ccihs_ipevaiot-iacaus,
s_ausl FOR ccihs_ipevaiot-iaobj,
s_tdverl FOR ccihs_ipevaiot-ipact,
s_bewver FOR ccihs_ipevaiot-ipmov,
s_wt FOR lv_workingtime, "classification data
s_masch FOR lv_maschine. "classification data
SELECT-OPTIONS: s_verlet FOR ccihs_ipevinjiot-injury,
s_kteil FOR ccihs_ipevinjiot-bodypart.
SELECTION-SCREEN END OF BLOCK xy.
04-25-2008 9:34 AM
Hi,
Looking at the logic of the F/M that you have used, it seems obvious that the TABLES parameters, starting with X_ are those in which data is passed while calling the F/M, whereas those starting with E_ are exporting tables, which get filled within the F/M.
Now your selection screen contains all the fields related to Data for Person Affected (Event), whereas the F/M takes in only the Accident/Incidence Header.
So what you can do is, populate the header as you are currently doing, then call the F/M. All possible entries will now be populated in E_ tables. The fields on your selection screen are the ones corresp to table E_API_AFFPERSDAT_TAB . You now want to restrict the entries in this table based on the selection screen. Hence...
loop at E_API_AFFPERSDAT_TAB into wa where IALPCAT in s_IALPCAT and ...<list of fields on your selection screen>.
Endloop.
similarly, for each of the exporting table, you will have to check which of the fields are on the selection screen and which entry is to be deleted. There is no other way to do it since the fields on ur selection screen do not match to those reqd as input to ur F/M.
Thanks,
Pranjal.
04-25-2008 9:34 AM
Hi,
Looking at the logic of the F/M that you have used, it seems obvious that the TABLES parameters, starting with X_ are those in which data is passed while calling the F/M, whereas those starting with E_ are exporting tables, which get filled within the F/M.
Now your selection screen contains all the fields related to Data for Person Affected (Event), whereas the F/M takes in only the Accident/Incidence Header.
So what you can do is, populate the header as you are currently doing, then call the F/M. All possible entries will now be populated in E_ tables. The fields on your selection screen are the ones corresp to table E_API_AFFPERSDAT_TAB . You now want to restrict the entries in this table based on the selection screen. Hence...
loop at E_API_AFFPERSDAT_TAB into wa where IALPCAT in s_IALPCAT and ...<list of fields on your selection screen>.
Endloop.
similarly, for each of the exporting table, you will have to check which of the fields are on the selection screen and which entry is to be deleted. There is no other way to do it since the fields on ur selection screen do not match to those reqd as input to ur F/M.
Thanks,
Pranjal.
04-25-2008 9:47 AM
Hi,
Thank u for replying.
Do have an little code example for me ?
Regards
ertas