Testing User Exit ZXEDFU02
Hi!
I have made some modifications in User Exit ZXEDFU02, if to be more precise I have populated some more lines in segments of Idoc of Invoice List.
And now I want to test it.
The thing is that I do not know SAP SD, because I'm ABAP programmer and do not know how to check if my Invoice List changed after changing User Exit ZXEDFU02... any ideas?
Help will be rewarded,
Mindaugas
Hi,
Please go to transaction WE02/WE05 and search an IDoc number with the following criteria search and execute.
Created on --> 01.01.2007 to 11.06.2007
Direction --> 1 (Outbound)
Current Status --> 03
Basic Type --> INVOIC02
The system will show list of IDoc(s). Then you select one IDoc and go to transaction WE19 and enter existing IDoc with the above selected IDoc and click on execute button. Next enter '/h' in command field, press enter and click on standard outbound processing. System will take you to ABAP debug mode. Then go to menu: Breakpoints -> Breakpoint at -> Function Module -> EXIT_SAPLVEDF_002. Then click on Run button (F8) ... and system will stop at the above user exits. From here you can debug through your codes.
Regards,
Ferry Lianto
Similar Messages
-
Adding lines to segment of Idoc in User Exit ZXEDFU02
Hi!
do I need to maintain Idoc in WE30 if I need to add some lines to one segment in User Exit ZXEDFU02?
Here is my sample code placed in ZXEDFU02 for adding a line, but it is not making an effect:
WHEN 'E1EDP01'.
CLEAR E1EDP26.
E1EDP26-QUALF = '003'.
E1EDP26-BETRG = 777.
or maybe it depends on Idoc that I use in We19?
For example, if Idoc that I use in WE19 for testing my User Exit does not has qualifier 003 in segment E1EDP26... could it be a reason?
Will reward,
Mindaugas.Hi,
Saple Code:
INCLUDE ZXEDFU02 *
data: ls_ka1 like e1edka1,
ls_edidd like edidd,
l_lines type i.
describe table int_edidd lines l_lines.
check l_lines ne 0.
read table int_edidd into ls_edidd index l_lines.
check ls_edidd-segnam eq 'E1EDKA1' and
ls_edidd-sdata(2) eq 'RS'.
ls_ka1-parvw = 'ZC'.
case xvbdkr-bukrs.
when '1000'.
ls_ka1-lifnr = '41010005823845840'.
when others.
exit.
endcase.
ls_edidd-sdata = ls_ka1.
append ls_edidd to int_edidd.
Regards -
User Exit ZXEDFU02 skipped in Inbound function module (WE19)
Hi!
when I choose Inbound function module in WE19, User Exit ZXEDFU02 is beeing skipped... or al least it seems so (not stopping at breakpoint in Exit).
But I need to add some lines to a segment, so need this Exit.
PS: I try to add some lines to Invoice List Idoc segment, Idoc type INVOICE02.
Any ideas?
Will reward,
Mindaugas.If is outbound try following
For outbound you have to use following way.
1) Cllick header-->output
2) Repeat output type
3) Select output type and click Further data and select dispatch time to 1(Send with periodic schedule job).
4) Save.
5) Go to Transaction WE15 or execute RSNAST00 program
6) Select your output type..input object key-->nothing but document number(eg..sales order number).
select output type and transmission medium.
7) Now breakpoint stop at your user exit.
Let me know still if you have problem.
Thanks,
Narayan -
Extend Idoc IINVOIC - User exit ZXEDFU02
Hi All,
I am trying to extend a standard IDocs IINVOIC with custom segment. I am using User Exit ZXEDFU02 populating segment data for FI Document posting .
Every thing is ok but I am facing problem when I am trying to multiple delivery assignments in FI Documents.
Right now FI Document is generating through IDocs and assignment is only one delivery but I want multiple assignment in FI Documents if invoice have multiple Delivery.
Could anybody help me.
Thanx in advance.
Regards,
Vijay Mauryasolved by changing user exit.
-
Restricting user exit ZXEDFU02 to one customer in WE20
I'm new to SAP. I've just written a code in user exit 002 (include zxedfu02) for the bill-to party invoice IDOC generation (FUNCTION IDOC_OUTPUT_INVOIC). My code is working perfectly. The only problem is I would like to restrict the use of this user exit to only one of my customers. From my understanding once I've programmed the user exit, every IDOC that is generated using IDOC_OUTPUT_INVOIC will perform my user exit, however I would like to be only executed for one partner. How do I do this?
If possible, please post a step by step solution to my problem, I would really appreciate your help.
Thanks in advance.
Edited by: mrisad on Jul 29, 2010 4:21 PMHello Mrisad,
As per your input, your exit function module EXIT_SAPLVEDF_002 contains CONTROL_RECORD_OUT as the import parameter.
Within your include please check the value of the following(which are the reciver related values) in the debugging mode.On top of your current code you can add this check, and include ur current code within this check.
RCVPOR
RCVPRT
RCVPRN
RCVSAD
RCVSMN
RCVSNA
RCVSCA
RCVSDF
RCVSLF
RCVLAD
Hope this will help you..
Regards,
Antony Thomas -
Extend Idoc INVOICE02 - User exit ZXEDFU02
Hi All,
I am trying to extend a standard Idoc <b>INVOICE02</b> with custom segment. I am trying to implement enhancement LVEDF001 and FM EXIT_SAPLVEDF_002. But when I try to insert a program logic into program ZXEDFU02 it complains Statement not accessible I am not sure what I am doing wrong here. Have anyone used this enhancement and any ideas?
Sample code will be very helpful, since this is the first time I am working on Idoc enhancement. Thank in advance.
Regards,
TimSaple Code:
INCLUDE ZXEDFU02 *
data: ls_ka1 like e1edka1,
ls_edidd like edidd,
l_lines type i.
describe table int_edidd lines l_lines.
check l_lines ne 0.
read table int_edidd into ls_edidd index l_lines.
check ls_edidd-segnam eq 'E1EDKA1' and
ls_edidd-sdata(2) eq 'RS'.
ls_ka1-parvw = 'ZC'.
case xvbdkr-bukrs.
when '1000'.
ls_ka1-lifnr = '41010005823845840'.
when others.
exit.
endcase.
ls_edidd-sdata = ls_ka1.
append ls_edidd to int_edidd. -
Debug an USER-EXIT which is present inside an INCLUDE
Hi folks,
i want to debug a include ' LVEDFF0E.' which is present in the program 'SAPLVEDF.
my user exit 'ZXEDFU02' is present in the include LVEDFF0E . This exit is to change the IDOC segmants.
i want to debug my user exit which is present inside a include.i tried so many times but control is not going to that point.
can anybody tell me how to debug that exit???
correct answers will be rewarded.
Thanks & RegardsHi,
Try this way
/h> choose "breakpoints" from menu> breakpoint at >function module> enter EXIT_SAPLVEDF_002 and press enter press f8
a® -
How can I test the IDOC ORDERS05 user exit EXIT_SAPLEINM_002?
We used user exit EXIT_SAPLEINM_002 for changing the PO IDOC values.
When I repeated the PO message to create new PO IDOC, I can not stop the process at the user exit EXIT_SAPLEINM_002. Is there any way to debug the PO IDOC creation at the point of user exit EXIT_SAPLEINM_002, so I can see how the user exit EXIT_SAPLEINM_002 works at run time?
Thank you in advance!
Fisher LiHi
Put a debug point at include ZXM06U02 in user exit EXIT_SAPLEINM_002.
In your PO go to header tab -> output and set ur output type to periodically scheduled job because if that output type is send immediately it will not stop at break point. So select your output type press button Further data and set it to peridically scheduled job.
Then go to we15 give ur application as EF, your Po number and your output type then execute. It will stop at that user exit. -
User exit ZXPADU02 - evaluating SY-UCOMM
Hello everyone,
I am trying to display an error message whenever someone tries to create a new work schedule rule (P0007-SCHKZ) in infotype 7. However, the error message should just come up when the user is trying to save his data.
I am using user exit ZXPADU02 for this purpose. My problem is that SY-UCOMM does not seem to hold reliable data in this user exit, and SSCRFIELDS does not seem to be supported at all.
My code looks like this (only the relevant code snippet in ZXPADU02):
CASE INNNN-INFTY.
WHEN '0007'.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING PRELP = INNNN
IMPORTING PNNNN = P0007.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING PRELP = PSAVE
IMPORTING PNNNN = P0007_ALT.
IF P0007_ALT-SCHKZ <> P0007-SCHKZ
AND IPSYST-MASSN IS INITIAL " do not warn within an info group of a personnel action
AND SY-UCOMM = 'UPD'. " only warn when saving the data -> problem here <-
MESSAGE 'Do not change IT7 directly or else.' TYPE 'I' DISPLAY LIKE 'E'.
SHOW_DATA_AGAIN = 'X'.
ENDIF.
At first glance, the above works nicely. But this is what happens when I test more thoroughly:
I create a new period in IT 7, enter a P0007-SCHKZ other than the one that was previously valid, press F11. Some warnings appear (for different reasons), which I dismiss using the Enter key. Afterwards, the above code fires, the error message is being displayed, and I am thrown back into the data screen. So far, so good.
Now I simply alter the value in the field "Weekly hours" (P0007-WOSTD) and press Enter (!). Again a series of warnings appear, including one that a dataset is going to be deleted (seeing that an IT 7-period with just the same date range already exists). I confirm that with Enter, and the data is being saved. The above code does not fire because I have only pressed Enter - but the data is being saved anyway!
Looks like a pretty erroneous behavior on the side of the SAP system. The question is whether I have a chance to do something about it in the code.Mihir Nagar wrote:
Dear Petersen,
Your IF condition seems ok. I doubt on the message statement. Can you replace your message statement with type E.
MESSAGE 'Do not change IT7 directly or else.' TYPE 'E'.
ENDIF.
Hope this works.
Regards,
Mihir.
I did not expect this to work, because normally you use type 'E'-messages only in certain PAI-environments, but it does the job, thank you!
make use of field IOPER of the structure PSYST to check on the infotype actions INS, MOD, COP, DEL...
In this particular case I did not care, so I did not check that. IT 7 should only be maintained through personnel actions in our case.
Next you can check with sy-ucomm field the different between "enter" and "save". With "save" sy-ucomm will be 'UPD'.
That is what I did, but as I described, there was a situation when SY-UCOMM is SPACE, but the system saved anyway due to a prior save attempt. -
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 -
How to select several values from a user exit variable in a planning folder
Hello,
I have created a user exit variable for limiting the values only to which the user need to access.
For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
But It seems in this case the user has only two possibilities :
- keep all the values without any restriction
- restrain the selection to only one value.
It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected (because the original set is too important) values ?
Thanks for your help.Hi Mayank,
Thanks for your response, but I don't think it corresponds to my problem.
I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
I must present a solution to my client next monday, so I have not enough time to open an OSS message.
An alternate solution should be interesting too.
My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
Regards -
How do I SUBMIT from a user exit which is called in an update task?
I want to send an idoc each time there is a goods movement. So, in the user exit of MB_POST_DOCUMENT I am calling IDOC_OUTBOUND_WRITE_TO_DB. This creates an idoc of status 30. However, in order to send the idoc I want to SUBMIT RSEOUT00. I get an ABAP dump on the SUBMIT because MB_POST_DOCUMENT is called in the update task, where SUBMIT is not allowed. Do you know any other way I can execute RSEOUT00 at this moment without having to call it later in batch?
Thanks!!
JoyHi Naren,
Your reply is VERY helpful!! Thank you so much.
I added CALL FUNCTION 'RSAP_IDOC_EINBUCHEN_VOM_BIW_4' IN BACKGROUND TASK. I am no longer getting the dump, but my idoc is still a status 03 and not a status 30. Should I expect to see it turn to a status 30? I ran this function directly in SE37 -> Test with the same parameters and it ran perfectly and turned the idoc to a status 03. Is there anything else I need to do in the code?
Thanks again,
Joy -
Packing data at delivery user exit or BADI time
I create a delivery and enter associated packing data (handling units HU), then save the delivery. At user exit time, the delivery header is available via XLIKP and the delivery items are available via XLIPS tables, but the packing data is not!
Now, program SAPMV50A has a table called CVEKP, whose structure is VEKPVB, the handling unit header, but this table is always empty.
I thought I had a solution: instead of putting my custom logic in user exit MV50AFZ1, I tested putting my logic in the "Delivery Publish" BADI. Supposedly, this one is executed after the commit work, and so I could then read table VEKP directly and get the handling units. No such luck! Unfortunately, at the time the BADI is executed, the VEKP table may or may not be updated. Even adding the WAIT option wasn't 100% effective.
But these attempted workarounds still leaves the big question unanswered: "Where are the handling units data stored during execution of transaction VL01 or VL02"?
Anybody know?which BADI u have seen ?
what abt ur requirement ?
Regards
Prabhu -
How to find out whether USER-EXIT is active or not
Hello!
How can I find out whether USER-EXIT is active or not ?
I set a break-point at these points and nothing happens
if I want save my daocument ???
Why
PERFORM USEREXIT_SAVE_DOCUMENT.
PERFORM USEREXIT_SAVE_DOCUMENT_PREPARE.
Ragards
IlhanHi Ilhan
The easiest way, I guess, is by going to transaction SMOD, sticking in your enhancement name and pressing the test button.
When placing breakpoints, don't use <b>Breakpoints > Breakpoint at > Statement...</b> and enter
PERFORM USEREXIT_SAVE_DOCUMENT
because you won't get any hits since the function module names are stored dynamically.
Rather use <b>Breakpoints > Breakpoint at > Function Module...</b> and enter
USEREXIT_SAVE_DOCUMENT
for a better chance of hitting the breakpoint.
Cheers
Lyal
Message's terrible grammar was edited by:
Lyal Schumann -
Hi,
Our client wants to update certain data in PR while the PRs are created from Planned orders or after a PR is created from a Planned order.
I've implemented BADI MD_PURREQ_CHANGE but while testing, the debugger is not taking to the break point.
Thus it appears that this BADI is not applicable for MD14.
I need a BADI/User exit where I can change the material description in PR.
Please help.Helpful answers shall be rewarded.Hi abhijit,
Check this program.You will get all exits for a transaction.
TABLES : TSTC, TADIR, MODSAPT, MODACT, TRDIR, TFDIR, ENLFDIR.
TABLES : 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 OBLIGATORY.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
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 = '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.
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.
Maybe you are looking for
-
TS1702 I keep getting error message number 0x800B010F when I try to update my applications
Whenever i try to update my iphone applications from the itunes program i get error message 0x800B010F. How do I fix this?
-
Using iSetup for day-to-day change management
We are an existing 11.5.10.2 e-business shop with many instances and many release flows. We've done a little bit of foundation object automation with fndload (just conc programs and request sets). We're contemplating using iSetup for day-to-day migra
-
I am currently taking a Dreamweaver class, online course, and I cannot find CSS Designer panel anywhere.
-
Communicating between components
I'm sure this is an easy question but I'm finding it hard to get to grips with programming an need a nudge in the right direction please I created my site for the first time in Flash Catalyst and now rightly or wrongly i have about 50 componen
-
This is either a FAQ or a genuine Interesting Topic; I would be grateful for help in either case. I'm running Red Hat 5.2 on my laptop. Upgrading to 6.x or 7.1 is going to be tough, because I've got a bunch of stuff that I use (like VMWare!), that's