abap-cleaner icon indicating copy to clipboard operation
abap-cleaner copied to clipboard

Feature Request: No line between DATA declaration of a table and initialization

Open vonglan opened this issue 1 year ago • 0 comments

Hi, to loop over a list of "options", I want to create a "quasi-constant" table containing these constants. I think there is no way in ABAP other than to do it like this:

  METHOD get_confirmed_quantity.
    DATA conf_cats TYPE STANDARD TABLE OF zb_c_purgdocsupplierconfirmati-SupplierConfirmationCategory WITH EMPTY KEY.

    conf_cats = VALUE #( ( 'AB' ) ( 'LA' ) ). " sometime there is just Lieferavis without Order Confirmation

    LOOP AT conf_cats INTO DATA(conf_cat).

However, ABAPCleaner then separates the DATA and its initialization, which I would prefer it not to do in this special case. (I know, this is a very small detail, still I wanted to share this.) Best regards, Edo

vonglan avatar May 15 '24 11:05 vonglan