BAPI_PR_CREATE - Error 'Enter G/L account'

hi,
               when i tried to create purchase requisition with bapi BAPI_PR_CREATE for VISA/BGC, i m getting error as 'Enter G/L account' even after passing that value. I tried with BAPI_REQUISITION_CREATE, here i can create requisition but i cant enter HEADER TEXT so im using BAPI_PR_CREATE. please help me in solving the error with BAPI_PR_CREATE.

Hi,
  could you explain how you solved your issue?
Thanks
Fabio

Similar Messages

  • BAPI_PR_CREATE  error enter GL account

    Hi All,
    I a using babi BAPI_PR_CREATE to create a PR with two line items. but I am getting error 'Enter GL account'.
    Please check below program and let me know if anything wrong in it.
    data: lv_prnum type BAPIEBANC-PREQ_NO.
    data: lv_prnumber type BAPIMEREQHEADER-PREQ_NO.
    data: it_req_item type table of BAPIEBANC,
          wa_req_item type BAPIEBANC.
    data: it_req_item_new type table of BAPIEBAN,
          wa_req_item_new type BAPIEBAN.
    data: it_acc_assig type table of BAPIEBKN,
          wa_acc_assig type BAPIEBKN.
    data: it_req_ser type table of BAPIESLLC,
          wa_req_ser type BAPIESLLC.
    data: it_ser_val type table of BAPIESKLC,
          wa_ser_val type BAPIESKLC.
    data: it_return type table of BAPIRETURN,
          lv_return type BAPIRET2.
    data: lv_msg type char50.
    data: it_change_return type table of BAPIRET2,
          wa_change_return type BAPIRET2.
    data: it_pritem type table of BAPIMEREQITEMIMP,
          wa_pritem type BAPIMEREQITEMIMP.
    data: it_pritemx type table of BAPIMEREQITEMX,
          wa_pritemx type BAPIMEREQITEMX.
    data: it_pritemexp type table of BAPIMEREQITEM,
          wa_pritemexp type BAPIMEREQITEM.
    data: it_praccount type table of BAPIMEREQACCOUNT,
          wa_praccount type BAPIMEREQACCOUNT.
    data: it_praccountx type table of BAPIMEREQACCOUNTX,
          wa_praccountx type BAPIMEREQACCOUNTX.
    data: it_ret type table of BAPIRET2,
          wa_ret type BAPIRET2.
    data: it_prheader type table of BAPIMEREQHEADER,
          wa_prheader type BAPIMEREQHEADER.
    data: it_prheaderx type table of BAPIMEREQHEADERX,
          wa_prheaderx type BAPIMEREQHEADERX.
    data: it_ser_acc type table of BAPI_SRV_ACC_DATA,
          wa_ser_acc type BAPI_SRV_ACC_DATA.
    data: it_ser_accx type table of BAPI_SRV_ACC_DATAX,
          wa_ser_accx type BAPI_SRV_ACC_DATAX.
    *first item - material
    wa_pritem-PREQ_ITEM = '00010'.
    wa_pritem-PUR_GROUP = 'ITD'.
    wa_pritem-preq_name = 'abcd'.
    wa_pritem-SHORT_TEXT = 'ABC'.
    wa_pritem-MATERIAL = 'NCAD100001'.
    wa_pritem-PLANT = '1100'.
    wa_pritem-TRACKINGNO = 'XXX'.
    wa_pritem-MATL_GROUP = 'Z111'.
    wa_pritem-QUANTITY = 1.
    *wa_pritem-UNIT = 'AU'.
    wa_pritem-PREQ_DATE = '20140430'.
    wa_pritem-DELIV_DATE = '20140505'.
    wa_pritem-PRICE_UNIT = 1.
    *wa_pritem-ITEM_CAT = ' '.
    wa_pritem-ACCTASSCAT = 'N'.
    *wa_pritem-des_vendor = '0050000793'.
    *wa_pritem-fixed_vend = '0050000793'.
    wa_pritem-PURCH_ORG = '1000'.
    append wa_pritem to it_pritem.
    *2nd item - service
    clear wa_pritem.
    wa_pritem-PREQ_ITEM = '00020'.
    wa_pritem-PUR_GROUP = 'ITD'.
    wa_pritem-preq_name = 'abc'.
    wa_pritem-SHORT_TEXT = 'ABC'.
    *wa_pritem-MATERIAL = 'NCAD100002'.
    wa_pritem-PLANT = '1100'.
    wa_pritem-TRACKINGNO = 'XXX'.
    wa_pritem-MATL_GROUP = 'S0010'.
    wa_pritem-QUANTITY = 1.
    *wa_pritem-UNIT = 'AU'.
    wa_pritem-PREQ_DATE = '20140430'.
    wa_pritem-DELIV_DATE = '20140505'.
    wa_pritem-PRICE_UNIT = 1.
    wa_pritem-ITEM_CAT = '9'.
    wa_pritem-ACCTASSCAT = 'N'.
    *wa_pritem-des_vendor = '0050000793'.
    *wa_pritem-fixed_vend = '0050000793'.
    wa_pritem-PURCH_ORG = '1000'.
    wa_pritem-pckg_no = '0000000001'.
    append wa_pritem to it_pritem.
    *fields for  1st item - material
    wa_pritemx-PREQ_ITEM = '00010'.
    wa_pritemx-PREQ_ITEMX = 'X'.
    wa_pritemx-PUR_GROUP = 'X'.
    wa_pritemx-preq_name = 'X'.
    wa_pritemx-SHORT_TEXT = 'X'.
    wa_pritemx-MATERIAL = 'X'.
    wa_pritemx-PLANT = 'X'.
    wa_pritemx-TRACKINGNO = 'X'.
    wa_pritemx-MATL_GROUP = 'X'.
    wa_pritemx-QUANTITY = 'X'.
    *wa_pritem-UNIT = 'AU'.
    wa_pritemx-PREQ_DATE = 'X'.
    wa_pritemx-DELIV_DATE = 'X'.
    wa_pritemx-PRICE_UNIT = 'X'.
    *wa_pritem-ITEM_CAT = ' '.
    wa_pritemx-ACCTASSCAT = 'X'.
    *wa_pritemx-des_vendor = 'X'.
    *wa_pritemx-fixed_vend = 'X'.
    wa_pritemx-PURCH_ORG = 'X'.
    append wa_pritemx to it_pritemx.
    *fields for  2nd item - service
    clear wa_pritemx.
    wa_pritemx-PREQ_ITEM = '00020'.
    wa_pritemx-PREQ_ITEMX = 'X'.
    wa_pritemx-PUR_GROUP = 'X'.
    wa_pritemx-preq_name = 'X'.
    wa_pritemx-SHORT_TEXT = 'X'.
    wa_pritemx-MATERIAL = 'X'.
    wa_pritemx-PLANT = 'X'.
    wa_pritemx-TRACKINGNO = 'X'.
    wa_pritemx-MATL_GROUP = 'X'.
    wa_pritemx-QUANTITY = 'X'.
    *wa_pritem-UNIT = 'X'.
    wa_pritemx-PREQ_DATE = 'X'.
    wa_pritemx-DELIV_DATE = 'X'.
    wa_pritemx-PRICE_UNIT = 'X'.
    wa_pritem-ITEM_CAT = 'X'.
    wa_pritemx-ACCTASSCAT = 'X'.
    *wa_pritemx-des_vendor = 'X'.
    *wa_pritemx-fixed_vend = 'X'.
    wa_pritemx-PURCH_ORG = 'X'.
    wa_pritem-pckg_no = 'X'.
    append wa_pritemx to it_pritemx.
    *Account assignment data for 1st item - material
    wa_praccount-PREQ_ITEM = '00010'.
    wa_praccount-SERIAL_NO = '01'.
    wa_praccount-QUANTITY = 1.
    wa_praccount-DISTR_PERC = '1.00'.
    wa_praccount-NET_VALUE = 1.
    wa_praccount-GL_ACCOUNT = '0040100801'.
    wa_praccount-UNLOAD_PT = 'ABC'.
    wa_praccount-CO_AREA = '1000'.
    wa_praccount-NETWORK = '000004011841'.
    append wa_praccount to it_praccount.
    *Account assignment data for 2nd item - service
    clear wa_praccount.
    wa_praccount-PREQ_ITEM = '00020'.
    wa_praccount-SERIAL_NO = '02'.
    *wa_praccount-QUANTITY = 1.
    *wa_praccount-DISTR_PERC = '1.00'.
    *wa_praccount-NET_VALUE = 1.
    wa_praccount-GL_ACCOUNT = '0040100801'.
    wa_praccount-UNLOAD_PT = 'ABC'.
    wa_praccount-CO_AREA = '1000'.
    wa_praccount-NETWORK = '000004011841'.
    append wa_praccount to it_praccount.
    *Account assignment fields for 1st item - material
    wa_praccountx-PREQ_ITEM = '00010'.
    wa_praccountx-SERIAL_NO = '01'.
    wa_praccountx-PREQ_ITEMX = 'X'.
    wa_praccountx-SERIAL_NOX = 'X'.
    wa_praccountx-QUANTITY = 'X'.
    wa_praccountx-DISTR_PERC = 'X'.
    wa_praccountx-NET_VALUE = 'X'.
    wa_praccountx-GL_ACCOUNT = 'X'.
    wa_praccountx-UNLOAD_PT = 'X'.
    wa_praccountx-CO_AREA = 'X'.
    wa_praccountx-NETWORK = 'X'.
    append wa_praccountx to it_praccountx.
    *Account assignment fields for 2nd item - service
    clear wa_praccountx.
    wa_praccountx-PREQ_ITEM = '00020'.
    wa_praccountx-SERIAL_NO = '02'.
    wa_praccountx-PREQ_ITEMX = 'X'.
    wa_praccountx-SERIAL_NOX = 'X'.
    *wa_praccountx-QUANTITY = 'X'.
    *wa_praccountx-DISTR_PERC = 'X'.
    *wa_praccountx-NET_VALUE = 'X'.
    wa_praccountx-GL_ACCOUNT = 'X'.
    wa_praccountx-UNLOAD_PT = 'X'.
    wa_praccountx-CO_AREA = 'X'.
    wa_praccountx-NETWORK = 'X'.
    append wa_praccountx to it_praccountx.
    *2nd item Service  details
    wa_ser_acc-doc_item = '00020'.
    wa_ser_acc-outline = '0000000001'.
    wa_ser_acc-srv_line = '0000000010'.
    wa_ser_acc-serial_no = '02'.
    wa_ser_acc-serial_no_item = '02'.
    wa_ser_acc-quantity = 10.
    append wa_ser_acc to it_ser_acc.
    *2nd item Service  fields
    wa_ser_accx-doc_item = '00020'.
    wa_ser_accx-outline = '0000000001'.
    wa_ser_accx-srv_line = '0000000010'.
    wa_ser_accx-serial_no = '02'.
    wa_ser_accx-serial_no_item = 'X'.
    wa_ser_accx-quantity = 'X'.
    append wa_ser_accx to it_ser_accx.
    *Header details
    wa_prheader-pr_type = 'PURE'.
    wa_prheaderx-pr_type = 'X'.
    CALL FUNCTION 'BAPI_PR_CREATE'
      EXPORTING
        PRHEADER                     = wa_prheader
        PRHEADERX                    = wa_prheaderx
    *   TESTRUN                      =
      IMPORTING
        NUMBER                       = lv_prnumber
    *   PRHEADEREXP                  =
      TABLES
        RETURN                       = it_ret
        PRITEM                       = it_pritem
        PRITEMX                      = it_pritemx
    *    PRITEMEXP                    = it_pritemexp
    *   PRITEMSOURCE                 =
        PRACCOUNT                    = it_praccount
    *   PRACCOUNTPROITSEGMENT        =
        PRACCOUNTX                   = it_praccountx
    *   PRADDRDELIVERY               =
    *   PRITEMTEXT                   =
    *   PRHEADERTEXT                 =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   PRVERSION                    =
    *   PRVERSIONX                   =
    *   ALLVERSIONS                  =
    *   PRCOMPONENTS                 =
    *   PRCOMPONENTSX                =
    *   SERVICEOUTLINE               =
    *   SERVICEOUTLINEX              =
    *   SERVICELINES                 =
    *   SERVICELINESX                =
    *   SERVICELIMIT                 =
    *   SERVICELIMITX                =
    *   SERVICECONTRACTLIMITS        =
    *   SERVICECONTRACTLIMITSX       =
        SERVICEACCOUNT               = it_ser_acc
        SERVICEACCOUNTX              = it_ser_accx
    *   SERVICELONGTEXTS             =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    IF sy-subrc eq 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
         WAIT          = 'X'
       IMPORTING
         RETURN        = lv_return.
    endif.

    Hi
    If you want to specify the G/L account for PR you have to transfer
    it in field GL_ACCOUNT in PRACCOUNT and PRACCOUNTX structures.
    This errornormally could occur because the SERIAL_NO in PRACCOUNT and PRACCOUNTX
    was set to "00". It should be setto a value > 0, e.g. "01"
    Kind regards,
    Lorraine

  • Inter compay EDI invoice error "Enter G/L Account No. Message no. ME083"

    Hi Friends,
    There is one IDOC in to error with the error message of "Enter G/L Account No. Message no. ME083".
    This IDOC is an intercompany EDI Invoice and I have checked the configuration of EDI intercompany in OBCA, OBCB, OBCD, OBCC, OBCE. The settings are maintained properly.
    Can any one let me know what is the problem and how to resolve this?
    Many thanks in Advance.
    Regards,
    Abdul

    Dear Karthik,
    There was an logic in the idoc processing for the text segment of the idoc.
    If some text/number avaialble in this segment (text) then system will check for the first 4 characters as chart of accounts and next 3 characters as transaction and look for the GL account in the T030 table of the OBYC.
    In my case there was a space (more than 4+3=7) and system was taking 4 spaces as COA and 3 spaces as transaction key and looking for the GL account in T030 table. And unfortunately there was an blank entry in T030 table and due to this system unable to find the GL account for this combination (Spaces).
    To resolve this issue go to SE16 and give table name EDID4 and give the segment name (segment of text field) and idoc number and search. You will get all the text related segments and try to find the segment having Space before the text/numeric filled in that segment.
    There after edit the IDOC and remove the space from the text field of the segment and try to re-process the IDOC from BD87 transaction code.
    Regards,
    Syed Abdul Mazid

  • Error:Enter a true account assignment object with revenues

    Hi expert,
    Pl advise it is coming at the time of making entry through F-02.I have selected GL for sales.Then this error comes.
    Regards,
    Samar

    Hi Experts,
    When i do entry in F-02,following error comes:
    Enter a true account assignment object with revenues
    Message no. KI166
    Diagnosis
    You made an account assignment for 700000, a revenue element, in controlling area 1000 to a cost center or profit center.
    System Response
    Cost centers and profit centers can carry revenues in the R/3 System as statistics only. To ensure reconciliation between FI and CO for revenue element 700000, a CO account assignment object must record the revenues as a real value. This object type is used for updating to the reconciliation ledger.
    In principle, it's possible for the R/3 System to automatically derive this CO account assignment object, the reconciliation object. However, all postings made in CO for costing-based Profitability Analysis are logged in the reconciliation ledger under "reconciliation object". In this manner, the reconcilation ledger identifies the exact values flowing into the operating profit. If you post reconciliation objects during revenue postings to cost centers or profit centers, you must do so while keeping the interpretation of the reconciliation ledger reports in mind. The sums of revenue postings to profitability segments, cost centers, and profit centers cannot be broken down further.
    Procedure
    To avoid posting to reconciliation objects, make account assignments to a real CO account assignment object.
    If you want to post to reconciliation objects, you can change this message to a caution or a note for future users, or deactivate the message entirely. Use the Implementation Guide under "Controlling: General" and choose Change message control. Enter area KI and message number 166. If you do not enter an individual user here, the change is valid for all users.
    Pl advise.
    Regards,
    Samar

  • BAPI_PR_CREATE (Enter G/L account) error

    Hi
    I am using <b>BAPI_PR_CREATE</b> to create Open PR , I passed all the fields  and entered  G/L account . But i am getting error as <b>'Enter G/L account'</b>. If I am not entering G/L account it is giving <b>error two times </b> as 'Enter G/L account'. What more I need pass to the BAPI .please help

    I've tried regarding Helmut's advise and it works.
    10 points (if i was a thread owner)

  • FBCJ Error - Enter a vendor for this accounting transaction

    Dear Experts,
    I am trying to enter expenses and I have mentioned Vendor Account No. in the Vendor field using splitting option with combination of Vendor Pay/Rec and All Expenses Business Transaction. But the document is not getting posted and giving the error - "Enter a vendor for this accounting transaction". But if I dont use split option it saves.
    This problem I am facing for the last 2 days only. Can you suggest what could be the reason for this error.
    Thanks,
    Deb

    Dear !!!
    I have done everything as you suggested, but it is still showing the same message. Can you please look in to this again.
    Thanks in advance !!!!
    Deb

  • Error 'Enter GL Account' while posting and invoice line item in MIRO

    Hello Gurus,
    I am facing a rather wierd issue.
    While posting a PO invoice in Tcode MIRO, its asking to enter the GL account in line items. Everytime I am entering the GL account and pressing the enter key, it wipes off the GL account clean and gives the same error 'Enter GL account'.
    It seems like this error is happening at the very first line item of the invoice. System is able to accept the GL account in 2,3,4th lines. If I delete the first line item, whatever is the first line item in that screen adapts the issue.
    Any help would be great as I have no clue what to do.
    Thanks

    Hello Priyadarshini,
    could you inform the error message number and it complete long text?
    Regards,
    Mateus Grings

  • Enter G/L account error while uploading open contracts using lsmw

    Hi Experts,
    I have a flat file for Open Contracts.While trying to upload using LSMW -BAPI method(BUS2014), it is throwing error as 'Enter G/L account' though G/L is present in the flat file.I have done with the mapping in the 5th step.
    Checked all the configuration settings of G/L.everything is fine. Not getting where is it going wrong.
    please help me out.

    I've tried regarding Helmut's advise and it works.
    10 points (if i was a thread owner)

  • BAPI  BAPI_PR_CHANGE  giving error message: Enter G/L Account

    Hi Folks,
    I am using bapi Enter G/L Account to add new item in existing PR number.
    In return table, bapi is giving error mesage that, 'Enter G/L Account' . But i don't know where to pass the G/L number to this bapi and from where i can get the G/L number for existing PR document.
    Regards
    PG

    Hi,
    Enter the G/L account in the structure PRACCOUNT field GL_ACCOUNT. Enter the Purchase requistion item no in the field PREQ_ITEM  in the structure PRACCOUNT.
    Also,
    Enter the Purchase requistion item no in the field PREQ_ITEM  in the structure PRACCOUNTX. Set update field to 'X'  in the structure PRACCOUNT field GL_ACCOUNT.
    Hope it helps.
    Sujay

  • BAPI_PR_CREATE Enter G/L account no.

    Hello,
    I am using BAPI_PR_CREATE to create PRs using the gl account but no material and it works fine if I create one with just one line item. However if I try and create one that has more than one line item I get the "Enter G/L account no" message returned even though the gl acct and the serial_no are passed in. Does anyone know what I need to do to get the PR to create for more than one line item?
    Here is a partial listing of the data being used:
    pritem line 1: preq_item=00001 pur_group=N1D Plant=WC01 matl_group=7510 qty=30 unit=EA preq_price=100 item_cat=K
               line 2: preq_item=00002 pur_group=N1D Plant=WC01 matl_group=7510 qty=30 unit=EA preq_price=100 item_cat=K
    praccount line 1: preq_item=00001 serial_no=01 creat_date=06/09/2011 qty=30 gl acct = 6100.3260 costcenter=80A415677B
                     line 1: preq_item=00002 serial_no=02 creat_date=06/09/2011 qty=30 gl acct = 6100.3260 costcenter=80A415677B
    I have also loaded up the X in the corresponding fields of pritemx and praccountx tables.
    If I just pass in one line item it will work but when I try two lines or more I get the old "Enter G/L account no" message returned.
    Thanks,
    Bert

    Hi,
    I think you need to set serial_no to 01 also for the second item. You can assign multiple accounts to PO item (for example 50/50 split between accounts) so serial number is additional part of primary key. I am not sure that it will fix your issue but it does not look right.
    Cheers

  • Reg. Enter G/L account error

    Dear Expers
    When I create Purchase order, After entered AAC,Material,Qty,Rate,Plant and st loc the G/L will assign acutomatically but in this
    case not assigned,especially  GBB is not calling, I have assigned Val class,G/L a/c in OBYC but not fetching the G/L
    Pls help me..............
    Thanks
    Rajakumar.K

    Hi Rajakumar ,
    At first check the below path :
    SproMaterials ManagementPurchasingAccount AssignmentMaintain Account Assignment Categories
    Click on the account ***.category choosen by you and check whether account modifcation exists in it.
    Later goto the below path :
    SproMaterials ManagementValuation and Account AssignmentAccount DeterminationAccount Determination Without Wizard--Configure Automatic Postings
    Click on Account Assignment -- Double Click on GBB - Enter Chart of accounts
    Now find out whether G/L account is assigned to the below combination:
    Val.Modification / Account Modification /Val.Class / Debit / Credit
    If the above two config are set properly then ur G/L will be picked automatically for the account category choosen.
    Regards
    Ramesh Ch

  • Enter a true account assignment object with revenues

    Hi there,
    At my current client site we implemented COPA - Costing Based. I mapped a few revenue accounts  to COPA. Now when I try to make a posting in to COPA using FB70 . The system issues a error Message "Enter a true account assignment object with revenues" . I know  the Prof Segment is the account assignment object  its looking for and the system is not deriving it  from the information I entered in the FB70 document. Am I missing somethig here? Did anyone out there face similar issue??
    You inputs are highly appreciated!
    Regards,
    Siva Padallaparthy

    Hi Siva,
    Please check note 373823 for this error. Also please go through the long text of error message KI166. The solution of the error is mentioned in the long text itself.
    Regards,
    Abhisek

  • While doing MIRO i am getting an error: Enter a tax jurisdiction code

    Hi,
    While doing a MIRO, i am getting an error :
    Enter a tax jurisdiction code
    Message no. M8757
    How to Resolve
    Pratik

    Hi
    Try this
    1.To enter the tax amounts of the G/L account items, choose Extras ® Tax amounts. The Tax Amounts screen appears.
    You can branch to this screen at any point during document entry.
    The Tax Amounts screen shows the tax amount, tax code, posting key, tax base amount, and jurisdiction code for all the items already entered. When you call up this screen after entering the G/L account items, it displays the amounts that have already been entered.
    2.You can now choose how you want to enter the taxes.
    The tax jurisdiction codes represent the different taxing authorities to which you submit payment for taxes EG: the state, county, city etc. 
    In SAP you can have as many as 4 levels. Configuration is done in 2 steps :
    First step :
    The tax jurisdiction structure (structure of the tax code) is set up with following menu path : 
    IMG >Financial accounting> Fi Accounting basic settings> tax on sales/purchases > basic settings > specify structure for tax jurisdiction code.
    Alternatively you can use t-code OBCO
    This step allows you the enter the character length of your various level of hierarchy within your tax jurisdiction code structure (State 2 char, county 3, city 4, etc...).
    Second step:
    You configure the tax jurisdiction code using the structure defined earlier, menu path :
    IMG >Financial accounting> Fi Accounting basic settings> tax on sales/purchases > basic settings > define tax jurisdiction codes.
    Alternatively t-code  OBCP
    Define your tax jurisdiction codes, EG GA0000000 for Georgia, GA001000 for Georgia, douglas county, GA001001 for georgia, douglas county, city of lithia springs.

  • Non-stockable items - Error of G/L Account - ( Error No - ME45 )

    Hi MM Experts,
    While creating PO for Non-stockable items I am getting one error which says that - " You can not enter G/L account directly for the controllling area/ Co. Code".
    Can u pls. help on this issue..
    Thanks & Regards,
    Mahesh

    Dear Karthik,
    There was an logic in the idoc processing for the text segment of the idoc.
    If some text/number avaialble in this segment (text) then system will check for the first 4 characters as chart of accounts and next 3 characters as transaction and look for the GL account in the T030 table of the OBYC.
    In my case there was a space (more than 4+3=7) and system was taking 4 spaces as COA and 3 spaces as transaction key and looking for the GL account in T030 table. And unfortunately there was an blank entry in T030 table and due to this system unable to find the GL account for this combination (Spaces).
    To resolve this issue go to SE16 and give table name EDID4 and give the segment name (segment of text field) and idoc number and search. You will get all the text related segments and try to find the segment having Space before the text/numeric filled in that segment.
    There after edit the IDOC and remove the space from the text field of the segment and try to re-process the IDOC from BD87 transaction code.
    Regards,
    Syed Abdul Mazid

  • Z1-015 Error "Enter Business Area" in BAPI_INCOMINGINVOICE_CREATE

    Hi All,<br/><br/>
    Here is a scenario that has totally confused me and I don't know what to do. Any guidance in this area will be highly appreciated.<br/><br/>
    I am using BAPI BAPI_INCOMINGINVOICE_CREATE for MIRO. Our client gets invoices that contains both PO lines and some Non PO lines. For the PO lines I am populating the BAPI_INCINV_CREATE_ITEMDATA table and for the non po lines I am populating the BAPI_INCINV_CREATE_GL_ACCOUNTDATA table. In the structure BAPI_INCINV_CREATE_GL_ACCOUNT I am also populating the Bus_Area field with the Business Area value along with other values. The header Bus_Area is also populated with business area code. <br/><br/>
    However, when I try to post the invoice the bapi return me a message: Z1 015 "Enter Business Area" and the invoice does not get booked in SAP, <br/><br/>
    I have tried searching this forum and also googled about it, but I got no help in this regard. Please help me out in understanding this problem. I am attaching the code below for ease of understanding my problem. I am using SAP .Net Connector for the purpose. However, any guide related to this error (may not be .Net specific) will be appreciated.<br/><br/>
    //objects used for creating the invoice ****<br/>
    BAPI_INCINV_CREATE_ADDRESSDATA Addressdata = new BAPI_INCINV_CREATE_ADDRESSDATA();<br/>
    BAPI_INCINV_CREATE_HEADER Headerdata = new BAPI_INCINV_CREATE_HEADER();<br/>
    BAPI_INCINV_CREATE_ACCOUNTTable Accountingdata = new BAPI_INCINV_CREATE_ACCOUNTTable();<br/>
    BAPI_INCINV_CREATE_ACCOUNT Account = new BAPI_INCINV_CREATE_ACCOUNT();<br/>
    BAPI_INCINV_CREATE_ITEMTable Itemdata = new BAPI_INCINV_CREATE_ITEMTable();<br/>
    BAPI_INCINV_CREATE_GL_ACCOUNTTable Glaccountdata = new BAPI_INCINV_CREATE_GL_ACCOUNTTable();<br/>
    BAPI_INCINV_CREATE_GL_ACCOUNT Glaccount = new BAPI_INCINV_CREATE_GL_ACCOUNT();<br/>
    BAPI_INCINV_CREATE_MATERIALTable Materialdata = new BAPI_INCINV_CREATE_MATERIALTable();<br/>
    BAPIRET2Table InvReturn = new BAPIRET2Table();<br/>
    BAPI_INCINV_CREATE_TAXTable Taxdata = new BAPI_INCINV_CREATE_TAXTable();<br/>
    BAPI_INCINV_CREATE_VENDORSPLITTable Vendoritemsplitdata = new BAPI_INCINV_CREATE_VENDORSPLITTable();<br/>
    BAPI_INCINV_CREATE_WITHTAXTable Withtaxdata = new BAPI_INCINV_CREATE_WITHTAXTable();<br/>
    // ****<br/>
    // populating the header<br/>
    Headerdata.Bus_Area = invoice.BusinessArea;<br/>
    Headerdata.Comp_Code = invoice.CompanyCode;<br/>
    Headerdata.Doc_Date = invoice.InvoiceDate;<br/>
    Headerdata.Doc_Type = "RE";<br/>
    Headerdata.Diff_Inv = invoice.VendorID;<br/>
    Headerdata.Currency = invoice.Currency;<br/>
    Headerdata.Exch_Rate = 1.00M; // to be replaced<br/>
    Headerdata.Gross_Amount = invoice.InvoiceAmount;<br/>
    Headerdata.Header_Txt = "";<br/>
    Headerdata.Invoice_Ind = "X"; // X = Invoice , '' = Credit Memo<br/>
    Headerdata.Inv_Rec_Date = invoice.DateReceived;<br/>
    Headerdata.Pmnttrms = invoice.PaymentTerm;<br/>
    if (invoice.IsMatched == "0")<br/>
        Headerdata.Pmnt_Block = "A"; // in case the IsMatch Status = 0<br/>
    Headerdata.Pstng_Date = invoice.PostingDate;<br/>
    Headerdata.Calc_Tax_Ind = "X";<br/>
    Headerdata.Del_Costs = 0.00M;<br/>
    Headerdata.Ref_Doc_No = invoice.InvoiceNumber;<br/>
    Headerdata.Inv_Year = "0000";<br/><br/>
    // populating the line<br/>
    List<Invoice.LineItem> lines = invoice.LineItems.Where(item => item.PONumber.Trim() != String.Empty).ToList();<br/>
    int itemCount = 0, accSlNo = 0;<br/>
    foreach (Invoice.LineItem line in lines)<br/>
    {<br/>
        itemCount++;<br/>
        string strItemNo = FillCharacter(itemCount.ToString(), "0", 6);<br/>
        BAPI_INCINV_CREATE_ITEM Item = new BAPI_INCINV_CREATE_ITEM();<br/>
        Item.Invoice_Doc_Item = strItemNo;<br/>
        Item.Po_Number = line.PONumber;<br/>
        Item.Item_Amount = line.Amount;<br/>
        Item.Quantity = line.Quantity;<br/>
        Item.Po_Item = FillCharacter(line.PO_LineNo, "0", 5);<br/>
        Item.Po_Unit = line.PO_Unit;<br/>
        Item.Po_Unit_Iso = line.PO_Unit_Iso;<br/>
        Item.Tax_Code = line.TaxCode;<br/>
        Item.Cond_St_No = "000";<br/>
        Item.Cond_Count = "00";<br/><br/>
        Item.Ref_Doc_It = "0000";<br/>
        Item.Ref_Doc_Year = "0000";<br/><br/>
        Item.Po_Pr_Qnt = Convert.ToDecimal(Po_item["Quantity"]);<br/>
        Item.Po_Pr_Uom = Po_item["Orderpr_Un"].ToString();<br/>
        Item.Po_Pr_Uom_Iso = Po_item["Orderpr_Un_Iso"].ToString();<br/><br/>
        Itemdata.Add(Item);<br/><br/>
    }<br/>
    // populating the GL Accounts for the non PO and PM lines where the PO number will be blank<br/>
    List<Invoice.LineItem> nonPOlines = invoice.LineItems.Where(item => item.PONumber.Trim() == String.Empty && item.LineItemType == "L").ToList();<br/>
    itemCount = 0;<br/>
    foreach (Invoice.LineItem line in nonPOlines)<br/>
    {<br/>
        int multiplier = 1;<br/>
        itemCount++;<br/>
        Glaccount = new BAPI_INCINV_CREATE_GL_ACCOUNT();<br/>
        Glaccount.Invoice_Doc_Item = FillCharacter(itemCount.ToString(), "0", 6);<br/>
        Glaccount.Db_Cr_Ind = "S"; // debit<br/>
        Glaccount.Neg_Postng = "";<br/>
        if (line.Amount < 0.00M)<br/>
        {<br/>
            Glaccount.Neg_Postng = "X";<br/>
            Glaccount.Db_Cr_Ind = "H"; // credit<br/>
            multiplier = multiplier * -1;<br/>
        }<br/>
        Glaccount.Comp_Code = invoice.CompanyCode;<br/>
        Glaccount.Item_Text = line.Description;<br/>
        Glaccount.Item_Amount = line.Amount * multiplier;<br/>
        Glaccount.Gl_Account = line.GLCode;<br/>
        Glaccount.Costcenter = line.CC;<br/>
        Glaccount.Profit_Ctr = line.PC;<br/>
        Glaccount.Orderid = line.OrderNo;<br/>
        Glaccount.Tax_Code = line.TaxCode;<br/>
        Glaccount.Bus_Area = line.BA;<br/>
        Glaccount.Person_No = "00000000";<br/>
        Glaccount.Sdoc_Item = "000000";<br/>
        Glaccount.Ref_Date = "00000000";<br/>
        Glaccount.Wbs_Elem = "00000000";<br/>
        Glaccount.Profit_Segm_No = "0000000000";<br/>
        Glaccount.Alloc_Nmbr = line.Assignment;<br/>
        Glaccount.Tr_Part_Ba = line.BA;<br/>
        Glaccount.Activity = "";<br/>
        Glaccount.Acttype = "";<br/>
        Glaccount.Cmmt_Item = "";<br/>
        Glaccount.Cmmt_Item_Long = "";<br/>
        Glaccount.Co_Busproc = "";<br/>
        Glaccount.Costobject = "";<br/>
        Glaccount.Func_Area = "";<br/>
        Glaccount.Func_Area_Long = "";<br/>
        Glaccount.Fund = "";<br/>
        Glaccount.Funds_Ctr = "";<br/>
        Glaccount.Network = "";<br/>
        Glaccount.Rl_Est_Key = "";<br/>
        Glaccount.Sd_Doc = "";<br/>
        Glaccount.Grant_Nbr = "";<br/><br/>
        Glaccountdata.Add(Glaccount);<br/>
    }<br/>
    proxyPOInvoice.Bapi_Incominginvoice_Create(Addressdata, Headerdata, out FiscalYear, out InvoiceNumber,<br/>
        ref Accountingdata, ref Glaccountdata, ref Itemdata, ref Materialdata, ref InvReturn, ref Taxdata, ref Vendoritemsplitdata, ref Withtaxdata);<br/>

    Hi,
    This error was mis leading. If CalculateTax flag is set to 'X' and there is balance in the transaction currency then, instead of giving "Balance in transaction currency" error "Enter Business Area" error comes.
    There must be some logic for SAP to give this error, but it was somewhat misleading. When i removed the flag for CalculateTax="", this error vanished and "Balance in transaction currency" error came. When I retrified that my invoice got booked properly.
    Thanks to all anyway for the responses provided.
    Best Regards
    Sutirtha

