2014 Jul 07 3:05 PM
Hello Experts,
I am trying to convert the correspondence data using the below code for return document:
* get the correspondence data
CALL FUNCTION 'FKK_READ_CORR'
EXPORTING
i_dfkkcoh = t_dfkkcoh
TABLES
t_fkkcoi = t_fkkcoi
t_dfkkcod = t_dfkkcod
t_dfkkcodclust = t_dfkkcodclust
EXCEPTIONS
OTHERS = 1.
* convert the correspondence data
CALL FUNCTION 'FKK_CONTAINER_2_REFUSAL'
EXPORTING
i_dfkkcoh = t_dfkkcoh
IMPORTING
e_dfkkrk = e_dfkkrk
e_dfkkrp = e_dfkkrp
e_fkkvk = e_fkkvk
e_fkkvkp = e_fkkvkp
e_fkkract = e_fkkract
TABLES
t_cfkkop = t_cfkkop
t_zfkkop = t_zfkkop
t_fkkcoi = t_fkkcoi
t_dfkkcod = t_dfkkcod
t_dfkkcodclust = t_dfkkcodclust
EXCEPTIONS
OTHERS = 1.
I have checked the data in table dfkkcodclust. data exists in this table but the FM is failing to import data, so returns empty table T_CFKKOP.
The below code does not import the data:
CASE h_version.
WHEN OTHERS.
CATCH SYSTEM-EXCEPTIONS conne_import_wrong_comp_type = 8
conne_import_wrong_comp_leng = 9
OTHERS = 1.
IMPORT
t_cfkkop TO t_cfkkop
t_zfkkop TO t_zfkkop
dfkkrk TO c_dfkkrk
dfkkrp TO c_dfkkrp
fkkvk TO c_fkkvk
fkkvkp TO c_fkkvkp
fkkract TO c_fkkract
FROM DATABASE dfkkcodclust(co)
ID h_cokey.
ENDCATCH.
IF sy-subrc = 8 OR sy-subrc = 9 OR sy-subrc = 1.
MESSAGE ID '>6' TYPE 'E' NUMBER '002'.
sy-subrc = 0.
ENDIF.
ENDCASE.
This is happening for some return documents only.
2014 Jul 07 7:59 PM
Hi,
Yes, it's a nasty and known "feature" - after the change of underlying DDIC Structures used to export the data, correspondence containers can not be imported by the SAP Standard logic anymore... See Note 1694243 - COTYP 0001: Printing after structural change, for example.
The only way of rescuing those correspondences I can think of borders on being impossible, unless the structure changes resulted from addition of relatively few custom fields... You'd have to somehow figure out what the types and structures were like at the time correspondences were created, recreate (in DDIC) those types, successfully import the containers using custom logic into old types/structures, move-corresponding to the new types/structures and export containers again... Tedious enough, even if you have a way to figure out the structure changes.
cheers
Janis
2014 Jul 08 10:48 AM
Hell Janis,
Thanks for your help!
Here, what I have observed that for some of the COKEY (for COTYP = 0001) I am getting output and for some I am not getting. Before the change structure FKKOP it was the same situation.
With Regards,
Viral