Hi,
I am trying to use Write Back BADI to replace Default Logic. The logic is supposed to perform currency translation and push the records to a different application. The Script Logic is blank, since the Write back BADI is invoked automatically based on Filters set on BADI Implementation.
I am performing all the calculations and storing the results in an internal table 'ct_data (not the SAP Provided table)' and passing this table to 'write_back_int'. The results are correct and as expected. The internal table is of the following structure:
TYPES:
BEGIN OF t_reporting,
account(20) TYPE c,
companycode(20) TYPE c,
datasrc(20) TYPE c,
functionalarea(20) TYPE c,
game(20) TYPE c,
gtechgame(20) TYPE c,
inputcurrency(20) TYPE c,
probability(20) TYPE c,
product(20) TYPE c,
profitcenter(20) TYPE c,
project(20) TYPE c,
time(20) TYPE c,
version(20) TYPE c,
signeddata TYPE uj_fieldname,
"signeddata(11) TYPE p DECIMALS 2,
END OF t_reporting.
ct_data TYPE STANDARD TABLE OF t_reporting,
When I am entering some values using Input Schedule (Module ID is set to 'MAN'), the Write back BADI is running into a short dump in GET_DELTA process in PACKAGE_LOGIC1. After debugging extensively, I found that the error is being caused by a line which is well nested within multiple calls of processes.
write_back_int - me->write_back - me->package - me->package_logic - PACKAGE_LOGIC_1 - me->GET_DELTA
TRY.
CREATE OBJECT lo_wb_main_int.
CALL METHOD lo_wb_main_int->write_back_int
EXPORTING
is_work_status = ls_work_status
i_bypass_badi = abap_false
i_default_logic = abap_false
i_update_audit = abap_true
i_duplicate = abap_true "In the future, Script Logic may generate duplicate records.
i_mdata_check = abap_false
i_sign_trans = lf_sign_data
it_array = <lt_rep_data>
i_measures_formula = l_measure
IMPORTING
et_message = lt_message
es_status_records = l_status.
"et_error_records = <lt_error_records>.
CATCH cx_ujr_write_back cx_uj_db_error cx_uja_admin_error cx_uj_static_check.
ENDTRY.
The Error is occuring at the below line code.
ASSIGN COMPONENT uj00_cs_fieldname-keyfigure OF STRUCTURE <ls_data> TO <l_value>.
When I checked the uj00_cs_fieldname,
begin of uj00_cs_fieldname,
keyfigure type uj_fieldname value 'SIGNEDDATA',
category type uj_fieldname value 'CATEGORY',
mandt type uj_fieldname value 'MANDT',
batch_id type uj_fieldname value 'BATCH_ID',
signeddata type uj_fieldname value 'SIGNEDDATA',
seqnr type uj_fieldname value 'SEQNR',
seqnr9 type uj_fieldname value 'SEQNR9',
stats type uj_fieldname value 'BPC_STATISTICS',
apporg type uj_fieldname value 'APPROVALORG',
end of uj00_cs_fieldname,
I am not sure what is happening here. I have tried changing the type of signeddata in "t_reporting" but that is also not helping here.
I understand that there is ABAP involved in this, but I am posting in BPC thread since it is used to accomplish the BPC functionality.
Your help will be greatly appreciated. I have completely exhausted all my possibilities.
Thanks,
Abhishek