Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Posting a document using FM PRELIMINARY_POSTING_FB01

Former Member
0 Likes
1,996

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.

3 REPLIES 3
Read only

Former Member
0 Likes
978

put a break point at BTE 2118 or 2218 i am not sure

there it will be having BKPF and BSEG strucutes

and while posting BSEG will be populated and while parking BKPF will be populated.

check whether you have given personnel number

and there are some BO delegations whether direct posting settings can be made

if you need to approve through parking like say if amount is GT 1000 RS. then it goes through approval

such situation might be there

so check with your functional guy

cheers

S.Janagar

Read only

0 Likes
978

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

Read only

0 Likes
978

hi,

Were you able to post using the above FM?