cancel
Showing results for 
Search instead for 
Did you mean: 

Copy control invoice -> order - KDMAT will not be there

daniel_hermann
Explorer
0 Kudos

Hi Experts!

we create customer orders (in this case credit notes) with reference to an invoice.

the problem is that the field vbap-kdmat is empty in the copy control and so it could not be filled into the new order.

in VTAF we use the copy requirement 153 Item from bill.doc.

in the PO tab of the invoice the customer material is filled (manually)

We don't have set up information in VD51 but we fill the customer material with some information and this should be copied into the returns.

does anyone have an idea how to get the copy control working?

I tried to change the 153 to 151 where the source says:

    vbap-kdmat = cvbap-kdmat.

but without the value in vbap (it is empty while executing this code) the field will remain empty.

Thank you in advance

Regards

Daniel Hermann

Accepted Solutions (1)

Accepted Solutions (1)

daniel_hermann
Explorer
0 Kudos

Solution was a new routine:

perform daten_kopieren_153.

select single kdmat from vbap

   into vbap-kdmat

   where vbeln eq vbrp-aubel

     and posnr eq vbrp-aupos.

Former Member
0 Kudos

HI Daniel ,

We have same scenarion as you mentioned above and we started  used your logic , But its not working perfectly . Will explain the steps , I have 3 items in my  sale order , After i adding the code which you mentioned in standard . When i am copying the Billing document to credit memo i am getting the last Customer material number copy to all the items. I mean item 10 item 20 item 30 item  are in my sales order , CMIR of item 30 alone getting copy to all the Customr material number, But we want CMIR of item 10 and 20 as well which have same number of the sales order.

If you have any suggestions . Let me know asap .

Regards ,

Saravana Kumar S


daniel_hermann
Explorer
0 Kudos

Hi Saravana,

We use this coding only for copying from invoice to order.

and in the invoice you have the item number vbrp-aupos  and with that you select only this one and not the last one.

You mentioned that this routine is only on item level and not header level?!

Hope this helps.

Regards

Daniel Hermann

Answers (1)

Answers (1)

bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

billing level PO tab customer material number comes through order , here table also VBAP, so actually this PO tab all fields are display mode only ,

when enter the sale order item PO tab level enter the customer material number , then pass to same billing level ,

when billing level you enter manually this data fet at VBAP table only ,

so you assign the copy routine 151 then on kdmat copy billing to credit memo order OR we maintain same kdmat  in main order its copy to billing then also copy credit memo also

do this

regards

sankar

daniel_hermann
Explorer
0 Kudos

sorry I have to clearify something.

We enter the cutsomer material number at order state so it will be copied to delivery and invoice.

Only on the creation with reference the field kdmat is empty in the "reference" vbap.

I hope this makes sence?

regards

Daniel

bsivasankarreddy_reddy
Active Contributor
0 Kudos

Hi

CVBAP means vbrp only not for VBAP, so KDMAT not copied to credit memo

you have to include logic then only system will the data

ask to abaper