Application Development 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: 

FM SD_CUSTOMER_MAINTAIN_ALL

Former Member
0 Kudos

Hi Forum,

I need to know how I can insert a mobile phone during a customer creation using the FM in subject.

I try to use all TEL* fields but all results are negative.

Thank you in advance.

Salvatore

9 REPLIES 9

Former Member
0 Kudos

Which structures did you try? There are telephone number fields in KNA1, BAPIADDR1, and BAPIADDR2.

- April King

0 Kudos

I'm using

kna1, knb1, knvv, knb5, knva, knv1 structures.

In all of these I try all tel* fields but no one of these is able to compile MOB_NUMBER field.

I see bapiaddr1 and bapiaddr2 structures, but I think that the telephone fields doesn't help me.

You know exactly which is the field and in which structure / table?

0 Kudos

Instead of using this function module, look at class CL_BSP_ACCESS_MODEL_ADDRESS. The methods MODIFY_DATA_COMM and MODIFY_DATA_PRFCOMM (to set whether preferred telephone number is regular or mobile) look like they would be of use to you.

- April

0 Kudos

I don't know Abap Object Programming. Then I'm not able to use the class CL_BSP_ACCESS_MODEL_ADDRESS and its methods. I need another solution. Thanks equally.

0 Kudos

Any other help?

0 Kudos

You can use the class and method without having to make your whole program object-oriented. You need to define a reference to the class like this:

DATA w_model_address TYPE REF TO CL_BSP_ACCESS_MODEL_ADDRESS.

In your code, you need to have this statement before you can call any methods:

CREATE OBJECT w_model_address.

Now you can call your method:

CALL METHOD w_model_address->modify_data_comm

EXPORTING

iv_comm_type =

iv_table_type =

it_screen_structure =

it_changed_field =

iv_parent_object_key =

  • IMPORTING

  • et_new_object_key =

  • ev_data_has_changed =

.

To generate the above code, put your cursor in the program where you want to add the code. Now click on the "Pattern" button from the toolbar. Select "ABAP Objects/Patterns" and click the checkmark. Now select "Call Method". The instance is whatever name you put in the DATA statement (before the "TYPE REF TO"). The class/interface is the original name of the class (after the "TYPE REF TO"). The method is just whatever method you are calling. Then click the checkmark.

Then just assign the data variable for importing and exporting, and uncomment any lines that you need. I hope this helps.

- April

0 Kudos

Hi April,

I', Sorry but in my sap release (4.7c Enterprise) there isn't class CL_BSP_ACCESS_MODEL_ADDRESS.

Former Member
0 Kudos

hi,

Create first an internal table which will have same structure as BAPIADDR1 and update the mandatory field with TEL Number.

Pass this structure to as import parameter.

<b><REMOVED BY MODERATOR></b>

Regards,

Sachin

Message was edited by:

Alvaro Tejada Galindo

0 Kudos

Which is the mandatory field?