Updating EKKO within user exit ZXM06U22 (EXIT_SAPLEBND_002)
I am trying to update EKKO table (2 new fields that I added to CI_EKKODB) in user exit ZXM06U22 (EXIT_SAPLEBND_002). I am populating E_CEKKO (the 2 new fields) with this information, but for some reason, it is not saving to the database (EKKO table) after I save my ME21N or ME22N transaction. The very first thing i do in this user exit is:
move-corresponding I_CEKKO to e_cekko.
Does anyone have any ideas for other code that I need to add to this user exit to get these new field values in EKKO to save to database table?
Thanks!
Sarah.
You should use SMOD enhancement MM06E005 to do this
EXIT_SAPMM06E_006, EXIT_SAPMM06E_007, EXIT_SAPMM06E_008
Similar Messages
-
Updating custom field in table EKKO within user exit when PO is saved
I am trying to update a custom field in table EKKO when a PO is saved. I am using FM EXIT_SAPMM06E_013, within enhancement MM06E005. Since EKKO is not a table that can be updated with this user exit, I am using a technic that I read about on SDN where I assign a field symbol to the calling program variable and then am able to access data within EKKO table. But when I pass this data back into the field symbol, for some reason this field is not getting saved when the PO is saved. In debug mode, it looks like this field is getting updated, but when I look in the table after the PO is saved, it is not there. My code sample is below. What I am doing wrong?
data:
CHAR(50) VALUE '(SAPLMEPO)EKKO-ZHDRCSTCENTER',
g_zhdrcstcenter like ekko-zhdrcstcenter,
FIELD-SYMBOLS <F1> type any.
if i_ekko-ekorg = '5401'.
ASSIGN (char) to <F1>.
g_zhdrcstcenter = <F1>.
move '0000113322' to g_zhdrcstcenter.
<F1> = g_zhdrcstcenter.
endif.
Thanks!
Sarah Smyth.Firstly, have you investigated using EXIT_SAPMM06E_008 to set any custom fields you have added in the EKKO_CI / CI_EKKODB structure?.. that might work more easily.
In terms of doing an assign back into a calling program's memory, it can work but it's probably worth setting a break point in your code then stepping through watching the values in EKKO - sometimes you can find subsequent code that re-writes an earlier copy of values back into the structure, thereby preventing you doing your change... SAP does warn this method is for "internal use". Also check in your debugger that it's SAPLMEPO and not SAPMM06E you need. -
Update infotype from user exit
Hi,
My requirement is to update a infotype from a user exit. I have a internal table with some records created in the user exit pbas0001. Now i need to update these records in the infotype 2001(absences). I tried using HR
INFOTYPEOPERATIONS directly from the user exit and it didn't work. If i create a include program and create a subroutine within the include program and call it in the user exit still i am getting a error message. How can update the infotype from the user exit.
Can someone send the example code for how to export the internal table from the user exit and import it in another program and update the infotype from that prgm.Put the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
~Suresh -
BAPI_PR_CHANGE within user-exit
Hi friends am using the BAPI_PR_CHANGE within a user-exit while doing transfer posting in MIGO.
since its within the user-exit i am not able to write commit work or transaction commit . Is ther any other way to commit the BAPI.
Even once the documents are posted the PR changes are not updated.
Please suggest a suitable solution for this issues.Iam using the EXIT_SAPLMBMB_001. As per my requirement in the exit am doing changes to PR's and updating the same in R/3 and also it should be updated in APO server so am using the particular BAPI. But its not updating the PR changes in r/3 or APO.
-
Vendor name should be updated in F110 (User exit by substituion)
Hello all,
I am doing payments for RTGS/NEFT through F110, BSEG-SGTXT should be filled with vendor name.
I tried this by substitution at acll up point 2 in OBBH by using User Exit. In user Exit we have written coading as Take BSEG-LIFNR where Account Type = K, go to LFA1 where BSEG-LIFNR=LFA1-LIFNR, Pick NAME1 for that LIFNR, & print that NAME1 in BSEG-SGTXT.
Now problem is, substitution is trigring but it is substituting BSEG-SGTXT by LFA1-NAME1 only for 1st line where account type = K (i.e Vendor Line item). System is not printing same NAME1 to the corresponding line item (i.e Bank Line item).
We want NAME1 at Bank Line.. Problem F110 runs at background, due to which we are not able to set any breakpoints & not able to do debuging also.
Regards,
SagarHere is what you can do..
In line item only one line will have vendor line item which will contain vendor number...In substituion it processes line by line...So for second line you need to store the vendor number of first line may be by import/export and than update second line... ?You can also process this in foreground by not doing the payment run in F110 and porcess it individually via the program.
Thanks
Nabheet -
Update transfer requirement user exit, with order
Dear experts,
I want to use exit MWMTR001, function module EXIT_SAPLL03T_003 to update the Transfer requirement with the Order number created in COR1.
But I see that by the time the user exit is called, the order number has not yet been created in the database.
Is there maybe another place to do what I want?
Thank you in advance,
Roxani AthousakiHi Frenchy,
Thanks for the answer. I have one more question.
Is it possible to automate it based on a movement type, so that every time we create a Transfer Order for this movement type the relevant TR will be automatically marked for 'final delivery'. This would help us, because then we would not have to go to WAM everytime to mark it as complete.
Or some kind of configuration that will dictate that only one Transfer order will be allowed for a Transfer Requirement and the TR will be set to complete as soon as the TO is confirmed.
Thanks,
Mike -
Hi all,
I am maintaining a Z-table for storing the logs of deleted entries for some infotypes such as 0002,0021,0022,0023 etc
i wrote a function module in update mode and called it in the user exit for PA30(PBAS0001)-PAI part.
I am facing problem while calling this fun. module in update task.
can anybody help me out??
regards,
DeepakPut the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
~Suresh -
Hi All,
I am trying to generate a BDC recording within a function exit. I have declared the BDCRECX1 include within the TOP include of the function group. But the include BDCRECX1 which actually contains all the FORMs also contains a selection-screen defined in it. I am not able to activate it because it gives me the following error "SELECTION-SCREEN statements can only be used between SELECTION-SCREEN BEGIN and END OF SCREEN (program type is not "1")" Is it because we are not allowed to define a selection screen between Function-Endfunction which defines a function exit?
Please let me know why this error is generated and the step to rectify it.Hi Nagaraj,
What Smitha is trying to accomplish here is reuse the subroutines that are available within the INCLUDE bdcrecx1.
Smitha - You cannot re-use the INCLUDE bdcrecx1 as it is, you will have to create a copy of it and take out all the code that relates to selection screen and reference to these selection parameters within the subroutines, as selection screen can be in programs type "1" - that is executable/report programs.
I guess you will need only the subroutines FORM BDC_DYNPRO USING PROGRAM DYNPRO. and FORM BDC_FIELD USING FNAM FVAL. just copy these routines into a new include. And you can use declare BDCDATA in the global data of the Function group.
If you ask me, i guess you could just write these 10-15 lines of code within the same include of the function exit and proceed rather than taking all this trouble.
Regards,
Chen -
Update EKKO table for the custom field through BAPI
Hi Experts,
I need to create an Custom field in EKKO table through Include Structure.
Now I have to update that custom field in my program.
I have gone through the following but could not solve my question.
Update EKKO table
User Exit for ME21 PO Creation at the time of saving--Urgent
I don't need to update when I hit the save button or any thing
I have the PO's which needs to be updated with that field...
Any suggestions would be greatly helpful.
Thanks,
Chaithanya...
<removed_by_moderator>
Edited by: Julius Bussche on Jul 7, 2008 10:47 PMHi Patrick,
Sorry Patrick you are right.. The structure is at header level.
I have made the changes still I could not achieve it.
I have made the following
In EKKO table I have append the structure with a custom field ZZBUY.
Now I have also appended BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX with the custom field
ZZBUY.
Here is my program
Data: wa_bapi_poheader type BAPIMEPOHEADER,
wa_bapi_poheaderx type BAPIMEPOHEADERX.
Data: it1_bapi_poheader like BAPI_TE_MEPOHEADER,
it1_bapi_poheaderx like BAPI_TE_MEPOHEADERX.
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
EXPORTING
PURCHASEORDER = wa_DATA-ebeln
* ACCOUNT_ASSIGNMENT = ' '
* ITEM_TEXT = ' '
* HEADER_TEXT = ' '
* DELIVERY_ADDRESS = ' '
* VERSION = ' '
* SERVICES = ' '
IMPORTING
POHEADER = wa_bapi_poheader
* POEXPIMPHEADER =
TABLES
RETURN = it_bapireturn
it1_bapi_poheader-ZZBUY = 'X'.
it1_bapi_poheaderx-ZZBUY = 'X'.
it_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
it_extensionin-valuepart1 = it1_bapi_poheader.
append it_extensionin.
Clear it_extensionin.
it_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
it_extensionin-valuepart1 = it1_bapi_poheaderx.
append it_extensionin.
Clear it_extensionin.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = wa_data-ebeln
POHEADER = wa_bapi_poheader
POHEADERX = wa_bapi_poheaderx
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
* IMPORTING
* EXPHEADER =
* EXPPOEXPIMPHEADER =
TABLES
RETURN = it_bapireturn
* POITEM =
* POITEMX =
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
EXTENSIONIN = it_extensionin
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
* POHISTORY =
* POHISTORY_TOTALS =
* POCONFIRMATION =
It gives me messages saying that
Please also populate interface parameter POHEADERX
No data changed
Where am I going wrong..
Waiting for your replies....
Thanks,
Chaitanya -
Is the Sales Order Item User Status available in user exit MV45AFZZ
Hello,
Does anyone know if a sales order line item user status is available within user exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT)?
I need to send an email when the status changes from one specific value to another specific value but I don't seem to have access to what the latest value is in this user exit.
I have found a table XTVSTAT which cntains some user status' but it's not clear which status maps to which line item.
If anyone has any suggestion please let me know.
Thanks,
RubyHi,
I do need to access the values as I need to check for a specific change to the user status from value A to value B.
I have already tried debugging the user exit and searching through the available variables but the status information doesn't seem to be available.
I guess I will have to try the output determination route. Can you explain this in a bit more detail please.
Thanks,
Ruby -
Hi Gurus,
I am new to User Exits. I have one requirement.
In T Code ME21N if the Document type (BSART) is P373 and Vender number (SUPERFIELD) is 70370, then only purchase order should be created otherwise it should raise error message.
To do this user exit i have got the User exit name and enhancement name.
User Exit Name : EXIT_SAPLEBND_002
Enhancement Name : M06E0004
Version 4.7
The user exit mentioned above has already been implemented. I need to add the code to meet the above mentioned requirement now.
Is it possible to add to the already existing user exit. If YES, please explain the procedure.
The two fields mentioned above are from structures. How do I find out the actual tables for these two fields. The fields BSART, SUPERFIELD are from structure MEPO_TOPLINE.
Thanks in advance
and
Points for every useful answer.
RegardsHi Raj,
To add code in the existing implementation of exist, you have to write code in that specific include of that function module.
Otherwise you can create another project and assign that exit; but at a time one implementation can be active, so you have to first deactivate the previous implementaion before activating it (here fear of losing old implemented logic remains!!!)
And for your information vendor number is LIFNR.
you will get these data from I_CEKKO structure.
Hope it will solve ur problem.
Regards
Krishnendu -
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 -
Update termination error on coding in user exit EXIT_SAPLCOIH_009
HI All,
I am working on approval of a work order in IW32 for which I am coding within a user exit EXIT_SAPLCOIH_009 which gets triggerred at the time of saving the work order. This will update the AUFK table and send a mail to a recipient. But when I save the work order after approving it, it gives me an error saying "Update Termination error". I checked within the SM13 transaction and ST22 for dump analysis, it says "The ABAP/4 Open SQL array insert results in duplicate database records.". Can anyone tell me what could have gone wrong and how I can rectify this. Your help is greatly appreciated.
Thanks in AdvanceHello
This type of error will appear in three cases
1.when there is a record in the database and trying to insert another with the same number
2.If there is any inconsistencies in number ranges (check this only if you have changed the number ranges very recently)
3. If the output type and the output device is wrongly selected ( not the prescribed)
Analyse yourself.
Regards,
Prakash -
Hr_infotype_operation errors when called within a user exit
Hi there.
I am doing an enhancement in userexit PBAS0001 for CE using the enhancement framework.Whenever I am trying to change the payroll area in IT0001 by PA30 it has to give a message saying that 'all the assignments will change to new payroll areas do you want to continue?'if i say yes then the payroll areas for all the assignments should be chnaged to the current payroll area which I am trying to change.So after the pop up I am looping at all the assignments and calling the function module hr_infotype_operation.It gives an error Complex Application error.I debugged and saw that when it calls the function module the user exit gets triggered again and goes to the starting within the function call and hits the function module again and keep going like this.I checked the structure and all the parameters.looks fine below is the code where I am using the function module.I am trying to update IT0001 when somebody tries to change the IT0001(is that an issue??) i tried by submitting a program by calling the function module in the program.Didnt work too.Is there any way we can do it by BDC??
Check if the payroll areas are equal
IF ls_i0001-abkrs NE new_p0001-abkrs.
If the payroll areas are not equal then generate a message pop-up with 'YES' and 'NO' buttons
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Warning'
text_question = 'Payroll Area specified is different with other assignments.Do you want to move all the other assignments to the same payroll area?'
text_button_1 = 'Yes'
icon_button_1 = ' '
text_button_2 = 'No'
icon_button_2 = ' '
default_button = '1'
start_column = 25
start_row = 6
IMPORTING
answer = lv_case
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
CASE lv_case.
WHEN '2'. "For 'NO' button
LEAVE TO SCREEN '2010'.
WHEN 'A'. "For 'CANCEL' button
LEAVE TO SCREEN '2010'.
WHEN '1'. "For 'YES' button
Second Pop-up confirm
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Warning'
text_question = 'System will update all other assignments to the new payroll area'
text_button_1 = 'Yes'
icon_button_1 = ' '
text_button_2 = 'No'
icon_button_2 = ' '
default_button = '1'
display_cancel_button = 'X'
start_column = 25
start_row = 6
IMPORTING
answer = lv_case1
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
CASE lv_case1.
WHEN '2'. "For 'NO' button
LEAVE TO SCREEN '2010'.
WHEN 'A'. "For 'CANCEL' button
LEAVE TO SCREEN '2010'.
WHEN '1'. "For 'YES' button
For all the assignments read the infotype 0001 and update the payroll area
LOOP AT lt_pernr INTO ls_pernr.
CLEAR:lt_i0001,ls_i0001.
REFRESH lt_i0001.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
tclas = 'A'
pernr = ls_pernr
infty = '0001'
begda = new_p0001-begda
endda = new_p0001-endda
bypass_buffer = 'X'
IMPORTING
subrc = lv_subrc
TABLES
infty_tab = lt_i0001
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SORT lt_i0001 BY endda DESCENDING.
READ TABLE lt_i0001 INTO ls_i0001 INDEX 1.
ls_i0001-abkrs = new_p0001-abkrs.
lv_record = ls_i0001.
Lock the employee
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = ls_i0001-pernr
IMPORTING
return = lv_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0001'
number = ls_i0001-pernr
validityend = '12302006'
validitybegin = '12012006'
record = ls_i0001
operation = 'INS'
IMPORTING
return = return.
*unlock the employee
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = ls_i0001-pernr
IMPORTING
return = lv_return.
SUBMIT zhr_infotype_operation_py_area USING SELECTION-SCREEN '1000'
WITH p_infty = '0001'
WITH p_pernr = ls_i0001-pernr
WITH p_endda = new_p0001-endda
WITH p_begda = new_p0001-begda
WITH p_record = lv_record
WITH p_opera = 'INS'
WITH p_tclas = 'A'
AND RETURN.
ENDLOOP.
ENDCASE.
ENDCASE.
ENDIF.maybe a little late, but I had found this message today (searching for different problem) but maybe the date for HR_infotype_operation might do a little problem, cause you are filling it with: DDMMYYYY but it should be YYYYMMDD so it just translate it that this is really far in the past so that might be a problem. Try sy-datum instead and for the end of validity try '99991231' dont worry, when you will update the same infotype again, the FM will end the previous infotype to previous day and the new one will get validity from sy-datum till the end ....
-
Re: User Exits on Updating and Integrating
Carl,
I sent this out to the list some time ago. But in case
you missed it here it is again.
Below is a zip file (UUencoded) containing instructions
on integrating Forte with Microsoft SourceSafe. It may
contain enough information for you to figure out how to
tap the repository callouts that happen on integrations.
-Fred
[email protected]
>
I was reading an old Forte v3.0 presentation on whats new in Forte v3.0.
One of the proposed features was a set of primitives for defining user exits
on updates and integrations.
I haven't seen any facility for this in Forte v3.0g though. Has this in fact been
done ? Does anyone have any information on this.
Thanks,
-Carl
Carl Schei
Technical Forte Consultant
South Africa
+27 31 3641765 (w)
email : [email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>------------------------------------------------------------------------
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
Reuters Ltd.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Although not a direct answer to your question, this blog series will help you to understand the difference better :
/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners
/people/thomas.weiss/blog/2006/03/15/the-new-enhancement-framework-part-2--what-else-you-need-to-know-before-building-an-enhancement
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
/people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
Maybe you are looking for
-
Linking PL/SQL custom region into html db pages
Hello, I have built an htmldb application with several pages, the first 7 of which contain html regions containing htmldb form items I created using the html db interface. I am able to step through the first 6 pages of my application, noting that the
-
Hi I'm making a responsive Edge animate scene, which has a Vimeo video embedded inside, and will have images animated in front of and behind the video player for added wow actors. So far so good... The problem is I would like the player to remain at
-
HT2729 Video syncing issues between new IPad and Macbook
I used my new IPad to film some videos for about three months. Today, I connected my IPad to my Macbook in an attempt to upload the IPad videos to my Macbook ITunes. Unfortunately, the IPad synced with my computer files, and all of my videos were era
-
Impossible to configure multiple data sources for EJB's in a single project
Hello everyone, I have jDev 10.1.3 installed and I'm doing some research on EJB 3.0. In the jDev help files, it is mentioned that a project can contain only one EJB module. Correct me if I'm wrong but to me, this means that there is only one data sou
-
In backflushing, how to get batch determination for IM managed components.
Hello friends, During confirmation, in Goods Movements screen, we get auto batch determination for WM managed components (based on their control cycle record). However, we are NOT getting auto batch determination for IM managed components. We have c