10-10-2007 4:13 PM
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
10-10-2007 4:23 PM
Which structures did you try? There are telephone number fields in KNA1, BAPIADDR1, and BAPIADDR2.
- April King
10-10-2007 4:30 PM
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?
10-10-2007 7:15 PM
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
10-11-2007 8:29 AM
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.
10-15-2007 10:42 AM
10-15-2007 8:04 PM
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
10-16-2007 10:47 AM
Hi April,
I', Sorry but in my sap release (4.7c Enterprise) there isn't class CL_BSP_ACCESS_MODEL_ADDRESS.
10-10-2007 4:37 PM
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
10-10-2007 4:49 PM