Changing line item account assignment

Hi all,
I am attempting to code the functionality of transaction KB61 to change the account assignment of a line item. The BAPI that I am using to recreate the functionality is BAPI_ACC_PRIMARY_COSTS_POST (may or may not be able to do what I want?)
Does anybody know how to pass the material number (MATNR) through to the line item for being reposted using BAPI_ACC_PRIMARY_COSTS_POST or is there another way to do this?
Regards,
Jason Lante

hi
good
go through this
FU BAPI_ACC_PRIMARY_COSTS_POST
Short text
Accounting: Post Primary Costs
Functionality
Method for posting a document with primary costs.
Structure DOC_HEADER holds the document header data. Field CO_AREA holds controlling area used for posting. For external number ranges, field DOC_ holds the document number. Fields DOCDATE (document date) and POSTGDATE (posting date) are optional; the R/3 System uses the current date for empty fields. Field OBJ_KEY holds the number and organization of a reference document (10 characters each). Field OBJ_TYPE holds the object type of the sender system reference document. Field LOGSYSTEM is for documents from external systems only. Field DOC_HDR_TX can hold a document header text. Field VARIANT can hold a valid screen variant if one is known. Field VERSION is not useful here; you can post only in version 000 which is set as the default.
You must specify the transaction currency for the entire document. You can either specify the currency in SAP format in the TRANS_CURR field or in ISO code in the TRANSCUR_ISO field.
The USERNAME field is a required field.
Table DOC_ITEMS adopts the document item data. The data consists of:
Field Name Short Text Optional
SEND_CCTR Sender Cost Center
SENDER_ORD Sender Order
SEN_WBS_EL Sender WBS Element
SEN_NETWRK Sender Network
SENOPERATN Sender Network Activity
SENSALEORD Sender Sales Order
SENITEM Item Number in Sender Sales Order
SENCOSTOBJ Sender Cost Object
COST_ELEM Cost Element
VALUE_TCUR Transaction Currency Ammount
QUANTITY Total Quantity Entered X
POSTQUUN Posted Quantity Unit X
POSTQUUN_ISO Posted Quantity Unit in ISO Code X
PERSON_NO Personnel Number X
SEG_TEXT Segment Text X
REC_CCTR Receiver Cost Center
REC_ORD Receiver Order
REC_WBS_EL Receiver WBS Element
REC_NETWRK Receiver Network
RECOPERATN Receiver Network Activity
RECSALEORD Receiver Sales Order
RECITEM Item Number in Receiver Sales Order
RECCOSTOBJ Receiver Cost Object
RECACTTYPE Receiver Activity Type
SEN_CALC_MOTIVE Sender Accounting Indicator
REC_CALC_MOTIVE Receiver Accounting Indicator
SENACTTYPE Sender Activity Type
You must enter at least one sender and one receiver object. Fields with *_ISO can also hold quantity units or currencies in ISO code.
Structure MESSAGES returns all messages. Parameter DOC_NO holds the document number for successful postings.
Parameter
DOC_HEADER
IGNORE_WARNINGS
DOC_NO
DOC_ITEMS
RETURN
Exceptions
Function group
K40C
thanks
mrutyun^

Similar Messages

  • Add field 'asset' in sales order line item account assignment tab

    Hi,
    I would like to add the following field: 'asset' in sales order line item account assignment tab.
    I can enter order, or wbs, but not Asset.
    How can I make this field visable?
    Anybody?
    thanks,
    klundert
    Edited by: Eric Van Zundert on Oct 30, 2010 8:43 AM

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • Printing of changed line item in scheduling agreement  smart form.

    Hi experts,
    I am facing problem in printing of changed line item in schedule agreement.
    can any body tell me how to find the line item has been changed through programming?what is the procedure to fetch the data for new line item.its
    very urgent for me.
    Please help me in this regard.
    Priti Shrivastava

    Hi
    with the help of  T180-TRTYP field you know if that doc has been changed or created.
    If it is not equal to H it is changed. H means created.
    pass the TCODE of Sched Agreement and check this field.
    You can use the CDHDR and CDPOS table s to get the changed values of new item.
    Reward points if useful
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • BAPI_PO_CHANGE Changing line Item

    Hi All,
    My requirement is like this I need to changed line item of a purchase order using BAPI_PO_Change is it required to pass header data other than po Number?I have to change only the Batch Number(POITEM-BATCH) can some body throw some idea on this?
    Thanks&Regards
    Mahesh

    Hi,
       PO number may solve your purpose. Just try filling
       PO number in your BAPI header structure and
       relevent field for your batch number.
    Regards
    Amole

  • Outgoing cash Payment line item account not printed

    Hi,
       In case any cash payment raised through outgoing payment, line item(account name, amount, etc..) table is printed. If check payment, we can get the print(Line item) out. If anybody knows the reason for not printing the table. please tell me.
    Thanx in advance,
    Suresh.

    Kevin,
            If it's one line, we can do as say, We have more than one line. we need repetative area.
    Scenario,
    Screen:    Outgoing Payment
    Select:       Account  ( not customer or not supplier)
    line table(Account) : Enter more than one line.
    Payment mode:  Cash.
    finally Check  the printout:   Line table which contains accounts are not coming in the printout.
    Created:  Own PLD.
    Suresh.

  • Vendor Display/Change Line Items

    Vendor with Debit balance
    Dear Friends:
    In FBL1N - Display/Change Line Items, How to indentify vendors with debit balance and How to identify vendors who has to be paid and why are amounts showing with - sign?
    Please explain.
    Thanks&Regards
    MSReddy

    Hi,
    You can identify the debit balance by checking the amount with positive value. Or you can also select "debit/credit" indicator in the screen layout. when the layout come out, you'll see "H" representing credit and "S" representing debit.
    Regarding second question, normally the line item that still need to be paid is identified as "open item" (red color", and the amount that has been paid as "cleared item" (green color).
    Even the amount already paid, it will still sign negative, but you can see the "clearing document" number as the payment or clearing document.
    Note that, the assumption on the above is that the payment of outstanding vendor is using clearing procedure.
    regards,

  • WBS element changed into an account assignment element

    Hi Gurus,
    Please let me know that how to get WBS element changed into an account assignment element.
    regards
    mohan

    In what releation? For depreciation costs?

  • Change Line Item Display in GL Accounts

    Hi, I need to know how can I make a massive change to all my GL Accounts, to put the check in the flag of "line item display" in the Control Data of my accounts

    Hi,
    Try transaction MASS or you can find help at http://help.sap.com/saphelp_erp2005/helpdata/en/59/0735b112c311d396cb006094b969cf/frameset.htm
    If you find the answer useful, please assign reward points.
    Regards,
    Svetlin

  • Enhancement - Accounting Document from Billing Document - change line items

    Hi Experts,
           Our client has a requirement to display all line items(as shown in Billing document) along with the tax line in the Accounting document. I can explain it as below:
          In VF01 transaction code: enter the delivery number.
          Press enter to see the number of line items that will be populated in the Billing document.
          Click on save.
          Here in the Accounting Doc you'll find only 2 line items, one line item is the consolidation of WRBTR and quatity of all the line items in the Billing Document and the other line item is the tax.
          We are required to replace the consolidated line item in the Account Doc with all the actual lines as populated in the Billing Document.
          For this we tried various methods:
                 Searched for a BAPI - couldnt find any which will help in modifying the line items before creation of Account Doc
                 Checked UserExits - Found one SDVFX008 but it didnt have the table which is sent for population of Accounting doc hence there was no way we could modify any table to get the desired output.
                 Searched the VF01 Flow in Debugger to check when the Accounting Doc is updated, but it also didnt yield any fruits.
          Kindly please guide on a way this can be accomplished. Appreciate the help from you all...

    Hi
    I think that your requirement is related with summarization of items in the FI doc for the billing document. Please, see SAP Note 36353 - AC interface: Summarizing FI documents. See also Note 301077 - User exits for the interface to accounting.
    I hope this helps you
    Regards
    Eduardo

  • Rebate Agreement number in GL account line item in Assignment Field

    Hi all
    We have two GL accounts in company code xxx - 299011 and 373500. They both have the same sort key 016 but do not get the same value in the assignment field. For the 299011 account the system seems to add the Rebate agreement number to the field from the sort key. This is also requested for the 373500 account.
    The document flow is like this Std order > outbound delivery > Invoice > Accounting Doc.
    In GL a/c 299011 the agreement number is displayed but no rebate agreement number is displayed in account 373500. What are the setting need to be done to achieve rebate no in gl account 373500.
    Thanks
    Naveen

    Hi
    Depending on the GL Account Assignment of the Two GL Accounts, you need to check the copy controls in VTFA
    Regards
    Sanil

  • IN SALES ORDER PLANT IS CHANGED BUT FM ACCOUNT ASSIGNMENT IS NOT CHANGED

    HI ALL
    while changing the plant in sales order  LINE ITEM FM  accounting assignment is not changing accordingly FOR THE PARTICULAR LINE ITEM.
    FOR THIS REASON NO ACCOUNTING DOCUMENT IS GENERATING.
    THANKS & REGARDS
    MALA

    solution found.
    Mala k reddy

  • Line Item Field "Assignment" not populating

    I am posting a KR doc. The assignment field in the line item is not populating with the date on the document is being posted in either of the line items, posting key 31 posting to Vendor and posting key 40 posting to an expense G/L account. The assignment field remains empty. I have checked some documents in the other company codes where this field is being populated with the date in the yyyymmdd.
    Please let me know what controls this and how can I make this field populate.

    Th Sory key for the GL for that company code should have the document date as the sort key.... check in FS00

  • How to change line item numbers

    HI
    when we are creating sales order, if we enter material number, line item number will be autmaticallly assigned(for eg 10,20,30 ....). if i want to change that number what i have to do(eg: to 1, 4, 5, .....). in standard SAP, the field is grayed out once the no is assigned. so i dont know how to change the no. please help me in this.

    Hello,
    You can give any number manually as the line item when you are creating the sales order.
    While creating the order give the item number also manually, then the system will accept. Once you given the line item number , it will not allow you to change it.
    Then you need to delete the line item and re-insert with the line item number you want.
    Prase

  • Changing line item delivery address in shopping cart need to reflect same in all line items

    Hi All,
    Need help on below,
    I have a requirement that when we change the shopping cart line item delivery address same needs to reflect all line items.
    Suppose a shopping cart having 3 line items 1, 2 and 3. if i change the delivery address of line item 1, the same needs to reflect the line item 2 and 3 as well.
    In my case  if we change the 1's delivery address, after processing its genrating the IDOC on line item wise not in the header wise. And same having the different delivery address.
    Thanks in advance.
    regards:
    Ramesh

    Hello Ramesh,
    we can do this changes in BBP_DOC_CHANGE_BADI . Create a Implementation for the above BADI and Inside that Implementation BADI method just call the function module BBP_PD_SC_GETDETAIL for SC item details by passing the Header GUID.
    Once you get the Partner table(E_PARTNER) details.. Keeping a loop on SC item(E_ITEM) and change address number(ADDR_NO) in Partner table when Partner function eq X( X is an partner function values which you define in SPRO.).
    pseudo logic:
      CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
        EXPORTING
          i_guid    = l_guid
        TABLES
          e_item    = lt_item
          e_partner = lt_partner.
    * Check for all the line items if vendor is assigned
      LOOP AT lt_item INTO lwa_item.
        READ TABLE lt_partner INTO lwa_partner
                          WITH KEY partner_fct = '00000019'
                                   del_ind     = space
                                   p_guid      = lwa_item-guid.
        IF sy-subrc eq 0 .
       * modification of address number logic here in partner table
        ENDIF.
      ENDLOOP.
    All the best.
    Regards,
    Sankarbabu

  • Error After BAPI_PO_CREATE1 with multiple Lines "Enter Account Assignment"

    Hi,
    I am trying to Post Purchase Orders with Multiple lines using BAPI_PO_CREATE1 and got error
    "Enter Account Assignment". This is happening when I post PO with multiple line items.
    I am trying the same PO with one record, PO is creating successfully. Do I need to put any additional data.
    I am creating PO with Item Category 'D' and Account Assignment 'N' and external number range and internal number range.
    Pls let me know, Do i need any additional flags for this.
    Thanks,
    naini

    Hello all,
    please help!!
    I used function BAPI_PO_CREATE1 to create PO with limit item but function returned message error '518 No account assignment exist for service line 0000000000'. Can anyone give me an idea to slove this problem? for your information, I used parameters below to run this function.
    POHEADER
    POHEADER-COMP_CODE = '1205'
    POHEADER-DOC_TYPE = 'GZPO'
    POHEADER-VENDOR = '8000001313'
    POHEADER-PMNTTRMS = '0001'
    POHEADER-PURCH_ORG = '1222'.
    POHEADER-PUR_GROUP = 'K05'
    POHEADER-CURRENCY = 'THB'
    POHEADER-EXCH_RATE = '1.00000'
    POHEADER-EX_RATE_FX = ' X'
    POHEADER-DOC_DATE = '10.06.2008'
    POHEADERX
    POHEADERX-COMP_CODE = 'X'
    POHEADERX-DOC_TYPE = 'X'
    POHEADERX-VENDOR = 'X'
    POHEADERX-PMNTTRMS= 'X'
    POHEADERX-DSCNT1_TO = 'X'
    POHEADERX-PURCH_ORG= 'X'
    POHEADERX-PUR_GROUP = 'X'
    POHEADERX-CURRENCY= 'X'
    POHEADERX-EXCH_RATE= 'X'
    POHEADERX-EX_RATE_FX= 'X'
    POHEADERX-DOC_DATE= 'X'
    POHEADERX-INCOTERMS1= 'X'
    POHEADERX-INCOTERMS2= 'X'
    POITEM
    POITEM-SHORT_TEXT = 'TEST'
    POITEM-PLANT = '5005'
    POITEM-MATL_GROUP = '606100001'
    POITEM-QUANTITY = '1.000'
    POITEM-PO_UNIT = 'AU'
    POITEM-ITEM_CAT = 'B'
    POITEM-ACCTASSCAT = 'K'
    POITEM-DISTRIB = ' '
    POITEM-PART_INV = ' '
    POITEM-PCKG_NO = '0000100001'
    POITEMX
    POITEMX-SHORT_TEXT = 'X'
    POITEMX-PLANT = 'X'
    POITEMX-MATL_GROUP = 'X'
    POITEMX-QUANTITY = 'X'
    POITEMX-PO_UNIT = 'X'
    POITEMX-ITEM_CAT = 'X'
    POITEMX-ACCTASSCAT = 'X'
    POITEMX-DISTRIB = 'X'
    POITEMX-PART_INV = 'X'
    POITEMX-PCKG_NO = 'X'
    POSCHEDULE
    POSCHEDULE-PO_ITEM = '00001'
    POSCHEDULE-SCHED_LINE = '0001'
    POSCHEDULE-DEL_DATCAT_EXT = 'D'
    POSCHEDULE-DELIVERY_DATE = '01.09.2006'
    POSCHEDULE-QUANTITY = ' 1.000'
    POSCHEDULEX
    POSCHEDULEX-PO_ITEM= '00001'
    POSCHEDULEX-SCHED_LINE = '0001'
    POSCHEDULEX-PO_ITEMX = 'X'
    POSCHEDULEX-SCHED_LINEX = 'X'
    POSCHEDULEX-DEL_DATCAT_EXT = 'X'
    POSCHEDULEX-DELIVERY_DATE = 'X'
    POSCHEDULEX-QUANTITY = 'X'
    POACCOUNT
    POACCOUNT-PO_ITEM = '00001'
    POACCOUNT-SERIAL_NO = '01'
    POACCOUNT-GL_ACCOUNT = '0065903020'
    POACCOUNT-BUS_AREA = '70'
    POACCOUNT-COSTCENTER = '0010700003'
    POACCOUNT-ORDERID = ' '
    POACCOUNTX
    POACCOUNTX-PO_ITEM = '00001'
    POACCOUNTX-SERIAL_NO = '01'
    POACCOUNTX-PO_ITEMX = 'X'
    POACCOUNTX-SERIAL_NOX = 'X'
    POACCOUNTX-GL_ACCOUNT = 'X'
    POACCOUNTX-BUS_AREA = 'X'
    POACCOUNTX-COSTCENTER = 'X'
    POACCOUNTX-ORDERID = 'X'
    POSERVICES
    POSERVICES-PCKG_NO = '0000100001'
    POSERVICES-LINE_NO = '0000000001'
    POSERVICES-OUTL_IND = 'X'
    POSERVICES-SUBPCKG_NO = '0000100002'
    POSERVICES-QUANTITY = ' '
    POSERVICES-BASE_UOM = ' '
    POSERVICES-GR_PRICE = ' '
    POSERVICES-FROM_LINE = '000001'
    POSERVICES-TO_LINE = '999999'
    POSERVICES-SHORT_TEXT = ' '
    POSERVICES-MATL_GROUP = ' '
    APPEND POSERVICES
    POSERVICES-PCKG_NO = '00100002'
    POSERVICES-LINE_NO = '0000002'
    POSERVICES-OUTL_IND = ' '
    POSERVICES-SUBPCKG_NO = ' '
    POSERVICES-QUANTITY = '1.000'
    POSERVICES-BASE_UOM = 'AU'
    POSERVICES-GR_PRICE = '43,486.21'
    POSERVICES-FROM_LINE = ' '
    POSERVICES-TO_LINE = ' '
    POSERVICES-SHORT_TEXT = 'Demurrage'
    POSERVICES-MATL_GROUP = '606100001'
    POSRVACCESSVALUES
    POSRVACCESSVALUES-PCKG_NO = '0000100001'
    POSRVACCESSVALUES-LINE_NO = '0000000001'
    POSRVACCESSVALUES-SERIAL_NO = ' '
    POSRVACCESSVALUES-QUANTITY = ' '
    APPEND POSRVACCESSVALUES
    POSRVACCESSVALUES-PCKG_NO = '0000100002'
    POSRVACCESSVALUES-LINE_NO = '0000000002'
    POSRVACCESSVALUES-SERIAL_NO = '01'
    POSRVACCESSVALUES-QUANTITY = '1.000'
    POLIMITS
    POLIMITS-PCKG_NO = '0000100001'
    POLIMITS-LIMIT = '1.00'
    POLIMITS-EXP_VALUE = '1.00'
    APPEND POLIMITS
    POLIMITS-PCKG_NO = '0000100002'
    POLIMITS-LIMIT = ' '
    POLIMITS-EXP_VALUE = ' '
    please help
    Thank you for advance

Maybe you are looking for

  • How to check open deliveries and open sales order using means of transport

    Hi, I want to check open sales order and open delivries which is having "ABXP" means of transport type .Can anybody suggest me to check in which table or any transa

  • Triggering an event with a digital input

    Hello all, I'm writing my first Labview program.  I used an architecture I found on the forums here, and it has been very helpful in getting me started.  This architecture uses two while loops, one containing an event structure and one containing a c

  • Troubleshooting Fiber Connection on a Catalyst 2960

    I am trying to test my fiber connectivity on a Catalyst 2960 before I deploy it. So what I thought I would do is connect it to another switch in my office with a open port for the fiber connection. The other switch is a Catalyst 3560G. Here are the p

  • MXML Application

    Hi, I'm fairly new to Flex and actionscript. I found a Flex project on the net and I managed to make it work. It is about drag and drop functionality. The MXML starts like this: <ab:AlphabetBase  xmlns="http://www.adobe.com/2006/mxml" horizontalGap="

  • Where is the iPhone backup?

    Hi, Recently, I just backup iPhone via iCloud service. I'm wondering where is the backup file stored at?