04-02-2014 1:12 PM
Hi guys.
I tryed use this BADI but it not work... I saw the notes:
http://service.sap.com/sap/support/notes/1286713
and
http://service.sap.com/sap/support/notes/1156325
but they cant help me too.
My problem is: I need to change the first "tax code" like below:
for that, I insert the code in BADI MRM_WT_SPLIT_UPDATE.
DATA: ls_rbws TYPE LINE OF mrm_tab_rbws.
te_rbvs[] = i_rbkpv-h_rbvs[].
te_rbws[] = i_rbkpv-h_rbws[].
LOOP AT te_rbws INTO ls_rbws.
ls_rbws-wt_withcd = 'I2'.
MODIFY te_rbws FROM ls_rbws.
EXIT. "change only first item
ENDLOOP.
after pass this BADI, the tax not change.
Please.. anyone can Help me?
04-03-2014 5:52 PM
I find one solution, it's not the best, but save me.
I put a ENHANCEMENT point in FM FI_WT_READ_LFBW and append the table x_lfbw with my tax.
if anyone give a better soluction, please, put here
below how i put my code:
IF sy-tcode = 'MIRO' OR
sy-tcode = 'MR8M' OR
sy-tcode = 'MIR7'.
*Get memory fields
ASSIGN: ('(SAPLMR1M)DRSEG-EBELN') TO <fs_d>,
('(SAPLMR1M)DRSEG-EBELN') TO <fs_i>.
[...put your code...]
LOOP AT t_imposto INTO v_imposto.
t_lfbw2-lifnr = i_lifnr.
t_lfbw2-bukrs = i_bukrs.
t_lfbw2-witht = v_imposto-witht.
t_lfbw2-wt_subjct = 'X'.
t_lfbw2-wt_withcd = v_imposto-wt_withcd.
APPEND x_lfbw2. CLEAR x_lfbw2.
ENDLOOP.
ENDIF
04-02-2014 3:02 PM
Hi,
have you posted the MIRO/MIR7/RBKP (MM) document?
have you checked the BKPF (FI) document?
Best regards.
04-02-2014 5:36 PM
Pablo,
My case is a MIRO document.
It is happening in creation document in Miro. because that, the FI document doesnt was created yet
tks.
04-02-2014 5:48 PM
Hi,
first of all:
Are you using extended withholding tax?
Next:
depending on your release the reasons can be different e.g.:
for 46C
325228 - MIRO: Remove old withholding tax structure RBWT
for SAP ERP 6.0 - SAPKH60606
1903563 - Withholding tax data is being updated incorrectly in FI after posting via MIRO
try this too:
LOOP AT te_rbws INTO ls_rbws.
ls_rbws-wt_withcd = 'I2'.
MODIFY te_rbws FROM ls_rbws index sy-tabix.
EXIT. "change only first item
ENDLOOP
.
Best regards.
04-02-2014 7:23 PM
Pablo,
I'm using extended withholding tax. it´s a problem?
I tryed change my code like you said, but not works.
My release is 6.0, but this note not help me.
I tryed execute the miro again, and I saw one important thing... When I saved the document (MIRO) and the SAP created the FI document, my changes went to FI Document, but not at Miro, just in FI document.
But I need the MIRO change too.
I'm thinking I'm close to the solution...
maybe exists another BADI or EXIT that cam help me...
04-02-2014 7:30 PM
Hi,
when you say
But I need the MIRO change too.
are you referring to any table in particular?
if so, which one?
RBKP, RSEG, RBCO, VBKPF, VBSEGK?
Best regards.
04-02-2014 8:07 PM
I mean..
is not a table, is the screen that I put in the first topic:
it is a screen from MIRO.
04-02-2014 8:22 PM
Hi,
yes but that data in the screen must be saved somewhere.
Anyway try this:
LOOP AT te_rbws INTO ls_rbws.
ls_rbws-witht = 'I2'.
MODIFY te_rbws FROM ls_rbws index sy-tabix.
EXIT. "change only first item
ENDLOOP
Best regards.
04-02-2014 8:45 PM
I tryed to change my code like you said, but not works.
I think this BADI doesnt works to MIRO transaction. only for FI documents..
04-03-2014 5:52 PM
I find one solution, it's not the best, but save me.
I put a ENHANCEMENT point in FM FI_WT_READ_LFBW and append the table x_lfbw with my tax.
if anyone give a better soluction, please, put here
below how i put my code:
IF sy-tcode = 'MIRO' OR
sy-tcode = 'MR8M' OR
sy-tcode = 'MIR7'.
*Get memory fields
ASSIGN: ('(SAPLMR1M)DRSEG-EBELN') TO <fs_d>,
('(SAPLMR1M)DRSEG-EBELN') TO <fs_i>.
[...put your code...]
LOOP AT t_imposto INTO v_imposto.
t_lfbw2-lifnr = i_lifnr.
t_lfbw2-bukrs = i_bukrs.
t_lfbw2-witht = v_imposto-witht.
t_lfbw2-wt_subjct = 'X'.
t_lfbw2-wt_withcd = v_imposto-wt_withcd.
APPEND x_lfbw2. CLEAR x_lfbw2.
ENDLOOP.
ENDIF