01-28-2010 9:11 AM
HI All,
I have one requirement in which I want to change the item text ( SGTEXT ) in FB01 while posting the document. I am not able to find the correct exit Or BADI. Please suggest the correct BADI or Exit.
Thanks,
Amit
01-28-2010 10:27 AM
Hi,
When you are posting the document through FB01 t-code SGTXT filed is editable filed, so why you are looking userexit to change this filed. Or please elaborate more...
01-28-2010 10:59 AM
Rahul,
Actually FB01 is called through another tcode i.e. FEBA at the time of posting the bank statements .
at that time the first 50 char of Note to payee text will be updated in SGTEXT of the document . we don't want first 50 char but we want middle char to be updated in the text field . I.e. the reason I am searching Exit/ BAdi in FB01 tcode.
01-28-2010 12:09 PM
Hi,
Please check this RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
RFEPOS00 Line item display: Checking of selection conditions.
Regards
Hiren K.Chitalia
02-01-2010 11:03 AM
Hi, Execute the below code which will return userexits for the t-code
REPORT yuserexit_vin NO STANDARD PAGE HEADING.
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.
* *---End of Program
Edited by: vinraaj on Feb 1, 2010 12:03 PM
02-02-2010 3:04 AM
Hi Amit,
You can try using Business Transaction Event #1120. It allows you to change the BSEG data before posting.
You will be able to set the SGTXT field in table T_BSEGSUB. All changes made in this substitiution table will be posted.
Here's a helpful link for BTE's
http://www.erpgenie.com/sap-technical/abap/business-transaction-events-bte
Cheers,
Miguel