Maybe you are looking for

  • Parameter LOG_ARCHIVE_DEST destination string cannot be translated

    Hi, After change in spfile and restart to mount mode, I got the error. (System is RH EL4.0 Oracle 10g) SQL> startup mount ORA-32004: obsolete and/or deprecated parameter(s) specified ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be

  • Import purchased music to iTunes

    Hi! I just bought a new iMac, but I'm having some problems getting the old music I purchased into the new iMac. I can see a list over all the music, but not an option to import it to iTunes. Can anyone help me? Thank you

  • Select sdo_nn with where-clause on large table

    Hi spatial-experts, I've following problem. I use a table with more than 2.500.000 dataset. Every dataset represents one point (SDO_GEOMETRY, SDO_POINT_TYPE) and have further (text) information. (PI (point of interest) table from TeleAtlas mn_pi) Fol

  • FM : SO_OBJECT_SEND  not working

    Hi i am modifing a standard sap script wherein sap has used FM SO_OBJECT_SEND to send the mails. I am getting the subrc = 0 but mail is not going. I have used following parameters X_RECEIVERS-RECESC       = 'U'. X_RECEIVERS-SNDART       = 'MAIL' Can

  • How would you configure your database?

    How would you configure your disks with those specifications? General Database Characteristics: os is Oracle Enterprise Linux 64 bit Enterprise Edition 180GIG size database. High "oltp" environment. Estimated growth of 40 to 60GIG/year 20GIG of archi