Posting a document using FM PRELIMINARY_POSTING_FB01

Hello Experts,
I know we can FM PRELIMINARY_POSTING_FB01 to PARK a Document. But I think we can also use this FM to Post the Document. The reason I want to use this FM, not other BAPI's, is I have all the structures (BSEG, BKPF, BSET etc) that I needed to populate. So I passed I_XCMPL = 'X'. However, it still Parked the Document not Posted.
Can anybody please let me know what I missed?
Thanks a lot. Sadly this FM does not have any documentation.
Here's my code:
w_bkpf-bukrs = p_bukrs.
   w_bkpf-gjahr = p_gjahr.
   w_bkpf-blart = p_blart.
   w_bkpf-bldat = p_dat.
   w_bkpf-budat = p_dat.
   w_bkpf-monat = '01'.
   w_bkpf-cpudt = p_dat.
   w_bkpf-cputm = sy-uzeit.
   w_bkpf-wwert = p_dat.
   w_bkpf-usnam = sy-uname.
   w_bkpf-tcode = 'FB01'.
   w_bkpf-xblnr = 'ZTEST1'.
   w_bkpf-waers = p_waers.
   w_bkpf-glvor = 'RFBV'.
   w_bkpf-ausbk = p_bukrs.
   w_bkpf-bktxt = 'TEST'.
  append w_bkpf to t_bkpf.
  w_bseg-bukrs = p_bukrs.
  w_bseg-gjahr = '2010'.
  w_bseg-bschl = '40'.
  w_bseg-koart = 'S'.
  w_bseg-shkzg = 'S'.
  w_bseg-dmbtr = '2000.00'.
  w_bseg-wrbtr = '2000.00'.
  w_bseg-pswsl = p_waers.
  w_bseg-altkt = '0001298232'.
  w_bseg-vorgn = 'RFBU'.
  w_bseg-kokrs = 'ABC'.
  w_bseg-xkres = 'X'.
  w_bseg-hkont = '0001298232'.
  w_bseg-saknr = '0001298232'.
  w_bseg-lifnr = '0000100000'.
  w_bseg-zterm = 'CN30'.
  w_bseg-projk = '00001111'.
  append w_bseg to t_bseg.
   CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
   EXPORTING
*     TEXT_UPDATE            = ' '
*     TEXT_ITEM_UPDATE       = ' '
*     I_UF05A                =
      I_XCMPL                = 'X'
*     FS006_FB01             =
      I_TCODE                = 'FB01'
*     I_PARGB                =
*     I_TCODE_INT            =
*   IMPORTING
*     XEPBBP                 =
    TABLES
      T_BKPF                 = t_bkpf
      T_BSEG                 = t_bseg
      T_BSEC                 = t_bsec
      T_BSET                 = t_bset
      T_BSEZ                 = t_bsez
*     T_BKORM                =
*     T_THEAD                =
*     T_SPLTTAB              =
*     T_SPLTWT               =
    EXCEPTIONS
     ERROR_MESSAGE           = 1.

Hi,
Thanks for the response. I wanted to check the FM which gets triggered in the BTE. However I could find one in FIBF.
Can you please let me know if you have any documentation on FM PRELIMINARY_POSTING_FB01? That would help me understanding its functionality.
Thanks a lot.
Should I use "IN UPDATE TASK" when calling this FM? Thanks.
Edited by: lope jie on Apr 28, 2010 8:10 PM

