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

BADI MRM_WT_SPLIT_UPDATE not working properly

Former Member
0 Likes
2,939

Hi,

My requirement is to update withholding tax using the line item entries in MIRO. So each wth tax differ in value. I am using the BADI MRM_WT_SPLIT_UPDATE. I update I_rbkpv-h_rbws table, I give split key as '1' for everthing. and my values follows as 100,200,0 for three taxes...in the output, the value of 0 changes to 100..can you please guide on this.

FM call - MRMBADI_WHTAX_SPLIT_UPDATE

- can you please help me on this

1 ACCEPTED SOLUTION
Read only

former_member182371
Active Contributor
0 Likes
1,941

Hi,

(although it´s been ages since i did something with this badi) maybe this can give you an idea:


METHOD if_ex_mrm_wt_split_update~whtax_split_update.

*I_RBKPV

*TI_DRSEG

*TE_RBWS

*TE_RBVS

DATA:  wa_drseg TYPE mmcr_drseg,

       wa_rbws  TYPE rbws,

       wa_rbvs  TYPE rbvs.

LOOP AT ti_drseg INTO wa_drseg.

*TE_RBWS

                    wa_rbws-belnr     = i_rbkpv-belnr.

                    wa_rbws-gjahr     = i_rbkpv-gjahr.

                    wa_rbws-split_key = wa_drseg-rblgp.

                    wa_rbws-witht     = ?

                    wa_rbws-wt_withcd = ?

                    wa_rbws-wt_qsshb  = ?

                    wa_rbws-wt_qbuihb = ?

                    wa_rbws-wt_wwrbtr = ?

                    APPEND wa_rbws TO te_rbws.

*TE_RBVS

                    wa_rbvs-belnr      = i_rbkpv-belnr.

                    wa_rbvs-gjahr      = i_rbkpv-gjahr.

                    wa_rbvs-split_key  = wa_drseg-rblgp.

                    wa_rbvs-srmwwr     = ?

                    wa_rbvs-zlsch      = ?

                    wa_rbvs-mwskz      = ?

                    wa_rbvs-zterm      = ?

                    APPEND wa_rbvs TO te_rbvs.

ENDLOOP.

ENDMETHOD.

Best regards.

Hi,

(although it´s been ages since i did something with this badi) maybe this can give you an idea:


METHOD if_ex_mrm_wt_split_update~whtax_split_update.

*I_RBKPV

*TI_DRSEG

*TE_RBWS

*TE_RBVS

DATA:  wa_drseg TYPE mmcr_drseg,

       wa_rbws  TYPE rbws,

       wa_rbvs  TYPE rbvs.

LOOP AT ti_drseg INTO wa_drseg.

*TE_RBWS

                    wa_rbws-belnr     = i_rbkpv-belnr.

                    wa_rbws-gjahr     = i_rbkpv-gjahr.

                    wa_rbws-split_key = wa_drseg-rblgp.

                    wa_rbws-witht     = ?

                    wa_rbws-wt_withcd = ?

                    wa_rbws-wt_qsshb  = ?

                    wa_rbws-wt_qbuihb = ?

                    wa_rbws-wt_wwrbtr = ?

                    APPEND wa_rbws TO te_rbws.

*TE_RBVS

                    wa_rbvs-belnr      = i_rbkpv-belnr.

                    wa_rbvs-gjahr      = i_rbkpv-gjahr.

                    wa_rbvs-split_key  = wa_drseg-rblgp.

                    wa_rbvs-srmwwr     = ?

                    wa_rbvs-zlsch      = ?

                    wa_rbvs-mwskz      = ?

                    wa_rbvs-zterm      = ?

                    APPEND wa_rbvs TO te_rbvs.

ENDLOOP.

ENDMETHOD.

Best regards.

3 REPLIES 3
Read only

former_member182371
Active Contributor
0 Likes
1,942

Hi,

(although it´s been ages since i did something with this badi) maybe this can give you an idea:


METHOD if_ex_mrm_wt_split_update~whtax_split_update.

*I_RBKPV

*TI_DRSEG

*TE_RBWS

*TE_RBVS

DATA:  wa_drseg TYPE mmcr_drseg,

       wa_rbws  TYPE rbws,

       wa_rbvs  TYPE rbvs.

LOOP AT ti_drseg INTO wa_drseg.

*TE_RBWS

                    wa_rbws-belnr     = i_rbkpv-belnr.

                    wa_rbws-gjahr     = i_rbkpv-gjahr.

                    wa_rbws-split_key = wa_drseg-rblgp.

                    wa_rbws-witht     = ?

                    wa_rbws-wt_withcd = ?

                    wa_rbws-wt_qsshb  = ?

                    wa_rbws-wt_qbuihb = ?

                    wa_rbws-wt_wwrbtr = ?

                    APPEND wa_rbws TO te_rbws.

*TE_RBVS

                    wa_rbvs-belnr      = i_rbkpv-belnr.

                    wa_rbvs-gjahr      = i_rbkpv-gjahr.

                    wa_rbvs-split_key  = wa_drseg-rblgp.

                    wa_rbvs-srmwwr     = ?

                    wa_rbvs-zlsch      = ?

                    wa_rbvs-mwskz      = ?

                    wa_rbvs-zterm      = ?

                    APPEND wa_rbvs TO te_rbvs.

ENDLOOP.

ENDMETHOD.

Best regards.

Read only

0 Likes
1,941

Hi

I am doing what is said by you. But if there are three WTH taxes, and one of those is Zero, and if I pass zero with the split key given, It is changing to the non zero tax which has a split key 0001. Should I pass something different to this split key, or is this a config issue

Read only

0 Likes
1,941

Hi,

Please check any OSS Notes available:

e.g.

858897 - MIRO:Zero W/Tax base amount in amount split, not considered.


Best regards.