2006 Oct 11 11:18 PM
Hi All,
I am trying to PARK a GL document using BAPI_ACC_GL_POSTING_POST. I have successfully posted documents using this BAPI but my requirement is for only park documents.
I have read some threads that mentioned that is possible to park documents by using the EXTENSION1 parameter (tables) to trigger a user exit that must be activated.
In other thread says to use the BADI ACC_DOCUMENT to pass the value '2' to C_ACCHD-STATUS_NEW ( C_ACCHD-STATUS_NEW = '2') which should park documents.
Does anyone is familiar with this? If so, could you
please send me a sample?
Please advice,
Regards,
Jose
Hi All,
I am trying to PARK a GL document using BAPI_ACC_GL_POSTING_POST. I have successfully posted documents using this BAPI but my requirement is for only park documents.
I have read some threads that mentioned that is possible to park documents by using the EXTENSION1 parameter (tables) to trigger a user exit that must be activated.
In other thread says to use the BADI ACC_DOCUMENT to pass the value '2' to C_ACCHD-STATUS_NEW ( C_ACCHD-STATUS_NEW = '2') which should park documents.
Does anyone is familiar with this? If so, could you
please send me a sample?
Please advice,
Regards,
Jose
2006 Nov 01 7:45 AM
i do some work follow your ideas, but it doesn't work.
in user_exit EXIT_SAPLACC4_001 changing parameter
T_ACCHD-STATUS_NEW = '2' , well, the bapi BAPI_ACC_GL_POSTING_POST returns success message and documents number, but i can't see it in fb03.
while i change it to '4' it also success,and i will see it in fbv3,but the message says it's not parked document.
what shall i do ?
2006 Nov 03 5:15 PM
I have exactly the same problem. The BAPI_ACC_GL_POSTING_POST returns success message and documents number, but I am unable to open the document in FB03. It says "Document does not exists".
Hopefully an expert can advice to us...
2006 Nov 27 11:35 AM
Hi,
concerning your 'document does not exist' issue:
try calling FM 'BAPI_TRANSACTION_COMMIT' right after calling FM 'BAPI_ACC_GL_POSTING_POST'.
Please search this forum for more examples on how to use 'BAPI_TRANSACTION_COMMIT'.
You can also test this in SE37 by creating a test sequence ( Function module --> Test --> Test sequences and then fill in the two BAPI names BAPI_ACC_GL_POSTING_POST and BAPI_TRANSACTION_COMMIT' )
Hope this helps.
2006 Nov 27 2:45 PM
Hi,
I have a similar requirement. I tried to find a BAPI to park a GL Doc but could not find any. I already search the whole SDN and many SAP related sites.
Thus, I ended up park the GL Doc using BDC for transaction code F-65. The performance is good as the screens has not many fields.
Pls let me know if you found any BAPI that can do that.
Pls reward points if solve your problem.
2006 Dec 05 10:13 AM
Hi Andrew Tan ,
This is shanmukesh from Hyderabad(India),I need some information regarding to park the document,Can u please send me the BDC code to park the document.I am sending my mail-id can you please help me.
Mail-id :[email protected]
Thanks & Regards,
Shanmukesh.P
2006 Dec 05 10:25 AM
Hi All...
I had this same requirement long back...
I was not able to Park using this FM .. However since some of u have successfully called this FM to pass .. but are not able to see the Parked Doc in FB03 .. I would advice you to do a BAPI_COMMIT after that... in case u have not done.
At that time.. I had written a BDC to park the Docs... So I would just post the BDC..
you may use it for ur reference.
Note : I had to deal with some jurisdiction codes also.. so i have coded that also.. u will have to modify the BDC accordingly ..
In any cas u can always refer the BDC part.
************************
&----
*& Form sub_park_document
&----
text
----
--> p1 text
<-- p2 text
----
FORM sub_park_document .
DATA : l_amount(13) TYPE c,
l_error_flag TYPE c,
l_date(10) TYPE c,
l_rc TYPE sy-subrc,
it_return TYPE STANDARD TABLE OF bapiret2 INITIAL SIZE 0 WITH HEADER LINE,
l_key_cr TYPE bseg-bschl,
l_key_db TYPE bseg-bschl.
WRITE sy-datum TO l_date.
Populate Header Data.
PERFORM sub_put_field TABLES bdcdata
USING : c_on 'SAPLF040' '0100',
c_off 'BKPF-BLDAT' l_date,
c_off 'BKPF-BLART' p_doc,
c_off 'BKPF-BUKRS' p_bukrs,
c_off 'BKPF-BUDAT' l_date,
c_off 'BKPF-WAERS' 'USD',
c_off 'VBKPF-XBWAE' 'X'.
LOOP AT it_cc_amount_final INTO fl_cc_amount.
IF fl_cc_amount-db_amount GE 0.
l_key_cr = '40'.
l_key_db = '50'.
WRITE fl_cc_amount-db_amount TO l_amount.
ELSE.
l_key_cr = '50'.
l_key_db = '40'.
WRITE fl_cc_amount-cr_amount TO l_amount.
ENDIF.
IF sy-tabix EQ 1.
PERFORM sub_put_field TABLES bdcdata
USING : c_off 'RF05V-NEWBS' l_key_cr,
c_off 'RF05V-NEWKO' p_acc_cr,
c_off 'BDC_OKCODE' '/00'.
ENDIF.
Get Tax jurisdiction code.
READ TABLE it_cost_centre INTO fl_cost_centre WITH KEY cost_centre = fl_cc_amount-cost_centre.
Populate Line Item Entry with Credit Amount.
PERFORM sub_put_field TABLES bdcdata
USING : c_on 'SAPLF040' '0300',
c_off 'BSEG-WRBTR' l_amount,
c_off 'BSEG-MWSKZ' p_tax_cd,
c_off 'BSEG-TXJCD' fl_cost_centre-tax_code.
Populate Line Item Entry with Debit Amount.
PERFORM sub_put_field TABLES bdcdata
USING : c_off 'RF05V-NEWBS' l_key_db,
c_off 'RF05V-NEWKO' p_acc_db,
c_off 'BDC_OKCODE' '/00',
c_on 'SAPLKACB' '0002',
c_off 'BDC_OKCODE' '=ENTE',
c_on 'SAPLF040' '0300',
c_off 'BSEG-WRBTR' l_amount,
c_off 'RF05V-NEWBS' l_key_cr,
c_off 'RF05V-NEWKO' p_acc_cr,
c_off 'BDC_OKCODE' '/00',
c_on 'SAPLKACB' '0002',
c_off 'COBL-KOSTL' fl_cc_amount-cost_centre,
c_off 'BDC_OKCODE' '=ENTE'.
ENDLOOP.
Park The Document.
PERFORM sub_put_field TABLES bdcdata
USING : c_on 'SAPLF040' '0300',
c_off 'BDC_OKCODE' '=BP',
c_on 'SAPLKACB' '0002',
c_off 'BDC_OKCODE' '=ENTE'.
Submit your transaction using Call Transaction method.
PERFORM sub_submit_transaction TABLES bdcdata t_ct_messages
USING 'FBV1' l_rc.
Populate the Return table.
PERFORM sub_build_bdc_return_table TABLES t_ct_messages it_return.
Check for Errors.
READ TABLE it_return WITH KEY type = 'E'.
IF sy-subrc EQ 0.
l_error_flag = 'X'.
ENDIF.
Error Handling.
LOOP AT it_return.
PERFORM sub_interface_message USING it_return-type it_return-message.
ENDLOOP.
IF l_error_flag NE 'X'.
ENDIF.
ENDFORM. " sub_park_document
**************************
Hope this will help u all...
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |