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

Business Partner Conversion using LSMW or BDC report program

Former Member
0 Likes
1,327

Hi All,

Can anybody tell me, how can we convert a Business partner using LSMW or BDC report program?

Thanks in advance,

Rahul

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
960

you can use LSMW , its very simple process....

you can use LSMW , its very simple process....

5 REPLIES 5
Read only

Former Member
0 Likes
961

you can use LSMW , its very simple process....

Read only

Former Member
0 Likes
960

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

Read only

dhirendra_pandit
Active Participant
0 Likes
960

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

Read only

dhirendra_pandit
Active Participant
0 Likes
960

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

Read only

Former Member
0 Likes
960

Thank you all for your replies.....

Regards,

Rahul Shirodkar

Goa