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

BAPI for FI Document Park.

Former Member
0 Likes
1,038

Hi Experts,

Can anyone help me about parking FI document.

I use BAPI_ACC_GL_POSTING_POST.

but this bapi directly post the document,

but i want to park the docuemnt and after that FI person post that document.

I use the exit EXIT_SAPLACC4_001 with below code.

READ TABLE extension INDEX 1.

IF sy-subrc = 0 AND extension-field1 = 'BAPI-PARK'. "<<to know it comes from BAPI call

MOVE 2 TO t_acchd-status_new. "to mark this is Park Document

ENDIF.

but after this exit bapi return OK message with document number.

but in the Tcode FBV3 display error that parked document (bukrs) (belnr) (gjahr) does not exist.

Pl. guide the acutal process.

8 REPLIES 8
Read only

Former Member
0 Likes
950

Still this issue is pending, Pl. help.

Read only

Former Member
0 Likes
950

Hi,

Did you placed COMMIT statement after Bapi call?

Read only

0 Likes
950

Yes .......

Read only

0 Likes
950

Pl. help, still unsolved

Read only

Former Member
0 Likes
950

Hi,

You can use the BAPI PRELIMINARY_POSTING_FB01for parking the document

Read only

Former Member
0 Likes
950

Hi,

Use the below FM



* Call the FM to Park the document.
  CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
    EXPORTING
      i_xcmpl       = 'X'
      i_tcode       = 'FB01'
    TABLES
      t_bkpf        = lt_bkpf
      t_bseg        = lt_bseg
      t_bsec        = lt_bsec
      t_bset        = lt_bset
      t_bsez        = lt_bsez
    EXCEPTIONS
      error_message = 1
      OTHERS        = 2.

  IF sy-subrc NE 0.
* Error message
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                        INTO ls_dochead-message.
* Set the error flag.
    g_err = gc_x.
  ELSE.
    COMMIT WORK.
* Document parked successfully
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                        INTO ls_dochead-message.

  ENDIF.

The data to be filled up are similar to fields in BKPF or BSEG tables

Hope this helps

Regards

Shiva

Read only

0 Likes
950

Hi Shiva Kumar

Can u give me the inputs for the BAPI fully or send me the code fully . I am struggling a lot to PARK a FI Document ?

Help me in this regard

Karthik

Read only

Former Member
0 Likes
950

self solved park in z table.