Skip to Content
avatar image
Former Member

How to update all the source fields at once in start routine??

Hi Gurus
I have around 60 fields in source and in the source I am getting Null.

I need to update all the fields to blank whenever the value is NULL.

Can I write abap code in start routine where I can loop in all the fields and update them to blank. Whenever it gets NULL value ?

Can i get a pseudo code for this ?

Add comment
10|10000 characters needed characters exceeded

  • Hi Francis,

    I'm just wondering what kind of dataSources can give you null values ?

    SAP db tables are generally defined with Not null fields (at the DB level).

    Regards,

    Frederic

  • Former Member

    We are getting data from SQL Azure .

    SQL team sends us csv files since NULL is accepted in SQL most of the fields have NULL.

    I can manually replace all the NULL to blank in CSV file but i want to make it dynamic.

    In BW I have created a file extract to consume these files.

    In the transformation from file extract to classic dso i want to write a routine where i can loop in all the fields and replace NULL with blank.

  • Get RSS Feed

1 Answer

  • Nov 14, 2017 at 07:58 AM

    loop at source_package assigning <source_fields>

    if <source_fields>-field1 is initial. <source_fields>-field1 = ' '.

    if <source_fields>-field2 is initial. <source_fields>-field2 = ' '.

    and so on

    endloop.

    the blank value is different per type of characteristic.

    Add comment
    10|10000 characters needed characters exceeded