Problem about bapi BAPI_ACC_DOCUMENT_POST

Field rstgr in bseg table am not able to field this field in BAPI, what can i do ,help me ,pls.

Hi,
you could play a dangerous game, modifying the value in the memory of the Abap program. I give you an example :
  field-symbols: <field1> type any ,
                 <field2> type any .
  data : w_field1(30) value '(SAPMM06I)PREIS_KSCHL' ,
         w_field2(30) value '(ZZ_FG007)KSCHL'.
  assign (w_field1) to <field1>.
  check sy-subrc eq space.
  assign (w_field2) to <field2>.
  check sy-subrc eq space.
  move <field2> to <field1>.
in this code I will modify the value of of the field PREIS_KSCHL in the program SAPMM06I (I'm not in this program when I do that).
but ... it's quiete dangerous
Fred

Similar Messages

  • Problem using BAPI BAPI_ACC_DOCUMENT_POST with vendor field XZEMP

    Hi, I'm using the bapi BAPI_ACC_DOCUMENT_POST, when i fill the table ACCOUNTPAYABLE and execute it, if i use a vendor that doesn't have an 'X' in the field XZEMP (Indicator: Alternative payee in document allowed ?) of the table LFA1 the bapi returns an error.
    I haven't found any place in the bapi tables to override this.
    Is there something that should be parameterized so that this error doesn't happen?
    Thanks!

    Hi,
    Refer
    https://wiki.sdn.sap.com/wiki/display/Snippets/VendorInvoicePostingusingBAPI
    Re: BAPI_ACC_DOCUMENT_POST

  • A Problem about BAPI

    Hi,everyone.
    Now i want to use JCo and BAPI to execute a function(create sales order ps:transaction code is VA01).
    How do i to find the BAPI that i need?
    And where can i find some documents about BAPI?
    Thx~~ a lot
    PS:if this topic isn`t suitable in Java Programming,plz tell me thx ,^^ 
                         by Louis

    HI Louis,
       You can find out the bapis , by running transaction -bapi (Bapi Explorer).
    Here u get a list of standard BAPI's given by SAP.
    u can select appropriate bapi  from here.. Associated with each bapi documentation is there . from this u will get a clear picture of import params ,export params and tables.
    Now to execute  BAPI  or RFC using JCO,
    please go through this sample piece of code. fill the params of standard jco methods with appropriate parameters for your use.
    private static JCO.Client client;
    private static JCO.Repository repository;
    client =
                        JCO.createClient(
                             "<client num>",
                             "<user name>",
                             "<password>",
                             "en",
                             "<server ip or server name>",
                             "<instance number>");
                   client.connect();
                   repository = new JCO.Repository("REP", client);
    try {
    IFunctionTemplate m_read_container;
    m_read_container =repository.getFunctionTemplate("<RFC Name>");
    JCO.Function function_read_cont  = m_read_container.getFunction();
    JCO.ParameterList importparam =
    function_read_cont.getImportParameterList();
    importparam.setValue(<Your value to pass>, "<Import parameter name as in RFC>");
    client.execute(function_read_cont);
    JCO.ParameterList tables =
       function_read_cont.getTableParameterList();
    //For Tables
    JCO.Table container = tables.getTable("<Your table Name from table parameter>");
    for (int iCtr = 0; iCtr < container.getNumRows(); iCtr++) {
    container.setRow(iCtr);
    Strin value = container.getString("<Tale fieldName>");
    JCO.ParameterList exp_abs_read =
    function_read_cont.getExportParameterList();//For Export Params
    JCO.Structure st_abs_read =
    exp_abs_read.getStructure("<If structure using then give structure name>");
    for (int iCtrst = 0;iCtrst < st_abs_read.getNumFields();
                             iCtrst++) {
                             //          String str_field_val = st_abs_read.getString("<Structure Field Name>"));
    String fieldName = st_abs_read.getName(iCtrst);
    } catch (Exception e) {
                                 Regards
                                  Kishor Gopinathan

  • A problem about bapi dd check

    Hi, all.
        I tried to use arfc2 to call a bapi to get PO data from R/3 in 7.1.1. So I did model binding for my component controller`s context. Then I tried to get the result from these parameters programly. But I always got dd check error.
    For example. If an attribute "A" `s data type is int. But the attribute "A" is empty in R/3, so it always returns " " to the attribue "A". Then it will raise an dd check error. The bapi which I used is BAPI_PO_GET_LIST. There are many attributes with this bapi. How can I solve this problem?
    Thanks.

    Hi,
    please check if the below link can help in your case.
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_db/~form/handler]
    Regards
    Narendra
    Edited by: Narendra Singh on Apr 3, 2009 11:54 AM

  • A Problem about BAPI (BAPI_SALESORDER_CREATEFROMDAT2)

    Hi, all.
    Now i try to use BAPI to create order,following is part of my codes:
    function=this.createFunction("BAPI_SALESORDER_CREATEFROMDAT2 ");
                       JCO.ParameterList input = function.getImportParameterList();
                       JCO.ParameterList table = function.getTableParameterList();
                       JCO.Structure ORDER_HEADER_IN = input.getStructure("ORDER_HEADER_IN");
                        ORDER_HEADER_IN.setValue("TA","DOC_TYPE");
                        ORDER_HEADER_IN.setValue("3000","SALES_ORG");
                        ORDER_HEADER_IN.setValue("10","DISTR_CHAN");
                        ORDER_HEADER_IN.setValue("00","DIVISION");
    JCO.Table ORDER_PARTNERS = table.getTable("ORDER_PARTNERS");
    ORDER_PARTNERS.setValue("SP","PARTN_ROLE");
                  ORDER_PARTNERS.setValue("3250","PARTN_NUMB");
    JCO.Table ORDER_ITEMS_IN = table.getTable("ORDER_ITEMS_IN");
                  ORDER_ITEMS_IN.setValue("P104","MATERIAL");
                  ORDER_ITEMS_IN.setValue("10","ITM_NUMBER");
    I ha already setup "ORDER_HEADER_IN"`s parameters.
    But i still can`t create an order successfully.
    And i got two message:
    1.Plz enter sold-to party or ship-to party
    2.Sales documents was not changed.
    Can anyone help me solve this situation?

    hi Louis,
       Checkout the link..,
      http://www.henrikfrank.dk/abapexamples/Java/sapjava_createsalesorder.htm
      hope it helps..,
    regards,
    Vinoth

  • F-04 (Vendor Clearing using BAPI-BAPI_ACC_DOCUMENT_POST)

    Hello all,
    i am using a BAPI - BAPI_ACC_DOCUMENT_POST for posting and clearing vendor payments but problem is that i m getting error that 'Account 3252995 in company code 5219 cannot be directly posted to', can anyone please help me?
    Regards saurabh.

    Hi Saurabh,
    I´m looking for a BAPI to clear Accounts Payable open itens (as F-30, F-28 or FB05) and I saw in your previous message that it´s possible to do this using BAPI BAPI_ACC_DOCUMENT_POST, please, could you give a clue to sove this issue? Any additional information would be well accept.
    Best Regards,
    Ivan Spellmeier

  • Issue in posting a accounting document using BAPI BAPI_ACC_DOCUMENT_POST

    Hi All,
    I 'm able to post a document using BAPI ' BAPI_ACC_DOCUMENT_POST ' but the problem i face is the header text is not getting updated for the document that is getting posted. Even though i'm populating the header text in the parameters i'm passing to the BAPI.
    Any pointers to this would be highly appreciated.
    Regards,
    Chaitanya

    Hi,
    put a  break in subroutine FORM fill_acchd
    and execute the bapi.
    Here you have:
      CLEAR gs_acchd.
      MOVE-CORRESPONDING gs_aw TO gs_acchd.
      gs_acchd-usnam = gs_bapi_acchd-username.
      gs_acchd-awsys = gs_bapi_acchd-obj_sys.
      gs_acchd-bktxt = gs_bapi_acchd-header_txt."---->¡¡¡CHECK THIS!!!
      gs_acchd-glvor = gs_bapi_acchd-bus_act.
      gs_acchd-tcode = sy-tcode.
      gs_acchd-acc_principle = gs_bapi_acchd-acc_principle.
    Check if there is something wrong there.
    Best regards

  • Question about BAPI Performance

    I am currently evaluating options to implement interface between legacy systems and SAP. We have a requirement to post goodsmovement from external application. As some of my team claim that the BAPI approach can cause performance problems. I would like to cross check whether the claim is true.
    And if it is, May I have your advice how can we prevent such problem about performance?
    Ho w can I get additional source of information?
    Kindly advise.
    The BAPI which we are going to use is BAPI_GOODSMVT_CREATE
    Thank you

    No performance problem is there.
    Infact BAPI is advisable against BDC. Also since BAPI is like FM there is no issue.
    I am using it in lot of the objects we have created.
    Cheers
    Regards
    Nishant

  • Passing field "BSCHL"  to bapi BAPI_ACC_DOCUMENT_POST.

    Hi developers,
                 I've just searched the forum, but I can't find the solution to the following problem:
    I need to use bapi BAPI_ACC_DOCUMENT_POST to simulate FB01 transaction. I need to pass to the bapi the field "BSEG-BSCHL" for each record I have to process, but I can't find where passing it to the bapi.
    Thanks a lot

    Hi,
    The BAPI_ACC_DOCUMENT_POST does not have a BSCHL field. Usually, the documents posted with this FM will automatically have the BSEG-BSCHL as '01 or 11' for Customer documents, and '40 or 50' for G/L Postings. Similar pair exists for Vendor postings, though I can't remember.
    Generally, these Posting Keys should be acceptable to most. If you have special requirements for the docs to post in other posting keys, you may have to use custom BDC recordings or standard load programs like RFBIBL00.
    If this helps, please remember to award points before closing the thread.
    Good luck,
    Bhanu

  • Need to upload mass excel sheet using the bapi bapi_acc_document_post.

    I am assigned with an object, where I need to post the records from a mass excel sheet in to ECC or/and BW basing the dimensions using the bapi bapi_acc_document_post.the excel sheet has header and Item data. I am pretty much new to this bapi's
    please do the need ful

    Check report "ACC_BAPI_TEST_INVOICE_RECEIPT",
    this report calls BAPI "BAPI_ACC_INVOICE_RECEIPT_POST",
    but the parameters are nearly the same.
    Best Regards, Dirk

  • An old and difficult problem about "UnsatisfiedLinkError"

    Hi dear all,
    I have been struck with the problem about "UnsatisfiedLinkError". I have a c++ class HelloWorld with a method hello(), and I want to call it from within a java class. In fact, I have succeeded in calling it on the windows platform. But when I transfer it to linux, the error "UnsatisfiedLinkError" comes out. I have tried to take the measures as Forum has suggested, but it failed.
    The source code is very simple to demonstrate JNI.
    "HelloWorld.h"
    #ifndef INCLUDEDHELLOWORLD_H
    #define INCLUDEDHELLOWORLD_H
    class HelloWorld
    public:
    void hello();
    #endif
    "HelloWorld.cpp"
    #include <iostream>
    #include "HelloWorld.h"
    using namespace std;
    void HelloWorld::hello()
    cout << "Hello, World!" << endl;
    "JHelloWorld.java"
    public class JHelloWorld
    public native void hello();
    static
    System.loadLibrary("hellolib");
    public static void main(String[] argv)
    JHelloWorld hw = new JHelloWorld();
    hw.hello();
    "JHelloWorld.cpp"
    #include <iostream>
    #include <jni.h>
    #include "HelloWorld.h"
    #include "JHelloWorld.h"
    JNIEXPORT void JNICALL Java_JHelloWorld_hello (JNIEnv * env, jobject obj)
    HelloWorld hw;
    hw.hello();
    All the files are in the same directory and all the processes are under the dirctory:
    1. javac JHelloWorld.java
    2. javah -classpath . JHelloWorld
    3. g++ -c -I/usr/java/jdk1.3/include -I/usr/java/jdk1.3/include/linux JHelloWorld.cpp HelloWorld.cpp
    4. ld -shared -o hellolib.so *.o
    5. java -cp . -Djava.library.path=. JHelloWorld
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no hellolib in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1349)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at JHelloWorld.<clinit>(JHelloWorld.java:7)
    Tried another measure:
    i) export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
    ii)java -cp . JHelloWorld
    The same error came out as above.
    I really don't know what is wrong with it.
    Would you like to help me as soon as possible?
    Thanks.
    Regards,
    Johnson

    Hi Fabio,
    Thanks a lot for your help.
    It is very kind of you.
    Regards,
    Johnson

  • A problem about calling Labview vi in VB

    Hi all:
    I meeting a problem about data transfer and parallel operation between VB and Labview.
    Actually, I want develop a VB program, in which, the Labview VI can be called and corresponding parameters can be transferred to Labview. and then, I also can operate my system by VB program at same time. something like parallel operation (VB and Labview program).
     But the question is :
    1.   If I use "Call" method of ActiveX in VB,  and the LabVIEW subvi is not stopped (for example, a loop structure), I can not do  parallel operation on VB program. The error message is "other application is busy" which is attached below. The sample codes is also attached.
    2.   I tried to use other methods like "OpenFrontPanel" and "Run", but I am not sure how to transfer the parameter??
    3.  Then I tried to use "SetControlValue" to set the parameters, but there is a error " := expected", which is very strange, because the statement  I wrote is followed with the help documents [ eg: VI.SetControlValue ("string", value)], why it is still need a "=" ??
    Does anybody know something about it? Thanks a lot
    Message Edited by hanwei on 11-07-2008 03:18 PM
    Attachments:
    vb_labview_error_message_1.JPG ‏14 KB
    VB_to_LV.zip ‏10 KB

    I sure hope OP has solved it by now.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Issue with posting G/L using the BAPI " BAPI_ACC_DOCUMENT_POST"

    Hi all,
    I am trying to create a G/L document using the BAPI "BAPI_ACC_DOCUMENT_POST". The Bapi is returning me a success message, but i am not able to see the document in BKPF/BSEG.
    Can somebody please let me know if there is any customization that needs to be done to get the document number reflected in the corresponding tables after i execute this BAPI.
    Here is the part of the code that i am using to fill the header structure:
      docheader-obj_type = 'REACI'.
        docheader-obj_key = 'TEST'.
        docheader-obj_sys = 'ECSCLNT010'.
        docheader-bus_act = 'RFBU'.
        docheader-username = sy-uname.
        docheader-header_txt = 'HDR TEXT'.
        docheader-comp_code = 'SC01'.
        docheader-doc_date = sy-datum.
        docheader-pstng_date = sy-datum.
        CASE wa_input_tmp-batch_type .
          WHEN '0'.
            docheader-doc_type = 'SA'.
          WHEN '1'.
            docheader-doc_type = 'RA'.
        ENDCASE.
    Any help is much appreciated.
    Thanks in Advance,
    Suresh

    See the below code :
    I have tested program in my system :
    *&---HEADER DECLARATION
    DATA: HEADER TYPE BAPIACHE09.                " HEADER DATA
                 INTERNAL TABLE DECLARATION
    *&----G/L ACCOUNT ITEM
    DATA: ACCOUNTGL TYPE STANDARD TABLE OF BAPIACGL09.
    *&---CURRENCY ITEMS
    DATA: CURRENCY_AMOUNT TYPE STANDARD TABLE OF BAPIACCR09.
    *&----RETURN PARAMETER
    DATA: RETURN  TYPE STANDARD TABLE OF BAPIRET2 with header line.
                         WORK-AREA DECLARATION
    *&----WORKAREA FOR G/L ACCOUNT ITEM
    DATA: WA_ACCOUNTGL TYPE BAPIACGL09.
    *&---WORKAREA FOR CURRENCY ITEMS
    DATA: WA_CURRENCY_AMOUNT TYPE BAPIACCR09.
                        INITIALIZATION
    HEADER-HEADER_TXT  = 'TEST HEADER'.
    HEADER-USERNAME    = 'DEVELOPER'.
    HEADER-COMP_CODE   = '0002'.
    HEADER-FISC_YEAR   = '2007'.
    HEADER-DOC_DATE    = '20070502'.
    HEADER-PSTNG_DATE  = '20070502'.
    HEADER-TRANS_DATE  = '20070502'.
    HEADER-DOC_TYPE    = 'SA'.
    HEADER-BUS_ACT     = 'RFBU'.
    WA_ACCOUNTGL-ITEMNO_ACC  = '0000000010'.
    WA_ACCOUNTGL-GL_ACCOUNT = '0000113020'.
    WA_ACCOUNTGL-ITEM_TEXT  = 'SO_DOC'.
    WA_ACCOUNTGL-DE_CRE_IND = 'S'.
    APPEND WA_ACCOUNTGL TO ACCOUNTGL.
    CLEAR WA_ACCOUNTGL.
    WA_ACCOUNTGL-ITEMNO_ACC  = '0000000020'.
    WA_ACCOUNTGL-GL_ACCOUNT = '0000113020'.
    WA_ACCOUNTGL-ITEM_TEXT  = 'SO_DOC'.
    WA_ACCOUNTGL-DE_CRE_IND = 'H'.
    APPEND WA_ACCOUNTGL TO ACCOUNTGL.
    CLEAR WA_ACCOUNTGL.
    WA_CURRENCY_AMOUNT-ITEMNO_ACC = '0000000010'.
    WA_CURRENCY_AMOUNT-AMT_DOCCUR = '500'.
    WA_CURRENCY_AMOUNT-CURRENCY   = 'INR'.
    APPEND WA_CURRENCY_AMOUNT TO CURRENCY_AMOUNT.
    CLEAR WA_CURRENCY_AMOUNT.
    WA_CURRENCY_AMOUNT-ITEMNO_ACC = '0000000020'.
    WA_CURRENCY_AMOUNT-AMT_DOCCUR = '-500'.
    WA_CURRENCY_AMOUNT-CURRENCY   = 'INR'.
    APPEND WA_CURRENCY_AMOUNT TO CURRENCY_AMOUNT.
    CLEAR WA_CURRENCY_AMOUNT.
                    START-OF-SELECTION
    START-OF-SELECTION.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = HEADER
      CUSTOMERCPD             =
      CONTRACTHEADER          =
    IMPORTING
      OBJ_TYPE                =
      OBJ_KEY                 =
      OBJ_SYS                 =
      tables
       ACCOUNTGL               =   ACCOUNTGL
      ACCOUNTRECEIVABLE       =
      ACCOUNTPAYABLE          =
      ACCOUNTTAX              =
        currencyamount          = CURRENCY_AMOUNT
      CRITERIA                =
      VALUEFIELD              =
      EXTENSION1              =
        return                  = RETURN
      PAYMENTCARD             =
      CONTRACTITEM            =
      EXTENSION2              =
      REALESTATE              =
    IF return-type NA 'EA'.
    call function 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'.
    IMPORTING
      RETURN        = RETURN.
      write:/ return-message.
    else.
      write:/ return-message.
    ENDIF.
    Reward Points if it is helpful
    Thanks
    Seshu

  • HT201210 hi everyone, i have a problem about my iphone 4S, doesn't work with wifi connection and bluetooth since upgrade to the IOS 7.0.3. Can anyone can help me tosolve this problem?????Thank's regards paulus

    hi everyone, i have a problem about my iphone 4S, doesn't work with wifi connection and bluetooth since upgrade to the IOS 7.0.3. Can anyone can help me tosolve this problem?????Thank's regards paulus

    Try the suggestions here to see if they resolve your problem:
    http://support.apple.com/kb/ts1559
    If these don't work you may have a hardware problem. Visit an Apple store for an evaluation or contact Apple Support.

  • Problem about Handling of Empty Files in File Adapter

    Hello everyone,
    NetWeaver 2004s --- XI
    In Sender i have a File Adapter.
    Now i meet a problem about Handling of Empty Files. When i send empty file, but don't cerate a leer message.
    I have seen following text in help document. But in adapter configuration i can not find the correspond parameter.
    can you give me some tips?
    Thx in advance
    best regards
    Yaning
    SAP Help Document über File Adapter
    +Handling of Empty Files
    Specify how empty files (length 0 bytes) are to be handled.
    &#9675;       Do Not Create Message
    No XI messages are created from empty files.
    The files are processed according to the selected Processing Mode.
    For example, if the processing mode is Delete, empty files are deleted in the source directory.
    &#9675;       Process Empty Files
    XI messages are created with an empty main payload.
    The files are processed according to the selected Processing Mode.
    &#9675;       Skip Empty Files
    No XI messages are created from empty files.
    Empty files are skipped and remain in the source directory.+
    Help Docu

    hi,
    it's available since Sp19 for XI 3.0
    and the corresponding SPS fpr XI 7.0
    http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    so probably you need to install the new SP
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • Mac OS 10.5.6 - Not compatible with Firefox? "not supported by architecture" message

    I just had OS updated on a Power Book - following a hard-drive crash, now running 10.5.6 - Tried to download/install Firefox 4 - get a "not compatible with this architecture" message upon launch. Any suggestions?

  • RoboHelp 10 - Unable to scroll in the output in IE

    I generated my Help project without errors. However, I am not able to scroll in IE to view the entire topic. Can you tell me how I change my settings to be able to view /scroll to see the entire topic in the IE browser. I am using Windows 7, 32 bit O

  • Downloaded iTunes video - doesn't work

    Hi, I am overseas and downloaded an iTunes video direct to my iPad. The download started fine but was going to take a while to download. Whe I looked back soon afer the download had disappeared, I checked the videos on my iPad, it was there. When I t

  • Organization Structure Extended Classic

    Hi, Can you please help me with the following Questions The below link says that one can use local porg and Local Pgrp in Extended classic. In this case when a PO is replicated to backend, system determined the back end porg for replicated PO based o

  • Clean up Advice Needed?

    Now that the project is done, what is the best way to clean up? Can I just delete the folder where I put everything? What if anything should stay (other than the projects final export to QT)? I just don't want FCE to crash looking for files that are