Updating Assignment field in FB02

Hi,
I have a scenario where I need to change the assignment field for G/L accounts, Vendor accounts & Customer accounts in TCode FB02/FB09. I have written a BDC for this I am facing the following issue:
If there are additional fields for the G/L account the "more" field is ticked. After entering the data in the assignment when I press save a second screen pops up after the main screen where I have to press 'ENTER'.
But in case no additional fields are there this "more" field does not appear, so my BDC fails.
Please suggest how scenario this can be handled.
Is there any BAPI to change the FI doocuments?
Regards
Tejaswini

Dear Tejaswini,
try following piece of code. I had exact similar requirement.
type-pools tpit .
*... interface to dialog RF_ZEILEN_ANZEIGE:
types: begin of tpit_buztab,
         bukrs             like bseg-bukrs,    " Buchungskreis
         belnr             like bseg-belnr,    " Belegnummer
         gjahr             like bseg-gjahr,    " Geschaeftsjahr
         buzei             like bseg-buzei,    " Buchungszeile
         koart             like bseg-koart,    " Kontoart
         umskz             like bseg-umskz,    " SHB-Kennzeichen
         bschl             like bseg-bschl,    " Buchungsschlüssel
         bstat             like bkpf-bstat,    " Buchungsstatus
         mwart             like bseg-mwart,    " Steuerart,
         mwskz             like skb1-mwskz,    " Steuerkategorie,
         flaen(1)          type c,     " X = Posten geaendert
       end of tpit_buztab.
types: tpit_t_buztab type tpit_buztab occurs 1.
*... table of fields in mass change:
types: begin of tpit_fname,
          fname    like t021-fname,
          aenkz(1) type c,                     " Aenderungskennzeichen
       end of tpit_fname.
types: tpit_t_fname type tpit_fname occurs 1.
*... table of errors in mass change:
types: begin of tpit_errdoc,
          doc type tpit_docmnt,
          err like bdcmsgcoll,
       end of tpit_errdoc.
types: tpit_t_errdoc type tpit_errdoc occurs 1.
DATA : it_buztab TYPE TPIT_T_BUZTAB ,
       it_fldtab  TYPE TPIT_T_FNAME WITH HEADER LINE.
DATA : it_errtab TYPE TABLE OF tpit_errdoc.
data  w_bseg TYPE BSEG.
"=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-==-==-=
*Select the BSEG records for which mass change should be applied
SELECT bukrs belnr gjahr buzei koart bschl
  APPENDING CORRESPONDING FIELDS OF TABLE it_buztab
  FROM bseg
  WHERE bukrs = '1015'
  AND   belnr =  '0150000275'
  AND   gjahr = '2013'
  AND   koart = 'K'.    "____________Change only Vendor Line Item - Assignment Filed
  w_bseg-ZUONR = 'UTR12345'.   "____________UTR no to be updated
  it_fldtab-fname = 'ZUONR'.         "____________Column name
  APPEND it_fldtab.
  CLEAR it_fldtab.
*Update payment block
  IF NOT it_buztab[] IS INITIAL.
    CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
         EXPORTING
              s_bseg     = w_bseg
         IMPORTING
              errtab     = it_errtab[]
         TABLES
              it_buztab  = it_buztab[]
              it_fldtab  = it_fldtab[]
         EXCEPTIONS
              bdc_errors = 1
              OTHERS     = 2.
    IF sy-subrc eq 0.
      MESSAGE 'Assignment Field successfully updated' TYPE 'I' DISPLAY LIKE 'S'.
    ENDIF.
    ENDIF.
Regards,
NG

