Form Routine in User Exit
Hi
I would like to include a form routine in user exit inlcude ZXTXWU01 but I guess that is not possible, so I created a new include ZXTXWZZZ in which I have developed the code for the form routines...
But I still get the error in the main user exit ZXTXWU01 stating that the Form... End Form can be only after the End Function which obviously refers to the function module containing the main user exit..
Please let me know how to over come this ....
Hi,
You cannot create another Form...EndForm if the first include ZXTXWU01 is already inside a Form..Endform.
Meaning following structure is invalid:
Form first_form.
Include zzzz
Endform.
In Include zzzz.
Form second_form.
Endform.
Instead of a Form..Endform subroutine...directly have the statements in the Include program and remove the Form..Endform.
Regards,
Subramanian
Similar Messages
-
How to get the values from form calls in user exit?
Hi all,
I am not getting a specific value readily in an user exit.
?Can any one tell me how to find what are the fields,tables available in various form calls(visible while debugging) in an user exit.
For example sapxkl is one ofthe callls...(sapxkl)<table>[] will hold some data.how to find what r the values available for <table>.
Thanks.
Edited by: sanjay_ask on Apr 16, 2010 10:43 PMHI ,
Use this line of code
field-symbols: <l_fs> type any.
data: l_value type char20.
Get Plant
l_value = '(SAPLCEI0)GV_WERKS'. " Here give the program name and variable name
assign (l_value) to <l_fs>.
v_werks = <l_fs>. " Instead of V_werks use you internal table
Thanks
Subhankar -
User include structure and routines/program/user exits
Hello Gurus,
following is the step for modify the field catalog in material determination .
Modify the field catalog (OV26)
1. Add the new field to the user include structure:
o Header data KOMKDZ
o Item data KOMPDZ.
2. Add coding to the routines for assigning values to the new fields in order processing in program MV45AFZA. Use user exits:
o USEREXIT_MOVE_FIELD_TO_KOMKD (header fields)
o USEREXIT_MOVE_FIELD_TO_KOMPD (item fields)
3. Add the new field to the field catalog (Customizing activity Basic Functions  Material Determination  Maintain prerequisites for material determination  Maintain field catalog).
Will you please tell me what the step 1 and step 2 mean ? and what 's the user include structure and USEREXIT_MOVE_FIELD_TO_KOMKD/USEREXIT_MOVE_FIELD_TO_KOMPD and program MV45AFZA ?
thanks very much!Hi,
KOMKD is cummunication header and KOMPD is communication item which are actually contained in KOMGD structure. So automatically when you add a field to either of header or item it becomes a part of KOMGD. And moreover KOMGD contains all the fields of KOMKD and KOMPD which are required for materail determination.
USEREXIT_MOVE_FIELD_TO_KOMKD
Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination" .
USEREXIT_MOVE_FIELD_TO_KOMPD
Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination ".
regards
sadhu kishore -
Include or sub-routine in user-exit
Hi all,
i want to put a sub-routine in my customer user-exit (CMOD).but i can not put the subroutine.
can i put a subroutine or include statement in a user exit?
correct answers will be rewarded.
Thanks
pabiYou can make subroutine calls inside a User exit, only if the exit is part of a function pool. All the subroutines can be placed in an include in the function pool & can be called with a Perform Statement from the User Exit.
~Suresh -
Why SAP has provided the VOFM routines even though we do have User-Exits?
Hi Experts,
Pls. let me clarify about,
1) What is the difference between VOFM routines and User-Exits?
2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
thanqDo be careful about asking questions that sound like interview questions...
> 1) What is the difference between VOFM routines and User-Exits?
VOFM are type of user exit.
>
> 2) Why SAP has provided the VOFM routines, even though we are having User-Exits, BADIs?
>
Historical. They were created before BADIs and CMOD user exits were invented. The other "old" user exits in SD are the user exit forms.
> 3) Is VOFM is meant for only SD module or we also use VOFM in other modules too, like MM, PP?
>
Only SD.
> thanq
You're welcome. -
Create new form in user exit ZRGGBR000
Hi everybody
I wanted to know if we can add a new form in the user exit ZRGGBR000 or we have to use the existing ones?
Its the first time im using that user exit and I dont quite know how to proceed
Thankssorry, may be i wrongly posted this question
theres a form called get_exit_titles in which all the exits are listed
I wanted to know if we can add new exits or we have to use the existing ones
Sorry for the inconvenience -
Triggering a smart form from User exit
Hi Gurus,
I need to trigger a smart form from a user exit.
The tcode name is COR1.there is a exit for this tocde.
This exit should be used to trigger the smart form.
User exit to be executed upon saving the Process order number.
Thanks in advance.
Edited by: vinay raj on Apr 13, 2009 9:38 AMHi,
You can write a Custom program i.e. the driver program for your smart form.
And submit that program in the exit. i.e. use the submit statement to run that program.
I hope this might help you. -
IN ME21N Pricing procedure ZPB0 is there .
i want to find out what value coded within ZPB0 ( zero)
how to find ZBP0 is Routine or User-Exits . ?Hi jim,
ZPB0 is Routine not a user-exits.
for ME21N we have to Routine in Pricing Procedure whenever a change occurs .
Routine may Change as per the Requirement of Business Process.
Pls reward if helpfull. -
User-exit that split at item level according to bill of entry(BOE)
HI,
need to write the logic for splitting invoices at item level according to BOE.
Customized new table:
Info for the customized table:
Table Name: ZIN_BONDINV
Field Name Data Element Type Length Short Text
MANDT MANDT CLNT 03 Client
VBELN VBELN_VF CHAR 10 Billing Document
EXNUM J_1IEXCNUM CHAR 10 BOE or Excise Invoice #
EXYEAR J_1IEXYEAR NUMC 04 Excise Year
ZEILE J_1IZEILE1 NUMC 04 Item no - GR at depot
ZVBELN VBELN_VL CHAR 10 Delivery Number
Z POSNR POSNR_VL CHAR 06 Delivery item
ZWERKS WERKS_D CHAR 04 Plant
This table to be used for storing the invoice created using delivery document along with other information extracted during billing document creation.
Logic for populating the table:
User Exit: RV60AFZC
Form: USEREXIT_FILL_VBRK_VBRP
This user exit should be used to update records in the customized table for the data with which billing document is created. The data should be populated as follows:
VBELN = VBRK-VBELN
EXNUM = J_1IRG23D-EXNUM*
EXYEAR = J_1IRG23D-EXYEAR*
ZEILE = J_1IRG23D-ZEILE*
ZVBELN = VBRP-VGBEL
ZPOSNR = VBRP-VGPOS
ZWERKS = VBRP-WERKS
*The above data is read during splitting the billing document based on BOE (copy control routine 602) and should be used from there.USER-EXIT NAME IS RV60AFZZ
-
User-exit for populating ztable
Customized new table:
Info for the customized table:
Table Name: ZIN_BONDINV
Field Name Data Element Type Length Short Text
MANDT MANDT CLNT 03 Client
VBELN VBELN_VF CHAR 10 Billing Document
EXNUM J_1IEXCNUM CHAR 10 BOE or Excise Invoice #
EXYEAR J_1IEXYEAR NUMC 04 Excise Year
ZEILE J_1IZEILE1 NUMC 04 Item no - GR at depot
ZVBELN VBELN_VL CHAR 10 Delivery Number
Z POSNR POSNR_VL CHAR 06 Delivery item
ZWERKS WERKS_D CHAR 04 Plant
This table to be used for storing the invoice created using delivery document along with other information extracted during billing document creation.
Logic for populating the table:
User Exit: RV60AFZC
Form: USEREXIT_FILL_VBRK_VBRP
This user exit should be used to update records in the customized table for the data with which billing document is created. The data should be populated as follows:
VBELN = VBRK-VBELN
EXNUM = J_1IRG23D-EXNUM*
EXYEAR = J_1IRG23D-EXYEAR*
ZEILE = J_1IRG23D-ZEILE*
ZVBELN = VBRP-VGBEL
ZPOSNR = VBRP-VGPOS
ZWERKS = VBRP-WERKS
*The above data is read during splitting the billing document based on BOE (copy control routine 602) and should be used from there.Hi,
I have already created the table named ZIN_BONDINV , there i have to insert the values and that has to be done according to the logic written in user-exit named:RV60AFZC(INCLUDE). -
User exit SAPLV1ZE for batch numbering
Hello,
The problem is with user exits. I have to make user exit that checks correct batch numbering. When user enters the batch number in transaction, for example, MSC1N it should check is it according standards. I found that user exit SAPLV1ZE is for such purposes and wrote code for this user exit to save dataset each time it executes, to test is it working.
As I understand form documentation, this user exit is triggered when you press enter after entering batch number in transaction MSC1N. I tried to do it and everything worked fine (dataset was created)! I added some code and tried to execute it again. It worked, but only once! I tried to execute it again with same code and it didnt work! Now I commented all the code I added and left only dataset creation part but no results I cant make it work again.
The user exit is activated and the code in it is correct (tried to copy it in report and execute). I thought it can be used only once per material or plant, so I tried to trigger the user exit with different data, but it doesnt work anyway.
Maybe anyone of you have this kind of solution in your system or you just have some ideas where the problem could be?
Any help will be appreciated!
Thanks in advice!The issue is solved! I tried to put break point in function where this user exits are called and it didn't stop when I tried to run it from MSC1N. I tried to do the same from other transactions and found that this user exit is triggered from, for example, MIGO. And it is working fine.
So the problem was that user exit SAPLV1ZE is not triggered from MSC1N. I'll have to find another user exit... -
Need Form routine in MV50AFZ1--Delivery User exits
FOR ANY VENDOR OUTSIDE INDIA, THE SYSTEM SHOULD ALLOW TO MAKE A SINGLE DELIVERY WIHTOUT TAKING INTO CONSIDERATION THE SUPPLYING PLANT ...
Could anyone tell me which routine would be suitable to include the code. (Vendor Country <> IN)Hi priya,
I think you cannot do this through the user exit, Delivery split based on the Supplying plant is the standard functionality. Consult with the functional consultant to know whether the same can be done through configuration.
Regards
Vinod -
SYNTAX Problem in User-Exit (Perform/Form)
Hi,
i use this User-Exit:
FUNCTION EXIT_SAPLAD15_010.
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DLISRC) LIKE AD01DLIA-DLISRC
*" VALUE(I_KOKRS) LIKE TKA01-KOKRS
*" TABLES
*" T_COVP STRUCTURE COVP OPTIONAL
*" T_COSPA STRUCTURE COSPA OPTIONAL
*" T_COSSA STRUCTURE COSSA OPTIONAL
*" T_COVPR STRUCTURE COVPR OPTIONAL
*" T_COSRA STRUCTURE COSRA OPTIONAL
*" T_V_COFP STRUCTURE V_COFP OPTIONAL
*" T_FMSUA STRUCTURE FMSUA OPTIONAL
*" T_CKF_DIP_CUSTOMER_EXIT STRUCTURE CKF_DIP_CUSTOMER_EXIT
*" OPTIONAL
*" IT_OBJECTS STRUCTURE AD01OBJ OPTIONAL
INCLUDE ZXAD1U10.
ENDFUNCTION.
* INCLUDE ZXAD1U10 *
CASE I_DLISRC.
WHEN '0001'. "Istkosten
PERFORM DP90.
WHEN '0021'. "Plankosten
PERFORM DP80.
ENDCASE.
FORM DP80.
BREAK-POINT.
ENDFORM. "DP90
FORM DP90.
BREAK-POINT.
ENDFORM. "DP90
I get this syntax-error:
Incorrect nesting: Before the statement "FORM", the structure
introduced by "FUNCTION" must be concluded by "ENDFUNCTION
Isn't it possible to use own Forms in includes of exits?
Thanks, Regards Dieterwhen you do this:
function.
include zx
endfuncion.
include ZXAD1U10
form aaa.
endform.
the abap engine see this:
function.
form aaa. " this is because the incorrect nesting error apperars
endform.
endfuncion.
so, you can do two things:
1° put your include sentence in the top of the function group, not inside the exit.
2° try with dinamyc sencentes include (zx...) perform (routine). -
Include with form in user-exit
Hello everyone,
I am trying to put an include which contains a form routine into a user-exit include . My include source activates normally by itself but when i try to activate the user-exit include which contains my custom include i am getting the error " Incorrect nesting: Before the statement "FORM", the structure introduced by "FUNCTION' must be concluded by "ENDFUNCTION" "
Any ideas on how i can fix that?
Regards,
HuseyinHi Huseyin,
userexits are done by filling an include which itself is source code of the function module. If you want to do some structurized programming, you should copy the EXIT function to customer name space and to your own function group. Then, in the include, you call your own function passing exactly the parameters of the EXIT function.
Then you are free to create includes, forms, data, objects,... whatever you want to achieve structured functionality.
Sample code:
*& Include.: ZXTRKU12 *
* new functionality sourced out to new function module
call function 'Z_EXIT_SAPLV55K_004'
importing
processing_protocol = processing_protocol
tables
idoc_data = idoc_data
changing
idoc_control = idoc_control
exceptions
idoc_error = 1
do_not_process_idoc = 2
others = 3.
case sy-subrc .
when 0.
exit.
when 1.
raise idoc_error.
when others.
* Can't raise OTHERS -> 2 AND Others handled in common
raise do_not_process_idoc.
endcase.
Here we created a new function group ZXTRK for the exit function group XTRK. We copied function EXIT_SAPLV55K_004 to function z_exit_saplv55k_004. In our case, we created 22 form includes and one top include because our programming guidelines require an include for each form.
The rest shoud be crystal-clear. If not, feel fre to ask for details.
Regards,
Clemens -
Is it possible to define a form (subprocedure) inside a user exit? When I try it complains that I'm trying to define a form inside of a function. Of course I have no choice because the whole user exit is a function. What's the best way to work around this?
i came to know from one of the posts here in SDN, the options are,
1) create a custom function module and call it
2) write ur subroutine in a report prog. and call that subroutine of that report prog.
3) develop a INCLUDE and add it in MAIN prog.
for more info. pls. search in SDN
thanq
Maybe you are looking for
-
No component configuration possible for some web dynpros?
Hi experts, I want to configure buttons for a view. Display of technical information (right click) for UI element says: Application: /SAPSRM/WDA_L_FPM_OIF Web-Dynpro Component: /SAPSRM/WDC_UI_DO_ACC Window-Info: IV_L_FPC_CA_DETAILS View-Info: V_DO_AC
-
Create multple inspection lots at customer returns
Hi all, at my comany we've the following problem. Customer returns should be posted to insp stock and an inspection lot must be created. When a customer has multiple return from the same batch it should create multiple inspection lots. We use insp 05
-
The 'Next' iPad...
... I really like the iPad as a device. I look at it's competition and say 'there is none', because I believe it occupies a niche of it's own. Like many other Apple-product fans, I listen to the harsh criticism of all of it's devices, and hear the 'e
-
Read (get) active document jpeg save quality
When one creates a jpeg using Save As, the jpeg options dialog box allows one to select a quality level of 1 to 12. When the file is re-opened and saved again using Save As, the original quality value appears in the dialog box. Is there a way to use
-
I was hoping that someone can clear my understanding of OSB and how it interacts with JMS. I created a JMS server, connection and topic in WLS. It works great. I am able to subscribe and publish from a java client and from an OSB business service. Ou