Application Development and Automation 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: 
Read only

BDC - Clearing value in field

Former Member
0 Likes
2,820

Hi Experts,

II have created a BDC program to create transfer orders using transaction LT04.

I have to clear the default values tht get populated in two screen fields.I tried passing space in the code and it does not work. The fields still get populated withe default values.

I saw some suggestions for clearing parameter ids in the forum , but these fields do not have parameter ids assigned.

Here is my code for passing space.

PERFORM bdc_field       USING 'RL03T-ANZL2'    ' '.

                                      

PERFORM bdc_field       USING 'RL03T-LMEN2'   ' '.

Please suggest a solution to this.

Thanks,

Saritha.

1 ACCEPTED SOLUTION
Read only

former_member585060
Active Contributor
0 Likes
1,468

Hi,

     Try to pass space by the ASCII value number 255( Type with following combination ALT key + 255, this will give you a space) you can test this any where combination of ALT key + 255 give you a space.

or

Use cl_abap_char_utilities=>horizontal_tab.

Sample :-

CONSTANTS : c_space  TYPE c VALUE ' '. (ALT key + 255)

or

CONSTANTS : c_space  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.

PERFORM bdc_field       USING 'RL03T-ANZL2'    c_space.

Thanks & Regards

Bala Krishna

4 REPLIES 4
Read only

former_member585060
Active Contributor
0 Likes
1,469

Hi,

     Try to pass space by the ASCII value number 255( Type with following combination ALT key + 255, this will give you a space) you can test this any where combination of ALT key + 255 give you a space.

or

Use cl_abap_char_utilities=>horizontal_tab.

Sample :-

CONSTANTS : c_space  TYPE c VALUE ' '. (ALT key + 255)

or

CONSTANTS : c_space  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.

PERFORM bdc_field       USING 'RL03T-ANZL2'    c_space.

Thanks & Regards

Bala Krishna

Read only

Former Member
0 Likes
1,468

did you try like this:

PERFORM bdc_field       USING 'RL03T-ANZL2'    SPACE.

Read only

ShyamPindiproli
Active Participant
0 Likes
1,468

Hello Saritha,

Just pass spaces for these fields, it should work properly.

The other way might be to clear the parameter IDs using SET PARAMETER ID, but this might not work if someone else processes the session. Typically in PROD, you might not be sure this will work, also clearing PARAMETER ID's might not be advisable.

Regards,

Shyam

Read only

Kartik2
Contributor
0 Likes
1,468

Hi,

Try giving space instead of null,

constants : c_space type char1 value ' '.

PERFORM bdc_field       USING 'RL03T-LMEN2'   c_space.

Thanks and regards,

kartik.