Adding entries to Custom table from IDOC User-Exit
Hi All,
I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002. But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
Please help..
Regards.
Asha
The table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
Thanks,
Adi.
Similar Messages
-
Insert delete or update entry in Custom table from KONV entry changed
Hi All,
I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
Thanks,Thanks for reply,
There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
Is this possible some how? by some database event or something.... -
Update the database table inside an user exit.
Hi Experts,
I have a issue where i have to update a custom table in an User exit.
I am using Lock object for ENQUE/DEQUE.
I have tried to use statements like UPDATE/MODIFY inside the user exit.
But the problem is that it's not updating the database table at the same time.
I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
The real issue is that this custom table is read for batch creation at the same time for different users.
Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
While requirement is to create a different/unique batch numbers.
Program is updating the table but it's taking time..so in between other users are creating the same batch number.
Please guide me what would be the best solution for this.
Regards,
Amit Kumar SinghThanks for your quick reply.
My actually requirement is like that.
I have to create a Process Order using tcode COR1.
After passing some input value it goes inside an User Exit.
There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
The new batch number is created using the combination of these table fields.
Once a new batch number is created it increment the numeric key field number by one.
Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
Here i am not able to update the database table inside this User Exit.
Table is geeting updated but after some time and out of this User Exit.
Please suggest what's required in that case?
Regards,
Amit Kumar Singh
Edited by: Amit Singh on Feb 3, 2009 11:33 AM -
How can I replicate table from a user to another user?
I want replicate a table from a user to another user, I use DBMS_STREAMS_ADM.RENAME_SCHEMA, but it didn't work.
who can tell this reason?
scripts as following:
create user strmadmin IDENTIFIED BY strmadmin;
grant dba to strmadmin;
BEGIN
DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(
grantee => 'STRMADMIN',
grant_privileges => TRUE);
END;
connect strmadmin/strmadmin
--queue
BEGIN
DBMS_STREAMS_ADM.SET_UP_QUEUE(
queue_table => 'STREAMS_QUEUE_TABLE',
queue_name => 'STREAMS_QUEUE');
END;
--capture
BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
schema_name => 'SCOTT',
streams_type => 'CAPTURE',
streams_name => 'S_CAPTURE',
queue_name => 'STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
include_tagged_lcr => false,
source_database => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
inclusion_rule => true);
END;
--instantiation
DECLARE
iscn NUMBER;
BEGIN
iscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER();
DBMS_APPLY_ADM.SET_SCHEMA_INSTANTIATION_SCN(
source_schema_name=>'SCOTT',
source_database_name => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
instantiation_scn=>iscn);
DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(
source_object_name=>'SCOTT.DEPT',
source_database_name => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
instantiation_scn=>iscn);
END;
--apply
--transformation
DECLARE
s_dml VARCHAR2(30);
s_ddl VARCHAR2(30);
BEGIN
DBMS_STREAMS_ADM.ADD_SCHEMA_RULES(
schema_name => 'SCOTT',
streams_type => 'APPLY',
streams_name => 'S_APPLY',
queue_name => 'STREAMS_QUEUE',
include_dml => true,
include_ddl => true,
source_database => 'ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM',
dml_rule_name => s_dml,
ddl_rule_name => s_ddl);
DBMS_STREAMS_ADM.RENAME_SCHEMA(
rule_name => s_dml,
from_schema_name => 'SCOTT',
to_schema_name => 'TEST',
step_number => 0,
operation => 'ADD');
END;
--start
BEGIN
DBMS_APPLY_ADM.SET_PARAMETER(
apply_name => 'S_APPLY',
parameter => 'DISABLE_ON_ERROR',
value => 'N');
END;
BEGIN
DBMS_APPLY_ADM.START_APPLY(
apply_name => 'S_APPLY');
END;
BEGIN
DBMS_CAPTURE_ADM.START_CAPTURE(
capture_name => 'S_CAPTURE');
END;
/select * from dba_streams_rename_schemaWhat do you have there?
-
How to MODIFY A CUSTOM TABLE FROM A FLAT FILE
Dear Friends,
I have a requirement where i have to upload data from excel file to my custom table so i have used a FM
'TEXT_CONVERT_XLS_TO_SAP' and i have collected data into a internal table , till here i am able to get data correctly , now i hae to upload this data into a custom table .
the flat file is having 6 fields and the custom table is having
8 fields , for uploading the data into this custom table from the internal table where i have collected above iam getting problem . Actually iam using a modify statement to update the custom table .
the flat file which i have collected into the internal table is as below :
IDNo. Name Date Location Designation Dept
101 Raja 4/12/2007 Delhi Manager HR
102 James 4/12/2007 Delhi Clerk HR
Custom table is having the below fields
IDNO. Name Date Location Designation Dept Manager
101 Raja
now when i run the program iam getting the problem while usign the modify statment is the ID no which is already having
a record as IDno = 101 and manger = Raja.......with the other fields name , date, location,designation and dept as blank.
if i want to fill this fields from my flat file the modify statment
just filling all the fields for the ID no = 101 and manager field which already having Raja as being overwritten by space .....
becasue this field is not being there in the flat file.
the code iam using as follows.
The flat file is having with the below structure
TYPES: BEGIN OF t_emp_data,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
end of t_emp_data.
The Custom Table(ZEMP_DATA) is having with the below structure
TYPES: BEGIN OF t_emp_data_table,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
Manager(20) type c, -- this is the extra field in table
end of t_emp_data_table.
data :
it_empdata TYPE STANDARD TABLE OF t_emp_data,
it_empdata_tmp TYPE STANDARD TABLE OF t_empdata_tmp,
wa_empdata_tmp type t_empdata_tmp,
wa_empdata type t_emp_data.
loop at it_empdata into wa_empdata.
move-corresponding wa_empdata to wa_empdata_tmp.
modify ZEMP_DATA from wa_empdata_tmp .
endloop.
could any one please let me know what i have to do inorder to not get the manager field data not being overwritten with the modify statment , for the IDNo. 101 . I want the data which is already ( manager = Raja) shouldnt not be get overwritten with Space.
please help me in this regard
Regards
Madhuri.Hi,
use a slect statement before
"move-corresponding wa_empdata to wa_empdata_tmp."
select manager
from ztable
into wa_empdata_tmp-manager
where id = 100.
regards,
lavanya -
Developing custom IDOC , USER Exit , BADI , BAPI and RFC
Hi,
I want basic information on developing custom IDOC , USER exit , BADI ,BAPI and RFC.
Thanks in advanceNeha,
>custom IDOC ,
http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
>USER exit
USER EXIT
> BADI
BADI Development Contents
> BAPI and RFC
Re: BAPI Development
Cheers
Agasthuri Doss -
Need help- need to read a customer table from the payroll schema
Hi gurus,
I need to read an amonunt from a customer table in the payroll schema. Is it possible to input TABLE XXXX in the schema, or is impossible to read from a customer table?Do I need to create a report to upload the amount in an infotype?
Thanks in advanced for for support!You should create your own custom operation (based on operation TABLE) to read your custom table from a Payroll PCR.
If your custom table's name is longer than 5 characters, you may be required to use operations VAOFF and/or VALEN prior to your custom operation in the PCR. -
Hi All,
i have written the user exit for Sales Order subscreen tab called <b>additional data2</b> , this tab is provided by sap for developer can write their own user exit coding.
my doubt is whenever PO comes as an <b>Inbound IDOC i need to pass the value from</b> <b>segment to my user exit fields</b>.
<b>where can i find the inbound idoc user exit for SO .</b>
Thanks in advance,
Regards,
Saravanan.Look at enhancement VEDA0001. It has got quite a few user exits you can use. You will also need to enhance the IDOC for the additional fields you have added on your screen.
Cheers,
Sanjeev -
Send email from PA30 user exit
When I try to send an email from user exit in ZXPADU02 it never makes it to SOST. WIll always go to SBWP outbox if I set the flag but never gets sent to receiver address.
If I paste the following code into a report it works fine. Is there some other parameter for this FM or some additional process needed to send email from a user exit?
DATA: maildata TYPE sodocchgi1.
DATA: mailtxt TYPE TABLE OF solisti1 WITH HEADER LINE.
DATA: mailrec TYPE TABLE OF somlrec90 WITH HEADER LINE.
CLEAR maildata.
REFRESH: mailtxt, mailrec.
maildata-obj_name = 'SRVC_EMAIL'.
maildata-obj_descr = 'Email test'.
maildata-obj_langu = sy-langu.
mailtxt-line = 'Test line from user exit'.
APPEND mailtxt.
mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
APPEND mailrec.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.Put the function call 'SO_NEW_DOCUMENT_SEND_API1'
in a report Program & SUBMIT that report from ZXPADU02.
Arya -
Re: IDOC User Exits
Posted: Aug 1, 2006 10:43 AM Reply E-mail this post
Hi
I have a basic doubt. We can modify or add new segments and change existing values to segments only for outbound idoc.
I have a requirement where a particular field in a segment would be empty for an inbound idoc. Is it possible to change inbound idoc values after the idoc is created and before it gets posted.
Please let me know,
Regards,
B.AnandhUpdating IDoc data in segments.
STEP 1 - Open document to edit
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
EXPORTING
document_number = t_docnum
IMPORTING
idoc_control = itab_edidc
TABLES
idoc_data = itab_edidd
EXCEPTIONS
document_foreign_lock = 1
document_not_exist = 2
document_not_open = 3
status_is_unable_for_changing = 4
OTHERS = 5.
STEP 2 - Loop at itab_edidd and change data
LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
e1edka1 = itab_edidd-sdata.
IF e1edka1-parvw = 'LF'.
e1edka1-partn = t_eikto.
itab_edidd-sdata = e1edka1.
MODIFY itab_edidd.
EXIT.
ENDIF.
ENDLOOP.
STEP 3 - Change data segments
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
TABLES
idoc_changed_data_range = itab_edidd
EXCEPTIONS
idoc_not_open = 1
data_record_not_exist = 2
OTHERS = 3. -
Hi Friends,
How do you find the IDOC User exits?
How to create IDOC Custom segment?
Please Let Me know.Any help is Appreciated.
Thanks,
Rinky<i>How do you find the IDOC User exits?</i>
<b>-->>There is nothing separately you can figure out only IDoc user-exits..Goto particular Transaction code -->system --> status..Click in the program & find out the Exits which is relevent to IDoc..Even u can put a break-point in all exits & find when its called...</b>
<i>How to create IDOC Custom segment?</i>
<b>--> Goto Tcode WE31 to create segments..</b>
Check these links for more details on IDoc's:
<b>ALE/ IDOC</b>
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Hope this helps
<i>* Reward each helpful answer</i>
Raja T -
Any of the Benefits idoc user exit
Hi All,
I am looking for the any benefit idoc user exit. We neeed to extend BENEFIT3 idoc, i was able to extend the idoc but dont see any user exit where i can def. my def segment.
Not sure how it is working in other case.
Does anybody has any idea as of how to proceed on this.
Appreciate your help in advance.
Thank you,This thread is vague and does not specify what the ultimate solution was. We were trying to accomplish the same thing - an enhancement to BENEFIT3 IDoc, but were unable to find a suitable user exit. So we put in an OSS note and received the following response:
"...currently there is no user exit/Badi in SAP Benefits Administration
to enhance IDoc BENEFIT3. Such functionality is indeed missing in the
system, which means that you will need to submit a development
request to enhance the system in this respect in a future release."
We are going to try to resolve our problem with a custom infotype.
Anke -
Error for customer specific Authorization check (User Exit)
Dear Experts,
I am facing a problem in PM.
I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
I have released the order and got the inspection lot number.
While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
"Error for customer specific Authorization check (User Exit)"
Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
I have checked the following user exits:
QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
QQMA0026: PM/SM: Auth. check when accessing notification transaction.
The above 2 User Exits are not active.
I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
Please some one help me on this issue.
Thanks and Regards,
Praveen.Dear Pete,
I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
Regards,
Praveen -
Making parmanent changes to a internal table inside a user exit
Hi All,
I am having a User exit to which I am passing a structure as importing parameter.
The user exit is not exporting the same structure, but is exporting some other values.
My problem is that I want to make parmanent changes in the structure I am passing to the user exit.
Currently what is happening:
I am passing the structure to the user exit. It has got 6 rows. Inside the user exit I am making some changes to a particular field of all the rows. Till the program control is inside the user exit the changes in the structure are visible. As soon as the control come out of the user exit, the values for the field are switched to teh old values(values before passing to teh user exit).
My question is, is there any method to make changes to a internal table inside a user exit and these changes are visible outside it when the program control come out of the user exit. (This is when the internal table to which the change is made in not exported by the user exit)Hi Dear,
Your changes done in import parameters will not reflect outside exit. You can only change the values of export parameters...
If you have very urgent requirement then make changes in SAP''s Standard code.
For your problem you can write to SAP. In many cases SAP provides the solution.
Award Points If Useful. -
Trigger a waiting ABAP program from a User Exit of CO01
Hi all,
We would like to launch a ABAP program from a User Exit (EXIT_SAPLCOZV_001) of CO01, this ABAP program has a special characteristic: using Function Module RFC_PING_AND_WAIT, so this program will be existing until terminating event coming.
Our purpose is terminate CO01 normally before finishing of ABAP program. We don't know if it's possible?
Actually:
1. when we use SUBMIT ..., the process will stop CO01 (stop not normally) and then launch ABAP program. => This is not suitable for our purpose.
2. when we use SUBMIT ... and RETURN, CO01 will wait for finishing of ABAP program => This is not suitable for our purpose too, because we wish CO01 terminated normally when ABAP program is still existing and waiting for its terminating event.
Do you have a solution that is suitable for our purpose, could you please help us?
(The context is below:
Time: Begin-->CO finished> ABAP finished-->
Launch CO01 --> Call User Exit --> Call ABAP program for waiting --> CO01 saved normally.
> ABAP program still waiting ---> waiting for terminating event
Thanks a lot,
Vinh VoHi,
Try with the function module BP_EVENT_RAISE, it takes eventid, and eventparm as import parameters in the User exit.
1) With Eventid, you create a background job of the ABAP program and schedule it. Eventparm can be the Production order number.
2) So when ever the Event is triggered the FM gets triggered and which in turn run the ABAP program, so the foreground the CO01 transaction runs without waiting for the ABAP program to complete.
Regards
Bala Krishna
Maybe you are looking for
-
How can I save a PDF from yahoo mail app in iphone5?
Hi everybody!!! I am asking what the title says... I want to save a PDF doc from yahoo mail app in my iphone5! How can I do it? I have ibooks and adobe reader but no luck.... Any suggestions? Thanks a lot!
-
Serial number works, cant use lightroom still
Hello, I've got lightroom 5. Lightroom currently is disable till I buy it, but I own it. It accepts my serial number (big green check mark) but wont unlock lightroom so I can get my work done. Can someone please help? Thank you!
-
Hi, Can you please tell the table and field to display reserved stock against contracts? Basically, we would enter a contract (VA41) and reserve this stock. (so that call off orders can consume this stock) What is the table where we can see the reser
-
Format External Drive : what filesystem to choose?
Hi, I've been having some issues with my external (NTFS) drive: it's read only. And reading on the internet only scares me. This because I've seen a lot of people writing about the lack of proper NTFS support in linux and the potential risk of data l
-
Hi i have recently installed Logic pro 9 and have tried adding additional 3rd party au plugins to it by adding them into the audio-plugins-components. I then have rebooted logic and looked in audio units section in my effects area and they do not see