google-code-export / saplink

Automatically exported from code.google.com/p/saplink
1 stars 2 forks source link

FUGR plugin dumps for lines of code with one character #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In a Function Module of a Function Group that you'd like to export 
create a one character line, like '*'
2. Atteempt to add a FUGR object to an existing Nugget

What is the expected output? What do you see instead?
Expected to be able to add an object to a nugget.  Instead I got a data 
dump.

SAP_ABA Release/ Level: 6.40
SAP_BASIS Release/ Level: 6.40

What version of SAPlink are you using: 0.1.2

Please provide any additional information below.

The issue is in:
Class: ZSAPLINK_FUNCTIONGROUP
Method: GET_FUNCTION_MODULES
Code:
      loop at isource_new into xsource_new.
        check xsource_new is not initial.
          if xsource_new+0(2) = '*"'.
            delete isource_new index sy-tabix.
            continue.
          endif.

The code assumes that all lines in a function module is at least 2 
characters long, however, if the line is a single character, you get 
a "String out of bound" data dump.

One of the way to fix this issue:

data: lnlen type i.      ' new variable

      loop at isource_new into xsource_new.
        check xsource_new is not initial.
        lnlen  = STRLEN( xsource_new ).    'new line
        if lnlen gt 1.            'new line
          if xsource_new+0(2) = '*"'.
            delete isource_new index sy-tabix.
            continue.
          endif.
        endif.                    ' new line

Original issue reported on code.google.com by aleks.oz...@gmail.com on 1 Feb 2007 at 7:41

GoogleCodeExporter commented 9 years ago
Thanks for the report.

This issue has been moved to the function group plugin page issues list. 
http://code.google.com/p/saplink-plugins/issues/list

Please report non-core plugin issues directly on the site in which its hosted.

Original comment by ewherrm...@gmail.com on 1 Feb 2007 at 9:45