Can any one pls tell me the mandatory fields for BAPI_ACC_DOCUMENT_POST

hi all ,
Can any one pls tell me the mandatory fields for BAPI_ACC_DOCUMENT_POST
what all data i need to give to post a document.
Thanks and Regards
JK

Hi...
part of my source code:
** Header Data " Sending comp code
wa_documentheader-comp_code = 'XXXXX'.
wa_documentheader-doc_date = '20060620'.
wa_documentheader-pstng_date = '20060620'.
wa_documentheader-doc_type = 'XX'.
wa_documentheader-username = sy-uname.
wa_documentheader-ref_doc_no = 'XXxxxxxx'.
wa_documentheader-header_txt = 'Text Header.
wa_documentheader-bus_act = 'XXXX'.
*it_currencyamount
wa_currencyamount-itemno_acc = '1'.
wa_currencyamount-currency = 'COP'.
wa_currencyamount-amt_doccur  = 1943.
APPEND wa_currencyamount TO it_currencyamount.
*it_accountpayable
wa_accountpayable-itemno_acc = '1'.
wa_accountpayable-gl_account = '1234567890'.
wa_accountpayable-bus_area = 'DIV'.
wa_accountpayable-item_text = 'Text 1 XXxxxxx '.
wa_accountpayable-pmnt_block = ''.
APPEND wa_accountpayable TO it_accountpayable.
*it_accountgl
wa_accountgl-itemno_acc = '2'.
wa_accountgl-gl_account = '1234567890'.
wa_accountgl-item_text = 'Text 2 XXxxxxx'.
wa_accountgl-bus_area = 'DIV'.
APPEND wa_accountgl TO it_accountgl.
wa_currencyamount-itemno_acc = '2'.
wa_currencyamount-currency = 'COP'.
wa_currencyamount-amt_doccur  = ( 1943 ) * -1.
APPEND wa_currencyamount TO it_currencyamount.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
  EXPORTING
    documentheader = wa_documentheader
  TABLES
    accountgl      = it_accountgl
    accountpayable = it_accountpayable
    currencyamount = it_currencyamount
    return         = it_return.
