PROGRAM WITH BAPI and BDC's

Hi All,
I am using a 2 BAPI's and 3 BDC's in a program. I need all these BAPI and BDC's update the tanscations in a single bundled task? that is if any of BAPI or BDC failed the sucessful BAPI/BDC should be rolled back. How can I make it happen? Any sample code will be helpful
All Suggestion will be rewarded.

BAPI-step by step procedure
http://www.sapgenie.com/abap/bapi/example.htm
list of all BAPI's
http://www.planetsap.com/LIST_ALL_BAPIs.htm

Similar Messages

  • What is BAPI?How to create a BAPI? Difference b/w BAPI and BDC

    Hi all,
    Can some one help me regarding...
    What is an BAPI?where it is used?
    How to create a BAPI?
    What is the difference between BAPI and BDC Program?
    Iam in Initial stage regarding BAPI concept.
    Please respond me soon.
    Thanks,
    Lee

    HI,
    Here it is:
    BAPI Programming Guide
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    BAPI User Guide
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://ifr.sap.com/catalog/query.asp
    STEP BY STEP for BAPI
    http://sap-img.com/abap/bapi-step-by-step-guidance.htm
    <b>DIFFERENCE between BAPI and BDC</b>
    BDC is traditional way of coding the transactions for uploading the legacy data, Sap is changing all transactions to Object oriented programming. Since BAPI is Object based and supports all the new transactions it is preffered over BDC. More over BAPI's process data faster than BDC.
    BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI. BDC is a method of driving screens programatically, for updating SAP data. BAPIs are generally faster than BDCs.
    A BAPI is faster because it is updating the DB "directly". Whereas BDC with call
    transaction goes through the whole screen sequence like any user would do, simply put, fills screens.
    However - there is not always a BAPI for a particular transaction and not all functions that are performed by a transaction can be done by a BAPI. BDCs produce error sessions which can be processed by the user, while BAPIs don't.
    First choose the BAPI ,if there is no BAPI go for BDC.
    why BAPI first not BDC.
    SAP comes up with Change in Version, so each and every time they will change the screens/number etc.
    so you have to change your BDC programs accordingly.
    and also Most of the Latest versions transactions are Enjoy Transaction. they will not support BDC's in Background.
    But Using BAPI's No such disadvantages.
    A BAPI is faster because it is updating the DB "directly" through ABAP code.
    A BDC with call transaction goes through the whole screen sequence like any user would do, simply put, it is filling screens.
    Actually it depends on your requirement but BAPI is more effective as it is standard function module to update SAP databases rather than BDC.
    using bdc over bapi has advantages and also disadvantages
    advantages:
    1. using bdc we can upload data into database tables using 2 ways
    1. foreground -
    means that user interaction is there for each and every record.
    2. back ground -
    no user interaction and tasks are done automatically.
    using these two options is one of the greatest advantage over bapi.
    2. in bdc call transaction method we can control the display of screen resolution which is not possible with bapi's
    3. bdc is generally used for transferring of large amount of data than bapi's
    4.session method of bdc allows us to place data directly in application server and then finally transfered into sap database tables
    disadvantages:
    1.bdc is only used for sap to sap system data transferring
    2. bapis's generally works more faster than bdc's
    3. using bapis we can connect to remote systems and also to non sap systems.
    if useful reward some points.
    A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
    with each other at the Business Object / Process level.
    Check this link to know more about BAPI.
    http://www.sapgenie.com/abap/bapi/example.htm
    http://sappoint.com/abap/
    Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
    typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
    of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
    transaction is then started using this internal table as the input and executed in the background.
    In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
    It can also be used for real-time interfaces and custom error handling & logging features. .
    To know more about BDC,
    check the link.
    http://sappoint.com/abap/
    Main differences are...
    In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
    where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
    not only that...
    when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
    <b><REMOVED BY MODERATOR></b>
    Manish
    Message was edited by:
            Alvaro Tejada Galindo

  • ABAP program for BAPI and convert DB into XML

    ABAP program for BAPI and convert DB into XML
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Refer the link -
    give an example of bapi coding?
    how can we transfer huge amount of data from database server to xml format
    Regards,
    Amit
    Reward all helpful replies.

  • Problem in creating and updating of  material by the use of bapi and bdc

    Hello All,
    I am using bapi (BAPI_MATERIAL_SAVEDATA ) and than bdc to create and update classification data of material.
    I am facing a problem.
    1) firstly I am creating material by the use of bapi and than after creation i want to update classification data for taht perticular material .
    2) To update classification data i am using bdc . while at the time of updating material through bdc system showing me error that material is currently locked by user (my login name ).
    Please suggest what to do.
    Tkank you
    With Regards
    Shantanu Modi

    When u update/create data it takes sometime to commit. So after using BAPI
    give 10 minutes wait in ur program before updating classification data.
    you can write like
    wait up to 20 seconds.
    and update the classification.

  • Calling SAP script program in BAPI and want to display in html format

    Dear All,
    I am writing bapi and calling sap script program in it.
    I want output in html format pl suggest me
    same coding is working for report giving error in sapscript only.
    types: begin of tt_html,
                 html type w3html,
           end of tt_html.
    data: list_tab type standard table of abaplist.
    SELTAB-SELNAME = 'S_INVNO'.
    SELTAB-KIND = 'S'.
    SELTAB-SIGN = 'I'.
    SELTAB-OPTION = 'EQ'.
    SELTAB-LOW =  INVOICE_NUM1.
    SELTAB-HIGH = INVOICE_NUM2.
    APPEND SELTAB.
    submit ZSDRDINVPNBRPT with selection-table seltab
    exporting list to memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = MTAB_REPORT_LIST
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
        CALL FUNCTION 'WRITE_LIST'
         EXPORTING
           WRITE_ONLY       = 'X'
          TABLES
            listobject       = MTAB_REPORT_LIST
         EXCEPTIONS
           EMPTY_LIST       = 1
           OTHERS           = 2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    CALL FUNCTION 'WWW_LIST_TO_HTML'
           TABLES
                HTML   = MTAB_REPORT_HTML
           EXCEPTIONS
                OTHERS = 1.
    LOOP AT MTAB_REPORT_HTML.
    ENDLOOP.

    For displaying output in html format,
    u can either use BSP ( Business Server Pages)
    or Webdynpro.
    Reward if helpful.

  • Program using BAPI and selection screens

    program to compare two infoobjects using BAPI and selection screen in ABAP

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • BAPI AND BDC

    How is BAPI different from call transaction or session

    BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI.
    BAPI enables SAP and third party applications to interact and integrate with each other at the Business Object / Process level.
    Check this link to know more about BAPI.
    http://www.sapgenie.com/abap/bapi/example.htm
    http://sappoint.com/abap/
    BDC is a method of driving screens programatically, for updating SAP data.BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.
    It can also be used for real-time interfaces and custom error handling & logging features. .
    To know more about BDC,check the link.
    http://sappoint.com/abap/
    BAPI V/S BDC:
    SAP comes up with Change in Version, so each and every time they will change the screens/number etc.
    so you have to change your BDC programs accordingly.
    and also Most of the Latest versions transactions are Enjoy Transaction. They will not support BDC's in Background.
    But Using BAPI's No such disadvantages.

  • Reg: bapi and bdc

    Hi Friends,
    I am trying to use a transaction IS01 in crm  in which i need to upload the long text, but when i am recording it , the particular field (long text) for which i need to give input is not appearing, since it is not a  screen batch input field, so is there any bapi available for it to use to transfer the longtext in the transaction IS01 or hw can i record it in BDC while recording and hw can i pass the long text to that particular screen in transaction
    Venki..

    Hi Friends,
    I am trying to use a transaction IS01 in crm  in which i need to upload the long text, but when i am recording it , the particular field (long text) for which i need to give input is not appearing, since it is not a  screen batch input field, so is there any bapi available for it to use to transfer the longtext in the transaction IS01 or hw can i record it in BDC while recording and hw can i pass the long text to that particular screen in transaction
    Venki..

  • Is it possible to match Lockbox program with MICR and/or Invoice, PO , BOL

    Hi ,
    Could please someone let me know , in Lockbox program whether it's feasible to do the matching with the PO , BOL(Bill of Lading) other than the MICR and/or Invoice?
    Any help is highly appreciated and rewarded with the points...
    Thanks

    If you want your LabVIEW program from Windows to run on Linux, you need to compile it first with a LabVIEW for Linux version. Be aware that path management is slightly different under Linux. So your Windows application won't run under Linux if you don't prepare for it.
    If you want a LabVIEW / Windows application to interface with LabVIEW / Linux, you can do this with TCP/IP functions, or perhaps even with global variables (not sure if they work under Linux).
    Can't help you with the second question(s). I'd be worried about getting any camera working under Linux and LabVIEW, but I'm not sure if this is a valid concern.
    Regards,
    Wiebe.

  • 'Z' program with trabstrip and user autorization for visualizing

    Hi
    There's a 'Z' program which contains tabstrip for user option, then an ALV is showed but not all the user must see all ALV, how can I do for this because  it's just one program.
    Thanks in advance.

    Hi,
    if u do not use authorization object, then u can do this think using z-table,
    create a Z-TABLE and enter the one fields 1.  block_user.
    then create table maintenance of the table and enter the user name witch u want to block .
    and in the program  check the value
    if sy-uname =  block_user.
    message ' u r not authorized'.
    else.
    display Report.
    endif.
    Regards,
    Abhilash

  • Program with list and select button

    Hi,
    is there a program module that displays a list and when user selects an item and clicks on some button the program returnes selected item.
    I just want to use that kind of program as a template.
    Thank you.

    Hi,
    Try this program BCALV_GRID_02
    Cheers.
    ...Reward if useful

  • French translation program with grammar and spell check?

    Does anyone know of any really good translation programs where you can write a document in english and the program will translate it to french? The program would also need to have spell and grammar checks.  Thanks

    I know that there's one on the dashboard. You can use google translate but you can't download that one.

  • Trying to compile a GUI program with ActionEvent and Color/Graphics

    Hey, I am trying to compile a program that where I press a button it designs/displays a picture. I have the first part that shows the button, but I can''t get the second part of it. Any suggestions on what to do? Here is the part of the code that I am unsure about, the idea is to get that to design a picture:
    private class ButtonHandler implements ActionListener
              public void actionPerformed( ActionEvent event )
         }

    Heres the code in order to give a better idea of what I am trying to do:
    import java.awt.FlowLayout;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    public class Game extends JFrame
         private JLabel greeting; // greets user and gives initial instructions
         private JButton startGame; // start game button
         private JButton highScore; // displays high scores
         private JButton exitGame; // exits game
         // adds buttons to JFrame
         public Game()
              super( "Game" );
              setLayout( new FlowLayout() ); // set frame layout
              greeting = new JLabel( "Make selection..." );
              add( greeting );           
              startGame = new JButton( "Start Playing" );
              add( startGame );
              highScore = new JButton( "View High Scores" );
              add( highScore );
              exitGame = new JButton( "Exit Game" );
              add( exitGame );
              ButtonHandler handler = new ButtonHandler();
              startGame.addActionListener( handler );
         private class ButtonHandler implements ActionListener
              public void actionPerformed( ActionEvent event )
              public void paintComponent( Graphics g )
    super.paintComponent( g );
    g.setColor( Color.RED );
    g.fillOval( 10, 10, 200, 200 );
    }

  • Stok Program With WCF and linq to sql

    It runs on studio but it doesnt run on windows phone.I didnt add wcf,services and sql.Help Me ?

    Hi WHAT IS  MSDB 'S FULL MEAN,
    >>It runs on studio but it doesnt run on windows phone.I didnt add wcf,services and sql
    Do you mean that you can not add the WCF Service Reference?
    Are you using the Windows Phone Sivlerlight or the Windows Phone Runtime app?
    The Windows Phone 8.1 Rutime app does not support the "Add Services Reference", then we need to use the WCF Restful services for instead in Windows Phone 8.1 Rutime app, for more information, please try to refer to this blog:
    http://blogs.msdn.com/b/myamama/archive/2014/06/24/workaround-to-adding-service-reference-to-windows-phone-8-1-runtime-app.aspx
    Besides, for how to create a WCF Restful Service, please try to refer to this following article:
    http://www.codeproject.com/Articles/571813/A-Beginners-Tutorial-on-Creating-WCF-REST-Services .
    If I have misunderstood you, please try to describe more about your question and post the error information in here.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • EITHER BAPI OR BDC IS BEST FOR F-02

    Hello Friends,
    Iam doing bdc for f-02 even bapi to but iam stuck in middle. i want to upload data for F-02 using posting keys
    40 and 50.
    iam sending sample code for it can any one rectify and tell me whats wrong with this....
    Iam sending both bapi and bdc code...
    Regards
    Bohra.
    REPORT  ZBDC_TEST no standard page heading line-size 255.
    INCLUDE BDCRECX1.
    PARAMETERS: filename LIKE rlgrap-filename.
    TYPES : BEGIN OF IT_TAB,
            bldat(2),                  " DOC DATE
            blart(2),                  " DOC TYPE
            bukrs(4),                  " COMPANY CODE
            budat(8),                  " POSTING DATE
            waers(5),                  " CURRENCY
            xblnr(16),                 " HEADER REF
            bktxt(50),                 " HEADER TXT
          newbs(2),                  " POSTING KEY
            accnt(16),                 " ACCOUNT
            umskz(1),                  " SPL GENREAL LEDGER
            wrbtr(13),                 " AMOUNT IN FOR CURRENCY
            dmbtr(13),                 " AMOUNT FOR COMPANY CODE INR
            zterm(4),                  " PAYEMENT TERM
            zfbdt(8),                  " BASELINE DATE
            wt_wit(2),                 " WITH TAX CODE
            wt_qs(15),                 " WITH TAX BASE
            wt_qb(15),                 " WITH TAX AMOUNT
            mwskz(2),                  " TAX CODE
            bupla(4),                  " BUSINESS PLACE
          bukrs(4),
            kostl(10),                 " COST CENTER
            acgl_it(12),               " INTERNAL ORDER
            acgl_i(10),                " PROFIT CENTER
          acgl_it(8),               " PERSONAL NO
            zuonr(18),                 " ASSIGNMENT
            xblnr1(16),                                         " REF1
            xblnr2(16),                                         " REF2
            xblnr3(16),                                         " REF3
            sgtxt(50),                 " LINE TEXT
          END OF IT_TAB.
    DATA: IT_TAB1 TYPE TABLE OF IT_TAB.
    DATA: WA_HEAD LIKE LINE OF IT_TAB1.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_bdcmsgcoll like bdcmsgcoll occurs 0 with header line.
    data: i_error like itab occurs 0 with header line.
    data: i_sucess like itab occurs 0 with header line.
    data: v_flag.
    data: v_msg(200).
    DATA :  w_file1 TYPE string.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = filename.
    START-OF-SELECTION.
      w_file1 = filename.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = w_file1
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_tab1.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      CLIENT                    = SY-MANDT
       GROUP                     = 'F-02'
       KEEP                      = 'X'
       USER                      = SY-UNAME.
       CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'F-02'
         TABLES
           DYNPROTAB              = IT_TAB1.
           CALL FUNCTION 'BDC_CLOSE_GROUP'.
    RECORDING PROGRAM FOR F-02
      loop at it_tab1 into wa_head.
        perform bdc_dynpro using 'SAPMF05A' '0100'.
        perform bdc_field using 'BDC_CURSOR'
                                'RF05A-NEWKO'.
        perform bdc_field using 'BDC_OKCODE'
                                '/00'.
        perform bdc_field using 'BKPF-BLDAT'
                                 WA_HEAD-BLDAT.
        perform bdc_field using 'BKPF-BLART'
                                'SA'.
        perform bdc_field using 'BKPF-BUKRS'
                                 WA_HEAD-BUKRS.
        perform bdc_field using 'BKPF-BUDAT'
                                 WA_HEAD-BUDAT.
        perform bdc_field using 'BKPF-MONAT'
                                '3'.
        perform bdc_field using 'BKPF-WAERS'
                                 WA_HEAD-WAERS.
        perform bdc_field using 'BKPF-XBLNR'
                                 WA_HEAD-XBLNR.
        perform bdc_field using 'BKPF-BKTXT'
                                 WA_HEAD-BKTXT.
        perform bdc_field using 'FS006-DOCID'
        perform bdc_field using 'RF05A-NEWBS'
                                 WA_HEAD-NEWBS.
        perform bdc_field using 'RF05A-NEWKO'
                                '100100'.
        perform bdc_dynpro using 'SAPMF05A' '0300'.
        perform bdc_field using 'BDC_CURSOR'
                                'RF05A-NEWKO'.
        perform bdc_field using 'BDC_OKCODE'
                                '/00'.
        perform bdc_field using 'BSEG-WRBTR'
                                 WA_HEAD-WRBTR.
        perform bdc_field using 'BSEG-VALUT'
                                '03/27/2006'.
        perform bdc_field using 'BSEG-ZUONR'
                                 WA_HEAD-ZUONR.
        perform bdc_field using 'BSEG-SGTXT'
                                 WA_HEAD-SGTXT.
        perform bdc_field using 'RF05A-NEWBS'
                                 WA_HEAD-NEWBS.
        perform bdc_field using 'RF05A-NEWKO'
                                '574130'.
        perform bdc_field using 'DKACB-FMORE'
                                'X'.
        perform bdc_dynpro using 'SAPLKACB' '0002'.
        perform bdc_field using 'BDC_CURSOR'
                                'COBL-GSBER'.
        perform bdc_field using 'BDC_OKCODE'
                                '=ENTE'.
        perform bdc_field using 'COBL-GSBER'
                                '101'.
        perform bdc_dynpro using 'SAPMF05A' '0300'.
        perform bdc_field using 'BDC_CURSOR'
                                'BSEG-SGTXT'.
        perform bdc_field using 'BDC_OKCODE'
                                '=BP'.
        perform bdc_field using 'BSEG-WRBTR'
                                 WA_HEAD-WRBTR.
        perform bdc_field using 'BSEG-VALUT'
                                '03/27/2006'.
        perform bdc_field using 'BSEG-ZUONR'
                                 WA_HEAD-ZUONR.
        perform bdc_field using 'BSEG-SGTXT'
                                 WA_HEAD-SGTXT.
        perform bdc_dynpro using 'SAPLKACB' '0002'.
        perform bdc_field using 'BDC_CURSOR'
                                'COBL-KOSTL'.
        perform bdc_field using 'BDC_OKCODE'
                                 '=ENTE'.
        perform bdc_field using 'COBL-GSBER'
                                '101'.
        perform bdc_field using 'COBL-KOSTL'
                                 WA_HEAD-KOSTL.
      ENDLOOP.
    BAPI PROGRAM----
    *& Report  ZBAPI_TEST
    REPORT  ZBAPI_TEST.
    DATA: BEGIN OF i_data OCCURS 0,
            text(255),
          END OF i_data.
    DATA: i_fico TYPE BAPIACHE09.
    *DATA: I_FICO1 TYPE BAPIACCR08.
    DATA: I_FICO1 TYPE BAPIACGL09.
    DATA: I_FICO3 TYPE BAPIACCR09.
    DATA: I_FICO2 TYPE BAPIACTX09.
    DATA: P_KEY TYPE BBSEG.
    *DATA: it_TAB LIKE TABLE OF i_fico INITIAL SIZE 0  WITH HEADER LINE.
    HEADER DETAILS FROM BAPI STRUCUTE BAPIACHE09
    DATA: BEGIN OF it_TAB1 OCCURS 0,   " BAPIACHE09
          bldat(8),                    " DOC DATE
          blart(2),                    " DOC TYPE
          bukrs(4),                    " COMPANY CODE
          BUDAT(8),                    " POSTING DATE
          XBLNR(16),                   " HEADER REF
          BKTXT(50),                   " HEADER TXT
          END OF IT_TAB1.
    DATA: it_TAB LIKE TABLE OF BAPIACHE09 INITIAL SIZE 0 WITH HEADER LINE .
    ITEM DETAILS FROM STRUCTURE OF BAPI G/L ACCOUNT ITEM BAPIACGL09.
    DATA: BEGIN OF IT_ITAB3 OCCURS 0,  " BAPIACGL09.
          HKONT(10),                   " General Ledger Account
          SGTXT(50),                   " ITEM TXT
          BUKRS(4),                    " Company Code
          KOSTL(10),                   " COST CENTER
          PRCTR(10),                   " PROFIT CENTER
          END OF IT_ITAB3.
    DETIALS OF CURRENCY ITEMS FROM STRUCTURE OF BAPI BAPIACCR09
    DATA: BEGIN OF IT_iTAB4 OCCURS 0,   " BAPIACCR09
          WAERS(5),                     " CURRENCY
          BAPIWRBTR(23),                " Amount in document currency
          BAPIFWBAS(23),                " Tax Base Amount in Document Currency
          END OF IT_ITAB4.
    TAX ITEM DETAILS FROM BAPI STRUCUTE BAPIACTX09.
    DATA: BEGIN OF IT_ITAB5 OCCURS 0,   " BAPIACTX09.
          MWSKZ(2),                     " Sales Tax Code
          TXJCD(15),                    " Tax Jurisdiction
          ACPI_TXJCD_DEEP(15),          " Tax jurisdiction code - jurisdiction for lowest level tax
          END OF IT_ITAB5.
    THIS IS FROM STRUCTURE BBSEG.
    DATA: BEGIN OF IT_TAB6 OCCURS 0,
          NEWBS(2),                     " Posting Key for the Next Line Item
          NEWUM(1),                     " Special G/L Indicator for the Next Line Item
          DMBTR(16),                    " Amount in local currency (batch input field)
          AUFNR(12),                    " Order Number
          DZUONR(18),                   " Assignment number
          ZTERM(4),                     " Terms of payment key
          ZFBDT(8),                     " Baseline Date.
          END OF IT_TAB6.
    DATA: v_index TYPE i.
    DATA: return TYPE TABLE OF bapiret2 INITIAL SIZE 0 WITH HEADER LINE.
    START-OF-SELECTION.
      CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
        TABLES
          data_tab                      = i_data
    EXCEPTIONS
      CONVERSION_ERROR              = 1
      INVALID_TABLE_WIDTH           = 2
      INVALID_TYPE                  = 3
      NO_BATCH                      = 4
      UNKNOWN_ERROR                 = 5
      GUI_REFUSE_FILETRANSFER       = 6
      OTHERS                        = 7
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION 'BAPI_ACC_GL_POSTING_CHECK'
    EXPORTING
      DOCUMENTHEADER       =
       TABLES
         ACCOUNTGL            = it_tab1
      CURRENCYAMOUNT       =
         RETURN               = return.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          DOCUMENTHEADER         =  it_tab
        TABLES
         ACCOUNTGL               = it_Itab3
         ACCOUNTRECEIVABLE       = it_Itab4
      ACCOUNTPAYABLE         =
         ACCOUNTTAX              = it_Itab5
       CURRENCYAMOUNT        =
      CRITERIA               =
      VALUEFIELD             =
      EXTENSION1             =
          RETURN                 =  return.
      loop at return.
        write:/ return-message,return-type.
      endloop.

    Try BAPI_ACC_GL_POSTING_POST.
    CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
      EXPORTING
        DOCUMENTHEADER       =
        IMPORTING
              OBJ_TYPE             =
              OBJ_KEY              =
              OBJ_SYS              =
      TABLES 
             ACCOUNTGL            =   
            CURRENCYAMOUNT       =   
           RETURN               =
             EXTENSION1           =

Maybe you are looking for

  • TV goes black when i change the channel?

    On my Toshiba LCD TV quite frequently (at least once a night) the screen will go black when I change the channel (via cable box) or if I change the input. I then have to turn the TV off then back on to get the picture back.

  • Downgrade ios8 to ios7 on iPhone 5s

    I am so angry for Apple for not letting me downgrade the current iOS8 to iOS7 on my iPhone 5s as it does not work correctly: the apps stuck, the battery drains faster plus the phone is slower. I am so disappointed!!!

  • Pricing Exchange Rate Type in Copy Control VTFL

    Hello, We have Pricing Exchange Rate type in the Copy control from Delivery To billing ( VTFL) at item level. This Exchange rate type is used for price determination in the billing document. there are several options available for this field. A     C

  • Setting color with Graphics2D on a BufferedImage with IndexColorModel

    I hava a BufferedImage from a GIF, the ColorModel is a IndexColorModel . Since i finally want to write back the modified image to a GIF , i don't want to change the color model, especially my application need to absolutely keep the palette as it is u

  • Mail appointments missing from emails

    Is anyone having issues receiving appointment requests from Windows machines where the appointment date and time is missing by the time you open the email in Mac Mail? The information is there if you open on your email provider's website, just not in