Badi AC_DOCUMENT for updating prctr
Hi ,
I am trying to update the profit center ( prctr ) through the BADI AC_DOCUMENT.
I have written the below code but its not posting and is giving me an error that document saved but not posted . Below is the code
In the variable I am passing the profit center which I am getting from Z table
DATA: ex_item type ACCIT,
wa_ex_item type ACCIT_SUB.
LOOP AT im_document-item INTO ex_item.
wa_ex_item-mandt = ex_item-mandt.
wa_ex_item-awtyp = ex_item-awtyp.
wa_ex_item-awref = ex_item-awref.
wa_ex_item-aworg = ex_item-aworg.
wa_ex_item-posnr = ex_item-posnr.
wa_ex_item-prctr = l_prctr.
APPEND wa_ex_item to ex_document-item.
endloop.
Hi,
Check that for which condition the message is triggering.
Try to check the condition.
Regards
Sandipan
Similar Messages
-
BADI used for updation of Amount fields for transaction CL24N
Hi All,
Badi's used for the transaction CL24N . Since need to update amount field ZPO_AMOUNT , ZPO_AMOUNT_GBP in the trsaction for a particular Realease strategy
Thanks,
Narasimha.Hi,
There are 4 User-Exits and 2 Badis present for that transaction. Check whether it is useful.
Enhancement/ Business Add-in Description
Enhancement
CLCLRS01 Additional Fields on the Result Screen
CLCLRS02 Fill the Additional Fields on the Result Screen
CLFM0003 Call Up After Check of Assigned Characteristic Values
CLMMD001 Selection of Objects for Mass Processing
Business Add-in
CACL_CHARACTER_INPUT Value Assgmt Screen: Set Ready-For-Input Status for Chars
CACL_VALUE_CHANGE Change/Check User Input Before Syntax Check
Hope this will help.
Regards,
Swarna Munukoti. -
BADI - ac_document for Non Business Area updation in MIRO - Manual entry
Hi,
We have customised the above badi to Zac_document1 and implemented successfully in our system. It is working correctly and giving proper / expected result except while doing the manual G/L entry in MIRO (In some of the scenarios).
In our Production system, one of the end user has generated a MIRO document in reference to a PO. In actual Invoice there were miscellaneous charges added by the party (Vendor), but not mentioned those in PO. End User has adjusted those charges by debiting the required tax G/L - u201CAP-CG Deduct-VATu201D account (In G/L Tab - in MIRO) and crediting the same amount to Material (In material tab of MIRO) that was used in PO.
While debiting the amount to G/L u2013 u201CAP-CG Deduct-VATu201D account, End User has not put the Business Area (In G/L Tab u2013 MIRO) which in turn result into entry in "Non Business Area" for the "G/L - AP-CG Deduct-VAT" irrespective of BADI was active in the system to update the business Area.
Could anybody suggest me the possibilities of non-picking up the Business Area in the line item of manual entry (In G/L tab of MIRO) entered in MIRO.
FI document is getting generated properly with updation of Business Area in all other scenarios (i.e. MIRO & SD Billing generation).
Points will be assigned to proper answer.
Regards,
Shridhar SawantClosing the issue from my side since there was inconsistancy in coding at our end.
Regards,
Shridhar -
Exit/BADI needed for updating the PERNR data in infotype 0105
Hi team,
We are getting the external system data through IDocs and we need to process the data in our systems,
But the PERNR in external system is different than in our system.How we can handle this .
is there any USerexits/Badi's available for this to handle.
Please let me know the solution if anybody encounter this problem earlier.
Thanks for your help
Regards
MuraliHello Murali,
If you are using HRMD_A message type the function module IDOC_INPUT_HRMD contains lot of exits and badi's
here are few
EXIT_SAPLRHA0_003 - Include ZXHALU07
EXIT_SAPLRHA0_002 - Include ZXHALU06
you may do more research in the function module IDOC_INPUT_HRMD -
Trigger event for badi ac_document
Hello,
I want to use BADI AC_DOCUMENT for text substitution following the note 386896. I create a new implementation but when I create a new FI Document the BADI is not triggered correctly.
How can I know where the BADI is called in ABAP program ?
Thanks for your help.Hi,
Check that for which condition the message is triggering.
Try to check the condition.
Regards
Sandipan -
Need exit or Badi for updating Warranty data in IE02 while Prod Order conf.
Hi All,
I need a user exit or Badi for updating the Warranty data in IE02(Equipment Master) while production order confirmation(CO15)?
I need to update the Begin guarantee date from Production order and warranty master type in IE02 while confirming the production order.
Thanks,
SudhaHi,
Are you saying first create notification,then service order
and then Sales order.
But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
Thanks & regards,
chetan. -
BADI for Updating work order component data
Hi,
I need to update the field special stock indicator for the work order component data when it is saved. I am using the BADI WORKORDER_UPDATE for the same, but when I implemented the ZWORKORDER_UPDATE_IM using the standard defenition WORKORDER_UPDATE , the code does not allow me to change the it_component internal table belonging to the BEFORE_UPDATE method. Could you please help me in this.
Basically if we are implementing a standard defenition how to change the parameters of the methods in it.
Regards,
Prabaharan.GHi ,
It is giving the below dump. The parameter is importing parameter and it does not allow to change even using field symbol. Is there any other way. Is there an user exit which will be called when pressing enter button in component screen. The exit EXIT_SAPLCOBT_001 did not work for this.
Error analysis
The program tried to assign a new value to the field "<F_FS1>" even though
it is protected against changes.
The following objects are protected:
- Character or numeric literals
- Constants (CONSTANTS)
- Parameters of the category IMPORTING REFERENCE for functions
and methods
- Untyped field symbols to which a field has not yet been assigned
using ASSIGN
- TABLES parameters if the corresponding actual parameter is protected
against changes
- USING reference parameters and CHANGING parameters for FORMs if
the actual parameter for this is protected against changes
Regards,
Prabaharan.G -
BADI for updating changing output medium in PO
Hi,
Is there any BADI or exit present for updating the output medium in PO , based upon some criteria ?
In my requirement I want to make output medium as <b><b>'email'</b></b> and set email address to email ID of one of the partner function maintained in PO.
Thanks and Regards,
Amit RHi
<b>At runtime, you will get the GUID in the BADI Interface.</b>
Incase this BADI does not help, go for another BADI
1) <u>BBP_SEND_MEDIUM_MODE</u>
(Determines the Default Settings for the Send Medium)
2) '<u>BBP_OUTPUT_CHANGE_SF'</u>.
<u>Here are some related links -></u>
Re: PO output medium issue
Re: SRM PO SMARTFORM
Re: Control PO output to vendor
Re: Add a Printer ? -> LP01
Hope this will help.
Regards
- Atul -
User Exit or BADI for Updating Tax code (MWSKZ) using ME21N
Hi all,
I am trying to fin out an exit or badi for Updating Tax code (MWSKZ) and Unit of Measure in transaction ME21n.
The scenario is like this...
For Purchase Orders Tax code will be defaulted from Purchasing info record or contract or parameter id for that item-vendor-plant.
If the Tax Code is not defaulted and account assignment is blank then tax code on the PO is updated according to the below mentioned table
Table
Supplying Plant/ Receiving Plant Tax code
Vendor/Country
Any plant/vendor/
country 5050(NA) 20
2300 6700 E0
If the tax code on PO cannot be updated by the above table, then buyer needs to put tax code on the purchase order manually.
Thanks,
Shiva, BangaloreHi Siva.,.,.,
These r the exits.,..,which will be called while calling ME21N/ME22N/ME23N
EXIT_SAPMM06E_006
EXIT_SAPMM06E_007
EXIT_SAPMM06E_008
EXIT_SAPMM06E_009
EXIT_SAPMM06E_012
EXIT_SAPMM06E_013
EXIT_SAPMM06E_014
EXIT_SAPMM06E_016
EXIT_SAPMM06E_017
EXIT_SAPMM06E_018
U want to default some values while the Initial screen will come right,
while u Enter ME21N in command Prompt.,.,two exits will get triggerd,
EXIT_SAPMM06E_014
EXIT_SAPMM06E_016
If u want to Default some values u can use these two exits.,.
Try using EXIT_SAPMM06E_016.,.this will solve ur purpose.
and if the user changes some values on screen.,,and you want them to get reflected .,.,.that means if user changes and saves data .,.
While saving.,.,EXIT_SAPMM06E_012 and EXIT_SAPMM06E_013 will get triggerd
Try using EXIT_SAPMM06E_013.,,.it was somehow the same requirement as mine.,.,IN my case it worked fine.,.,
Regards
Debasish
Message was edited by:
Debasish Das -
User-Exit/Badi/Funtion Module for update Batch in transaction CORK
Hi Gurus,
when an IDoc 'Z' is executed to do a confirmation using the FM CO_RU_ORDER_CONFIRMATION, the values of transaction CORK are modified.
I'd like to update the field batch number so when you enter a process order in transaction CORK and then you click on Components, you'll see the list of component and the batch number updated throught the custom IDoc.
Does anyone knows any user-exit or Badi or maybe a FM to implement so when the first confirmation is done, the batch numbers are updated?
Thanks in advance.Hi,
You can copy and paste the Report code below. This will give the list of User Exits and BADIs available for the Transcation code. Very usefull program.
Below code will give a list of BADIs for particular transaction.
=============START
*& Report ZNEGI16 *
REPORT ZNEGI16 .
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE,
P_PGMNA LIKE TSTC-PGMNA .
DATA wa_tadir type tadir.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'PROG'
AND OBJ_NAME = TSTC-PGMNA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM TRDIR
WHERE NAME = TSTC-PGMNA.
IF TRDIR-SUBC EQ 'F'.
SELECT SINGLE * FROM TFDIR
WHERE PNAME = TSTC-PGMNA.
SELECT SINGLE * FROM ENLFDIR
WHERE FUNCNAME = TFDIR-FUNCNAME.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'FUGR'
AND OBJ_NAME EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
SELECT * FROM TADIR INTO TABLE JTAB
WHERE PGMID = 'R3TR'
AND OBJECT in ('SMOD', 'SXSD')
AND DEVCLASS = V_DEVCLASS.
SELECT SINGLE * FROM TSTCT
WHERE SPRSL EQ SY-LANGU
AND TCODE EQ P_TCODE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) P_TCODE,
45(50) TSTCT-TTEXT.
SKIP.
IF NOT JTAB[] IS INITIAL.
WRITE:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.
Get the total SMOD.
LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.
endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 wf_object2,
105 SY-VLINE.
endat.
case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
when 'SXSD'.
For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
endcase.
WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
data : wf_object type tadir-object.
clear wf_object.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.
case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
endcase.
================END
<b>Reward POints if this helps.
Manish</b> -
BADI-User exit required for updating Purchase order header field -IHREZ
Hello All,
We have requirement in our business to update the purchase order header field "our reference" EKKO-IHREZ with some text field. We need a BADI/user exit that can be used for updating this field . We have checked the BADI ME_PROCESS_PO_CUST and unfortunately we are not able to use this BADI as it getting triggered in enjoy SAP transactions ME21N , ME22N etc. We are not creating the purchase order manually and we are using ME59N for creating Purchase order . Hence we are looking for some user exit/BADI that can be used in ME59N for updating the purchase order header field IHREZ.
Thanks in advance for your immediate response .
With regards,
Joseph Anand BTRY using the exist u2022 EXIT_SAPLME59_001
You can also later on add this field by BAPI_PO_CHANGE -
User exit/BADI for updating Purchase Order Item
I am would like to update the purchase order item - specifically field EKPO-REPOS in a user exit or BADI. I haven't been able to find one that allows you to update the purchase order item.
Any input would be appreciated.
DerickYou can use BADI ME_PROCESS_PO_CUST for you requirement
Method PROCESS_ITEM
* Retrieve item data.
CALL METHOD im_item->get_data
RECEIVING
re_data = v_data_item.
Do you validations and changes here
*update changes
CALL METHOD im_item->set_data( v_data_item ). -
BADI or function module for updating open purchase orders
Hi all,
Does anyone know of a BADI or function module which can be used for updating item prices in open purchase orders?
All helpful answers are highly appreciated!
Regards,
MV1 ) execute this program in se38 .enter the input as transaction code for which you want list of User
Exit.
REPORT z_find_userexit NO STANDARD PAGE HEADING.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP® User Exits exists.
*& Tables
TABLES : tstc, "SAP® Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP® Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
Find SAP® Modifications
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
2) Second way is to go to transaction code SE93 .enter transaction code click on display.
There you will see the package. Copy that package name.
Go to transaction code se84
Enhancements -customer exits-enhancementsu2014enter package there and execute.
You will get list of exits.
3) BAPI for PO change is
BAPI_PO_CHANGE -
BAdI - AC_DOCUMENT / data passing for nested structures
Hi all.
I need your help for this scenario:
I used this to pass value of MM field to FI field from transaction MIGO.
Our company placed field in EKKN-WEMPF to BSEG-ZUONR.
For this one option was: BAdI AC_DOCUMENT
Questions:
1. Nested structures - passing of data:
First problem encountered was with the reading of data from nested structures and passing them to nested structures as well. How to do this? I have used a certain declaration but any input will be much appreciated.
2. When I activated my BAdI, it says error on FI Interface,
specifically on AWREF and AWORG fields.
It is currently blank. Can I use the values in IM_DOCUMENT to pass to EX_DOCUMENT?
(What is a good way to do it since simple syntax does not allow for passing of data bec. structures are incompatible, and added complexity, it has nested structures.)
If you have sample code for this, it would truly be helpful.
Thanks and God bless!Hi,
Check that for which condition the message is triggering.
Try to check the condition.
Regards
Sandipan -
I would like to turn off firefox checking for updates
I don't want to update due to previous bad experiences with updates (version 4 and version 5)
I am frustrated by being reminded on a daily basis to update when I don't want toUse
*'''Firefox button -> Options -> |Advanced | -> |Update|''' and uncheck the update option, or opt to ask first.
* see [[Options window - Advanced panel#w_update-tab]]_update-tab
* and to downgrade
**[[installing a previous version of Firefox]]
** and the download itself [http://www.mozilla.com/en-US/firefox/all-older.html]
Also note that currently
* firefox 3.6 is still supported, and has had recent security updates
* plans are to continue supporting it despite any comment on the download page
**(not sure how long for but see https://wiki.mozilla.org/Firefox/Planning/2011-09-07#Questions.2C_Comments.2C_FYI ) confirming continuing support for Firefox 3.6
* Firefox 3.6 has updated with security fixes, so is I think now 3.6.22 ; but it is NOT currently trying to upgrade its users to the current firefox release (Firefox 6)
Maybe you are looking for
-
Report for gl accounts with reference to purchase order
hi experts Is there any report which can give the gl accounts with reference to purchase order thnx
-
Can we include the customize results in the Open Script Result Summary
hi all can we include the customize results in the Open Script Result Summary if we include what is the code. customize result i mean Scenario: i am checking the concurrent job is completed successfully or not result:Concurrent Job Completed Successf
-
Activate or deactivate a condition based on Input Variable
Hi, Is it possible to Activate/De activate a condition based on Input variable, if yes can any one tell me how this could be done...
-
Encoding issue - having UTF-16LE BOM "FF FE"
Hello Experts, The scenario is as follows: SAP sends IDOCS -> SAP-PI (collects IDOCS & creates IDOC xml) -> Content conversion done at Receiver CC -> Text File having pipe delimited is placed in an FTP location. Requirement : Currently SAP R
-
Clicking for a new tab brings up yahoo search instead of google as usual. What gives?
I always use fire fox and google is my home page. Today when i click to open a new tab instead of opening a google search page it opens a yahoo search bar. Google is my only search engine and I have no yahoo add-on. I have even blocked the site and i