clear it_return.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader = wa_documentheader
      TABLES
        return         = it_return
        currencyamount = it_currencyamount "currencyamount
        accountpayable = it_accountpayable "accountpayable
        accountgl      = it_accountgl "accountgl
      EXCEPTIONS
        OTHERS         = 01.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Similar Messages

  • Can any one pls tell me the procedure of crm datasourse data extraction r/3

    hi
    pls can any one pls tell me the procedure of crm datasourse data extraction from r/3
    regards
    subbu

    Subbu,
    First off please don't post the same question twice.  I have locked your other question due to it being a duplicate.
    Second off:  don't expect an answer to your question immediately.
    Third off:  You need to read the rules of engagement before posting any more questions here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    Fourth:  You question is way too vague and honestly if you would have done a search or read some introductory material on CRM, you would have learnt that the CRM middleware handles the data transfer.
    Last:  I'm locking this thread because your question is way too vague, please take a look at the CRM wiki and help.sap.com and read all the associated documentation about CRM on those sites.
    CRM wiki
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/crm/home
    Then you can come back here if you have a detailed question after reading those materials.
    Take care,
    Stephen
    CRM Forum Moderator

  • I am new to Java, can any one pls tell me what exactly is "Build Path".

    Hi Techies...
    i am new to Java, can any one pls tell me what exactly is "Build Path".
    thanx in adv.
    Regards
    Nitin.V
    Edited by: Nitin.V on Feb 12, 2008 11:08 PM
    Edited by: Nitin.V on Feb 12, 2008 11:09 PM

    The "BuildPath" is a place where all the "resources" referenced by your java program exists.
    please visit http://www.u.arizona.edu/~jtmurphy/H2R/java.htm for more info

  • Can any one say What are the mandatory parameters in BAPI_GOODSMVT_CREATE

    Hi,
    Can any one say What are the mandatory parameters in
    BAPI_GOODSMVT_CREATE.
    Helpful answer will be rewarded.

    Hi,
    The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
    BAPI TO Upload Inventory Data
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
                         02 - MB31 - Goods Receipts for Prod Order
                         03 - MB1A - Goods Issue
                         04 - MB1B - Transfer Posting
                         05 - MB1C - Enter Other Goods Receipt
                         06 - MB11
    Domain: KZBEW - Movement Indicator
         Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
                                     'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
                                     'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
            include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
            include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
            include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
            include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
          errflag.
    data: begin of pcitab occurs 100,
            ext_doc(10),           "External Document Number
            mvt_type(3),           "Movement Type
            doc_date(8),           "Document Date
            post_date(8),          "Posting Date
            plant(4),              "Plant
            material(18),          "Material Number
            qty(13),               "Quantity
            recv_loc(4),           "Receiving Location
            issue_loc(4),          "Issuing Location
            pur_doc(10),           "Purchase Document No
            po_item(3),            "Purchase Document Item No
            del_no(10),            "Delivery Purchase Order Number
            del_item(3),           "Delivery Item
            prod_doc(10),          "Production Document No
            scrap_reason(10),      "Scrap Reason
            upd_sta(1),            "Update Status
          end of pcitab.
    call function 'WS_UPLOAD'
      exporting
        filename                      = p-file
        filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      exit.
    endif.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
      itab-move_type  = pcitab-mvt_type.
      itab-mvt_ind    = 'B'.
      itab-plant      = pcitab-plant.
      itab-material   = pcitab-material.
      itab-entry_qnt  = pcitab-qty.
      itab-move_stloc = pcitab-recv_loc.
      itab-stge_loc   = pcitab-issue_loc.
      itab-po_number  = pcitab-pur_doc.
      itab-po_item    = pcitab-po_item.
      concatenate pcitab-del_no pcitab-del_item into itab-item_text.
      itab-move_reas  = pcitab-scrap_reason.
      append itab.
    endloop.
    loop at itab.
      write:/ itab-material, itab-plant, itab-stge_loc,
              itab-move_type, itab-entry_qnt, itab-entry_uom,
              itab-entry_uom_iso, itab-po_number, itab-po_item,
                                                  pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
        goodsmvt_header             = gmhead
        goodsmvt_code               = gmcode
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = mthead
      MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg
    clear errflag.
    loop at errmsg.
      if errmsg-type eq 'E'.
        write:/'Error in function', errmsg-message.
        errflag = 'X'.
      else.
        write:/ errmsg-message.
      endif.
    endloop.
    if errflag is initial.
      commit work and wait.
      if sy-subrc ne 0.
        write:/ 'Error in updating'.
        exit.
      else.
        write:/ mthead-mat_doc, mthead-doc_year.
        perform upd_sta.
      endif.
    endif.
          FORM UPD_STA                                                  *
    form upd_sta.
      loop at pcitab.
        pcitab-upd_sta = 'X'.
        modify pcitab.
      endloop.
      call function 'WS_DOWNLOAD'
        exporting
          filename                      = p-file
          filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    endform.
    *--- End of Program
    Reward for useful answers.
    Regards,
    Raj.

  • The camera app on my iphone 4S is crashing and while using the rear video cam black wavy lines are appearing but only when exposed to flurescent light in addition to the front cam... can any one please tell me what is happening???

    the camera app on my iphone 4S is crashing and while using the rear video cam black wavy lines are appearing but only when exposed to flurescent light in addition to the front cam... can any one please tell me what is happening???

    Try resetting your phone by holding down the home and off button until the apple symbol comes up. Then if still doing, restore your phone in itunes from your backup.

  • Can any one please tell me how to configure the oracle data gaurd. in steps

    can any one please tell me how to configure the oracle data gaurd. in steps

    Hi,
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#i63561
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/ha/dataguard/physstby/physstdby.htm
    Regards
    Yoonas

  • Can any one please tell me why this e-class is not working

    Hi
    I want to listen the following e-class. But its not running. Can any one please tell me why its not working
    I have windows media player 11 in my system
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/34b9359e-0701-0010-f59d-ee014d5079b3?prtmode=navigate"></a>
    Best Regards
    Ravi Shankar B

    Hi
    I want to listen the following e-class. But its not running. Can any one please tell me why its not working
    I have windows media player 11 in my system
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/34b9359e-0701-0010-f59d-ee014d5079b3?prtmode=navigate"></a>
    Best Regards
    Ravi Shankar B

  • Can any one please tell me how to write labview program for data logging in electric motor bike.

    Can any one please tell me how to write labview program for data logging in electric motor bike. I am going to use CompactRIO for getting wide range of data from various sensors in bike. I need to write labview program for data logging of temperature, voltage and speed of the bike. Can any one help me?

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • Can any one pls let me know how to set up budget in HRMS ..

    Hi Gurus,
    Can any one pls let me know, how to setup Budget in HRMS ..
    with regards
    user600722

    Hi,
    Thank you for the Valuable Information Sir ....
    with Regards
    User600722

  • I created an iMovie. When I try to export it crashes. Can any one walk me through the problem. In 3 hours, my mom's 80th b'day is taking place and this was one of the gifts.

    I created an iMovie. When I try to export it crashes. Can any one walk me through the problem. In 3 hours, my mom's 80th b'day is taking place and this was one of the gifts.

    All of the Spry files are missing and the basic_fs.css.  It's a long list.  If you use Chrome or Safari, you can view source (Safari) or Inspect Element (Chrome) and under Resources you will see the missing files highlighted. 

  • Can any one give step by step screen shots for dialog programming

    can any one give step by step screen shots for dialog programming ..
    thanks
    venki...

    Hi
    see the following links and example programs and practice the same dialog pool program
    Check the below link:
    http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    You can also check the transaction ABAPDOCU which gives you lot of sample programs.
    Also you can see the below examples...
    <b>Go to se38 and give demodynpro and press F4.
    YOu will get a list of demo module pool programs.
    One more T-Code is ABAPDOCU.
    YOu can find more examples there.
    See the prgrams:
    DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
    DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB</b>
    http://www.geocities.com/ZSAPcHAT
    http://www.allsaplinks.com/files/using_table_in_screen.pdf
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Can any one recommend a good mixer/control surface for Soundtrack pro?

    Hey,
    Can any one recommend a good mixer/control surface for Soundtrack pro? I was looking at the Mackie Universal Pro, does anyone have any experience with that or any others?
    Many thanks in advance,
    Gus

    I have to put in another vote for OWC and against ANYTHING else. I bought a Western Digital MyBook Studio Mac Edition several years ago and it did not play well with my old G-series minitower nor the Intel iMac that replaced it last year. The drive was noisy, would cause sleep issues, lock up, overheat and, when allegedly working, dragged down performance.
    I had to leave it turned off most of the time and do TM backups when I remembered--not good.
    Recently I grew sufficiently browned off at the device to rip out the perfectly good WD SATA drive inside it and order an OWC Mercury Elite Pro enclosure with FireWire 800, USB 2 and eSATA ports. The old drive required only minutes to install in the OWC and has behaved perfectly since. No lockups, overheating, and the same drive is actually quieter in the new enclosure than the old.
    WD makes fine hard drives but their enclosures are not very friendly, even those sold as "Mac Editions."
    EDIT: forgot one point. If you have a desktop Mac, don't get a "mobile" or "portable" drive that has no source of power other than the computer. If you MUST use USB, it's possible to have dropouts if the USB bus gets overwhelmed while the drive is connected. Go with a desktop dirve with a separate power supply if you can. If you must go with a USB portable drive lacking its own power supply, also buy a powered USB hub. That usualy provides portable drives with enough power to stay with the program when used at home.

  • Pls tell me the exact formula for calculation of Safty Stock with quality example

    Pls tell me the exact formula for calculation of Safty Stock with quality example

    Hi Devendra,
    safety stock is a quantity of stock which should be planned to be in inventory to protect against fluctuations in demand or supply. Therefore it is considered in planning.
    The Product Planning Details screen is mainly a planning screen, giving an overview on the planning situation for a product in a planning area. The projected stock reflects the planning behavior, displaying the shortages relevant for the planning run.
    As the safety stock has to be always in stock, the projected stock takes it into account as an immediate demand. That is why it reduces the projected stock, for example, if the stock on-hand is 0, then the initial planning situation for the product with a safety stock shows a negative projected stock.
    For more information please check the help document “Material Planning Settings “ under section safety stock which explain with pictorial rep.
    hope it help you.
    Regards,
    Suresh

  • Mandatory fields for  BAPI_ACC_DOCUMENT_POST

    Hi
    I am getting the follwing data from the file (Which is coming from oracle) invoice number and the amount,
    from that i have to use Fb70 tcode for posting ,Please help me what are the mandatory fields for FB70,
    how will get those fields from SAP. How to use the BAPI ?
    Regards
    Pabs

    hi
    check out this thread
    Re: BAPI_ACC_DOCUMENT_POST
    hope this helps
    regards
    Aakash Banga

  • Can any one know how do restrict that fields in mm

    hi gurus
    can any one know how do we restrict the fields in the material master.  Where do we control  do any one know the transaction code for that.
    Thanks in advance

    OMSR
    and
    OMS9
    Help for OMSR
    Assign Fields to Field Selection Groups
    To define whether a field is hidden or displayed, or whether an entry is mandatory or optional in material master maintenance, you must assign the field to a field selection group. You may assign a field to one field selection group only.
    Before including customer-defined fields in a field selection group together with standard fields, or assigning standard fields to a different field selection group, familiarize yourself with the assignment of fields to field selection groups in the standard R/3 System.
    Standard settings
    The values of the field selection groups have been preassigned as follows:
    001-110 Material master for industry
    111-120 Reserved for customers (except where the values are already in use)
    121-150 Material master for industry
    151-210 Material master for retail
    211-240 Reserved for customers
    Recommendation
    If possible, use the setting in the standard R/3 System. No further action is then required. If you want to make individual fields inaccessible, the easiest way is to group them together in a single field selection group and to set it to Display or Hide.
    Activities
    1. Check the setting in the standard R/3 System.
    For this, you need to know the data screen on which the relevant field appears in the material master, and the name of the screen field, for example, MARA-MEINS in the case of the base unit of measure.
    2. If necessary, change the assignment of fields to field selection groups as required.
    Further notes
    In the case of long texts, you define whether the entire screen is hidden or displayed, or whether entries are mandatory or optional. For this reason, each screen has been assigned to one of the following dummy fields:
    LTEXT_BEST Purchase order text
    LTEXT_GRUN Basic data text
    LTEXT_IVER Internal comment
    LTEXT_PRUE Inspection text
    LTEXT_VERT Sales text
    help for OMS9
    Maintain Field Selection for Data Screens
    In this IMG activity, you create and maintain field references. You can see where a field reference is used by choosing Where-used list.
    Activities
    Define or change the field references as required (except for field references with the prefix SAP which must not be changed). New field references must begin with Y or Z.
    Changing the Field Selection Options for a Field Selection Group
    1. Specify the field selection group.
    2. Select the field selection option (hide, display, required entry, or optional entry) for each field reference as required.
    3. Save your data.
    Creating a Field Reference
    1. Choose New entries.
    2. Specify a field reference beginning with Y or Z.
    3. Select the field selection option for each field selection group as required.
    4. Save your data.
    Changing a Field Reference
    1. Double-click the relevant field reference.
    2. Change the field selection option for each field selection group as required.
    3. Save your data.
    reward if usefull
    Message was edited by:
            Umakant Bhangale

