04-02-2015 9:11 AM
Hi all,
I implemented the method CHECK_BEFORE_CREATION in the badi CTS_REQUEST_CHECK to control the transport request description entered and show error message and cancel the creation if the description doesn't meet some requirements.
Now I want to create another screen for the description in order to help users enter the description by putting fields with search helps ...
So, I want to know how to achieve this and what is the best solution to do it.
Thanks in advance.
04-02-2015 9:27 AM
Did you notice that CHECK_BEFORE_CREATION has changing parameters for long text and attributes, so in your check, before raising the error message you could display your customer screen and change those parameter values, then raise error only if user doesn't correct his input?
Regards,
Raymond
04-02-2015 9:30 AM
The problem is that I can't display the screen, it's not possible to call it from within a method implementation.
04-02-2015 9:44 AM
Just create a small function group with a FM and a dynpro and call it from method, same signature than the BAdI method. In the FM call the dynpro.
Regards,
Raymond
04-02-2015 9:50 AM
Ok that seems correct. thanks for the answer.
But what do you mean by 'same signature than the BADI method' ?
04-02-2015 9:54 AM
04-02-2015 9:58 AM
You mean in the FM ? Because I'm just going to create a screen and call it in the FM, and then call the FM from the method if the description is incorrect. So, my FM wouldn't have any parameters, right ?
04-02-2015 10:09 AM
I was suggesting to pass same parameters to the FM as received by the method.
*" IMPORTING
*" REFERENCE(TRFUNCTION) TYPE TRFUNCTION
*" CHANGING
*" REFERENCE(TEXT) TYPE AS4TEXT
*" REFERENCE(ATTRIBUTES) TYPE SCTS_ATTRS
*"----------------------------------------------------------------------
* some code
CALL SCREEN 0100.
* some code
ENDFUNCTION.
(Note parameter name TYPE not allowed in FM so I renamed)
Regards,
Raymond
04-02-2015 10:18 AM