Skip to Content
author's profile photo
Former Member

code help

Hi all,

I need help for coding a logic.

Suppose when a BDC is run for Class Updation for CL01 T.Code. I want the system to considering '_' (Underscore) instead of SPACE in the Class Name. i.e when the End user using the flat file for the BDC, if he enters a name with SPACE in between (ex: class 01) it should consider '_' (ex: class_01) and continue with the update.

the naming convension has no specific format.

Plz help me to solve this.

Points will be awardes.

Thanks n Regards

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:59 AM

    hi,

    specify class_01 in flat file itself.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 12:02 PM

    You can use

    REPLACE

    statement in your abap code to replace space with '_' and then go for updation.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2007 at 12:13 PM

    Hi ..

    Try this..

    REPLACE ALL OCCURRENCES OF SPACE IN CLNAME WITH '_'.

    <b>reward if Helpful.</b>

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 12:13 PM

    hi

    u can use like this

    NAME = 'CLASS 01'.

    REPLACE ' ' WITH '_' INTO NAME.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 01:19 PM

    hi,

    do this before you map the filed to the screen field

    REPLACE ALL OCCURRENCES OF SPACE IN CLNAME WITH '_'.

    thanks,

    Nethaji

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Nethaji - that dumps too. ALL OCCURRENCES translates a space into a field of zero length ind thinks it will go into an infinite loop.

      Rob