on 04-05-2006 4:58 PM
Hello everyone,
I am using transaction KEFC (program RKEVEXT3) to load a flat text file into CO-PA. Our team has defined a custom structure ZCOPAEXT to load this information.
However, when KEFC is executed, the program fails with a message "The file cannot be imported in this format."
Debugging the program shows that this error occures in subroutine CHECK_UNICODE in include RKCDFILEINCFOR. I've provided the code of below.
FORM check_unicode USING value(repid) TYPE kcdu_repid.
DATA: subrc LIKE sy-subrc,
l_it242s LIKE cfsend_tab OCCURS 100 WITH HEADER LINE,
l_charlen TYPE i,
l_char TYPE c LENGTH 1.
CALL FUNCTION 'KCD_SENDERSTRUC_LOGICAL_READ'
EXPORTING
repid = repid
TABLES
e_send = l_it242s
EXCEPTIONS
OTHERS = 0.
DESCRIBE FIELD l_char LENGTH l_charlen IN BYTE MODE.
LOOP AT l_it242s WHERE ftype CA 'IFPX'.
EXIT.
ENDLOOP.
IF sy-subrc = 0 AND l_charlen <> 1.
subrc = 4.
EXPORT subrc TO MEMORY ID 'KCDFILE0'.
* Die Datei kann in diesem Format nicht eingelesen werden
CALL FUNCTION 'KCD_MESSAGES_COLLECT'
EXPORTING
repid = repid
grpid = grpid
msgty = 'A'
arbgb = 'DU'
msgnr = '027'.
MESSAGE a027(du).
ENDIF.
ENDFORM. "no_floats_and_integers
The error seems to occur with the "DESCRIBE FIELD" statement. The field length in bytes of the 1 character field "l_char" is always 2. This triggers the IF statement where "l_charlen <> 1".
I've searched the OSS notes and this forum, but it doesn't seem like anyone has experienced a similar issue. Any ideas on how to resolve this? I would like to avoid having to copy the program (and includes) and create a custom solution.
Thanks very much for any input you can provide.
Check out the OSS # 548016 and 632796 .
Hope this`ll give you some guide line .
Good luck !!
Thanks
Saquib Khan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Along with that check, it also has another check where it is looking at your structure and seeing if any field of that structure is of type 'P' or 'F' or 'X' or 'I'. Do you have any of these type fields in your structure? May be it is not allowed now.
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Srinivas,
I see the LOOP statement checking for "ftype" containing "IFPX". However the loop logic doesn't seem to be doing anything other than the check.
At the end of the loop, regardless of whether the check was triggered, SY-SUBRC will always be 0 and L_CHARLEN will also be greater than 1. So I don't see how this loop check will effect the IF statement below it.
Am I missing something in my understanding? It could be, I have been starring at this problem for a while now :-).
Thanks for your input.
- Suresh
Let us say the internal table has a field of type I, then after the LOOP statement, SY-SUBRC will be 0. The IF statement following it has a SY-SUBRC = 0 check along with the L_CHARLEN check.
So, in other words, if I don't any field in my internal table whose type is one of IFPX, then the sy-subrc will be non-zero and so the IF check will fail and it will not dump.
I hope this clarifies.
Srinivas
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.