‎2014 Jul 07 9:43 AM
Hi all,
I need to update the field 'WITH_ITEM-WT_WITHCD(01)' in screen SAPMF05L , 0100 . It has to update the with_item table.
I did the recording through SHDB and wrote the BDC. But it does not work. Is there any BAPI available ? The BAPI change document is not working.
Any idea will be helpful.
Thanks,
Sindhu
‎2014 Jul 07 11:20 AM
‎2014 Jul 10 1:47 PM
Hi Amol,
The function module CHANGE_DOCUMENT updates only BSEG table. I need to update WITH_ITEM table to update the tax codes.
Regards,
Sindhu
‎2014 Jul 10 1:55 PM
‎2014 Jul 10 2:48 PM
For that reason, the post you replied to has been rejected. To reiterate
DO NOT USE UPDATE FUNCTION MODULES IN YOUR PROGRAMS.
‎2014 Jul 10 1:59 PM
During your search (before posting ) did you find my answer in BAPI for FB02 or similar threads/discussions ?
Regards,
Raymond
‎2014 Jul 16 12:19 PM
Hi Raymond,
I did go through the link given by you. I have to update only the field WT_WITHCD in screen
'SAPLFWTD' '0110'.
I will pass the document number, company code and fiscal year as input parameters and I need to update WT_WITHCD based on few conditions.
I tried doing recording with both FB09 and FB02.
Is there any other way.
Thanks & Regards,
Sindhu
‎2014 Jul 16 1:12 PM
Hi Sinthu,
first use FM FI_DOCUMENT_READ for reading the items into your BSEG table parameter based on GJAHR,BUKRS and BELNR.
then use FM FI_ITEMS_MASS_CHANGE as raymond suggested .
it will solve your purpose.
regards,
‎2014 Jul 16 1:15 PM
Apart BDC, I also called FM FI_ITEMS_MASS_CHANGE (no longer calling FI_DOCUMENT_CHANGE) , check if your field is allowed / available, but if FB02 and FB09 do not allow this (*), there should be no chance for that and you could have to reverse and post again documents...
Regards,
Raymond
(*) Is this what you described "it does not work". then read 545362 - FAQ: When is a field ready for input?, 827413 - FI: Changeability of fields in FI documents, 1874979 - FB02 Fields of the accounting interface cannot be changed, etc.
‎2014 Jul 17 7:56 AM
Hi Raymond, Naren,
Thanks for your reply.
I had already checked the FM FI_ITEMS_MASS_CHANGE . The BDC written inside the FM, does not call the screen SAPMF05L , 0100 . (Change withholding tax information ).
The field WT_WITHCD is not mentioned in the notes given below.
But, if I go to FB02/FB09, I am able to edit the field.
Any insight?
Thanks and Regards,
Sindhu
‎2014 Jul 17 8:00 AM
‎2014 Jul 17 8:28 AM
Hi Sinthu,
Try this
CALL FUNCTION 'FI_DOCUMENT_READ'
EXPORTING
i_bukrs = gc_bukrs
i_belnr = gd_belnr
i_gjahr = gd_gjahr
TABLES
t_bkpf = ist_bkpf
t_bseg = ist_bseg
EXCEPTIONS
wrong_input = 1
not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
Here u will get the field QSSKZ(which is with holding tax field) in table IT_BSEG for your Line item
READ TABLE ist_BSEG INTO wa_bseg INDEX 1( or according to ur line item number).
IF sy-subrc = 0.
MOVE-CORRESPONDING wa_bseg TO wa_buztab.
APPEND wa_buztab TO ist_buztab.
wa_fldtab-fname = 'QSSKZ'.
wa_fldtab-aenkz = gc_x.
APPEND wa_fldtab TO ist_fldtab.
wa_bseg-QSSKZ = UR NEW VALUE .
ENDIF.
Now again call FM.
CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
EXPORTING
s_bseg = wa_bseg
TABLES
it_buztab = ist_buztab
it_fldtab = ist_fldtab
EXCEPTIONS
bdc_errors = 1
OTHERS = 2.
this will change ur Tax code.
‎2014 Jul 10 1:59 PM
‎2016 Jul 08 2:12 AM