2009 Dec 01 9:47 AM
Hi All,
Can anybody tell me, how can we convert a Business partner using LSMW or BDC report program?
Thanks in advance,
Rahul
2009 Dec 01 9:56 AM
you can use LSMW , its very simple process....
2009 Dec 01 9:56 AM
2009 Dec 01 10:32 AM
Hi,
Try doing with LSMW .By defining what all fields you require and then you can do it using LSMW Recording method.
I think you will be able to do.
Regards,
rahul
2009 Dec 07 1:13 PM
Hi Rahul,
You can go with IDoc method for Business partner creation in LSMW no need to go with recording.
The details of idoc method in LSMW is as folows:-
Message type: BUPAFS_FS_CREATE_FRM_DATA2
Basic type: BUPAFS_FS_CREATE_FRM_DATA201
Dhirendra
2009 Dec 11 1:05 PM
Hi Rahul,
You can do it in the way of object oriented abap as well. wanna do it just follow the steps ahead:-
2.Validate Business Partner form table but000 If the Business Partner does not exist, populate error message u2018Business partner does not existu2019 in internal table for error messages. 3.Validate Collection group form table udm_coll_grp If the Collection group does not exist, populate error message u2018Collection group does not existu2019 in internal table for error messages.
4.Validate Collection profileform table udm_coll_grp If the Collection profiledoes not exist, populate error message u2018Collection profiledoes not existu2019 in internal table for error messages. 5.If above validation fails, show the error and stop.
6.Run the service layer using /fscaa/cl_object=>start and get reference ref_process
PASS FOLLOWING EXPORTING PARAMETERS:
pi_caller = c_caller
PASS FOLLOWING CHANGING PARAMETERS:
pc_iref_process =<ref_process.
7.Get the extension handler using reference got from above step & method get_oref_extension_handler
8.Get reference (ref_partner_content) to BP content interface reference using /fscaa/cl_instance_manager=>get_reference
PASS FOLLOWING CHANGING PARAMETERS
pc_iref = ref_partner_content.
9.Set link extension reference to BP content using reference got from above step & method set_oref_extensions
PASS FOLLOWING EXPORTING PARAMETERS:
pi_oref_extensions = ref_extensions.
10.Set central partner id using ref_partner_content->set_partner_id
PASS FOLLOWING EXPORTING PARAMETERS:
pi_partner = <wa_in_fields-partner>.
11.Set central block using ref_partner_content->set_centraldata.
Pass u2018Xu2019 to centralblock field of wa_centraldata. And Pass bu_contact_char from input file to contactallowance field of wa_centraldata
PASS FOLLOWING EXPORTING PARAMETERS:
pi_centraldata = <wa_centraldata>.
12.Set notice using ref_partner_content->set_notice
Pass zeile from input file to text field of t_notice
PASS FOLLOWING EXPORTING PARAMETERS:
pi_tab_notice = <t_notice>.
13.Change the BP using ref_process->change_partner_execute
PASS FOLLOWING EXPORTING PARAMETERS:
pi_iref_partner = ref_partner_content.
14.Stop the service layer using /fscaa/cl_object=>finish
PASS FOLLOWING EXPORTING PARAMETERS:
pi_oref_exception = ref_exception
pi_display_log = c_space
PASS FOLLOWING IMPORTING PARAMETERS:
pe_tab_messages = <t_messages>.
15.Get BP reference (ref_partner) using cl_udm_business_partner=>get_instance
PASS FOLLOWING EXPORTING PARAMETERS:
im_partner = <wa_in_fields-partner>
PASS FOLLOWING IMPORTING PARAMETERS:
ro_partner = ref_partner.
16.Set collection profile using ref_partner->set_coll_profile
Pass coll_profile from input file to coll_profile field of wa_coll_profile
PASS FOLLOWING EXPORTING PARAMETERS:
is_coll_profile = <wa_coll_profile>.
17.Set collection segment using ref_partner->set_coll_segments
Pass coll_segment, coll_group, coll_specialist from input file to coll_profile field of wa_segment_bp
PASS FOLLOWING EXPORTING PARAMETERS:
it_coll_segment = <t_segment_bp>.
18.Save the BP using ref_partner->save
PASS FOLLOWING EXPORTING PARAMETERS:
im_update_task = c_x
im_with_enqueue = c_x
im_with_chdocs = c_x
if Sy-subrc is not zero, then error message in internal table for error messages. And increase the error count by 1.
19.Write COMMIT WORK.
Regards
Dhirendra
2009 Dec 15 8:45 AM
Thank you all for your replies.....
Regards,
Rahul Shirodkar
Goa
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |