cancel
Showing results for 
Search instead for 
Did you mean: 

BADI CRM_COPY_BADI for item splitting in Quote -> Contract

Former Member
0 Kudos

Hi all,

i have this requirement to split the item quantity into 1 per line when a contract gets created from a quotation.

im new to both CRM and BADI but after doing some research online i figure that my scope should involve creating an implementation of the BADI, configurating the transaction type, and then adding my splitting code in method PRODUCT_I.

but problem is, i've created my implementation and put a breakpoint in both method COPY and PRODUCT_I... and when i try to create a follow-up from a quote to contract, only the COPY method breakpoint gets caught. however, im quite sure it's the PRODUCT_I method which i should be using as it contains the item level internal table being pass into it. but it doesnt seems to be called in this process (am wondering if it's some config thing which i've missed).

can someone provide some guidance into BADI, CRM_COPY_BADI and possibly the requirement's approach?

many thanks in advance.

cheers,

Ryan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ryan,

For the item level internal table use ORDERADM_I and to set the quantity as 1 per line item use internal table SCHEDLIN_I. Since you want to handle the item data and not the product data, use ORDERADM_I.

When you try to create a follow-up, PRODUCT_I method will get trigerred when the product field is being handled.

Regards,

Karthik.

Former Member
0 Kudos

Hi Karthik,

thanks for the info!

technically, my understanding is that when u create an implementation, the process should goes through all these methods at relevant point on relevant business transaction. but strangely after putting breakpoints in all the said methods above, it seems to just going through the COPY method everytime a followup is being created (from quotation to contract). btw, i'm processing it through tcode CRMD_BUS2000112-> openning an existing quote-> then creating a follow-up contract.

or should should i instead be coding these method-calling manually (on ORDERADM_I and SCHEDLIN_I) or is there some config i'm missing?

lost in badi, was working more on the old exits for MM/SD. any pointers are much appreciated.

many thanks!

cheers,

Ryan.

Former Member
0 Kudos

Hi Ryan,

Have you defined the filter types accordingly?

Regards,

Karthik.

Former Member
0 Kudos

Hi Karthik,

yes, i've created a filter type for it (9xxxx prefix) ... which i later configured in IMG Define Copying Control for Transaction Type.

SRC type TGT type description copying routine

ZECQ ZESC PPM Contract 900001

the COPY method for my implementation is being called but not the rest (ie ORDERADM_I or PRODUCT_I or SCHEDLIN_I). is there something i missed?

thanks.

cheers,

Ryan.

Former Member
0 Kudos

Hi all,

managed to get to those methods. se30's method-trace helps verifying all the method being passed through in the CRMD_BUS2000112 process, which i soon found out the relevant methods are being called after clicking the "copy" pushbutton (instead of the screen transition from quotation to contract).

however, i later found out that method SCHEDLIN_I allows you to change the quantity of the existing line item. but rahter my requirement involves splitting the existing line item into multiple lines. any advice of which method to use in achieving those?

thanks in advance.

cheers,

Ryan.

Former Member
0 Kudos

Hi,

I have the same issue, i want to copy the schedule line in follow up transation. I put the breakpoint in CRM_COPY_BADI methos SCHEDLIN_I. But it is not triggering.

Thanks in Advance for help.

Anil

0 Kudos

Hi,

Some positive status about the schedulin quantity change in crm_copy_badi ?

Thx.

0 Kudos

Hi all,

I copied the function CRM_SCHEDLIN_I_COPY_EC to Z4_CRM_SCHEDLIN_I_COPY_EC, commet the "CHECK LINES( lt_input_field_names ) EQ 0. verification and created a entry in sm30 CRMV_EVC_ALL

BUS20001 Trans.comercial CRM 1 Imediatamente 99 ORDERADM_I AFTER_CREATE_WITH_REFERENCE <*> Z4_CRM_SCHEDLIN_I_COPY_EC K Cham.p/cabeç./item c/ obj./evento/atr.+dados ant./nov.comp.

Copy of original CRM_SCHEDLIN_I_COPY_EC ..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am also facing the same problem when i am trying to copy the items from a Quote to another Quote. When I put a break-point in the method ORDERADM_I of my Badi, it doesn't go into the Break-point at all. Can anybody tell if there are any configuration required for Copying the Item data.

Former Member
0 Kudos

Hi Krish,

the only part i did to get the orderadm_i running was to configure the "copy transaction type" in SPRO, the create/activate the badi's implementation. also bear in mind those methods are only trigger when you click the "copy" button on the "copy" button in the item alv.

hope that helps (im still stuck in splitting the item lines).

cheers,

Ryan.