‎2016 Mar 09 5:24 AM
hi ,
i m uploading data through bdc .
i use controll break statement "at end end at".
when i run my code it takes the '*' instead of actual data from my excel file.
here i put screen shot of it.
if any one know what i miss?
please tell me .
thanks you in advance.
‎2016 Mar 09 5:31 AM
Hi,
This is the standard behavior of control break statements.
Solution : save the index value after every loop statement in local variable, and whenever at end of gets executed use this index value and read the internal table or you can save the values of work area into temporary work area after loop and use it in after executing at end of statement .
Let me know if you are still facing any issues.
Regards,
Shadab.
‎2016 Mar 09 5:31 AM
Hi,
This is the standard behavior of control break statements.
Solution : save the index value after every loop statement in local variable, and whenever at end of gets executed use this index value and read the internal table or you can save the values of work area into temporary work area after loop and use it in after executing at end of statement .
Let me know if you are still facing any issues.
Regards,
Shadab.
‎2016 Mar 09 5:51 AM
hi shadab,
can u send me the code for this .
what u said in ur answer.
‎2016 Mar 09 6:08 AM
Hi,
Loop at itab into wa.
wa_temp = wa.
at end of.
you can make use of wa_temp here instead of wa.
clear wa_temp.
endat.
Endloop.
or
Loop at itab into wa.
lv_ind = sy-tabix.
at end of.
read table itab into wa index lv_ind.
clear wa.
endat.
Endloop.
Please ignore the syntax error above, just a logic.
Regards,
Shadab.
‎2016 Mar 09 6:31 AM
‎2016 Mar 09 5:41 AM
Hi,
that is correct what shadab said 'This is the standard behavior of control break statements."
But my question is when u get the value in internal table after using this function module
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
if so pass the value I_FIELD_SEPERATOR = X.
kindly explain when u got the ****** value in internal table.can you share it the code
thanks,
kaustav
‎2016 Mar 09 5:53 AM
hi kaustav,
this is my code for fm for file.
FORM UPLOAD_FILE .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR = 'X'
I_LINE_HEADER = 'X'
I_TAB_RAW_DATA = W_STRUCT
I_FILENAME = p_file
TABLES
I_TAB_CONVERTED_DATA = LT_MAT
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM. " UPLOAD_FILE