‎2010 Aug 11 12:12 PM
Hi experts,
I want to check one ztable entry when 'cancel invoice document'( i.e MR08) is doing, i have copied rggbr000 program into my zprogram and assigned it in 'GCX2' t-code with GBLR application area, in 'OB28' i am maintaining validation, in check screen how i can check ztable entry. i have seen some existing validations, they have given like U100, U200.. what are those? where to write the code (select query i need to write) in my case?
regards,
venkat
‎2010 Aug 12 7:57 AM
Hi,
Create your validations in GGBO transaction. Search SCN for this topic
‎2010 Aug 11 12:43 PM
You have to insert your code in the Z program you created by copy of RGGBS000 or RGGBR000, you have to add some coding in the GET_EXIT_TITLES form, add a record in internal table with the definition of the exit to add, then add a FORM with this name at the end of the program, there you will execute your code.
- read the comments in the SAP form pools
- read the documentation in SPRO Customizing, and online help like [User Exits in Validations/Substitutions/Rules|http://help.sap.com/saphelp_erp60_sp/helpdata/en/5b/d231a843c611d182b30000e829fbfe/frameset.htm]
Regards,
Raymond
‎2010 Aug 11 12:49 PM
You've to code your validation in the copied program (the one you've copied from rggbr000).
‎2010 Aug 11 1:26 PM
hi suhas,
i added piece of code in my zprogram in a routine(i.e U999), the same routine i passed to internal table also in form get_exit_titles. now how to add U999 in 'OB28' validation check screen
regards,
venkat
‎2010 Aug 11 1:49 PM
‎2010 Aug 11 1:51 PM
Hi,
To add the user exit go to OB28 transaction and in CHECK parameter, select the Exit tab which gives you all the available exit. select the exit U999 and save the validation.
‎2010 Aug 11 3:53 PM
answer from niraj is correc!:
you must 1) define your exit U999 in validation pool
2) implement form U999
3) choose exit U999 in ob28
Edited by: Andreas Mann on Aug 11, 2010 4:54 PM
‎2010 Aug 12 9:24 AM
TCode - GGB0 is for creation of Validation and TCode - OB28 is for activating & deactivating the Validation in SAP.
Then go again in Tcode - GGB0 and delete the steps of "Prerequisite", "Check" & "Message" in -> FI A/cgs - Line Item -
If you have created Validation (In Tcode - GGB0 )for Document Header apply the same rule.
or
1) Maintain Validation T Code GGB0
Select Financial accounting folder
give your validation name and save
2)Activation of Validation T Code OB28
Select new entries
Co code
Call point: 002 line item
Validation: give your validation
Activate level: Select 1 activate
Edited by: kk.adhvaryu on Aug 12, 2010 10:25 AM
‎2010 Aug 12 6:53 AM
Following link include
http://www.richard-harper.me.uk/kb/showtext.aspx?id=0007c
User Exits in FI are implemented again in a different manner to both standard user exits and user exits in SD. The user exits are available for Substitutions, Validations and Rules which are specified either in transaction OB28 (for rules), or OBBH (for substitutions).
There are 3 steps involved in setting up user exits in FI.
These are:
*
* Creating the Module Pool and programming the user exit.
* Specifying the Module Pool that will hold the user exits.
* "Activating" the user exit.
‎2010 Aug 12 7:37 AM
Hi experts,
my code is like this... this U999 exit i added in OB28 t-code in check screen and activation level is '1'. error message also i specified
but still validation is not triggering
FORM u999 USING b_result.
TYPES : BEGIN OF ty_yservdetl,
bukrs TYPE yservtaxdetl-bukrs,
belnr TYPE yservtaxdetl-belnr,
gjahr TYPE yservtaxdetl-gjahr,
servtax_status TYPE yservtaxdetl-servtax_status,
adj_doc_no TYPE yservtaxdetl-adj_doc_no,
adj_doc_yr TYPE yservtaxdetl-adj_doc_yr,
END OF ty_yservdetl.
DATA : wa_yservdetl TYPE ty_yservdetl,
it_yservdetl TYPE TABLE OF ty_yservdetl.
SELECT bukrs
belnr
gjahr
servtax_status
adj_doc_no
adj_doc_yr
FROM yservtaxdetl
INTO TABLE it_yservdetl
WHERE bukrs EQ bkpf-bukrs
AND belnr EQ bkpf-belnr
AND gjahr EQ bkpf-gjahr.
IF sy-subrc EQ 0.
LOOP AT it_yservdetl INTO wa_yservdetl WHERE servtax_status EQ 'A'
OR servtax_status EQ 'H'.
b_result = b_false.
ENDLOOP.
ENDIF.
ENDFORM.
Regards
Venkat
‎2010 Aug 12 8:59 AM
Are you sure to use the correct field values, the key values of BKPF are the key values of the new accounting document that will be posted and not those of the previous one,, nor those of the invoice header or its cancellation.
Because this document is not yet registered in the database, there is no chance of finding these values in your table.
- I suppose that your Y-table records were created when the original accounting document or invoice header was processed by a specific program.
- In your exit, you have to look for the original document number.
Database hints - Relation between BKPF (accounting document header) and RBKP (invoice header) via AWKEY : BKPF-AWKEY is concatenation of RBKP-BELNR and GJAHR - In RBKP record the invoice and its cancellation are in fields BELNRGJAHR and STBLGSTJAH
Regards,
Raymond
‎2010 Aug 12 7:57 AM
Hi,
Create your validations in GGBO transaction. Search SCN for this topic
‎2010 Aug 12 8:16 AM
i tried with GGB0 also, still it is allowing for cancellation.
‎2010 Aug 12 9:18 AM
Using following example u can modify your code
FORM u999 USING b_result.
TABLES: t003, "Tipi Documento
nriv. "Range Numerazione
DATA: w_budat LIKE bkpf-budat,
w_blart LIKE bkpf-blart,
w_gjahr LIKE bkpf-gjahr,
w_bukrs LIKE bkpf-bukrs,
w_belnr LIKE bkpf-belnr.
MOVE: bkpf-budat TO w_budat,
bkpf-blart TO w_blart,
bkpf-gjahr TO w_gjahr,
bkpf-bukrs TO w_bukrs.
CLEAR t003.
SELECT SINGLE * FROM t003 WHERE blart EQ w_blart.
CLEAR nriv.
SELECT SINGLE * FROM nriv
WHERE object = 'RF_BELEG'
AND subobject = w_bukrs
AND nrrangenr = t003-numkr
AND toyear = w_gjahr.
WRITE nriv-nrlevel+10 TO w_belnr.
CLEAR bkpf.
SELECT SINGLE * FROM bkpf WHERE bukrs EQ w_bukrs
AND gjahr EQ w_gjahr
AND belnr EQ w_belnr.
IF w_budat GE bkpf-budat.
b_result = b_true.
ELSE.
b_result = b_false.
ENDIF.
‎2010 Aug 12 9:42 AM
Hope you have not forgotten to insert the code that notifies the calling programs of availability of your user exits. This is achieved in the form get_exit_titles in your ZRGGBR000 program. You need to add this above the REFRESH ETAB.
Eg. exits-name = 'U102'.
exits-param = c_exit_param_none.
exits-title = text-102.
APPEND exits.
Hope this helps you.