2015 Apr 11 5:29 AM
hi.
I am having one requirement
i.e
before adding the customer master.
i need to validate the authorization filed (please have a look on below attached image)
if any body enter the text like 'RSV'. I need to stop it..
My badi name is :: CUSTOMER_ADD_DATA
under this my method name is:: CHECK_ALL_DATA
i had written below code in method
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'I'.
ENDIF.
Even is firing. before adding the customer.
but i would like validate means stop that customer.
but it is firing.. and saving in data base.
i would like to stop the customer if authorization is 'RSV'.
what is the mistake i had done...
i need your valuable suggestions..
2015 Apr 11 5:54 AM
Hello,
If the BADI is getting triggered properly and checking the 'Auth' field as you mentioned in the screenshot and popping up the information - "TRIGGED BY BADI RSV-BAS".
Then to stop the customer master to be created, write "EXIT" or "LEAVE PROGRAM" after the MESSAGE.
eg: -
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'I'.
EXIT.
ENDIF.
Thanks
Hello,
If the BADI is getting triggered properly and checking the 'Auth' field as you mentioned in the screenshot and popping up the information - "TRIGGED BY BADI RSV-BAS".
Then to stop the customer master to be created, write "EXIT" or "LEAVE PROGRAM" after the MESSAGE.
eg: -
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'I'.
EXIT.
ENDIF.
Thanks
2015 Apr 11 5:54 AM
Hello,
If the BADI is getting triggered properly and checking the 'Auth' field as you mentioned in the screenshot and popping up the information - "TRIGGED BY BADI RSV-BAS".
Then to stop the customer master to be created, write "EXIT" or "LEAVE PROGRAM" after the MESSAGE.
eg: -
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'I'.
EXIT.
ENDIF.
Thanks
2015 Apr 11 5:59 AM
hi,
thanks for your reply.
i will check it and i will update to u..
2015 Apr 11 6:08 AM
hi,
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'I'.
leave program.
ENDIF.
i used leave program.
exit is not working.
now working fine..
but what i need is if i write rsv in authorization field.
program is closing. again user has to open the same code and he has to change the field.
what i am saying screen shout not be close but if the field is having rsv then it will be stop to save the data into db
is there any possibility....plz inform me...
2015 Apr 11 6:31 AM
Hello,
Try to change the message type from 'I' to 'E'.
or
"LEAVE TO SCREE 0" or if you have any screen number.
Thanks
2015 Apr 11 6:37 AM
Hi Srini,
IF S_KNB1-BEGRU = 'RSV'.
MESSAGE 'TRIGGED BY BADI RSV-BAS' TYPE 'E'.
ENDIF.
Make it an error message type.It will work.
Regards,
Kannan
2015 Apr 11 6:41 AM
Use the changing parameters of the method CHECK_ALL_DATA.
E_MSGID " Give your Z message class
E_MSGNO " Message no
E_MSGV1 " Variable if any.
E_MSGV2
E_MSGV3
E_MSGV4
2015 Apr 11 7:06 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |