Release authorization for Posting FI document nor Parked document
hii guru
I am facing a problem as below. i have created a release authorization for parking document using workflow variant, created event - Created, object type - FIPP, receiver type - WS10000051, and when i am parking the document its working fine, wants release authorization to post parked document. but my client requirement is to set release authorization for posting FI document in fb50. not parked document.
please give me a solution how do i cofigure the release authorization to post directly FI Document in fb50.
thanks & regards
Rajesh
i have solved by myself
Similar Messages
-
BDC Program for posting FI document
Hi everyone!
Anyone out there already made a BDC program for posting FI documents with this concept:
User will upload a spreadsheet file with the line items per row
User will input which TCODE user will use for posting
BDC program will then post the document using the line items in the spreadsheet file
I need to make a BDC program with that concept but having a hard time to think of a good algorithm to make my program very flexible.
Thanks!you can use batch input program RFBIBL00 to pasrk document. Please check these links for more information.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFADM/CAGTFADM-FI.pdf
http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/CAGTFADM-FI.pdf
Have a processing routine defined for the specific Idocs that come into SAP.
So, as and when the idocs are in, the routine triggers and you can codeappropriately in the routine for parking the idocs.
Check these threads
BAPI For Parking FI Document
Post FI Parked Documents
You can use message type INVOIC, IDoc Type INVOIC01/02 with process code INVF (FM IDOC_INPUT_INVOIC_FI) for FBV1 transaction.
See if there are any BAPI/FMs for parking an FI document.
1.. Use INVOIC01 IDOC with INVF process code (This works for Vendor Line Items only). I read the documentation somewhere that, this would work even if the line items are > 999
2.. BAPI_ACC_INVOICE_RECEIPT_POST (This works for Vendor Line Items only)
3.. BAPI_ACC_DOCUMENT_POST (Tax jurisdiction allocation not calculated properly)
4.. BAPI_ACC_GL_POSTING_POST (No tax line items allowed for this BAPI) -
Updation of COGS in CO-PA for posted Billing Documents
Hi Experts,
We have observed that in CO-PA COGS was not getting posted for posted Billing Documents. The reason which we found was standard cost was not released for that product. Now we have released the same and COGS values are getting posted into CO-PA.
We want to post COGS value for posted Billing Documents which was not posted before. Is there any standard transaction for this?
Regards,
Pawan KumarHi,
Use KE27. The documentation explain the details.
Benni -
BASIS--to restrict authorization for a PO document type & 122 movement type
Dear All,
Plz guide me how to restrict authorization for a PO document type & for a movement type 122 i.e. for eg. if a user has authorization for PO document type IC then he should not be able to rum movement type 122 for any T-code he runs.
Thanks in advance
Arpit
BasisHi,
Your request was not too clear to me.. As per my unde
Here is some details of Authorization object related to Purchase Order:
Document Type in Purchase Order( M_BEST_BSA )
Purchasing Group in Purchase Order (M_BEST_EKG )
Purchasing Organization in Purchase Order (M_BEST_EKO)
Plant in Purchase Order (M_BEST_WRK )
Document Type in Outline Agreement (M_RAHM_BSA )
Purchasing Group in Outline Agreement (M_RAHM_EKG )
Purchasing Organization in Outline Agreement ( M_RAHM_EKO )
Plant in Outline Agreement ( M_RAHM_WRK )
This can be helpfull to you to restrict authorization to PO..
In Organization Level, it can be restricted by Purchasing group, Purchasing organization and plant..
Regards,
Sandip -
No authorization for posting previous period running a repeat depreciation
Hi!
We are working on 4.7 version, during a repeat depreciation posting run using AFAB transaction (RAPOST2000), error messages F5A 094 is issued because the user's account does not has authorization for posting on previous period.
Exact Job Log Error from SM37 transaction:
Period 003 in fiscal year 2008 is open for posting for the variant for posting periods 0020. However, you do not have the required authorization.
Please let me know what do I need check for fixing this issue.
Thanks in advance.Hi,
Please go through SAP notes:337493-Incor.mess.for missing master data authorztn.That notes should be helpful
Thanks
Aravind
Assign points if useful -
Bapi for posting FI documents for new General ledger accounting
Hi,
We have a requirement for posting FI documents for new General ledger i.e for transaction FB01L. Is there any BAPI for the same so that BDC can be avoided.
The BAPI "BAPI_ACC_DOCUMENT_POST" is used for FB01. Can we use it for FB01L?? As in this BAPI ledger group field is not there. Please suggest.
Thanks in advance.
Regards,
GauravHi Sandra,
Solved myself using the below options.
If you are using the BAPI - BAPI_ACC_GL_POSTING_POST, you can pass accounting principle field in importing structure BAPIACHE08. The relation between Legder group & accounting principle has to be configured in SPRO by FICO consultant. Once they configured in the system, get the accounting principles and then pass the accounting principle .
Code: s_documentheader-acc_principle = wa_header-acc_principle.
Reward me if this will help you.
Thanks,
Yerukala Setty -
Using FM PRELIMINARY_POSTING_FB01 for Posting a Document
Hi there,
Can we use FM PRELIMINARY_POSTING_FB01 for Posting a document? Has anybody done that? Please let me know which of the following needs to be populated? Thanks a lot.
(TEXT_UPDATE)
TEXT_ITEM_UPDATE)
(I_UF05A)
(I_XCMPL)
(FS006_FB01)
(I_TCODE)
(I_PARGB)
(I_TCODE_INT)
Does anybody have any documentation/help on this FM? Please let me know - as I need to do this sometime next week.
Edited by: sam jose on Apr 29, 2010 4:50 PM
Edited by: Rob Burbank on May 5, 2010 10:13 AMDear Sam,
You can Use the bapi BAPI_ACC_DOCUMENT_POST. By using the extension tables of the BAPI when creating the accoutning documents you will pass all the fields you did not found on the standard tables.
Now, you will use the BTE (Business Transaction Event) RWBAPI01 : SAMPLE_INTERFACE_RWBAPI01, and you will find all the data you fill in the tables Extension in the bapi, and you have to transfer it to table IT_ACCIT.
You can fill even specific fields of table BSEG if you want.
Regards,
Yassine NEJMY -
Authorization for Task - Manual Document Posting
Hi All
We have have few tasks in our consol monitor like data collection, manual posing, validation, reclass etc. I want to restrict authorizaiton to users based on company and tasks. When I do so its perfectly working except for manual posting task. The system is allowing user to post manual posting of other company in which the user is not supposed to. I am wondering. The system is just ignoring manual posting task alone. Is there any tricky way to solve the issue for manual posting task?
I am currently using the objects R_UGMD_CHA, R_UGMD_SNG, R_UC_TASK combinations. It works fine except for manual document posting task. If any one got any suggestions, let me know to fix this problem.
Regards
A.BharathNote 610621 - SEM-BCS: Authorization check for the Manual Posting
During the execution of the Manual Posting the system by mistake checks the authorization for consolidation groups or consolidation units against value '#'. The system should check against the initial value instead.
For example, if you start a Manual Posting task, which posts on posting level 10, for a consolidation unit 'xyz', the system checks the authorization against the following values:
Consolidation unit = 'xyz'
Consolidation group = '#'
Instead of this, the system should check against the following values:
Consolidation unit = 'xyz'
Consolidation group = initial value
Other terms
Manual Posting, authorization check
Reason and Prerequisites
This problem is caused by a program error -
Release Procedure for every Purchasing documents
Hi,
for a procument of material eg:- Material007
Can I set Release Procedure for Purchase rquisition
then after releasing Purchase rquisition i need to create a RFQ
which is also subject to Release Procedure ,After releasing RFQ I should able to enter into a Contract,which also subject to Release Procedure ,After releasing Contract i need to create a Purchase Order which is also subject to Release Procedure,After releasing Purchase Order only I should be able to Receive the goods.
Is it possible to do this way ?Can any one help me?
ThanksWhy you want to put so many locks??????
well if case your required use below steps for all document typew in IMG.
suggestion to download the BBP from below link also
http://help.sap.com/bestpractices/BBLibrary/bblibrary_start.htm
3.4.24 Releasing Procedure for Purchase Documents
Use
This setting is incorporated to just give demonstration of how SAP Release procedure works. The aim of this procedure is to replace manual written authorization procedures using signatures by an electronic one, while maintaining the dual Ctrl principle. The person responsible processes the purchasing document in the system, thereby marking it with an "electronic signature" which can give the document legal force.
3.4.24.1 Creation of Characteristics
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Edit Characteristic
Transaction Code CT04
2. On the Characteristic screen, make the following entries.
3. In put POVAL in filed Characteristic and choose Create (White paper) icon or Ctrl + F3 to begin creation of characteristic.
Field name Description User action and values Note
Select Addnl Data tab
Table Name Table Name CEKKO
Field Name Field Name GNETW
Choose Enter to continue, system will give an information message saying Format Data taken from ABAP dictionary, Choose Enter again to continue.
Select Basic Data tab
Description Description Total net order value
Status Status Released
Data Type Data type Currency format Selected by system
Number of characters Number of characters 15
Decimal places Decimal places 2
Currency Currency INR
Interval vals allowed Interval values allowed Check this tick box
Multiple Values Multiple values allowed Select this radio button
4. Choose Enter to complete the entries
5. Choose Save icon or Ctrl + S to save the characteristic.
3.4.24.2 Creation of Class
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Edit Class
Transaction Code CL02
2. On the Class screen, make the following entries:
Field name Description User action and values Note
Class Class PORELPROC
Class Type Class Type 032
Choose Create icon or white paper icon to create new class.
Description Description Purchase Order Release Procedure
Status Status Released
Choose Char. Tab to input characteristic name.
Characteristic Characteristic POVAL Created in above step
3. Choose Enter to complete the entries
4. Choose Save icon or Ctrl + S to save the characteristic.
Result
Class type 032: Class PORELPROC created.
3.4.24.3 Configuration of Release Procedure
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Materials Management Purchasing Purchase Order Release Procedure for Purchase Orders Define Release Procedure for Purchase Orders
Transaction Code SPRO
2. On executing the transaction system will give a popup screen choose Release Groups, system will display Change View u201CRelease Groups: External Purchasing Documentu201D: Overview.
3. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Rel. Group Release Group 02
Class Class Name PORELPROC Created in above step
Description Description PO Release Procedure
4. Choose Enter to complete the entries
5. Choose Save icon or Ctrl + S to save the entries.
6. Choose yellow arrow to go back to popup screen.
7. Choose Release Codes to select.
8. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Grp Release group 02 Created in above step
Code Release Code 01
Workflow Workflow Leave it blank
Description Description Purchase Officer
Grp Release group 02 Created in above step
Code Release Code 02
Workflow Workflow Leave it blank
Description Description Materials Manager
9. Choose Enter to complete the entries
10. Choose Save icon or Ctrl + S to save the entries.
11. Choose yellow arrow to go back to popup screen.
12. Choose Release indicator to select.
13. Choose New Entries icon and make the following entries:
Field name Description User action and values Note
Release ind. Release Indicator 1
Released Released Leave it blank
Chgable Changeability 4
Value change % Change of value 10%
Description Description Purchase Order Blocked
Go to 2nd line and input the following values:
Release ind. Release Indicator 2
Released Released Select Check box
Changeable Changeability 6
Description Description Purchase Order Released
14. Choose Enter to complete the entries
15. Choose Save icon or Ctrl + S to save the entries.
16. Choose yellow arrow to go back to popup screen.
17. Choose Release Strategies to select.
18. Choose New Entries icon and make the following entries:
19. System will give new screen New Entries: Details of Added Entries
Field name Description User action and values Note
Release Group Release group 02
Rel. Stategy Release Strategy S1
Capital Items Release
Release Code Release Code 1 01
Release Code Release Code 2 02
20. Choose Enter to complete the entries.
21. Choose Release prerequisites icon and select check box 02 at the bottom and choose Enter.
22. Choose Release statuses icon, system will give a popup screen system will default 1, 1 and 2 entries one by one as a default. Choose Continue.
23. Choose Classification icon, here you can see Total net order value is displayed, please input >= 1.00 INR value in the white placed and choose Enter.
24. Choose Next Screen icon or choose F8 to continue.
25. If you want to simulate the release procedure you can choose Release Simulation icon.
26. Choose Enter to complete the entries.
27. To save the settings choose Save icon or Ctrl + S.
Result
Release procedure is saved.
3.4.24.4 Assignment of Values to Release Procedure
As a default all the purchase documents >= Rs. 1000000.00 is suggested in the following step of release procedure, if you want to have different one you need to change the value in the following step. If you do not want release procedure you may change the value to Zero.
Procedure
1. Access the activity using one of the following navigation options:
IMG Menu Cross-Application Components Classification System Assignments Assign Object to Classes
Transaction Code CL20N
2. On the Class screen, make the following entries:
Field name Description User action and values Note
Class Type Class Type 032
Choose Enter to Assign values.
Release group Release Group 02
Rel. Strategy Release strategy S1
Choose Enter.
System will give Class name in Assignments, Double choose Class Name.
System will display Characteristic name Total net order value. Assign the value >= 1000000.00 INR against filed Value.
3. Choose Enter to complete the entries
4. Choose Save icon or Ctrl + S to save the characteristic. -
Hi Friends,
I have a issue to fix. The issue is releated to PR.
There are some PR's in the system which has wrong release strategy picked up or wrong approvers picked up due to some congif change. now that the config changes are rectified correctly, we need to find a solution to correct the PR's which got affected due this.
I have to retrigger the release strategy for all the affected PR's.
The characterstics which we have consider for release strategy is Document Type, Company Code and Price Range.
Can anyone suggest how can we retrigger the PR in bulk or individual to all the affected PR's, so that it picks up correct release strategy as per new config changes.
Regards,
Manjunath KHi,
Refer the discussion to triggers release again on release code addition/change in release strategy.
release code is changed on PR release strategy - old PR can´t be approved
Regards,
Biju K -
HR authorization for Display the documents in SAP DMS
HI experts,
We want to control display authorization depending on the entry made in object link tab in DMS( DOcument Management System). We developed screen for HR master object link. When user executes cv03n and enters document No. system should check hr master number entered in object link. If the user has authorization for that hr master number in PA (personnel administration), then he should be allowed to display the document. Otherwise it should restrict him to display the DIR.
Now my query is how to achieve it. Can anybody provide me some solutions
I have one solution, whenever user enter document number in cv03n screen, system will first check hr master number entered in object link and it will check the Personnel Area, Employee group and employee subgroup aginst this hr master number. Say for ex: PA:1000, EG:1 and ESG:01 for HR number xyz.
Now system should check in roles assigned agaist user id for these PA, EG and ESG values. If user has got authorization for PA:1000, EG:1 and ESG:01 in HR roles,then he should allowed to display the document.
Now my query is how feasible this approach? is this tough task for abaper? or is there any easier approach than this.
regards
shamHi,
Try to use the User Exit: CNEX0002.
Check with your ABAP er for the enhancement.
Hope it helps..
Thanks!!! -
How to handle line item for posting a document
Hello,
I am using a function module to post a document, so far I have hard coded all the values in the test program. I am passing two internal tables to the function module, one which has header data and the other which has line item data. So far I have written the following code to get the line item details:
it_bseg-BUKRS = '001'.
it_bseg-GJAHR = u20182010u2019.
it_bseg-BUZEI = '001'.
it_bseg-BSCHL = '31'.
it_bseg-WRBTR = '900'.
it_bseg-PSWSl = 'USD'.
it_bseg-SAKNR = u20180000123456u2019.
it_bseg-HKONT = u20180000123456u2019.
it_bseg-LIFNR = u2018001234567u2019.
append it_bseg to lt_temp_bseg.
clear it_bseg.
it_bseg-BUKRS = '001'.
it_bseg-GJAHR = '2010'.
it_bseg-BUZEI = '002'.
it_bseg-BSCHL = '40'.
it_bseg-WRBTR = '900''.
it_bseg-PSWSL = 'USD'.
it_bseg-KOSTL = '1111871234'.
it_bseg-XKRES = 'X'.
it_bseg-HKONT = '0000564738'.
it_bseg-FISTL = '1234556000'.
it_bseg-GEBER = '0000001'.
it_bseg-fkber = '0'.
append it_bseg to lt_temp_bseg.
clear it_bseg.
Now I want to get rid of the way I am handling the line item and want to handle it based on what user enters. For example right now only line item is being considered but if user enters two line items then what should be the approach.
Thank you,
Rajeev GuptaAny Suggestion.
-
Adjustments in CO for posted FI documents/invoices
Dear,
We are posting FI documents/invoices through an interface, using a BAPI. This BAPI allows us to enter the Foreign currency amount and the exchange rate.
Because the external application creates FI documents with minor exchange rate differences, we also take over the Local currency amount via a workaround.
This means: for example, that an invoice is posted with
foreign currency amount = 1500
exchange rate = 1,5911
local currency amount = 2387,13
(while calculated correctly, the local currency amount should be 2386,65)
Each FI (finance) posting generates a posting in CO (controlling).
The problem now is the Controlling document that is posted (controlling document always posted in local currency): SAP recalculates the local currency amount, via the foreign currency amount and the exchagne rate...
Result: the local currency in controlling is 2386,65, while it should be 2387,13 to be in line with FI.
Anybody has any idea how/if we could change the local currency amount posted in controlling document somehow?
Because it is strange that FI is not in line with CO... this should not be the case of course, reporting is to be done based on CO, not on FI so this creates... problems.
Is there any way that someone would know that we can fix it so that also controlling takes over these local ánd foreign currency amounts during the posting to CO instead of recalculating them itself?
Many thanks in advance!Yes, that is true.
But the idea is that they want to display the exchange rate that is "used"/valid that day or period, yet taking over the amounts as they are.
So it would have to stay like this:
- Local currency amount taken over
- Exchange rate from the document taking over (this value can be divergent from the local/foreign curr amount, due to rounding differences).
- Foreign currency amount taken over
In CO, we would also need to adjust the amount to the local currency amount of the invoice instead of the recalculated amount by SAP.
Is it in any way possible to adjust this amount?
The solution would be to still use our custom built program to read in the information and make the postings and after the posting was done, adjust the CO document (if this is possible...) by an update of the program.
As each posting in FI of either an invoice, credit note or GL document automatically creates a CO document.
Anyone an idea on how to adjust an (automatic posted) CO document please?
Thank you very much -
Authorization for posting periods
Hi All,
is it possible to give authorization to only one user for postings for the previous months. where as my requirement is I need to unlock previous months posting periods, so that one user will login into XXX userid and he will start postings in to previous months. Mean while i want to restrict other users to post entries in to previous months.
Please help.......
Thankyou,
Sree.Hi!
Yes, very much possible in SAP B1 2007B
Set Posting Period as Closing Period for the Financial Year
Do Authorization for Closing Period under General Authorization.
Give full autho to that particular user who going to do postdated entry. -
BAPI for posting accounting documents
Hi,
Can anyone please provide me with the BAPI to be used for GL postings with example.Hi,
Use the BAPI BAPI_ACC_DOCUMENT_POST for posting Documents.
Check the sample code related to posting.
REPORT acc_bapi_document .
selection-screen begin of block bl01 .
parameters:
check_l radiobutton group rb1,
check_a default 'X' radiobutton group rb1,
post radiobutton group rb1.
selection-screen uline.
parameters:
rev_c radiobutton group rb1,
rev_p radiobutton group rb1.
selection-screen uline.
parameters:
ref_key like bapiache01-obj_key default 'TEST000001BAPICALL',
dest like bdi_logsys-logsys default ' '.
selection-screen end of block bl01 .
data:
gd_documentheader like bapiache09,
gd_customercpd like bapiacpa09,
gd_fica_hd like bapiaccahd,
it_accountreceivable like table of bapiacar09 with header line,
it_accountgl like table of bapiacgl09 with header line,
it_accounttax like table of bapiactx09 with header line,
it_criteria like table of bapiackec9 with header line,
it_valuefield like table of bapiackev9 with header line,
it_currencyamount like table of bapiaccr09 with header line,
it_return like table of bapiret2 with header line,
it_receivers like table of bdi_logsys with header line,
it_fica_it like table of bapiaccait with header line,
it_accountpayable like table of bapiacap09 with header line,
it_paymentcard like table of bapiacpc09 with header line,
it_ext like table of bapiacextc with header line.
it_re LIKE TABLE OF bapiacre09 WITH HEADER LINE,
it_ext2 LIKE TABLE OF bapiparex WITH HEADER LINE.
perform fill_internal_tables.
if check_l = 'X'.
call function 'BAPI_ACC_DOCUMENT_CHECK'
destination dest
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of check lines:'. "#EC NOTEXT
perform show_messages.
endif.
if check_a = 'X'.
call function 'BAPI_ACC_DOCUMENT_CHECK'
destination dest
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of check all:'. "#EC NOTEXT
perform show_messages.
endif.
if post = 'X'.
data: l_type like gd_documentheader-obj_type,
l_key like gd_documentheader-obj_key,
l_sys like gd_documentheader-obj_sys.
if dest = space or
dest = gd_documentheader-obj_sys.
post synchron
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
importing
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
write: / 'Result of post:'. "#EC NOTEXT
perform show_messages.
else.
create Idoc
it_receivers-logsys = dest.
append it_receivers.
call function 'ALE_ACC_DOCUMENT_POST'
exporting
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
tables
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
paymentcard = it_paymentcard
contractitem = it_fica_it
extension2 = it_ext2
realestate = it_re
receivers = it_receivers
COMMUNICATION_DOCUMENTS =
APPLICATION_OBJECTS =
exceptions
error_creating_idocs = 1
others = 2 .
if sy-subrc = 0.
write: / 'IDoc created'. "#EC NOTEXT
else.
write: sy-msgid.
endif.
endif.
endif.
if rev_p = 'X' or rev_c = 'X'.
data: rev like bapiacrev,
rev_key like ref_key.
rev_key = ref_key.
rev_key(1) = 'R'.
rev-obj_type = gd_documentheader-obj_type.
rev-obj_key = rev_key.
rev-obj_sys = gd_documentheader-obj_sys.
rev-obj_key_r = ref_key.
if rev_c is initial.
if dest = space or
dest = gd_documentheader-obj_sys.
call function 'BAPI_ACC_DOCUMENT_REV_POST'
exporting
reversal = rev
bus_act = gd_documentheader-bus_act
tables
return = it_return.
else.
it_receivers-logsys = dest.
append it_receivers.
call function 'ALE_ACC_DOCUMENT_REV_POST'
exporting
reversal = rev
busact = gd_documentheader-bus_act
OBJ_TYPE = 'BUS6035'
SERIAL_ID = '0'
tables
receivers = it_receivers
COMMUNICATION_DOCUMENTS =
APPLICATION_OBJECTS =
exceptions
error_creating_idocs = 1
others = 2
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
write: / 'IDoc created'. "#EC NOTEXT
endif.
endif.
else.
call function 'BAPI_ACC_DOCUMENT_REV_CHECK'
exporting
reversal = rev
bus_act = gd_documentheader-bus_act
tables
return = it_return.
endif.
write: / 'Result of Reversal Posting:'. "#EC NOTEXT
perform show_messages.
endif.
commit work.
Form fill_internal_tables
form fill_internal_tables.
perform fill_header.
perform fill_accountgl.
perform fill_accountar.
perform fill_accountap.
perform fill_accounttax.
perform fill_currencyamount.
perform fill_criteria.
perform fill_valuefield.
perform fill_re.
perform fill_cpd.
perform fill_contractitem.
perform fill_contractheader.
perform fill_paymentcard.
perform fill_extension.
endform. " fill_internal_tables
Form Show_messages
form show_messages.
if it_return[] is initial.
write: / 'no messages'.
else.
skip 1.
loop at it_return.
write: / it_return-type,
(2) it_return-id,
it_return-number,
(80) it_return-message,
IT_RETURN-LOG_NO
IT_RETURN-LOG_MSG_NO
it_return-message_v1,
IT_RETURN-MESSAGE_V2
IT_RETURN-MESSAGE_V3
IT_RETURN-MESSAGE_V4
(20) it_return-parameter,
(3) it_return-row,
it_return-field.
IT_RETURN-SYSTEM
endloop.
endif.
uline.
endform. " Show_messages
FORM fill_accountgl *
form fill_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 2.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010101'.
it_accountgl-comp_code = 'SLOC'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 3.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010101'.
it_accountgl-comp_code = 'SLOC'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 5.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010301'.
it_accountgl-comp_code = 'SLOC'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 6.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '01'.
it_accountgl-profit_ctr = '0000010301'.
it_accountgl-comp_code = 'SLOC'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 7.
it_accountgl-itemno_acc = 8.
it_accountgl-gl_account = '0021510201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '90'.
it_accountgl-profit_ctr = '0000900008'.
it_accountgl-comp_code = 'CORP'.
append it_accountgl.
clear it_accountgl.
it_accountgl-itemno_acc = 8.
it_accountgl-itemno_acc = 9.
it_accountgl-gl_account = '0082000201'.
it_accountgl-item_text = 'BAPI Test G/L line item'. "#EC NOTEXT
it_accountgl-bus_area = '90'.
it_accountgl-profit_ctr = '0000900008'.
it_accountgl-comp_code = 'CORP'.
it_accountgl-tax_code = 'A3'.
append it_accountgl.
endform. "fill_accountgl
FORM fill_header *
form fill_header.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = gd_documentheader-obj_sys.
OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
gd_documentheader-obj_type = 'IDOC'.
gd_documentheader-obj_key = ref_key.
gd_documentheader-username = sy-uname.
gd_documentheader-header_txt = 'BAPI Test'. "#EC NOTEXT
gd_documentheader-obj_key_r =
GD_DOCUMENTHEADER-reason_rev =
gd_documentheader-comp_code = 'SLOC'.
GD_DOCUMENTHEADER-AC_DOC_NO =
gd_documentheader-fisc_year = sy-datum(4).
gd_documentheader-doc_date = sy-datum.
gd_documentheader-pstng_date = sy-datum.
GD_DOCUMENTHEADER-TRANS_DATE =
GD_DOCUMENTHEADER-VALUE_DATE =
GD_DOCUMENTHEADER-FIS_PERIOD =
gd_documentheader-doc_type = 'KR'.
gd_documentheader-ref_doc_no = 'xxxx'.
GD_DOCUMENTHEADER-COMPO_ACC =
gd_documentheader-bus_act = 'RFBU'.
endform. "fill_header
FORM fill_contractheader *
form fill_contractheader.
gd_fica_hd-doc_no =
gd_fica_hd-doc_type_ca =
gd_fica_hd-res_key =
gd_fica_hd-fikey =
gd_fica_hd-payment_form_ref =
endform. "fill_contractheader
FORM fill_cpd *
form fill_cpd.
gd_customercpd-name
gd_customercpd-name_2
gd_customercpd-name_3
gd_customercpd-name_4
gd_customercpd-postl_code
gd_customercpd-city
gd_customercpd-country
gd_customercpd-country_iso
gd_customercpd-street
gd_customercpd-po_box
gd_customercpd-pobx_pcd
gd_customercpd-pobk_curac
gd_customercpd-bank_acct
gd_customercpd-bank_no
gd_customercpd-bank_ctry
gd_customercpd-bank_ctry_iso
gd_customercpd-tax_no_1
gd_customercpd-tax_no_2
gd_customercpd-tax
gd_customercpd-equal_tax
gd_customercpd-region
gd_customercpd-ctrl_key
gd_customercpd-instr_key
gd_customercpd-dme_ind
gd_customercpd-langu_iso
endform. "fill_cpd
FORM fill_ar *
form fill_accountar.
CLEAR it_accountreceivable.
it_accountreceivable-itemno_acc =
it_accountreceivable-customer =
IT_ACCOUNTRECEIVABLE-REF_KEY_1 =
IT_ACCOUNTRECEIVABLE-REF_KEY_2 =
IT_ACCOUNTRECEIVABLE-REF_KEY_3 =
IT_ACCOUNTRECEIVABLE-PMNTTRMS =
IT_ACCOUNTRECEIVABLE-BLINE_DATE =
IT_ACCOUNTRECEIVABLE-DSCT_DAYS1 =
IT_ACCOUNTRECEIVABLE-DSCT_DAYS2 =
IT_ACCOUNTRECEIVABLE-NETTERMS =
IT_ACCOUNTRECEIVABLE-DSCT_PCT1 =
IT_ACCOUNTRECEIVABLE-DSCT_PCT2 =
IT_ACCOUNTRECEIVABLE-PYMT_METH =
IT_ACCOUNTRECEIVABLE-DUNN_KEY =
IT_ACCOUNTRECEIVABLE-DUNN_BLOCK =
IT_ACCOUNTRECEIVABLE-PMNT_BLOCK =
IT_ACCOUNTRECEIVABLE-VAT_REG_NO =
IT_ACCOUNTRECEIVABLE-ALLOC_NMBR =
it_accountreceivable-item_text =
IT_ACCOUNTRECEIVABLE-PARTNER_BK =
IT_ACCOUNTRECEIVABLE-GL_ACCOUNT =
it_accountreceivable-comp_code
it_accountreceivable-bus_area
it_accountreceivable-pmtmthsupl
it_accountreceivable-paymt_ref
it_accountreceivable-scbank_ind
it_accountreceivable-businessplace
it_accountreceivable-sectioncode
it_accountreceivable-branch
it_accountreceivable-pymt_cur
it_accountreceivable-pymt_cur_iso
it_accountreceivable-pymt_amt
it_accountreceivable-c_ctr_area
it_accountreceivable-bank_id
it_accountreceivable-supcountry
it_accountreceivable-supcountry_iso
it_accountreceivable-tax_code
it_accountreceivable-taxjurcode
it_accountreceivable-tax_date
it_accountreceivable-sp_gl_ind
it_accountreceivable-partner_guid = '1465464654'.
APPEND it_accountreceivable.
endform. "fill_accountar
FORM fill_ap *
form fill_accountap.
clear it_accountpayable.
it_accountpayable-itemno_acc = 1.
it_accountpayable-vendor_no = '0000060259'.
it_accountpayable-vendor_no = '0000060693'.
it_accountpayable-gl_account
it_accountpayable-ref_key_1
it_accountpayable-ref_key_2
it_accountpayable-ref_key_3
it_accountpayable-comp_code = 'SLOC'.
it_accountpayable-bus_area = '01'.
it_accountpayable-pmnttrms = 'A000'.
it_accountpayable-bline_date
it_accountpayable-dsct_days1
it_accountpayable-dsct_days2
it_accountpayable-netterms
it_accountpayable-dsct_pct1
it_accountpayable-dsct_pct2
it_accountpayable-pymt_meth
it_accountpayable-pmtmthsupl
it_accountpayable-pmnt_block
it_accountpayable-scbank_ind
it_accountpayable-supcountry
it_accountpayable-supcountry_iso
it_accountpayable-bllsrv_ind
it_accountpayable-alloc_nmbr
it_accountpayable-item_text = 'BAPI Test A/P line item'. "#EC NOTEXT
it_accountpayable-po_sub_no
it_accountpayable-po_checkdg
it_accountpayable-po_ref_no
it_accountpayable-w_tax_code
it_accountpayable-businessplace
it_accountpayable-sectioncode
it_accountpayable-instr1
it_accountpayable-instr2
it_accountpayable-instr3
it_accountpayable-instr4
it_accountpayable-branch
it_accountpayable-pymt_cur
it_accountpayable-pymt_amt
it_accountpayable-pymt_cur_iso
it_accountpayable-sp_gl_ind
append it_accountpayable.
endform. "fill_accountap
FORM fill_tax *
form fill_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 4.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-cond_key = 'MWVS'.
it_accounttax-itemno_tax = 8.
append it_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 7.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-COND_KEY = 'MWVS'.
append it_accounttax.
clear it_accounttax.
it_accounttax-itemno_acc = 10.
it_accounttax-itemno_acc = 9.
it_accounttax-gl_account = '0011361502'.
it_accounttax-tax_code = 'A3'.
it_accounttax-acct_key = 'VST'.
it_accounttax-cond_key = 'MWVS'.
it_accounttax-itemno_tax = 4.
append it_accounttax.
endform. "fill_accounttax
FORM fill_currencyamount *
form fill_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 1.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '-7408036.2'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 2.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '5336472.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 3.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '3840.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 4.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '5548.00'.
it_currencyamount-amt_doccur = '832.2'.
it_currencyamount-amt_doccur = '576.00'.
it_currencyamount-amt_base = '3840.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 5.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '2051279.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 6.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '1690.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 7.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '1690.00'.
it_currencyamount-amt_doccur = '253.5'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 8.
it_currencyamount-itemno_acc = 7.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '13905.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 9.
it_currencyamount-itemno_acc = 8.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_base = '2.70'.
it_currencyamount-amt_doccur = '18.00'.
append it_currencyamount.
clear it_currencyamount.
it_currencyamount-itemno_acc = 10.
it_currencyamount-itemno_acc = 9.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = 'MXN'.
it_currencyamount-amt_doccur = '2.70'.
it_currencyamount-amt_base = '18.00'.
append it_currencyamount.
endform. "fill_currencyamount
FORM fill_criteria *
form fill_criteria.
CLEAR it_criteria.
it_criteria-itemno_acc = 2.
it_criteria-fieldname = 'BZIRK'.
it_criteria-character = '000001'.
append it_criteria.
endform. "fill_criteria
FORM fill_valuefield *
form fill_valuefield.
CLEAR it_valuefield.
it_valuefield-itemno_acc = 2.
it_valuefield-fieldname = 'VV010'.
it_valuefield-curr_type
it_valuefield-currency = 'EUR'.
it_valuefield-currency_iso
it_valuefield-amt_valcom
it_valuefield-base_uom
it_valuefield-base_uom_iso
it_valuefield-qua_valcom
append it_valuefield.
endform. "fill_valuefield
FORM fill_extension *
form fill_extension.
CLEAR it_ext.
it_ext-field1
it_ext-field2
it_ext-field3
it_ext-field4
APPEND it_ext.
DATA: ls_zzz TYPE ZZZ_ACCIT.
CLEAR it_ext2.
it_ext2-structure = 'ZZZ_ACCIT'.
ls_zzz-posnr = 2.
ls_zzz-awref_reb = '123654'.
ls_zzz-aworg_reb = '654654'.
ls_zzz-grant_nbr = '0022002'.
MOVE ls_zzz TO it_ext2-valuepart1.
APPEND it_ext2.
endform. "fill_extension
FORM fill_paymentcard *
form fill_paymentcard.
CLEAR it_paymentcard.
it_paymentcard-itemno_acc = 1.
it_paymentcard-cc_glaccount
it_paymentcard-cc_type
it_paymentcard-cc_number
it_paymentcard-cc_seq_no
it_paymentcard-cc_valid_f
it_paymentcard-cc_valid_t
it_paymentcard-cc_name
it_paymentcard-dataorigin
it_paymentcard-authamount = '100'.
it_paymentcard-currency = 'EUR'.
it_paymentcard-currency_iso
it_paymentcard-cc_autth_no
it_paymentcard-auth_refno
it_paymentcard-auth_date
it_paymentcard-auth_time
it_paymentcard-merchidcl
it_paymentcard-point_of_receipt
it_paymentcard-terminal
it_paymentcard-cctyp = '1'.
APPEND it_paymentcard.
endform. "fill_paymentcard
FORM fill_contractitem *
form fill_contractitem.
CLEAR it_fica_it.
it_fica_it-itemno_acc
it_fica_it-cont_acct
it_fica_it-main_trans
it_fica_it-sub_trans
it_fica_it-func_area
it_fica_it-fm_area
it_fica_it-cmmt_item
it_fica_it-funds_ctr
it_fica_it-fund
append it_fica_it.
endform. "fill_contractitem
*& Form fill_re
form fill_re .
CLEAR it_re.
it_re-itemno_acc =
it_re-business_entity =
it_re-building =
it_re-property =
it_re-rental_object =
it_re-serv_charge_key =
it_re-settlement_unit =
it_re-contract_no =
APPEND it_re.
endform. "fill_re
Please check these links
http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
http://www.sapfans.com/forums/viewtopic.php?p=76232&sid=b6519d31b5097f49dc303d03b35eed43
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561
Regards,
Raj.
Maybe you are looking for
-
RAM preview needs 2 or more frames, I've got a clue...
After struggling for half an hour or so, I think I'm on the right way to find a solution to this annoying problem. I'm using CS5 on Win7 x64 Ultimate. The problem is that AE cannot starts the ram preview: "after effects error: RAM preview needs 2 or
-
CMYK swatch problem- new documents
Hi When I open a new document in CMYK my swatches in swatch palette are showing as RGB. How do I get them back to CMYK? My colour mode is ticked as CMYK. I have rebooted and reset my workspace to my saved setting but it still doesnot default my swatc
-
Import manual budgets in B1 V9
Hi A customer has asked if we can import manual budgets into B1 V9 from a spreadsheet / ascii file I haven't done anything with budgets before but I did find one discussion on the forum about this but it was never answered Just wondered if anyone els
-
Swapping photo heads in iPhoto 11 ?
Can anyone help with the above please Thanks Steve
-
How can I get sent email from my BB reflected in sent mail on Gmail?
I use Gmail, custom Google Apps email, and a Sprint BlackBerry email. Strangly, if I send email from the GApps email address, I can later see that when I log in and view the Sent Mail folder. I don't see that happening with Gmail. Is there anything s