Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LSMW Error When Uploading file (Return Code 1)

Former Member
0 Kudos

Hi SAP peeps,

Just upgraded from ECC6 EHP5(SAPKH60507) to EHP7(SAPKH61707), and trying to copy over an LSMW into EHP7 using export/import Project...

The export/import works fine from eg. EHP5 to EHP5, but the import into EHP7 is getting an error... It's not even getting to the point where the .TXT file is even imported into the new system. It's getting stuck trying to select the damn file off the local machine...

I've debugged it and this is what it's doing in EHP7:

  • In FM /SAPDMC/LSM_PROJECT_IMPORT2, it's doing a call to CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
  • This is supposed to return 1x row for the .TXT file I've selected for Import (file from prior Export)
  • The file entry resides in: CHANGING       FILE_TABLE              = l_filetable
  • However, in EHP7, it seems to have a bug in it such that there are 2x rows in l_filetable - the 1st of which is BLANK!
  • The subsequent read of this table and call to FM 'GUI_UPLOAD' is not very happy about this:     read table l_filetable index 1 into l_filename.
         CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME                      = l_filename  .......


Exporting/Importing from EHP7 to EHP7 also has the issue - so seems to be specifically related to EHP7 Import functions...


I've also debugged EHP5, and this BLANK row doesn't appear in the table l_filetable, and therefore the issue does not occur...


Could this be Unicode related somehow? If so, what to do and how to fix?  The EHP5 was made Unicode compliant before the upgrade started as it was a mandatory pre-req...


Any ideas? Anyone seen this before? Any thoughts appreciated... Can't find any SAP OSS notes related to this either... 😕


Cheers,

Nick


1 ACCEPTED SOLUTION

david_liu1
Advisor
Advisor
0 Kudos

Hello,

Please implement the SAP note 2066358 and test again.

Regards,

David

1 REPLY 1

david_liu1
Advisor
Advisor
0 Kudos

Hello,

Please implement the SAP note 2066358 and test again.

Regards,

David