Maybe you are looking for

  • Reset Cleared document for multiple docs

    Deal all, There are around 699 documents which were cleared using a particular document number( only one ). Now the user wants to reverse all these documents . As these docs are cleared , we cannot reverse these docs. Can we reset the clearing docume

  • Do I have Standard or Custim installed?

    I have Firefox up and running without any problems. Just want to know how I determine if I am running Standard or Custom edition? If it is Standard can I delete it and reload Custom?

  • How do I get Illustrator CC 2014 to update to CC 2014.1?

    How do I get Illustrator CC 2014 to update to CC 2014.1? Creative Cloud says its up to date, but its not. I've tried uninstalling and reinstalling. Still goes back to 2014. I'd love to start using the new library features, but I can't get it to updat

  • Force the xml declaration to show when the xmltype in generated

    Hi. I use oracle 9.2i . When i generate the XML the xml declaration doesnt show. <?xml version="1.0" encoding="UTF-8" standalone="no"?> Only if i do a getclobval(), but that returns a string that has spaces and alot of other stuff that i don't want.

  • Tm2 touchpad is completely unusuable even when working perfectly due to drivers

    It seems there is a flaw in the touchpad drivers.  If you use two hands on the touch pad, one to move the mouse and another to click the buttons, it becomes unusable. This touchpad has physical click buttons that double as part of the touch area.  If