Similar Messages

  • How to update Assignment field in Accounting Document through BAPI ?

    I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?

    Hey,
    I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
    -Kiran
    *Please reward useful answers

  • How to update Assignment field in Accounting Document ? Any method

    Hello experts,
    i want to change Assignment field in already posted accounting document. The field is "GSBER".
    i think i can't do a BDC on transaction FB09 or FB02 because this field is no available to change..
    any advice ?
    regards.

    i was looking for some bapi, then i found
    BAPI_ACC_DOCUMENT_REV_CHECK Accounting: Check Reversal
    BAPI_ACC_DOCUMENT_REV_POST Accounting: Post Reversal
    maybe i could use that, or find an enhancement point in the aplication ?.
    I suppose i have both options.

  • Want to update one field in MIRO

    Hi Experts,
    During the MIRO transaction, I want to update "Assignment" field in "Detail" Tab according to purchase document number.
    I have to fetch data from Z table using Purchasing document number and update it in Assignment field when user post the document in MIRO.
    Please help me how to do this as i am very new to this moodule.
    Thanks
    Sameer Dhuke

    Hi
    Did you try changing the 'Sort key' in GL master to 010 - Purchase order number
    Thank You,

  • Investment order settlement- assignment field with order number in GL code

    We are settling the investment order to the concerned asset and in reco account of the concerned asset it has to update assignment field with Investment order number from which order settlement was happend.
    For example I am booking all the expences to 1000 GL account code for investment order and I am settling to 2000 GL code.
    Investment order number is coming in 1000 GL code in fbl3n and for 2000 asset class (Reco 2000 GL code) it it not showing IO number.
    We want IO number in 2000 GL code line item.
    Do the the need full.  It is very urgent..........
    Edited by: sudhakara reddy jakku on May 31, 2008 8:09 AM

    hi
    when u are seeing gl line item .onse u enterd inthat screen change layout screen tab will be ther u plz see the  IO filed and select that . to next saide it will give urs IO no.also

  • Assignment field not showing in KO22

    Hi,
    We entered some budget in KO22 as per 2009 fiscal year and overall Rs.6000 but we entered some transaction against this order Rs.5000. System showing Rs.5000 in assignment field against overall but do not show against 2009 fiscal year for the same, please suggest me any way or some setting..
    Thanks,
    Dharmveer

    Thanks for response
    Please clarify me, we did not understand your solution ,let me clarify me again
    Period Budget  Trs. Current Budget  Assigned
    Overall 6000 INR 6000  ,5000
    2009    6000 INR  6000,------
    2008
    Again we clarify that we entered Rs. 6000 in inernal order buget and psoted some expenses for Rs.5000 to this internal order .
    I mean to say that against over all , system showing RS, 5000 in assignment column but against year 2009 , system showing blank value in assignment column while displying inernal order budget , please tell me, why not system update assignment field against posting in inernal order in 2009 year, it showing against overall ..
    Thanks,
    Dharmveer

  • Update material doc.num in assignment field of GR/IR line item of a/c doc

    HI Experts,
    please tell me the solution for my problem
    My requirement : Transaction is : MIGO
    Before posting of material document, update material document number in assignment field of GR/IR line item of accounting document (WE) at number commitment stage
    Update MKPF-MBLNR (Material Document Number) in BSEG-ZUONR
    but already i tried AC_DOCUMENT i got a problem .
    What i did,
    first use MB_DOCUMENT_BADI with method
    mb_document_before_update.
    here i tried to get the material document and export into memory
    after use AC_DOCUMENT With method
    change_after_check.
    here Import the material document doc num and pass it to Assignment field in
    but it is not working
    when i debug first trigger the AC_DOCUMENT And then it goes to MB_DOCUMENT_BADI
    Plese help me regarding this.
    Moderator message: please open only one thread per issue.
    Edited by: Thomas Zloch on Feb 9, 2012

    Hi,
    Thanks, I will check the same. Well, I will be clearing the documents with reference to MIGO number itself. When I do my delivery chrgs migo, that number I need to be populated in my line item's assignment field. Not only that but I the same number should get populated in the delivery charges miro. Since my miro is with ref to PO it becomes difficult to fetch the field.
    Plz let me know if you can help me on this as well.
    Thanks,
    Priyanka.

  • Updating the Assignment Field (ZUONR) with Check No

    Hi
    Can anyone help me please?
    I would like to update the assignment field (ZUONR) in the Bank Payables Clearing Account with the cheque number from the payment run (PAYR-CHECF).
    1.  Firstly is this possible?; and
    2.  If so could you explain how I do this.
    Thanks in advance for your assistance on this issue.
    Regards
    Claire

    Hi
    I would but there is no sort key which contains this, nor can I create one :o(.
    If you are aware of how I can do this then please let me know.  Is there a user exit which will populate this field when a payment has been made?
    Regards
    Claire

  • Assignment field updation in Vendor document

    In vendor master, i have given sort key as Purchase Order(10). 
    I made MIRO against PO, but assignment field not updated with Purchase order number.  If i pay down payment against PO, for that document, Purchase order is updated.  But for MIRO it has not updated.

    Dear,
    In MIRO you should enter the Assignment field manually it is not fill automatically..
    If you want fill automaically maintain the substitution.
    Regards,
    Venkat

  • How to update Tr code FB02   and update the field reference key1 (bseg-xref

    Can any body
    help me how to update   Tr code   fb02
    and  update the field  reference  key1 (bseg-xref1)  with the interest amount
    calculated.
    Below i have  written My  program  flow logic
    The program should read the open items i.e debit items in the customer account,
    Based on the  invoice date and customer payment terms  calculate the due date and then the  interest should be  calculated on that item based on the due date.
    Use the  transaction  fb02  and update the field  reference  key 1 (BSEG-xref1)
    with the interest amount calculated
    Only  consider  customers whose  interest indicator  knb1-vzskz = 'vk'.
    Interest is to be  calculated for every  30  days
    at the rate of  1% .please see example below.
    Document date is 01.01.2007
    for amount  1000SGD   payment  term  7  days
    It becomes  due  on  08.01.2007
    until  06.02.2007 you should not  consider  for calculation of interest
    SGD  on   7.02.2007 run you can consider this  item for interest calculation

    Hi Robert,
    Thanks for answering.
    I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
    Ex: Billing document is created and accounted. Ref 2 is AB
    Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
    Thanks
    NNS.

  • Assignment field in FB03 is updated with a TM PO, and not the material PO

    Hi Experts,
    I am facing an issue.
    Issue: The assignment field in accounting document generated during GR is updated with the TM PO number(Trade PO) and not the Material PO .
    this happens while Posting goods receipt in VL32N tcode.
    Please let me know what can be the issue.
    Thanks and regards,
    Meenakshi Raina

    Everytime we create a TM PO , the error occurs in account assignment the first time you do the Good issue.
    If you reverse the document and repost the Good Issue it works the correct way

  • Assignment Field not updated in F-54

    Hi Experts,
    While clearing vendor down payment thru F-54, the assignment(ZUONR) field is blank even though in the line item of the document, the assignment field as values. Here are the scenarios I have.
    1. If I make a down payment with some values in assignment field, then I am able to see the values in assignment field in F-54.
    2. But if make a down payment with no values in assignment field and then clear some invoices against the down payment and later if i key in some values in assignment field in the down payment document, at that time I am  unable to see the values in assignment field in F-54.
    As anybody faced similar issue like this? Any suggestions or information would be really helpfull for me.
    Thanks in Advance.
    Best Regards,
    Jen

    Hello Jan
    The assignment field will be mostly controlled by the master data in most cases unless you have any substitution in place.
    You can check the sort key in the control data of FS00- GL accounts master data for all the gl accounts which which you are mentioning. The same is applicable in case of vendor or customer you can find that in their respective master data.
    The default value comes from what you select in this say 014 - purchase order number will show p.o number in assignment field in a purchase GL account.
    Hope this helps
    regards
    pbb

  • Sort Key 0014 (Purchase Order) not updated in Assignment Field

    Hi SDN experts,
    I assigned Sory Key 0014 to one of my vendors, after which I tried to post a PO, GR and eventually the IR.
    However, upon checking the FBL1N report, system does not populate it with the Purchase Order Number.
    Any step I missed out?
    Also, the Purchasing Document number is empty. Shouldn't this be populated by the invoice document? (MIRO)
    Regards

    Hi
    In FBL1N, PO will not be displayed in the Assignment field just by giving Sort Key as Assignment Field. You need to implement BTE 1650 in FIBF and write your code to populate it. The logic why sort key of PO will not populate it , because from Version  4 onwards, R/3 aqllows, single Invoice Verification against Multiple PO. Even in the BTE Implementation, you will be able to populate only the First PO Line Item No only, if you do a single invoice verification against multiple PO of the Vendor.
    Regards
    Sanil Bhandari

  • Assignement field for F110

    Hi expert ,
    I am running F110 for vendor payment. System is generating payment document and then creating a check. Hence my payment document is not having check information. How I can bring check number in assignemnet column of bank out going account.
    Thanks

    Hi ,
    There are 2 points to it :
    For the documents which are already created and for the documents that would be created in the future .
    For the documents that are created you can use the Transaction FCHU or else you can use the transaction FB02 to individually edit each document to update the assignment field .
    Seconldy for future cases , you will have to take care of the field ZOUNR , in FS00 put the sort key as 000 and in the IMG settings make the settings for assignment field as Zounr and Check number for reference .
    Hope this helps .
    Regards ,
    Dewang T.

  • Assignment Field - Accounting Document

    Hi,
    The Accounting Documents generated from the Invoicing thru SD module, contain the reverse of the date in the "Assignment Field". The users now want this field to be used for putting the PO nos. Thus after creating the Invoice, in the accounting document generated, the users will be putting the PO No. manually. However, it is also desired by users to put in the PO nos. in the old accounting documents that have already been generated and are there in the systems. Is there a way by which the PO nos. can be automatically uploaded or can there be a mass change of the Assignment Feild?
    Thanks in advance.
    Regards

    From my experience this usually depends on the SD copying controls in
    VTFA, where we assign at the header level the Target Bill type with the Source Sales Doc Type.
    Then specifying the copying req as = 001, Assignment number = A( which is the manual customer PO in the Sales Order entry VA01). Reference Number = E ( Actual invoice no.) where our invoice number <> accounting number.
    And also repeat  the same in VTFL, where we assign at the header level the Target Bill type with the Source Delivery Type.
    For upload we would need to use LSMW by choosing FB02 to update these fields.
    If these fields are constant values then can choose to use FBL5N function for Mass change.

Maybe you are looking for

  • Pages 4.3 not syncing with iCloud.

    Having issues syncing documents from my iPad and iPhone to my Mac, and vice versa. Logged in to iCloud on the Mac, and Pages 4.3 offers iCloud support, however doesn't bring any of my docs from the cloud to my Mac, and when I created one and tried to

  • Aperture to iPhone sync not working

    I am trying to sync photos from Aperture to my iPhone and something is not working. The photos and albums that show up in iTunes when I select the iPhone are old and have been deleted from Aperture. Most of them are sample bird photos that came with

  • The specified data format is not available when I paste

    When I try to copy a jpg image from Firefox21 and try to paste into a graphic software program, I get a message: "the specified date format is not available" It works ok with text, It also works fine in IE8, which I prefer not to use anymore. I use W

  • I want to connect my ps3 to my macbook pro wirelessly.

    I want to connect my ps3 to my macbook pro wirelessly, my macbook pro is connected to the internet via ethernet.

  • Sound missing from one clip when dvd made

    I am using the current version of iMovie. When I burn a DVD via iDVD (and save to Mobileme) I have one clip where the voice track drops out. This clip was filmed at the same time as others and plays fine in iMovie. I've tried replacing the clip with