2007 May 25 4:21 PM
Hi ,
I am using user exist F180A001 for T-code FB01.
I am validing field called assignment whether data enter there is correct or not.
If data is inccorect i want to give error message that enter data correctly.
I am writing code for this as "MESSAGE 'error in assigment' TYPE 'E'. "
This is working fine but it is also coming out of my existing screen.
but I dont want to come of screen i want to be in same screen where i have enter data. I should be able to correct data to proper value.
can you tell me code which i should use in order to achive this.
thanks
2007 May 25 4:33 PM
Hi
Give the message as
MESSAGE e000(zm_msg) WITH 'You cannot create' 'a FI document'.
ZM_MSG is the message class
it should stay in that screen.
other wise change the error message to I (information) or warning and see.
Reward points if useful
Regards
Anji
Hi ,
I am using user exist F180A001 for T-code FB01.
I am validing field called assignment whether data enter there is correct or not.
If data is inccorect i want to give error message that enter data correctly.
I am writing code for this as "MESSAGE 'error in assigment' TYPE 'E'. "
This is working fine but it is also coming out of my existing screen.
but I dont want to come of screen i want to be in same screen where i have enter data. I should be able to correct data to proper value.
can you tell me code which i should use in order to achive this.
thanks
2007 May 25 4:33 PM
Hi
Give the message as
MESSAGE e000(zm_msg) WITH 'You cannot create' 'a FI document'.
ZM_MSG is the message class
it should stay in that screen.
other wise change the error message to I (information) or warning and see.
Reward points if useful
Regards
Anji
2007 May 25 4:51 PM
Thanks for reply.
I am doing same ......
when i am using message E its coming out of screen .
if i am using W or I its is saving document.
I want to give message and also want to be in same scrren so that i can correct value in field assigment and save it.
2007 May 25 4:58 PM
Hi
U shouldn't use that exit to do a validation, but FI validations: trx OB28
Max
2007 May 25 5:02 PM
I have check whether user is entering proper asset no in this field or not.
for that i have write select query.
how can i do that in ob28
2007 May 25 5:14 PM
Hi
Run trx OB28 and do the double click on the validations for item of your company code.
Here you need to create a new step, than insert the prerequisite when the validation has to be done (for example SY-SYST-TCODE = 'FB01'), in CHECK create an EXIT where you write the code for validation and in MESSAGE insert the error message has to be shown if the validation fails.
Max
2007 May 25 5:25 PM
can you please explain in details.
I want into OB28 but i dont have any validation so i created one . and have define message class.
now how can i related FB01 assignmnet field to this. where will i write code.
should i create new z program.
please reply in details
2007 May 25 5:30 PM
After running the trx OB28 u'll see a table (just like SM30) where you have to insert
the company code and the point (Document header or Line item or Complete document) where the validation has to be done: I suppose at line Item livel.
Do a double click and then press create VALIDATION, here you need to create a new step.
In the step u should create an exit at CHECK level, after inserting the code of the exit (for example UZ01) press the icon to display the abap editor.
Here you should find the form GET_EXIT_TITLES and insert these codes:
EXITS-NAME = 'UZ01'.
EXITS-PARAM = C_EXIT_PARAM_CLASS.
EXITS-TITLE = <title>.
APPEND EXITS.and then insert the FORM for your exit:
FORM UZ01 USING BOOL_DATA TYPE GB002_015
CHANGING B_RESULT.
IF ......
B_RESULT = B_FALSE.
ELSE.
B_RESULT = B_TRUE.
ENDIF.
ENDFORM.
Max
2007 May 25 5:34 PM
that is what i am asking where will i write code in validation......
please reply
2007 May 25 5:50 PM
Hi
U should create a copy of std program RGGBR000 and insert it in the view V_T80D by sm30 for the hit GBLR
Max
2007 May 31 5:20 PM
Hi I have done same I have created copy of program RGGBR000 and inserted in view but still i cant see this prgram in ob28 .can you please send me screen shot or showing step how i can do this
here v_anln1 is assigment field in FB01.
SELECT SINGLE * FROM ANLA INTO ANLA WHERE ANLN1 = V_ANLN1.
IF SY-SUBRC NE '0'.
MESSAGE 'error in assigment' TYPE 'W'.
ENDIF.
thanks and waiting for your reply
2007 May 31 5:27 PM
2007 May 31 5:57 PM
what will be data in bool-data.how can i match assignment field in this what is code.
and I have done same but still i cant go into z series program using OB28
2007 May 31 9:20 PM
Now i am getting program but I cant see form name in exit can you tell me how can i get it .
GB002_015 its telling not define .
what should i do .
pls reply
2007 May 25 5:00 PM
It might be simpler to do this with a validation (transaction OB28).
Rob
2007 Oct 31 8:51 AM
Hi,
I have found a way to avoid the problem. Try to use FM 'POPUP_DISPLAY_MESSAGE' and then LEAVE SCREEN after the FM. Check the sample code below.
LOOP AT doc_item_tab.
IF doc_item_tab-vname = '900000'.
CALL FUNCTION 'POPUP_DISPLAY_MESSAGE'
EXPORTING
titel = 'Error'
msgid = '38'
msgty = 'E'
msgno = '000'
msgv1 = 'error'.
LEAVE SCREEN.
ENDIF.
ENDLOOP.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |