‎2011 Jul 15 10:13 AM
Hi All,
I'm struggling with one short dump which I'm identify where problem is coming. Here is my issue. We are trying to budjet upload through bespoke txn ZKP06 but internally we are calling standard program kpp_flex_upl by submit with selection screen table to upload excel. Its giving following error "An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
not caught in
procedure "IMPORT_SELTAB_FROM_MEM" "(FORM)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
When importing the object "%_SELTAB", the component 5 in the dataset
had a different length from the corresponding component of the
target object in the program "RSDBRUNT".
The length is 360 in the dataset, but 90 in the program RSDBRUNT" .
But When I'm running program kpp_flex_upl seperately its woking fine, not sure where the issue is. Even I didn't found any Note or any help. If someone come across same issue, it would be great if could you please help me.
Thanks in advance.
Regards,
NT
‎2011 Jul 15 10:23 AM
Hi,
Go to transaction code ZKP06 then check systum->status on the menubar.
Now in the pop up you will able to see the customized program used, I think you are calling this standred program from your customized program.
While you are calling the program using submit and return , you might be passing some parameter to the program for file path or some other.
Please check the length of standred parameters in the standred program and length that you have used for variable in the customized program, I think there is a mismatch.
If possible You can also post your customized code, which can help to ractify the exact issue.
‎2011 Jul 15 10:23 AM
Hi,
Go to transaction code ZKP06 then check systum->status on the menubar.
Now in the pop up you will able to see the customized program used, I think you are calling this standred program from your customized program.
While you are calling the program using submit and return , you might be passing some parameter to the program for file path or some other.
Please check the length of standred parameters in the standred program and length that you have used for variable in the customized program, I think there is a mismatch.
If possible You can also post your customized code, which can help to ractify the exact issue.
‎2011 Jul 15 10:58 AM
Hi,
Thanks for your response. Please find the below code for submitting the program.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'KPP_FLEX_UPL'
TABLES
selection_table = i_selections
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
*Assign values to the selections from the other program
LOOP AT i_selections.
CASE i_selections-selname.
WHEN 'P_F_D_D'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
i_selections-low = 'X'.
WHEN 'FILENAME'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
i_selections-low = p_save.
WHEN 'FILE_ID'.
i_selections-low = file_id.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
WHEN 'P_EX1'.
i_selections-low = 'X'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
WHEN OTHERS.
CLEAR: i_selections-low, i_selections-high.
ENDCASE.
MODIFY i_selections.
ENDLOOP.
*export the filename
EXPORT p_save TO MEMORY ID 'ZFI_CCA_PLAN_DATA'.
*submit program
SUBMIT kpp_flex_upl
WITH SELECTION-TABLE i_selections[].
Thanks,
NT
‎2011 Jul 15 11:13 AM
Hi,
Where is the data declaration part?
Anyways I have declared the variables as per the standred program's requirement, check out the code,
check data type of file_id and p_save, same has to be as below
DATA : i_selections like RSPARAMS OCCURS 0 WITH HEADER LINE,
file_id TYPE FILE_ID.
PARAMETERS : p_save TYPE CFFILENAME.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'KPP_FLEX_UPL'
TABLES
selection_table = i_selections
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
*Assign values to the selections from the other program
LOOP AT i_selections.
CASE i_selections-selname.
WHEN 'P_F_D_D'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
i_selections-low = 'X'.
WHEN 'FILENAME'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
i_selections-low = p_save.
WHEN 'FILE_ID'.
i_selections-low = file_id.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
WHEN 'P_EX1'.
i_selections-low = 'X'.
i_selections-sign = 'I'.
i_selections-option = 'EQ'.
WHEN OTHERS.
CLEAR: i_selections-low, i_selections-high.
ENDCASE.
MODIFY i_selections.
ENDLOOP.
*export the filename
EXPORT p_save TO MEMORY ID 'ZFI_CCA_PLAN_DATA'.
*submit program
SUBMIT kpp_flex_upl
WITH SELECTION-TABLE i_selections[].
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_save.
DATA: L_HELP.
DATA: REPID LIKE D020S-PROG,
DYNNR LIKE SY-DYNNR.
DATA: DYNPREAD LIKE DYNPREAD OCCURS 50 WITH HEADER LINE.
REPID = SY-REPID.
DYNNR = SY-DYNNR.
REFRESH DYNPREAD.
DYNPREAD-FIELDNAME = 'P_SAVE'.
DYNPREAD-STEPL = '0'.
APPEND DYNPREAD.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = REPID
DYNUMB = '1000'
TABLES
DYNPFIELDS = DYNPREAD.
* l_maske = ',*.*,'.
L_HELP = p_save+1(1).
IF L_HELP = ':'.
* l_def_path = l_path.
ENDIF.
LOOP AT DYNPREAD. ENDLOOP.
p_save = DYNPREAD-FIELDVALUE.
* write filename to l_maske+5.
* condense l_maske no-gaps.
CLEAR p_save.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = p_save
DEF_PATH = '\'
MASK = ',*.*,*.csv;*.txt.'
MODE = 'O'
TITLE = 'File path'
* 'Dateiauswahl'(flw)
IMPORTING
FILENAME = p_save
EXCEPTIONS
INV_WINSYS = 01
NO_BATCH = 02
SELECTION_CANCEL = 03
SELECTION_ERROR = 04.
IF SY-SUBRC <> 0. ENDIF. " ok