Similar Messages

  • Posting period 011 2013 is not open while posting the document using F-02 getting the error

    Hi SAP Captains,
    Pls help me here.
    While posting the document using T-code F-02 getting the error "Posting period 011 2013 is not open.
    Please help me how to do, can you provide step by step.
    Rgds..Suresh

    Hi Suresh,
    You can search google and will get number of posts on this. This will lead to duplication of similar posts on forum.
    The message says "FI posting period is closed for 11th period of 2013". In which period you are trying to post the transaction?
    If it is past, open the FI posting periods in OB52.
    BR, Srinivas Salpala

  • Post the document using f-65?

    Hi Experts,
    I know the FB01 tcode  used for Posting and F-65 used for document parking, my query is there any possible to "POST"  the document using F-65?
    Thanks
    NK

    why do you want to POST with f-65 . where there is Fb01 for post But in FB01 you can Pak the docuemnt .
    Go to docuemnt menu and click on SAVE  as completed "
    Many Thanks

  • Posting Intercompany documents using program RFBIBL00

    Hi,
    I want to know if we can post intercompany documents using program RFBIBL00(Direct Input Method).
    If this is possible, please let me know how can this be achieved as I am getting an error "Cross-company code postings not defined".
    Thanks
    Harveen.

    HI
    You need to setup the relationships between the company codes. Do this via
    OBYA transaction.
    Hope this help.
    Regards
    kishore

  • Unable to transfer post the document using BAPI "BAPI_GOODSMVT_CREATE"

    Hi Experts,
    I am unable to post the document using BAPI "BAPI_GOODSMVT_CREATE", getting error "_Sales order stock --- does not exist_"
    details are stated below:
    GM_CODE : 04, it is working fine for the scenario with same saleorder number and line item, but when i give same sale order number and different line item, then i am getting the above error.
    Example : Posting from Saleorder A with line item 100 to saleorder A with lineitem 100 its working fine, but when we are posting
                    from Saleorder A with lineitem 100 to saleorder A with line item 200 it is not working.
    Also When I trying to do with the transaction MB1B manually, it is working fine. kindly suggest me.
    Needed Urgently....
    Appreciate for you early response.
    Regards,
    Sathya.
    Edited by: Sathyanarayana Raghavendra on May 6, 2010 1:00 PM

    Hi,
    Hi Did you call Function BAPI_TRANSACTION_COMMIT' after calling the BAPI.    ?
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = c_x.
    Regards,
    Jovito.

  • Problem while Posting a Document Using BAPI_ACC_DOCUMENT_POST

    Hi All,
    When i try to post my General Ledger Document using BAPI_ACC_DOCUMENT_POST, i face a situation due to the exchange rate. The field EXCH_RATE in CURRENCYAMOUNT table accepts only 5 decimals. But according to my scenario it should accept more than 5 decimals. Is there any BAPI or other way to solve this issue.
    Thanks & Regards,
    Venkatesh. R

    We restricted our entry to five decimals and solved the issue.

  • Validation when posting a document using T. Code FB50 or F-02

    Dear Experts
    Please let me know on how to validate when posting a Cross Company Transaction using T. Codes FB50 or F-02.  The requirement is to restrict Branches (each Branch is a Company Code in SAP) to post any Cross Company documents by selecting HO Company Code in Line Item, system has to stop the User by giving Error Message.
    We can't control this using User level Authorizations because, here the Authorization is provided to the Users to post the Transactions using T. Codes FB50 and F-02.
    To restrict this, I created a Validation as below:
    Prerequisite:
    BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'F-02' AND
    BKPF-BUKRS = 'Br. Company Code' AND
    BSEG-BUKRS = 'HO Company Code'
    Check:
    FALSE
    Message:
    You Can't post Cross Company Transactions using T.Code FB50 or F-02
    And I activated the above Validation in OB28 for HO and Branch Company Codes.  But the Validation is not working properly.  Can anybody help me on how to proceed further in this regard please.

    Hi,
    I haven't tried to use a transaction code for Validation purpose. Instead, I have used document type as prerequisite and then check:
    BKPF-BUKRS = 'Br. Company Code' AND
    BSEG-BUKRS = 'HO Company Code'
    If the condition is met, it displays an error (per the message in validation) while completing the line item details on posting a document.
    Please let me know if that helps. If not, I can try to replicate your scenario and let you know if there is anything missing.
    Thanks,
    Ashish

  • Unable to update XBLNR field on BKPF when posting a document using BAPI_ACC_GL_POSTING_POST

    Hi,
    I'm trying to post a clearing document using BAPI_ACC_GL_POSTING_POST, but after posting i'm unable to see the data in the reference field on header (BKPF-XBLNR). I'm passing the data in the header structure of the BAPI  (DOCUMENTHEADER-REF_DOC_NO).
    Thanks in advance.
    Regards,
    Sandeep

    We restricted our entry to five decimals and solved the issue.

  • Problem in Posting a document using BAPI_ACC_DOCUMENT_POST

    Hi,,
    I am using the function module "BAPI_ACC_DOCUMENT_POST" to post a vendor Invoice (KR). i think the t-code to post this is FV60.when i post the document, the document number is getting generated but amount is missing  in t-code fbv3 but bseg table is getting updated properly. Can any one help the actual input to be given to create a document and tax
    Regards

    I have a suggestion:
    Try to post this kind of document (KR) with transaction code FB01. If you can see the document correctly with FBV3 transaction, then you can use BAPI you mention.
    The following function modules may be useful for calculating taxes:
    CALCULATE_TAX_FROM_NET_AMOUNT
    CALCULATE_TAX_FROM_GROSSAMOUNT
    Regards.
    Rafael Rojas.

  • Is not post parked document using workflow

    Hi friends!!!!
    Weu2019re using workflow for document parked through FIPP_FRAME_1 template and task Task WS10000051 delivered by SAP
    The system does not post parked document parked that are processed via the workflow although they have been released, but, when we try posting it through the menus u201CDocuments > Complete" in the Tcode FBV0 the document parked is not post.
    When checked in the Tcode SWIA, We´re having an endless loop
    the moment we choose workflow logs option. The items keep on
    repeating on a loop giving us a long scroolbar with repeated lines.
    Thanks!!!!

    In FBV0 use document list and the try and post it
    Cheers
    Prakash

  • Posting parked document using RFC

    hi all
    I want to post a parked document using bgjob. I am trying to use PRELIMINARY_POSTING_POST function module but it doesn't post the document.
    the same is possible with function PRELIMINARY_POSTING_POST_D as its dialog.
    My question is before doing any changes do i need to lock the document.
    thanks
    barin

    Hi,
    Please go through the below wiki:-
    [http://wiki.sdn.sap.com/wiki/display/Snippets/ConfiguringparkingdocumentsworkflowinSAPsystem]
    Regards,
    SDNer

  • Validation of a reference field when posting accounting document using FB50

    Hi all,
    We hada requirement to restrict the users from entering japanese caharaceters in the reference field of a accounting document. The validation for this was done using the transaction OB28. when the user posts the accounting document using transaction FB01 or changes the accounting document using transaction FB02, the validation provided in OB28 does work(it throws an error restricting the user from entering japanese characters if he has done so). But whenthe user pots the accounting document using the transaction FB50, the same error message comes as information message although the coding is for giving an error message.
    This however does not happen when the user logs on in English. In English logon the error mesage does appear.
    When the user logs on in Japanese the message comes as an information message but at the same time does not allow posting of the document.
    Debugging this revealed that the OSS note 197329 has been applied to the standard SAP program SAPMF05A.
    Any pointers to how this can be rectifiied would be appreciated.
    Thanks in advance.

    I think it would be best if you opened an OSS message on this.
    Rob

  • Posting a document using RFBIBL00

    Hi,
    I want to post certain details using this program. I have populated the three structures: BGR00, BBKPF(header data) and BBSEG(line item data). The session gets opened but is terminated while reading the header data strucure. It gives this error:
    Session 1 session name SESSION was opened
    Doc. 1 record 1 : Invalid record type /
    ... Last header record ...
    it gives the list of structure fields, and after the last field, it says " Editing terminated".
    I am not populating all the fields , only 6 fields which i require. Is there any fixed format in populating these structures while writing them to the file?
    Any help would be appreciated,
    Thanks,
    Sruthy

    Hi Sruthy
      I guess you have missed populating field STYPE in each of the records which identifies the actual structure.
      Below is how you have to pass for them:
    <b>Struc --> Value
    BGR00 --> 0
    BBKPF --> 1
    BBSEG --> 2</b>
    Kind Regards
    Eswar

  • Error whil posting FI Document using 'F-28' 'Entry not Possible'

    Hi ,
            When i  trying post FI Dcoument using 'F-28'. As sudden given Posting key and account number i m getting the error "Entry not possible'. Can someone tell what is the reason for this.
    Regards
    Balamurugan N

    Check table TBSL : posting key TBSL-BSCHL give allowed account type TBSL-KOART
    A-nlagen(Asset),
    D-ebitoren(customer),
    K-reditoren(vendor),
    M-aterial,
    S-achkonten (general ledger))
    So, you cannot use a [posting key|http://help.sap.com/saphelp_46c/helpdata/en/96/8b3ee943ce11d189ee0000e81ddfac/frameset.htm] like 40 or 50 for a customer account or a 01 or 11 for a bank or expense/fee account.
    Regards,
    Raymond

  • Error while posting a document using  the  BAPI_GOODSMVT_CREATE

    Hi,
    i was trying to post the Goods Receipt document ( Tcode MB1C) using the bapi  BAPI_GOODSMVT_CREATE
    i am passing the item details and Serial number details.
    the error triggered was Maintain Serial Numbers for Total Quantity
    but i am passing the quantity as 1 ( in item data) and passing one serial number.
    is this error because of data problem or am i missing to pass the value to  some dependent parameter..?
    Please help me out.
    Thanks in advance.
    Sriram

    Hi David,
    i was tring to pass the same.
    in item table we have we have four item details ( below)
    RES_ITEM - Item Number of Reservation/Dependent Requirement
    ORDER_ITNO - Order Item Number
    S_ORD_ITEM - Item Number in Sales Order ( length mismatch with serial  item number)
    PO_ITEM  - Item Number of Purchasing Document ( length mismatch with serial  item number)
    out 4 , 2 are ruled out because of length mismatch. and in the reaming two are
    RES_ITEM - Item Number of Reservation/Dependent Requirement
    ORDER_ITNO - Order Item Number
    this is a Goods receipt document, please let me know which field is required to map with item number in the above two.
    Regards,
    Sriram.

Maybe you are looking for

  • Skype Account Hacked. Which is the after procedure...

    Unfortunatly my account at Skype has been hacked so i was obliged at first to create a new one. But my main concern is to deactivate my old-one hacked account as at this account there is my initial list of my contacts. I 've tried to find at Skype si

  • IMac G5 not starting up after system board install

    Six caps blew on my old system board so I ordered a new one and installed it. The system started up great and was running perfectly. However, after the 3rd or 4th reboot, there is no longer anything on the display. I can hear the power click on and a

  • Mapping 1:2 won't work in reverse

    Hi. I have another problem with reverse mapping :) I'm trying to reverse map a table with two foreign keys to another table. Table descriptions Association <<table> id number primary key id_role_1 number id_role_2 number Role <<table>> id number prim

  • GX623 SCREEN PROBLEM

    So the other day i woke my notebook up from sleep mode and everything was Okay ,but after 30 seconds of internet ,screen turned a little bit pink , i restarted  and then tiny black stripes came on screen , Not on one part of screen , everywhere on sc

  • Making 8gb dvd onto single layer dvd with popcorn?

    I know you can compress a dual layer dvd using popcorn to fit onto a single layer dvd. Is there any way to make a 4.7 or larger dvd WITHOUT burning it to a dual layer dvd, but sending it to your HD then using Popcorn to compress it and then record it